diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-09-29 11:42:20 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-10-04 08:38:41 +0200 |
commit | d30d41b36118ccfa473fab1e82c94c016e3a3f21 (patch) | |
tree | cd98bbb7f67c031fbb477e61648b600369b0e95c /vcl | |
parent | f266feaebea39668392e3a3830e20e4670344658 (diff) |
pdfium: add getObject, getValueType for PDFiumAnnotation
Change-Id: Iadfd767463a57958f5ffb2dc5c8b5387b59373fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103883
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index f25ff480f7d4..136a40786112 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -432,6 +432,11 @@ bool PDFiumAnnotation::hasKey(OString const& rKey) return FPDFAnnot_HasKey(mpAnnotation, rKey.getStr()); } +int PDFiumAnnotation::getValueType(OString const& rKey) +{ + return FPDFAnnot_GetValueType(mpAnnotation, rKey.getStr()); +} + OUString PDFiumAnnotation::getString(OString const& rKey) { OUString rString; @@ -473,6 +478,17 @@ std::unique_ptr<PDFiumAnnotation> PDFiumAnnotation::getLinked(OString const& rKe int PDFiumAnnotation::getObjectCount() { return FPDFAnnot_GetObjectCount(mpAnnotation); } +std::unique_ptr<PDFiumPageObject> PDFiumAnnotation::getObject(int nIndex) +{ + std::unique_ptr<PDFiumPageObject> pPDFiumPageObject; + FPDF_PAGEOBJECT pPageObject = FPDFAnnot_GetObject(mpAnnotation, nIndex); + if (pPageObject) + { + pPDFiumPageObject = std::make_unique<PDFiumPageObject>(pPageObject); + } + return pPDFiumPageObject; +} + PDFiumTextPage::PDFiumTextPage(FPDF_TEXTPAGE pTextPage) : mpTextPage(pTextPage) { |