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

Unified Diff: fpdfsdk/src/fpdfeditpage.cpp

Issue 1383933003: XFA: Remove checks for new returning NULL in fpdfsdk. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 2 months 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/fpdf_flatten.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfeditpage.cpp
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index e158bee7e6b961a8bd29964335d0fce9b59ea9ee..145d8ca5c3a6a2199b6c517f53c7e6d753ff2f4b 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);
« no previous file with comments | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698