summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_text.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-03 13:53:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-03 13:53:02 +0000
commitccd9421589922b8f35ee5330d7fdac7edea081db (patch)
treebc1628d831ac02ce5fd98ca859d9f0f9f9f5c23b /fpdfsdk/fpdf_text.cpp
parent241071b455e8922caa787c821563d1bd2587a4c5 (diff)
downloadpdfium-ccd9421589922b8f35ee5330d7fdac7edea081db.tar.xz
Add CPDF_Page::Extension::GetDocExtension()
In turn, add CPDF_Document::Extension::GetPDFDoc() so that we can use the abstract return type in more places. Mark an internal-only cpdfxfa_context method as private while we're at it. Change-Id: I08e64f4b9438bf2f731c3a37cf2a41152bbbd8fa Reviewed-on: https://pdfium-review.googlesource.com/31916 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_text.cpp')
-rw-r--r--fpdfsdk/fpdf_text.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/fpdf_text.cpp b/fpdfsdk/fpdf_text.cpp
index dade84a005..c06885a1a7 100644
--- a/fpdfsdk/fpdf_text.cpp
+++ b/fpdfsdk/fpdf_text.cpp
@@ -52,7 +52,7 @@ FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page) {
#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* pPage = UnderlyingFromFPDFPage(page);
- CPDFXFA_Context* pContext = pPage->GetContext();
+ auto* pContext = static_cast<CPDFXFA_Context*>(pPage->GetDocumentExtension());
CPDF_ViewerPreferences viewRef(pContext->GetPDFDoc());
#else // PDF_ENABLE_XFA
CPDF_ViewerPreferences viewRef(pPDFPage->m_pDocument.Get());