summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-09-16 08:20:56 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-09-16 09:05:33 +0200
commit493b10997053882d06803156a98ae8924bf7660d (patch)
treef4f03a1a407b85fc7abb8c11a3cfbfb1e55a13e2 /vcl
parentc317f0adb308b1ece3bfa8bdffb4d0bcb1478d30 (diff)
sw content controls: add PDF export of font properties
Like font name or size. Change-Id: Ie7b0d38be0ef69faf364b7c801d0bd3fdd60777a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140038 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/pdf/PDFiumLibrary.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 5e4588f6bf17..bb371ca930dc 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -250,6 +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;
};
class PDFiumPageObjectImpl final : public PDFiumPageObject
@@ -1135,6 +1136,18 @@ PDFFormFieldType PDFiumAnnotationImpl::getFormFieldType(PDFiumDocument* pDoc)
FPDFAnnot_GetFormFieldType(pDocImpl->getFormHandlePointer(), mpAnnotation));
}
+float PDFiumAnnotationImpl::getFormFontSize(PDFiumDocument* pDoc)
+{
+ auto pDocImpl = static_cast<PDFiumDocumentImpl*>(pDoc);
+ float fRet{};
+ if (!FPDFAnnot_GetFormFontSize(pDocImpl->getFormHandlePointer(), mpAnnotation, &fRet))
+ {
+ return 0.0f;
+ }
+
+ return fRet;
+}
+
namespace
{
bool getBorderProperties(FPDF_ANNOTATION mpAnnotation, float& rHorizontalCornerRadius,