diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-01-06 21:05:04 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-01-07 09:05:30 +0100 |
commit | 6bb6eb1692d7dd432103d0e7278534390084caf6 (patch) | |
tree | b6bac260197e27085d2ec3f26a49fa2f90dbdeb9 /include/vcl | |
parent | 85b400482dee5c9da2cf83a755ec37ab149b5b20 (diff) |
pdfium: rework to eliminate FPDF_ANNOTATION from the public interface
Change-Id: Ib11213f0307cd215b71e3da08468be6e82e2eb55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108914
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 3509c1d77d5a..e32466b9bf13 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -86,36 +86,27 @@ public: virtual PDFBitmapType getFormat() = 0; }; -class VCL_DLLPUBLIC PDFiumAnnotation final +class VCL_DLLPUBLIC PDFiumAnnotation { -private: - FPDF_ANNOTATION mpAnnotation; - - PDFiumAnnotation(const PDFiumAnnotation&) = delete; - PDFiumAnnotation& operator=(const PDFiumAnnotation&) = delete; - public: - PDFiumAnnotation(FPDF_ANNOTATION pAnnotation); - ~PDFiumAnnotation(); - FPDF_ANNOTATION getPointer() { return mpAnnotation; } - - PDFAnnotationSubType getSubType(); - basegfx::B2DRectangle getRectangle(); - bool hasKey(OString const& rKey); - PDFObjectType getValueType(OString const& rKey); - OUString getString(OString const& rKey); - std::unique_ptr<PDFiumAnnotation> getLinked(OString const& rKey); - int getObjectCount(); - std::unique_ptr<PDFiumPageObject> getObject(int nIndex); - std::vector<std::vector<basegfx::B2DPoint>> getInkStrokes(); - std::vector<basegfx::B2DPoint> getVertices(); - Color getColor(); - Color getInteriorColor(); - float getBorderWidth(); - basegfx::B2DSize getBorderCornerRadius(); - size_t getAttachmentPointsCount(); - std::vector<basegfx::B2DPoint> getAttachmentPoints(size_t nIndex); - std::vector<basegfx::B2DPoint> getLineGeometry(); + virtual ~PDFiumAnnotation() = default; + virtual PDFAnnotationSubType getSubType() = 0; + virtual basegfx::B2DRectangle getRectangle() = 0; + virtual bool hasKey(OString const& rKey) = 0; + virtual PDFObjectType getValueType(OString const& rKey) = 0; + virtual OUString getString(OString const& rKey) = 0; + virtual std::unique_ptr<PDFiumAnnotation> getLinked(OString const& rKey) = 0; + virtual int getObjectCount() = 0; + virtual std::unique_ptr<PDFiumPageObject> getObject(int nIndex) = 0; + virtual std::vector<std::vector<basegfx::B2DPoint>> getInkStrokes() = 0; + virtual std::vector<basegfx::B2DPoint> getVertices() = 0; + virtual Color getColor() = 0; + virtual Color getInteriorColor() = 0; + virtual float getBorderWidth() = 0; + virtual basegfx::B2DSize getBorderCornerRadius() = 0; + virtual size_t getAttachmentPointsCount() = 0; + virtual std::vector<basegfx::B2DPoint> getAttachmentPoints(size_t nIndex) = 0; + virtual std::vector<basegfx::B2DPoint> getLineGeometry() = 0; }; class PDFiumTextPage; |