include/vcl/pdf/PDFNote.hxx                     |   40 ++++++
 include/vcl/pdfextoutdevdata.hxx                |    2 
 include/vcl/pdfwriter.hxx                       |   13 --
 sc/source/ui/view/output.cxx                    |    7 -
 sd/source/ui/unoidl/unomodel.cxx                |   45 +++++--
 sw/source/core/text/EnhancedPDFExportHelper.cxx |    7 -
 vcl/inc/pdf/pdfwriter_impl.hxx                  |    3 
 vcl/source/gdi/pdfextoutdevdata.cxx             |    7 -
 vcl/source/gdi/pdfwriter_impl.cxx               |  144 +++++++++++++++---------
 9 files changed, 183 insertions(+), 85 deletions(-)

New commits:
commit fa7fedd5751e34ded987db492b18f97741765245
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Wed Jun 5 11:08:56 2024 +0900
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Jun 13 09:19:24 2024 +0200

    annot: improve PDF annotation export and clean-up PDFNote class
    
    Add support for exporting more PDF annotation types and props.
    Prefix member variables in PDFNote class, extract it out of
    pdfwriter.hxx file into it's own header file.
    
    Change-Id: I99fb4cbb0c68fcec6585c9c21d81daaef26344cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168418
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit bd7638485220f17472157a02608e1080c25376cc)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168571
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/include/vcl/pdf/PDFNote.hxx b/include/vcl/pdf/PDFNote.hxx
new file mode 100644
index 000000000000..95fab08c2207
--- /dev/null
+++ b/include/vcl/pdf/PDFNote.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <sal/types.h>
+#include <tools/gen.hxx>
+#include <tools/color.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+
+#include <vcl/dllapi.h>
+#include <vcl/pdf/PDFAnnotationSubType.hxx>
+
+#include <com/sun/star/util/DateTime.hpp>
+
+#include <vector>
+
+namespace vcl::pdf
+{
+struct PDFNote
+{
+    vcl::pdf::PDFAnnotationSubType meType = 
vcl::pdf::PDFAnnotationSubType::Text;
+
+    OUString maTitle; // optional title for the popup containing the note
+    OUString maContents; // contents of the note
+    css::util::DateTime maModificationDate;
+    std::vector<basegfx::B2DPolygon> maPolygons;
+    Color maAnnotationColor;
+    Color maInteriorColor;
+    float mfWidth = 0.0;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 206dfa4adc97..e5615da7b260 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -341,7 +341,7 @@ public:
     number of page the note is on (as returned by NewPage)
     or -1 in which case the current page is used
     */
-    void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, 
sal_Int32 nPageNr = -1 );
+    void CreateNote( const tools::Rectangle& rRect, const vcl::pdf::PDFNote& 
rNote, sal_Int32 nPageNr = -1 );
 
     /** begin a new logical structure element
 
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index cd8be2a50581..37f8a4251f7b 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -61,16 +61,7 @@ namespace vcl
 class PDFExtOutDevData;
 class PDFWriterImpl;
 
-struct PDFNote
-{
-    OUString          Title;          // optional title for the popup 
containing the note
-    OUString          Contents;       // contents of the note
-    css::util::DateTime maModificationDate;
-    bool isFreeText = false;
-    std::vector<basegfx::B2DPolygon> maPolygons;
-    Color annotColor;
-    Color interiorColor;
-};
+namespace pdf { struct PDFNote; }
 
 class VCL_DLLPUBLIC PDFOutputStream
 {
@@ -1061,7 +1052,7 @@ The following structure describes the permissions used in 
PDF security
     number of page the note is on (as returned by NewPage)
     or -1 in which case the current page is used
     */
-    void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, 
sal_Int32 nPageNr );
+    void CreateNote( const tools::Rectangle& rRect, const vcl::pdf::PDFNote& 
rNote, sal_Int32 nPageNr );
 
     /** begin a new logical structure element
 
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 6f01dc052fa4..be6fa725b3f7 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -34,6 +34,7 @@
 #include <vcl/lineinfo.hxx>
 #include <vcl/gradient.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/pdf/PDFNote.hxx>
 #include <svx/unoapi.hxx>
 #include <sal/log.hxx>
 #include <comphelper/lok.hxx>
@@ -2603,9 +2604,9 @@ void ScOutputData::AddPDFNotes()
                         OUString aContent = pNote->GetText();
                         aContent = aContent.replaceAll("
", " ");
 
-                        vcl::PDFNote aNote;
-                        aNote.Title = aTitle;
-                        aNote.Contents = aContent;
+                        vcl::pdf::PDFNote aNote;
+                        aNote.maTitle = aTitle;
+                        aNote.maContents = aContent;
                         pPDFData->CreateNote( aNoteRect, aNote );
                     }
                 }
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 6ef7b4124abd..4eabf79c2a50 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -111,6 +111,8 @@
 #include <optsitem.hxx>
 
 #include <vcl/pdfextoutdevdata.hxx>
+#include <vcl/pdf/PDFNote.hxx>
+
 #include <com/sun/star/presentation/AnimationSpeed.hpp>
 #include <com/sun/star/presentation/ClickAction.hpp>
 #include <svx/sdr/contact/viewobjectcontact.hxx>
@@ -1605,31 +1607,44 @@ static void ImplPDFExportComments( const 
uno::Reference< drawing::XDrawPage >& x
 
         while( xAnnotationEnumeration->hasMoreElements() )
         {
-            uno::Reference< office::XAnnotation > xAnnotation( 
xAnnotationEnumeration->nextElement() );
+            uno::Reference<office::XAnnotation> 
xAnnotation(xAnnotationEnumeration->nextElement());
 
-            geometry::RealPoint2D aRealPoint2D( xAnnotation->getPosition() );
+            geometry::RealPoint2D aRealPoint2D(xAnnotation->getPosition());
             geometry::RealSize2D aRealSize2D(xAnnotation->getSize());
-            uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
 
-            vcl::PDFNote aNote;
-            aNote.Title = xAnnotation->getAuthor();
-            aNote.Contents = xText->getString();
+            Point aPoint(aRealPoint2D.X * 100.0, aRealPoint2D.Y * 100.0);
+            Size aSize(aRealSize2D.Width * 100.0, aRealSize2D.Height * 100.0);
+
+            uno::Reference<text::XText> xText(xAnnotation->getTextRange());
+
+            vcl::pdf::PDFNote aNote;
+            aNote.maTitle = xAnnotation->getAuthor();
+            aNote.maContents = xText->getString();
             aNote.maModificationDate = xAnnotation->getDateTime();
             auto* pAnnotation = 
dynamic_cast<sd::Annotation*>(xAnnotation.get());
-            aNote.isFreeText = pAnnotation && pAnnotation->isFreeText();
+            if (pAnnotation && pAnnotation->isFreeText())
+            {
+                aNote.meType = vcl::pdf::PDFAnnotationSubType::FreeText;
+            }
             if (pAnnotation && pAnnotation->hasCustomAnnotationMarker())
             {
                 aNote.maPolygons = 
pAnnotation->getCustomAnnotationMarker().maPolygons;
-                aNote.annotColor = 
pAnnotation->getCustomAnnotationMarker().maLineColor;
-                aNote.interiorColor = 
pAnnotation->getCustomAnnotationMarker().maFillColor;
+                aNote.maAnnotationColor = 
pAnnotation->getCustomAnnotationMarker().maLineColor;
+                aNote.maInteriorColor = 
pAnnotation->getCustomAnnotationMarker().maFillColor;
+                if (aNote.maPolygons.size() == 1)
+                {
+                    auto const& rPolygon = aNote.maPolygons[0];
+                    aNote.meType = rPolygon.isClosed()
+                        ? vcl::pdf::PDFAnnotationSubType::Polygon
+                        : vcl::pdf::PDFAnnotationSubType::Polyline;
+                }
+                else if (aNote.maPolygons.size() > 1)
+                {
+                    aNote.meType = vcl::pdf::PDFAnnotationSubType::Ink;
+                }
             }
 
-            rPDFExtOutDevData.CreateNote(
-                
::tools::Rectangle(Point(static_cast<::tools::Long>(aRealPoint2D.X * 100),
-                                         
static_cast<::tools::Long>(aRealPoint2D.Y * 100)),
-                                   
Size(static_cast<::tools::Long>(aRealSize2D.Width * 100),
-                                        
static_cast<::tools::Long>(aRealSize2D.Height * 100))),
-                aNote);
+            rPDFExtOutDevData.CreateNote(::tools::Rectangle(aPoint, aSize), 
aNote);
         }
     }
     catch (const uno::Exception&)
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 8ff764d92f3e..de88acdd0cd8 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -28,6 +28,7 @@
 #include <sot/exchange.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/pdfextoutdevdata.hxx>
+#include <vcl/pdf/PDFNote.hxx>
 #include <tools/multisel.hxx>
 #include <editeng/adjustitem.hxx>
 #include <editeng/lrspitem.hxx>
@@ -2173,11 +2174,11 @@ void 
SwEnhancedPDFExportHelper::EnhancedPDFExport(LanguageType const eLanguageDe
                     const Color* pColor;
                     pNumFormatter->GetOutputString(aDateDiff.GetDate(), 
nFormat, sDate, &pColor);
 
-                    vcl::PDFNote aNote;
+                    vcl::pdf::PDFNote aNote;
                     // The title should consist of the author and the date:
-                    aNote.Title = pField->GetPar1() + ", " + sDate + ", " + 
(pField->GetResolved() ? SwResId(STR_RESOLVED) : "");
+                    aNote.maTitle = pField->GetPar1() + ", " + sDate + ", " + 
(pField->GetResolved() ? SwResId(STR_RESOLVED) : "");
                     // Guess what the contents contains...
-                    aNote.Contents = pField->GetText();
+                    aNote.maContents = pField->GetText();
 
                     // Link Export
                     tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, 
rNoteRect.SVRect()));
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index 090f3e090c35..c30956d0e1ee 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -55,6 +55,7 @@
 #include <comphelper/hash.hxx>
 #include <tools/stream.hxx>
 #include <vcl/BinaryDataContainer.hxx>
+#include <vcl/pdf/PDFNote.hxx>
 
 #include <vcl/filter/pdfobjectcontainer.hxx>
 #include <vcl/settings.hxx>
@@ -458,7 +459,7 @@ struct PDFPopupAnnotation : public PDFAnnotation
 
 struct PDFNoteEntry : public PDFAnnotation
 {
-    PDFNote m_aContents;
+    vcl::pdf::PDFNote m_aContents;
 
     PDFPopupAnnotation m_aPopUpAnnotation;
 
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index c2c838d5db55..168a03860020 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -24,6 +24,7 @@
 #include <vcl/gfxlink.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/graphicfilter.hxx>
+#include <vcl/pdf/PDFNote.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <sal/log.hxx>
@@ -88,12 +89,14 @@ struct CreateOutlineItem {
     sal_Int32 mnParent;
     sal_Int32 mnDestID;
 };
+
 struct CreateNote {
     MapMode maParaMapMode;
-    PDFNote maParaPDFNote;
+    vcl::pdf::PDFNote maParaPDFNote;
     tools::Rectangle maParaRect;
     sal_Int32 mnPage;
 };
+
 struct SetPageTransition {
     PDFWriter::PageTransition maParaPageTransition;
     sal_uInt32 mnMilliSec;
@@ -720,7 +723,7 @@ sal_Int32 PDFExtOutDevData::CreateOutlineItem( sal_Int32 
nParent, const OUString
     mpGlobalSyncData->mActions.push_back( vcl::CreateOutlineItem{ rText, 
nParent, nDestID } );
     return mpGlobalSyncData->mCurId++;
 }
-void PDFExtOutDevData::CreateNote( const tools::Rectangle& rRect, const 
PDFNote& rNote, sal_Int32 nPageNr )
+void PDFExtOutDevData::CreateNote( const tools::Rectangle& rRect, const 
vcl::pdf::PDFNote& rNote, sal_Int32 nPageNr )
 {
     mpGlobalSyncData->mActions.push_back(
         vcl::CreateNote{ mrOutDev.GetMapMode(), rNote, rRect, nPageNr == -1 ? 
mnPage : nPageNr } );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 16b0b5e23501..073b755543d1 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -80,6 +80,7 @@
 #include <vcl/filter/pdfdocument.hxx>
 #include <vcl/filter/PngImageReader.hxx>
 #include <comphelper/hash.hxx>
+#include <vcl/pdf/PDFNote.hxx>
 
 #include <svdata.hxx>
 #include <vcl/BitmapWriteAccess.hxx>
@@ -540,7 +541,6 @@ void appendDouble( double fValue, OStringBuffer& rBuffer, 
sal_Int32 nPrecision =
 
 void appendColor( const Color& rColor, OStringBuffer& rBuffer, bool 
bConvertToGrey )
 {
-
     if( rColor == COL_TRANSPARENT )
         return;
 
@@ -3918,7 +3918,7 @@ namespace
 
 void appendAnnotationRect(tools::Rectangle const & rRectangle, OStringBuffer & 
aLine)
 {
-    aLine.append("/Rect[");
+    aLine.append("/Rect [");
     appendFixedInt(rRectangle.Left(), aLine);
     aLine.append(' ');
     appendFixedInt(rRectangle.Top(), aLine);
@@ -3929,75 +3929,121 @@ void appendAnnotationRect(tools::Rectangle const & 
rRectangle, OStringBuffer & a
     aLine.append("] ");
 }
 
+void appendAnnotationColor(Color const& rColor, OStringBuffer & aLine)
+{
+    aLine.append("/C [");
+    appendColor(rColor, aLine, false);
+    aLine.append("] ");
+}
+
+void appendAnnotationInteriorColor(Color const& rColor, OStringBuffer & aLine)
+{
+    aLine.append("/IC [");
+    appendColor(rColor, aLine, false);
+    aLine.append("] ");
+}
+
+void appendPolygon(basegfx::B2DPolygon const& rPolygon, double fPageHeight, 
OStringBuffer & aLine)
+{
+    for (sal_uInt32 i = 0; i < rPolygon.count(); ++i)
+    {
+        appendDouble(convertMm100ToPoint(rPolygon.getB2DPoint(i).getX()), 
aLine, nLog10Divisor);
+        aLine.append(" ");
+        appendDouble(fPageHeight - 
convertMm100ToPoint(rPolygon.getB2DPoint(i).getY()), aLine, nLog10Divisor);
+        aLine.append(" ");
+    }
+}
+
+void appendVertices(basegfx::B2DPolygon const& rPolygon, double fPageHeight, 
OStringBuffer & aLine)
+{
+    aLine.append("/Vertices [");
+    appendPolygon(rPolygon, fPageHeight, aLine);
+    aLine.append("] ");
+
+}
+
+void appendAnnotationBorder(float fBorderWidth, OStringBuffer & aLine)
+{
+    aLine.append("/Border [0 0 ");
+    appendDouble(convertMm100ToPoint(fBorderWidth), aLine, nLog10Divisor);
+    aLine.append("] ");
+}
+
 } // end anonymous namespace
 
 void PDFWriterImpl::emitTextAnnotationLine(OStringBuffer & aLine, PDFNoteEntry 
const & rNote)
 {
     appendObjectID(rNote.m_nObject, aLine);
 
-    aLine.append("<</Type /Annot /Subtype ");
-    if (rNote.m_aContents.maPolygons.size() == 1)
+    double fPageHeight = m_aPages[rNote.m_nPage].getHeight();
+
+    aLine.append("<</Type /Annot ");
+
+    appendAnnotationRect(rNote.m_aRect, aLine);
+
+    aLine.append("/Subtype ");
+
+    if (rNote.m_aContents.meType == vcl::pdf::PDFAnnotationSubType::Polygon ||
+        rNote.m_aContents.meType == vcl::pdf::PDFAnnotationSubType::Polyline)
     {
         auto const& rPolygon = rNote.m_aContents.maPolygons[0];
-        aLine.append(rPolygon.isClosed() ? "/Polygon " : "/Polyline ");
-        aLine.append("/Vertices [");
-        for (sal_uInt32 i = 0; i < rPolygon.count(); ++i)
-        {
-            appendDouble(convertMm100ToPoint(rPolygon.getB2DPoint(i).getX()), 
aLine, nLog10Divisor);
-            aLine.append(" ");
-            appendDouble(m_aPages[rNote.m_nPage].getHeight()
-                             - 
convertMm100ToPoint(rPolygon.getB2DPoint(i).getY()),
-                         aLine, nLog10Divisor);
-            aLine.append(" ");
-        }
-        aLine.append("] ");
-        aLine.append("/C [");
-        appendColor(rNote.m_aContents.annotColor, aLine, false);
-        aLine.append("] ");
-        if (rPolygon.isClosed())
-        {
-            aLine.append("/IC [");
-            appendColor(rNote.m_aContents.interiorColor, aLine, false);
-            aLine.append("] ");
-        }
+        if (rNote.m_aContents.meType == 
vcl::pdf::PDFAnnotationSubType::Polygon)
+            aLine.append("/Polygon ");
+        else
+            aLine.append("/Polyline ");
+
+        appendVertices(rPolygon, fPageHeight, aLine);
+        appendAnnotationColor(rNote.m_aContents.maAnnotationColor, aLine);
+
+        if (rNote.m_aContents.meType == 
vcl::pdf::PDFAnnotationSubType::Polygon)
+            appendAnnotationInteriorColor(rNote.m_aContents.maInteriorColor, 
aLine);
+        appendAnnotationBorder(rNote.m_aContents.mfWidth, aLine);
     }
-    else if (rNote.m_aContents.maPolygons.size() > 1)
+    else if (rNote.m_aContents.meType == 
vcl::pdf::PDFAnnotationSubType::Square)
     {
-        aLine.append("/Ink /InkList [");
+        aLine.append("/Square ");
+        appendAnnotationColor(rNote.m_aContents.maAnnotationColor, aLine);
+        appendAnnotationInteriorColor(rNote.m_aContents.maInteriorColor, 
aLine);
+        appendAnnotationBorder(rNote.m_aContents.mfWidth, aLine);
+    }
+    else if (rNote.m_aContents.meType == 
vcl::pdf::PDFAnnotationSubType::Circle)
+    {
+        aLine.append("/Circle ");
+        appendAnnotationColor(rNote.m_aContents.maAnnotationColor, aLine);
+        appendAnnotationInteriorColor(rNote.m_aContents.maInteriorColor, 
aLine);
+        appendAnnotationBorder(rNote.m_aContents.mfWidth, aLine);
+    }
+    else if (rNote.m_aContents.meType == vcl::pdf::PDFAnnotationSubType::Ink)
+    {
+        aLine.append("/Ink ");
+
+        aLine.append("/InkList [");
         for (auto const& rPolygon : rNote.m_aContents.maPolygons)
         {
             aLine.append("[");
-            for (sal_uInt32 i = 0; i < rPolygon.count(); ++i)
-            {
-                
appendDouble(convertMm100ToPoint(rPolygon.getB2DPoint(i).getX()), aLine,
-                             nLog10Divisor);
-                aLine.append(" ");
-                appendDouble(m_aPages[rNote.m_nPage].getHeight()
-                                 - 
convertMm100ToPoint(rPolygon.getB2DPoint(i).getY()),
-                             aLine, nLog10Divisor);
-                aLine.append(" ");
-            }
+            appendPolygon(rPolygon, fPageHeight, aLine);
             aLine.append("]");
-            aLine.append("/C [");
-            appendColor(rNote.m_aContents.annotColor, aLine, false);
-            aLine.append("] ");
         }
         aLine.append("] ");
+
+        appendAnnotationColor(rNote.m_aContents.maAnnotationColor, aLine);
+        appendAnnotationBorder(rNote.m_aContents.mfWidth, aLine);
+
     }
-    else if (rNote.m_aContents.isFreeText)
+    else if (rNote.m_aContents.meType == 
vcl::pdf::PDFAnnotationSubType::FreeText)
+    {
         aLine.append("/FreeText ");
+    }
     else
+    {
         aLine.append("/Text ");
-
-    aLine.append("/BS<</W 0>>");
+    }
 
     // i59651: key /F set bits Print to 1 rest to 0. We don't set NoZoom 
NoRotate to 1, since it's a 'should'
     // see PDF 8.4.2 and ISO 19005-1:2005 6.5.3
     if (m_bIsPDF_A1 || m_bIsPDF_A2 || m_bIsPDF_A3)
         aLine.append("/F 4 ");
 
-    appendAnnotationRect(rNote.m_aRect, aLine);
-
     aLine.append("/Popup ");
     appendObjectReference(rNote.m_aPopUpAnnotation.m_nObject, aLine);
 
@@ -4009,14 +4055,14 @@ void 
PDFWriterImpl::emitTextAnnotationLine(OStringBuffer & aLine, PDFNoteEntry c
 
     // contents of the note (type text string)
     aLine.append("/Contents ");
-    appendUnicodeTextStringEncrypt(rNote.m_aContents.Contents, 
rNote.m_nObject, aLine);
+    appendUnicodeTextStringEncrypt(rNote.m_aContents.maContents, 
rNote.m_nObject, aLine);
     aLine.append("
");
 
     // optional title
-    if (!rNote.m_aContents.Title.isEmpty())
+    if (!rNote.m_aContents.maTitle.isEmpty())
     {
         aLine.append("/T ");
-        appendUnicodeTextStringEncrypt(rNote.m_aContents.Title, 
rNote.m_nObject, aLine);
+        appendUnicodeTextStringEncrypt(rNote.m_aContents.maTitle, 
rNote.m_nObject, aLine);
         aLine.append("
");
     }
     aLine.append(">>
");
@@ -10402,7 +10448,7 @@ void PDFWriterImpl::intersectClipRegion( const 
basegfx::B2DPolyPolygon& rRegion
     }
 }
 
-void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const PDFNote& 
rNote, sal_Int32 nPageNr )
+void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const 
pdf::PDFNote& rNote, sal_Int32 nPageNr )
 {
     if (nPageNr < 0)
         nPageNr = m_nCurrentPage;

Reply via email to