Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: fpdfsdk/src/fpdftext.cpp

Issue 1472363003: XFA: More underlying types (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Missing include Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfsave.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdftext.cpp
diff --git a/fpdfsdk/src/fpdftext.cpp b/fpdfsdk/src/fpdftext.cpp
index 7675dada6184fba59dc70bf7dcdcb003eebe0b76..ac4e01e2bc5e52c6db8179bd6fd44eeb687a4a1a 100644
--- a/fpdfsdk/src/fpdftext.cpp
+++ b/fpdfsdk/src/fpdftext.cpp
@@ -10,22 +10,21 @@
#include "../include/fpdfxfa/fpdfxfa_page.h"
#include "core/include/fpdfdoc/fpdf_doc.h"
#include "core/include/fpdftext/fpdf_text.h"
+#include "fpdfsdk/include/fsdk_define.h"
#ifdef _WIN32
#include <tchar.h>
#endif
DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page) {
- if (!page)
- return NULL;
- IPDF_TextPage* textpage = NULL;
+ CPDF_Page* pPDFPage = CPDFPageFromFPDFPage(page);
+ if (!pPDFPage)
+ return nullptr;
CPDFXFA_Page* pPage = (CPDFXFA_Page*)page;
- if (!pPage->GetPDFPage())
- return NULL;
CPDFXFA_Document* pDoc = pPage->GetDocument();
CPDF_ViewerPreferences viewRef(pDoc->GetPDFDoc());
- textpage = IPDF_TextPage::CreateTextPage((CPDF_Page*)pPage->GetPDFPage(),
- viewRef.IsDirectionR2L());
+ IPDF_TextPage* textpage =
+ IPDF_TextPage::CreateTextPage(pPDFPage, viewRef.IsDirectionR2L());
textpage->ParseTextPage();
return textpage;
}
« no previous file with comments | « fpdfsdk/src/fpdfsave.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698