summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfeditpage.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-02 10:10:49 -0700
committerLei Zhang <thestig@chromium.org>2015-10-02 10:10:49 -0700
commitcb78ef507c272488fd7e4fd6862014333d8a9de5 (patch)
treefc5ef896bc830bebd4aca2902685dfb097365115 /fpdfsdk/src/fpdfeditpage.cpp
parent6ac0d2f03c8a00fd770d2beddf57da7755d950a6 (diff)
downloadpdfium-cb78ef507c272488fd7e4fd6862014333d8a9de5.tar.xz
XFA: Remove checks for new returning NULL in fpdfsdk.
Based on parts of https://codereview.chromium.org/1089823004 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1383933003 .
Diffstat (limited to 'fpdfsdk/src/fpdfeditpage.cpp')
-rw-r--r--fpdfsdk/src/fpdfeditpage.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index e158bee7e6..145d8ca5c3 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -19,8 +19,6 @@
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
CPDF_Document* pDoc = new CPDF_Document;
- if (!pDoc)
- return NULL;
pDoc->CreateNewDoc();
time_t currentTime;
@@ -46,8 +44,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
}
CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
- CPDFXFA_Document* document = new CPDFXFA_Document(pDoc, pApp);
- return document;
+ return new CPDFXFA_Document(pDoc, pApp);
}
DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) {
@@ -89,10 +86,6 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
pPageDict->SetAt("Rotate", new CPDF_Number(0));
pPageDict->SetAt("Resources", new CPDF_Dictionary);
- // CPDF_Page* pPage = new CPDF_Page;
- // pPage->Load(pDoc,pPageDict);
- // pPage->ParseContent();
-
CPDFXFA_Page* pPage =
new CPDFXFA_Page((CPDFXFA_Document*)document, page_index);
pPage->LoadPDFPage(pPageDict);
@@ -288,7 +281,7 @@ DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object;
if (pPageObj == NULL)
return;
- // PDF_ImageObject* pImageObj = new CPDF_ImageObject;
+
CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d,
(FX_FLOAT)e, (FX_FLOAT)f);
pPageObj->Transform(matrix);