summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_ap.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-18 17:05:11 -0800
committerLei Zhang <thestig@chromium.org>2015-12-18 17:05:11 -0800
commit4880d1a168729d42be736293fb93b514802e4f12 (patch)
tree9cfe5aa73113301487dce8bcef5139fb7295536a /core/src/fpdfdoc/doc_ap.cpp
parentaedd4555ec1a80121f176586cb72180337e4ccd8 (diff)
downloadpdfium-4880d1a168729d42be736293fb93b514802e4f12.tar.xz
Merge to XFA: 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 . (cherry picked from commit d866ab0b44a571c884fdd8ba5a5319adaf607559) Review URL: https://codereview.chromium.org/1541563002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_ap.cpp')
-rw-r--r--core/src/fpdfdoc/doc_ap.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp
index 0efaa8caa5..d0adc06691 100644
--- a/core/src/fpdfdoc/doc_ap.cpp
+++ b/core/src/fpdfdoc/doc_ap.cpp
@@ -311,10 +311,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
return FALSE;
}
if (!pFontDict) {
- pFontDict = CPDF_Dictionary::Create();
- if (!pFontDict) {
- return FALSE;
- }
+ pFontDict = new CPDF_Dictionary;
pFontDict->SetAtName("Type", "Font");
pFontDict->SetAtName("Subtype", "Type1");
pFontDict->SetAtName("BaseFont", "Helvetica");
@@ -419,7 +416,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
rcBody.Normalize();
CPDF_Dictionary* pAPDict = pAnnotDict->GetDict("AP");
if (!pAPDict) {
- pAPDict = CPDF_Dictionary::Create();
+ pAPDict = new CPDF_Dictionary;
pAnnotDict->SetAt("AP", pAPDict);
}
CPDF_Stream* pNormalStream = pAPDict->GetStream("N");
@@ -436,10 +433,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
if (pStreamResList) {
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font");
if (!pStreamResFontList) {
- pStreamResFontList = CPDF_Dictionary::Create();
- if (!pStreamResFontList) {
- return FALSE;
- }
+ pStreamResFontList = new CPDF_Dictionary;
pStreamResList->SetAt("Font", pStreamResFontList);
}
if (!pStreamResFontList->KeyExist(sFontName)) {
@@ -684,10 +678,7 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
if (pStreamResList) {
CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font");
if (!pStreamResFontList) {
- pStreamResFontList = CPDF_Dictionary::Create();
- if (!pStreamResFontList) {
- return FALSE;
- }
+ pStreamResFontList = new CPDF_Dictionary;
pStreamResList->SetAt("Font", pStreamResFontList);
}
if (!pStreamResFontList->KeyExist(sFontName)) {