summaryrefslogtreecommitdiff
path: root/public/fpdf_searchex.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-03-10 11:59:17 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-03-10 19:04:24 +0000
commit5c1961dfa0b1828eb2db38dc637548584c5cc704 (patch)
tree3346f34e13738c2b997e46428e255c3ded0f0ebc /public/fpdf_searchex.h
parent52c73c24ab053e839182d3cdac6cbb758ce3a196 (diff)
downloadpdfium-5c1961dfa0b1828eb2db38dc637548584c5cc704.tar.xz
Add public method FPDFText_GetTextIndexFromCharIndex
BUG=pdfium:676 Change-Id: I46de35a86769dc2f7f73ac3552306356ca3289a5 Reviewed-on: https://pdfium-review.googlesource.com/2955 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'public/fpdf_searchex.h')
-rw-r--r--public/fpdf_searchex.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/fpdf_searchex.h b/public/fpdf_searchex.h
index 7c1b31848e..a795a52394 100644
--- a/public/fpdf_searchex.h
+++ b/public/fpdf_searchex.h
@@ -23,6 +23,15 @@ extern "C" {
DLLEXPORT int STDCALL
FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex);
+// Get the text index in |text_page| internal character list.
+//
+// text_page - a text page information structure.
+// nCharIndex - index of the character in internal character list.
+//
+// Returns the index of the text returned from |FPDFText_GetText|. -1 for error.
+DLLEXPORT int STDCALL
+FPDFText_GetTextIndexFromCharIndex(FPDF_TEXTPAGE text_page, int nCharIndex);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus