Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: fpdfsdk/cpdfsdk_widget.cpp

Issue 2361713002: Remove some objnum locals with AddIndirectObject (Closed)
Patch Set: Same treatment for arrays Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/cpdfsdk_baannot.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/cpdfsdk_widget.cpp
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index d4fc5c790022acc04fb23fa21deb8f5ee9b45d76..cc2a7670398bf27f3c863233fef263f75bb6b585 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -1835,11 +1835,9 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
pStreamDict->SetFor("Resources", pStreamResList);
}
- if (pStreamResList) {
- CPDF_Dictionary* pXObject = new CPDF_Dictionary;
- pXObject->SetReferenceFor(sImageAlias, pDoc, pImage);
- pStreamResList->SetFor("XObject", pXObject);
- }
+ CPDF_Dictionary* pXObject = new CPDF_Dictionary;
+ pXObject->SetReferenceFor(sImageAlias, pDoc, pImage->GetObjNum());
+ pStreamResList->SetFor("XObject", pXObject);
}
void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) {
« no previous file with comments | « fpdfsdk/cpdfsdk_baannot.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698