diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-15 16:17:18 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-15 16:17:18 -0700 |
commit | 471a1034e70ddcfc93ce2a93b28a8385109e83de (patch) | |
tree | c845fb1b73b936023be1fc2e7699ff4768aec652 /fpdfsdk/src/fpdf_ext.cpp | |
parent | dfbf8e7ba55695c4e6cb30eadbe9c6a2955815ba (diff) | |
download | pdfium-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.cpp | 6 |
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; |