summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-06-13 14:19:44 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-06-14 04:07:12 +0200
commit0fb1e4e9a74b566fb075a58ae2c7632f2cc068de (patch)
treef657a04bfe28f52c2865e813903c9b5e441815f2
parent0e2409e5e3c73ec25c61aa4ea140d114869ea512 (diff)
annot: add annotation marker for free text annotation
Added new class PDFAnnotationMarkerFreeText as we need a marker to know if the annotation is a special one. Change-Id: Ica0e72dd6bf62b322676c8e87659a3850074522a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168759 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--include/vcl/pdf/PDFAnnotationMarker.hxx5
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx5
2 files changed, 10 insertions, 0 deletions
diff --git a/include/vcl/pdf/PDFAnnotationMarker.hxx b/include/vcl/pdf/PDFAnnotationMarker.hxx
index c643856375b5..3be2e6c8ca3d 100644
--- a/include/vcl/pdf/PDFAnnotationMarker.hxx
+++ b/include/vcl/pdf/PDFAnnotationMarker.hxx
@@ -27,6 +27,11 @@ struct VCL_DLLPUBLIC PDFAnnotationMarker
Color maFillColor = COL_TRANSPARENT;
};
+/** Free text annotation marker - showing text of the annotation in the document */
+struct VCL_DLLPUBLIC PDFAnnotationMarkerFreeText : public PDFAnnotationMarker
+{
+};
+
struct VCL_DLLPUBLIC PDFAnnotationMarkerCircle : public PDFAnnotationMarker
{
};
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index b8a6687827cb..ebd6ea0dba10 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -324,6 +324,11 @@ findAnnotations(const std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, basegfx::B2D
pMarker->mnWidth = convertPointToMm100(fWidth);
}
}
+ else if (eSubtype == vcl::pdf::PDFAnnotationSubType::FreeText)
+ {
+ auto pMarker = std::make_shared<vcl::pdf::PDFAnnotationMarkerFreeText>();
+ rPDFGraphicAnnotation.mpMarker = pMarker;
+ }
}
}
}