summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_appstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pwl/cpwl_appstream.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp
index cbe6501a32..01ef48a298 100644
--- a/fpdfsdk/pwl/cpwl_appstream.cpp
+++ b/fpdfsdk/pwl/cpwl_appstream.cpp
@@ -1910,9 +1910,8 @@ void CPWL_AppStream::AddImage(const ByteString& sAPType, CPDF_Stream* pImage) {
CPDF_Dictionary* pXObject =
pStreamResList->SetNewFor<CPDF_Dictionary>("XObject");
- pXObject->SetNewFor<CPDF_Reference>(sImageAlias,
- widget_->GetPageView()->GetPDFDocument(),
- pImage->GetObjNum());
+ pXObject->SetFor(sImageAlias, pImage->MakeReference(
+ widget_->GetPageView()->GetPDFDocument()));
}
void CPWL_AppStream::Write(const ByteString& sAPType,
@@ -1935,7 +1934,7 @@ void CPWL_AppStream::Write(const ByteString& sAPType,
if (!pStream) {
CPDF_Document* doc = widget_->GetPageView()->GetPDFDocument();
pStream = doc->NewIndirect<CPDF_Stream>();
- pParentDict->SetNewFor<CPDF_Reference>(sAPType, doc, pStream->GetObjNum());
+ pParentDict->SetFor(sAPType, pStream->MakeReference(doc));
}
CPDF_Dictionary* pStreamDict = pStream->GetDict();