summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfeditpage.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-30 12:39:54 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-30 12:39:54 -0800
commit40e9ff30b7f22b37c071dc9751f489d4cc22b0ee (patch)
tree33f50b65518fcb32bc197adc94bb0073244113e1 /fpdfsdk/src/fpdfeditpage.cpp
parentd029d934e1a23aadc07cc99753a55b308f20ef2b (diff)
downloadpdfium-40e9ff30b7f22b37c071dc9751f489d4cc22b0ee.tar.xz
Tidy PDF_ENABLE_XFA #ifdefs in fpdfsdk.
-- label matching #endifs -- prefer #ifdef over #ifndef -- consolidate some blocks. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1484843002 .
Diffstat (limited to 'fpdfsdk/src/fpdfeditpage.cpp')
-rw-r--r--fpdfsdk/src/fpdfeditpage.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index 75ed27ced9..aff74d1601 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -6,13 +6,14 @@
#include "public/fpdf_edit.h"
+#include "fpdfsdk/include/fsdk_define.h"
+#include "public/fpdf_formfill.h"
+
#ifdef PDF_ENABLE_XFA
#include "../include/fpdfxfa/fpdfxfa_app.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
#include "../include/fpdfxfa/fpdfxfa_page.h"
-#endif
-#include "fpdfsdk/include/fsdk_define.h"
-#include "public/fpdf_formfill.h"
+#endif // PDF_ENABLE_XFA
#if _FX_OS_ == _FX_ANDROID_
#include "time.h"
@@ -83,15 +84,15 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
pPageDict->SetAt("Rotate", new CPDF_Number(0));
pPageDict->SetAt("Resources", new CPDF_Dictionary);
-#ifndef PDF_ENABLE_XFA
- CPDF_Page* pPage = new CPDF_Page;
- pPage->Load(pDoc, pPageDict);
- pPage->ParseContent();
-#else
+#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* pPage =
new CPDFXFA_Page((CPDFXFA_Document*)document, page_index);
pPage->LoadPDFPage(pPageDict);
-#endif
+#else // PDF_ENABLE_XFA
+ CPDF_Page* pPage = new CPDF_Page;
+ pPage->Load(pDoc, pPageDict);
+ pPage->ParseContent();
+#endif // PDF_ENABLE_XFA
return pPage;
}