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

Unified Diff: fpdfsdk/src/fpdftext.cpp

Issue 1406543004: Introduce CPDFPageFromFPDFPage() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase. Created 5 years, 2 months 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/fpdfformfill.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 43edd525e8d2b9f7caff360029610383a41d9e28..800c138f3ff2cfedacb6f04d1e53535b3c8429ac 100644
--- a/fpdfsdk/src/fpdftext.cpp
+++ b/fpdfsdk/src/fpdftext.cpp
@@ -7,18 +7,19 @@
#include "../../core/include/fpdfdoc/fpdf_doc.h"
#include "../../core/include/fpdftext/fpdf_text.h"
#include "../../public/fpdf_text.h"
+#include "../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_ViewerPreferences viewRef(((CPDF_Page*)page)->m_pDocument);
- textpage =
- IPDF_TextPage::CreateTextPage((CPDF_Page*)page, viewRef.IsDirectionR2L());
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
+ if (!pPage)
+ return nullptr;
+ CPDF_ViewerPreferences viewRef(pPage->m_pDocument);
+ IPDF_TextPage* textpage =
+ IPDF_TextPage::CreateTextPage(pPage, viewRef.IsDirectionR2L());
textpage->ParseTextPage();
return textpage;
}
« no previous file with comments | « fpdfsdk/src/fpdfformfill.cpp ('k') | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698