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

Unified Diff: fpdfsdk/src/fpdfppo.cpp

Issue 1540693002: Get rid of a few CPDF_Object Create() methods and just use new instead. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 5 years 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/src/fpdfeditpage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfppo.cpp
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 513ffc4adeeb5e8aad547d5fff3b9a549d4135b6..2fce7adfc43787649efa9a786e2d5177754f073e 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -43,17 +43,16 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
if (!pNewRoot)
return FALSE;
- // Set the document information////////////////////////////////////////////
-
+ // Set the document information
CPDF_Dictionary* DInfoDict = pDestPDFDoc->GetInfo();
if (!DInfoDict)
return FALSE;
CFX_ByteString producerstr;
producerstr.Format("PDFium");
- DInfoDict->SetAt("Producer", new CPDF_String(producerstr));
+ DInfoDict->SetAt("Producer", new CPDF_String(producerstr, FALSE));
- // Set type////////////////////////////////////////////////////////////////
+ // Set type
CFX_ByteString cbRootType = pNewRoot->GetString("Type", "");
if (cbRootType.Equal("")) {
pNewRoot->SetAt("Type", new CPDF_Name("Catalog"));
@@ -100,7 +99,7 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
if (!pSrcPageDict || !pCurPageDict)
return FALSE;
- // Clone the page dictionary///////////
+ // Clone the page dictionary
FX_POSITION SrcPos = pSrcPageDict->GetStartPos();
while (SrcPos) {
CFX_ByteString cbSrcKeyStr;
@@ -112,7 +111,7 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
}
}
- // inheritable item///////////////////////
+ // inheritable item
CPDF_Object* pInheritable = nullptr;
// 1 MediaBox //required
if (!pCurPageDict->KeyExist("MediaBox")) {
@@ -156,7 +155,6 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
pCurPageDict->SetAt("Rotate", pInheritable->Clone());
}
- /////////////////////////////////////////////
// Update the reference
FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum();
FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum();
« no previous file with comments | « fpdfsdk/src/fpdfeditpage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698