summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-06-11 18:19:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-11 18:19:57 +0000
commitfb72726e51bfd0c7bfc61c9b354e2b60f46adac5 (patch)
treeb2a763c74a07b081a4b176c18c42569e377d6fc8 /fpdfsdk/pwl
parent5e873f5ce8e407c97e966b9708d2560e908112d3 (diff)
downloadpdfium-fb72726e51bfd0c7bfc61c9b354e2b60f46adac5.tar.xz
Implement CPDF_Object::MakeReference method.chromium/3456
Change-Id: I153747ef587a184eaef58ff09dbf8f214c9ddfb3 Reviewed-on: https://pdfium-review.googlesource.com/17230 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'fpdfsdk/pwl')
-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();