sw/source/uibase/uno/unotxdoc.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 1e8428e04c3fff20b3b518130a1ccd3f9db6512e Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Mon Jul 3 10:40:38 2023 +0200 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Mon Jul 3 11:48:37 2023 +0200 tdf#152575 Fix missing comment export in some cases Comments in margin were not exported to PDF when there was no comment on the first page. Change-Id: I102834d6e39b0cf471e4b28f7f6b112ad52c54a9 diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index fb4ecac28965..ec585cda8c25 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3038,13 +3038,16 @@ void SAL_CALL SwXTextDocument::render( SwWrtShell* pWrtShell = pSwView ? pSwView->GetWrtShellPtr() : nullptr; SwPrintData rSwPrtOptions = *m_pRenderData->GetSwPrtOptions(); + if (bIsPDFExport) + { + rSwPrtOptions.SetPrintPostIts( + lcl_GetBoolProperty(rxOptions, "ExportNotesInMargin") + ? SwPostItMode::InMargins + : SwPostItMode::NONE); + } if (bIsPDFExport && (bFirstPage || bHasPDFExtOutDevData) && pWrtShell) { - rSwPrtOptions.SetPrintPostIts( - lcl_GetBoolProperty(rxOptions, "ExportNotesInMargin") - ? SwPostItMode::InMargins - : SwPostItMode::NONE); SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, false, rSwPrtOptions ); }