From ca02733961f84abd562d59e4b6a83018ef41b143 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 25 May 2018 23:37:50 +0000 Subject: Replace some #ifdefs PDF_ENABLE_XFA, part 2. Tidy some code encountered along the way in cpdfsdk_helpers.cpp Remove one ifdef from xfa-only file. Restore some option flag processing (probably wrong to remove). Flip some #ifndef to #ifdef (#ifndef PDF_ENABLE_XFA is an anti-pattern and should be treated with suspicion since XFA should always be "additive"). Change-Id: I564a28401e20e6269c85ea610da8c96f8c8dd737 Reviewed-on: https://pdfium-review.googlesource.com/32834 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fpdfsdk/fpdf_text.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'fpdfsdk/fpdf_text.cpp') diff --git a/fpdfsdk/fpdf_text.cpp b/fpdfsdk/fpdf_text.cpp index a1bbbb4a7a..d8d3b2675b 100644 --- a/fpdfsdk/fpdf_text.cpp +++ b/fpdfsdk/fpdf_text.cpp @@ -40,14 +40,7 @@ FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage(FPDF_PAGE page) { if (!pPDFPage) return nullptr; -#ifdef PDF_ENABLE_XFA - CPDFXFA_Page* pPage = UnderlyingFromFPDFPage(page); - auto* pContext = static_cast(pPage->GetDocumentExtension()); - CPDF_ViewerPreferences viewRef(pContext->GetPDFDoc()); -#else // PDF_ENABLE_XFA CPDF_ViewerPreferences viewRef(pPDFPage->GetDocument()); -#endif // PDF_ENABLE_XFA - CPDF_TextPage* textpage = new CPDF_TextPage( pPDFPage, viewRef.IsDirectionR2L() ? FPDFText_Direction::Right : FPDFText_Direction::Left); -- cgit v1.2.3