summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-06-13 20:53:56 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-06-14 06:27:03 +0200
commit647642468d42aba2e259d85d068652756d5aa20c (patch)
tree965537037c98208c4cf02c4d53f11d9bbba066dd /vcl/source
parentffa5c8e13970403319a6761811fd79fb51dbaff7 (diff)
annot: read PDF FreeText annotation "DS" and "RC" keys
DS (DefaultStyle) and RC (RichContent") contain xhtml, css3 rich text content for the text presented by the FreeText annotation in the document. This adds reading of those 2 things to the PDFium library, PDFium based import and the PDFAnnotationFreeTextMarker class. Change-Id: I32f89640611c730c8a1a8d1a2107e2e11669ec18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168787 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index c7cf5794dffa..c60e8bb4a792 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -329,6 +329,16 @@ findAnnotations(const std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, basegfx::B2D
{
auto pMarker = std::make_shared<vcl::pdf::PDFAnnotationMarkerFreeText>();
rPDFGraphicAnnotation.mpMarker = pMarker;
+ if (pAnnotation->hasKey(vcl::pdf::constDictionaryKey_DefaultStyle))
+ {
+ pMarker->maDefaultStyle
+ = pAnnotation->getString(vcl::pdf::constDictionaryKey_DefaultStyle);
+ }
+ if (pAnnotation->hasKey(vcl::pdf::constDictionaryKey_RichContent))
+ {
+ pMarker->maRichContent
+ = pAnnotation->getString(vcl::pdf::constDictionaryKey_RichContent);
+ }
}
else if (eSubtype == vcl::pdf::PDFAnnotationSubType::Stamp)
{