diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-18 16:26:45 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-18 16:26:45 -0800 |
commit | d866ab0b44a571c884fdd8ba5a5319adaf607559 (patch) | |
tree | ce18ed89550cf563dbdf2e421f8ff08bc6526f27 /fpdfsdk/src/fpdfppo.cpp | |
parent | 20c8a9a66ea710b96493c9048fb65753e68b48fc (diff) | |
download | pdfium-d866ab0b44a571c884fdd8ba5a5319adaf607559.tar.xz |
Get rid of a few CPDF_Object Create() methods and just use new instead.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1540693002 .
Diffstat (limited to 'fpdfsdk/src/fpdfppo.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfppo.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp index 513ffc4ade..2fce7adfc4 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(); |