summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_flatten.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-16 14:00:21 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-16 14:00:21 -0700
commitdb0be96179f0cd5f1787564cbccf86320a4d54ae (patch)
tree447ba797f172bfffa2d21dacc7dbf6fb2900bfd7 /fpdfsdk/src/fpdf_flatten.cpp
parentcebdda5a686251087f14e8df19b7f988dfae46de (diff)
downloadpdfium-db0be96179f0cd5f1787564cbccf86320a4d54ae.tar.xz
Merge to XFA: Introduce CPDFPageFromFPFDPage()
Original Review URL: https://codereview.chromium.org/1406543004 . (cherry picked from commit 943ea142b6a7e6edc91fe3c307013129e6eb0ef3) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1411623002 .
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 73410b6c39..9d5a0d4067 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -312,14 +312,11 @@ void GetOffset(FX_FLOAT& fa,
}
DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!page) {
return FLATTEN_FAIL;
}
- CPDF_Page* pPage = ((CPDFXFA_Page*)(page))->GetPDFPage();
- if (!pPage)
- return FLATTEN_FAIL;
-
CPDF_Document* pDocument = pPage->m_pDocument;
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;