diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-17 21:08:25 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-18 09:12:55 +0100 |
commit | 17388045d0b2191a7af7245b286e153e30fa0f3e (patch) | |
tree | 5a7172b9d82dc93960608bd2a4eaf554e10942e3 /include | |
parent | 1491b0003a03064a3cec30fc71c35d46eb6970b2 (diff) |
pdfium: eliminate FPDF_PAGE from public header
Change-Id: I8cfe55b4b23441f7b5c3b748903137a145cc00bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111085
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 1c60e52d5f09..7bf14eb910dc 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -177,48 +177,30 @@ public: virtual basegfx::B2DRectangle getCharBox(int nIndex, double fPageHeight) = 0; }; -class VCL_DLLPUBLIC PDFiumPage final +class VCL_DLLPUBLIC PDFiumPage { -private: - FPDF_PAGE mpPage; - -private: - PDFiumPage(const PDFiumPage&) = delete; - PDFiumPage& operator=(const PDFiumPage&) = delete; - public: - PDFiumPage(FPDF_PAGE pPage) - : mpPage(pPage) - { - } + virtual ~PDFiumPage() = default; - ~PDFiumPage() - { - if (mpPage) - FPDF_ClosePage(mpPage); - } - - FPDF_PAGE getPointer() { return mpPage; } - - int getObjectCount(); - std::unique_ptr<PDFiumPageObject> getObject(int nIndex); + virtual int getObjectCount() = 0; + virtual std::unique_ptr<PDFiumPageObject> getObject(int nIndex) = 0; - int getAnnotationCount(); - int getAnnotationIndex(std::unique_ptr<PDFiumAnnotation> const& rAnnotation); + virtual int getAnnotationCount() = 0; + virtual int getAnnotationIndex(std::unique_ptr<PDFiumAnnotation> const& rAnnotation) = 0; - std::unique_ptr<PDFiumAnnotation> getAnnotation(int nIndex); + virtual std::unique_ptr<PDFiumAnnotation> getAnnotation(int nIndex) = 0; - std::unique_ptr<PDFiumTextPage> getTextPage(); + virtual std::unique_ptr<PDFiumTextPage> getTextPage() = 0; /// Get bitmap checksum of the page, without annotations/commenting. - BitmapChecksum getChecksum(int nMDPPerm); + virtual BitmapChecksum getChecksum(int nMDPPerm) = 0; - double getWidth(); - double getHeight(); + virtual double getWidth() = 0; + virtual double getHeight() = 0; - bool hasTransparency(); + virtual bool hasTransparency() = 0; - bool hasLinks(); + virtual bool hasLinks() = 0; }; /// Represents one digital signature, as exposed by PDFium. |