summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_searchex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_searchex.cpp')
-rw-r--r--fpdfsdk/fpdf_searchex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_searchex.cpp b/fpdfsdk/fpdf_searchex.cpp
index 9d48cebf8a..dbc2d2abcd 100644
--- a/fpdfsdk/fpdf_searchex.cpp
+++ b/fpdfsdk/fpdf_searchex.cpp
@@ -7,19 +7,20 @@
#include "public/fpdf_searchex.h"
#include "core/fpdftext/cpdf_textpage.h"
+#include "fpdfsdk/cpdfsdk_helpers.h"
FPDF_EXPORT int FPDF_CALLCONV
FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex) {
if (!text_page)
return -1;
- return static_cast<CPDF_TextPage*>(text_page)
- ->CharIndexFromTextIndex(nTextIndex);
+ return CPDFTextPageFromFPDFTextPage(text_page)->CharIndexFromTextIndex(
+ nTextIndex);
}
FPDF_EXPORT int FPDF_CALLCONV
FPDFText_GetTextIndexFromCharIndex(FPDF_TEXTPAGE text_page, int nCharIndex) {
if (!text_page)
return -1;
- return static_cast<CPDF_TextPage*>(text_page)->TextIndexFromCharIndex(
+ return CPDFTextPageFromFPDFTextPage(text_page)->TextIndexFromCharIndex(
nCharIndex);
}