summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_ext.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-15 16:17:18 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-15 16:17:18 -0700
commit471a1034e70ddcfc93ce2a93b28a8385109e83de (patch)
treec845fb1b73b936023be1fc2e7699ff4768aec652 /fpdfsdk/src/fpdf_ext.cpp
parentdfbf8e7ba55695c4e6cb30eadbe9c6a2955815ba (diff)
downloadpdfium-471a1034e70ddcfc93ce2a93b28a8385109e83de.tar.xz
Merge to XFA: Introduce CPDF_DocumentFromFPDFDocument().
Manual merges everywhere. Original Review URL: https://codereview.chromium.org/1395493007 . (cherry picked from commit bb51c4fb6bc6095984c303c95e5336f83e66bc67) Original Review URL: https://codereview.chromium.org/1396283006 . (cherry picked from commit 86adb658843658969041a13bf6cf0cc950ffe8ed) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1395353004 .
Diffstat (limited to 'fpdfsdk/src/fpdf_ext.cpp')
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index f68a45f119..196ac99967 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -177,11 +177,11 @@ void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) {
}
DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
- if (!document)
+ CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
+ if (!pDoc)
return PAGEMODE_UNKNOWN;
- CPDF_Dictionary* pRoot =
- (((CPDFXFA_Document*)document)->GetPDFDoc())->GetRoot();
+ CPDF_Dictionary* pRoot = pDoc->GetRoot();
if (!pRoot)
return PAGEMODE_UNKNOWN;