diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-24 13:33:57 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-24 13:33:57 -0800 |
commit | 540c436dc8e7d7b700b448acc8536f5cf68d4b74 (patch) | |
tree | bff6a2297a280b39753d93b64ec61d6c9459b50a /fpdfsdk/src/fpdfview.cpp | |
parent | ed19d211f96f47e06dc1b597c5a054e17d7e160d (diff) | |
download | pdfium-540c436dc8e7d7b700b448acc8536f5cf68d4b74.tar.xz |
XFA: more underlying type changes to match master
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1474663004 .
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfview.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index 7e568062f0..1ff1004880 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -873,8 +873,8 @@ DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, int page_index, double* width, double* height) { - CPDFXFA_Document* pDoc = (CPDFXFA_Document*)document; - if (pDoc == NULL) + UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document); + if (!pDoc) return FALSE; int count = pDoc->GetPageCount(); @@ -1021,13 +1021,17 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, long* buflen) { if (!buffer) *buflen = 0; - if (!document || index < 0) - return NULL; + + if (index < 0) + return nullptr; CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); + if (!pDoc) + return nullptr; + CPDF_Dictionary* pRoot = pDoc->GetRoot(); if (!pRoot) - return NULL; + return nullptr; CPDF_Object* pDestObj = NULL; CFX_ByteString bsName; |