diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-02 21:09:53 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-03 09:26:54 +0100 |
commit | 76f878e299796db2bf3f31b2519a87e6ca232609 (patch) | |
tree | 3144f737012e5586e0f960c0f37c3e6b53466727 /vcl/source/pdf | |
parent | 14d064cee7b76e8a2a2201d4da423336f68fe624 (diff) |
pdfium: add a FPDFText_FindStart() wrapper
Change-Id: I0bf77c116ab83ea557467da7f0c780d92db6a60e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110333
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source/pdf')
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index fce8d4d539bd..c1571682f4b3 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -1100,6 +1100,14 @@ unsigned int PDFiumTextPage::getUnicode(int index) return FPDFText_GetUnicode(mpTextPage, index); } +std::unique_ptr<PDFiumSearchHandle> +PDFiumTextPage::findStart(const OUString& rFindWhat, sal_uInt64 nFlags, sal_Int32 nStartIndex) +{ + FPDF_WIDESTRING pFindWhat = reinterpret_cast<FPDF_WIDESTRING>(rFindWhat.getStr()); + return std::make_unique<vcl::pdf::PDFiumSearchHandle>( + FPDFText_FindStart(mpTextPage, pFindWhat, nFlags, nStartIndex)); +} + PDFiumSearchHandle::PDFiumSearchHandle(FPDF_SCHHANDLE pSearchHandle) : mpSearchHandle(pSearchHandle) { |