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/inc/DrawViewShell.hxx | 10 + 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 +++++++++++++++--------- 10 files changed, 190 insertions(+), 88 deletions(-)
New commits: commit e03d54c2652049a1315fcddcb6a8e881a0ca65cb Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Jun 5 11:33:12 2024 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Jun 5 08:36:49 2024 +0200 sd: change CHECK_RANGE macro to template function Change-Id: Iecd6f37324b2788fac77b272ac56c3a2eb122dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168420 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index e19e39d3d71b..80543adebac2 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -57,7 +57,11 @@ class Ruler; class AnnotationManager; class ViewOverlayManager; -#define CHECK_RANGE(nMin, nValue, nMax) ((nValue >= nMin) && (nValue <= nMax)) +template <typename MIN_T, typename T, typename MAX_T> +constexpr bool CHECK_RANGE(MIN_T nMin, T nValue, MAX_T nMax) +{ + return nValue >= nMin && nValue <= nMax; +} /** Base class of the stacked shells that provide graphical views to Draw and Impress documents and editing functionality. In contrast @@ -494,8 +498,8 @@ private: bool mbPastePossible; bool mbMouseButtonDown; bool mbMouseSelecting; - ::std::unique_ptr< AnnotationManager > mpAnnotationManager; - ::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager; + std::unique_ptr<AnnotationManager> mpAnnotationManager; + std::unique_ptr<ViewOverlayManager> mpViewOverlayManager; std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits; SdViewOptions maViewOptions; }; commit bd7638485220f17472157a02608e1080c25376cc Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Jun 5 11:08:56 2024 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Jun 5 08:36:40 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> 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 670ff234e2bd..e6bf7e5aed08 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -346,7 +346,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 34d44525b4d4..044d18dece10 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -60,16 +60,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 { @@ -1058,7 +1049,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 797f58ba4712..9c545e588bed 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -35,6 +35,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> @@ -2668,15 +2669,15 @@ void ScOutputData::AddPDFNotes() { tools::Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight ); - vcl::PDFNote aNote; + vcl::pdf::PDFNote aNote; // Note title is the cell address (as on printed note pages) ScAddress aAddress( nMergeX, nMergeY, nTab ); - aNote.Title = aAddress.Format(ScRefFlags::VALID, mpDoc, mpDoc->GetAddressConvention()); + aNote.maTitle = aAddress.Format(ScRefFlags::VALID, mpDoc, mpDoc->GetAddressConvention()); // Content has to be a simple string without line breaks OUString aContent = pNote->GetText(); - aNote.Contents = aContent.replaceAll(" ", " "); + aNote.maContents = aContent.replaceAll(" ", " "); pPDFData->CreateNote( aNoteRect, aNote ); } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index ad3cc80b2695..92a112242bbd 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> @@ -1615,31 +1617,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 da596aab3b68..277c51754a94 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 2afab075dbe6..9b2db532e6c0 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 c15b917d3420..c81868c97a59 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 ba786d7bb34b..9250204581bc 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(">> "); @@ -10420,7 +10466,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;