summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_view.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-04 18:07:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 18:07:47 +0000
commit168c763539e70bea450701470c47a8991f578336 (patch)
tree61e053e549e5477919bcef5a39f79d74a666fcca /fpdfsdk/fpdf_view.cpp
parent2491990f50f8ea48a509eb0ccc0193b4c1a3f776 (diff)
downloadpdfium-168c763539e70bea450701470c47a8991f578336.tar.xz
Revert "Make common page base class for XFA and non-XFA."
This reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8. Reason for revert: blocking previous revert Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063 Reviewed-on: https://pdfium-review.googlesource.com/33713 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_view.cpp')
-rw-r--r--fpdfsdk/fpdf_view.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index d5c2a7e3dd..e38c651cbe 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -351,7 +351,7 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document,
#ifdef PDF_ENABLE_XFA
auto* pContext = static_cast<CPDFXFA_Context*>(pDoc->GetExtension());
if (pContext)
- return FPDFPageFromIPDFPage(pContext->GetXFAPage(page_index).Leak());
+ return FPDFPageFromUnderlying(pContext->GetXFAPage(page_index).Leak());
// Eventually, fallthrough into non-xfa case once page type made consistent.
return nullptr;
@@ -361,17 +361,17 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document,
return nullptr;
RetainPtr<CPDF_Page> pPage = pDoc->GetOrCreatePDFPage(pDict);
- return FPDFPageFromIPDFPage(pPage.Leak());
+ return FPDFPageFromUnderlying(pPage.Leak());
#endif // PDF_ENABLE_XFA
}
FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageWidth(FPDF_PAGE page) {
- IPDF_Page* pPage = IPDFPageFromFPDFPage(page);
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
return pPage ? pPage->GetPageWidth() : 0.0;
}
FPDF_EXPORT double FPDF_CALLCONV FPDF_GetPageHeight(FPDF_PAGE page) {
- IPDF_Page* pPage = IPDFPageFromFPDFPage(page);
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
return pPage ? pPage->GetPageHeight() : 0.0;
}
@@ -731,12 +731,12 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_ClosePage(FPDF_PAGE page) {
return;
// Take it back across the API and hold for duration of this function.
- RetainPtr<IPDF_Page> pPage;
- pPage.Unleak(IPDFPageFromFPDFPage(page));
+ RetainPtr<UnderlyingPageType> pPage;
+ pPage.Unleak(UnderlyingFromFPDFPage(page));
#ifndef PDF_ENABLE_XFA
CPDFSDK_PageView* pPageView =
- static_cast<CPDFSDK_PageView*>(pPage->AsPDFPage()->GetView());
+ static_cast<CPDFSDK_PageView*>(pPage->GetView());
if (!pPageView || pPageView->IsBeingDestroyed())
return;
@@ -774,7 +774,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_DeviceToPage(FPDF_PAGE page,
if (!page || !page_x || !page_y)
return false;
- IPDF_Page* pPage = IPDFPageFromFPDFPage(page);
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
const FX_RECT rect(start_x, start_y, start_x + size_x, start_y + size_y);
Optional<CFX_PointF> pos =
pPage->DeviceToPage(rect, rotate, CFX_PointF(device_x, device_y));
@@ -799,7 +799,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_PageToDevice(FPDF_PAGE page,
if (!page || !device_x || !device_y)
return false;
- IPDF_Page* pPage = IPDFPageFromFPDFPage(page);
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
const FX_RECT rect(start_x, start_y, start_x + size_x, start_y + size_y);
CFX_PointF page_point(static_cast<float>(page_x), static_cast<float>(page_y));
Optional<CFX_PointF> pos = pPage->PageToDevice(rect, rotate, page_point);