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

Unified Diff: core/src/fpdfdoc/doc_utils.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 | « core/src/fpdfdoc/doc_formfield.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_utils.cpp
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index b0705ea556ed5a0e45f4b845f61f87385fd8aa80..01a7470ef0cbcc5bdeabc6fc5337af348458c1c6 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -228,7 +228,7 @@ void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Document* pDocument) {
return;
}
if (!pFormDict) {
- pFormDict = CPDF_Dictionary::Create();
+ pFormDict = new CPDF_Dictionary;
FX_DWORD dwObjNum = pDocument->AddIndirectObject(pFormDict);
CPDF_Dictionary* pRoot = pDocument->GetRoot();
pRoot->SetAtReference("AcroForm", pDocument, dwObjNum);
@@ -560,12 +560,12 @@ void AddInterFormFont(CPDF_Dictionary*& pFormDict,
}
CPDF_Dictionary* pDR = pFormDict->GetDict("DR");
if (!pDR) {
- pDR = CPDF_Dictionary::Create();
+ pDR = new CPDF_Dictionary;
pFormDict->SetAt("DR", pDR);
}
CPDF_Dictionary* pFonts = pDR->GetDict("Font");
if (!pFonts) {
- pFonts = CPDF_Dictionary::Create();
+ pFonts = new CPDF_Dictionary;
pDR->SetAt("Font", pFonts);
}
if (csNameTag.IsEmpty()) {
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698