diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-10-05 21:44:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-06 10:16:35 +0200 |
commit | d0b2f5f65e80a4262425bb87d5716d7b4341dfea (patch) | |
tree | 06454afb84511a05b2bf6a40b465f04982061244 /vcl/source/pdf | |
parent | f8983580f67b06461b23fa34dd1bfdefbb33012a (diff) |
pdfium: drop not needed annot.patch.1
If FORM_OnAfterLoadPage() is called, then FPDFAnnot_GetFontSize() can do
what we need.
Change-Id: I8aa3acbbda5c040f30b28db36f8b3332115b50e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140997
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source/pdf')
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index 68bae2d78d80..3e247b7772eb 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -250,7 +250,7 @@ public: std::vector<basegfx::B2DPoint> getAttachmentPoints(size_t nIndex) override; std::vector<basegfx::B2DPoint> getLineGeometry() override; PDFFormFieldType getFormFieldType(PDFiumDocument* pDoc) override; - float getFormFontSize(PDFiumDocument* pDoc) override; + float getFontSize(PDFiumDocument* pDoc) override; OUString getFormFieldAlternateName(PDFiumDocument* pDoc) override; int getFormFieldFlags(PDFiumDocument* pDoc) override; }; @@ -388,6 +388,8 @@ public: bool hasTransparency() override; bool hasLinks() override; + + void onAfterLoadPage(PDFiumDocument* pDoc) override; }; /// Wrapper around FPDF_FORMHANDLE. @@ -756,6 +758,12 @@ bool PDFiumPageImpl::hasLinks() return FPDFLink_Enumerate(mpPage, &nStartPos, &pLinkAnnot); } +void PDFiumPageImpl::onAfterLoadPage(PDFiumDocument* pDoc) +{ + auto pDocImpl = static_cast<PDFiumDocumentImpl*>(pDoc); + FORM_OnAfterLoadPage(mpPage, pDocImpl->getFormHandlePointer()); +} + PDFiumPageObjectImpl::PDFiumPageObjectImpl(FPDF_PAGEOBJECT pPageObject) : mpPageObject(pPageObject) { @@ -1144,11 +1152,11 @@ int PDFiumAnnotationImpl::getFormFieldFlags(PDFiumDocument* pDoc) return FPDFAnnot_GetFormFieldFlags(pDocImpl->getFormHandlePointer(), mpAnnotation); } -float PDFiumAnnotationImpl::getFormFontSize(PDFiumDocument* pDoc) +float PDFiumAnnotationImpl::getFontSize(PDFiumDocument* pDoc) { auto pDocImpl = static_cast<PDFiumDocumentImpl*>(pDoc); float fRet{}; - if (!FPDFAnnot_GetFormFontSize(pDocImpl->getFormHandlePointer(), mpAnnotation, &fRet)) + if (!FPDFAnnot_GetFontSize(pDocImpl->getFormHandlePointer(), mpAnnotation, &fRet)) { return 0.0f; } |