include/vcl/pdf/PDFAnnotationMarker.hxx |    5 +++++
 vcl/source/filter/ipdf/pdfread.cxx      |    5 +++++
 2 files changed, 10 insertions(+)

New commits:
commit 110b5685a3f3f2709d692976c48f5742c3550d0d
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Thu Jun 13 14:19:44 2024 +0900
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Jun 18 12:10:47 2024 +0200

    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 <[email protected]>
    (cherry picked from commit 0fb1e4e9a74b566fb075a58ae2c7632f2cc068de)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168843
    Tested-by: Miklos Vajna <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

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 ac4bceaf45d3..c19a6939b486 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -325,6 +325,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;
+                }
             }
         }
     }

Reply via email to