summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-11 20:40:26 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-12 09:06:03 +0100
commit7ff14c0f79d8400ec2fe29350b0d9bc0cd51f957 (patch)
tree25721bd5fb8fe48e5088eae7481a9707938768b8 /include
parentcc92f065563e471463d11aa9b8f0445b3588f450 (diff)
pdfium: eliminate FPDF_TEXTPAGE from the public header
All usage goes via the PDFiumTextPage interface now. Change-Id: Ied9d7fc9e1cf91b6a2feca63264993fd77348bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110792 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/filter/PDFiumLibrary.hxx23
1 files changed, 7 insertions, 16 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx
index 5908f01e4ab0..eea1be960291 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -161,27 +161,18 @@ public:
virtual int getSearchCount() = 0;
};
-class VCL_DLLPUBLIC PDFiumTextPage final
+class VCL_DLLPUBLIC PDFiumTextPage
{
-private:
- FPDF_TEXTPAGE mpTextPage;
-
- PDFiumTextPage(const PDFiumTextPage&) = delete;
- PDFiumTextPage& operator=(const PDFiumTextPage&) = delete;
-
public:
- PDFiumTextPage(FPDF_TEXTPAGE pTextPage);
- ~PDFiumTextPage();
-
- FPDF_TEXTPAGE getPointer() { return mpTextPage; }
+ virtual ~PDFiumTextPage() = default;
- int countChars();
- unsigned int getUnicode(int index);
- std::unique_ptr<PDFiumSearchHandle> findStart(const OUString& rFindWhat, PDFFindFlags nFlags,
- sal_Int32 nStartIndex);
+ virtual int countChars() = 0;
+ virtual unsigned int getUnicode(int index) = 0;
+ virtual std::unique_ptr<PDFiumSearchHandle>
+ findStart(const OUString& rFindWhat, PDFFindFlags nFlags, sal_Int32 nStartIndex) = 0;
/// Returned rect is no longer upside down and is in mm100.
- basegfx::B2DRectangle getCharBox(int nIndex, double fPageHeight);
+ virtual basegfx::B2DRectangle getCharBox(int nIndex, double fPageHeight) = 0;
};
class VCL_DLLPUBLIC PDFiumPage final