svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d329fb26e422cf359db190b20e4268b640b7ac82
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Sat Jun 8 21:35:05 2024 +0900
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Jun 18 11:25:08 2024 +0200

    annot: don't render objects marked as annotation in PDF export
    
    Objects that are marked as annotation shouldn't be rendered to the
    PDF document. Those should be written to the PDF as annotations
    (if output of annotations is enabled in the PDF export options).
    
    Change-Id: I60650b5a64dc52da6d32d8ac92441e4b21900126
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168653
    Tested-by: Miklos Vajna <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx 
b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index 0cc353a5b65c..fc132946883a 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -89,6 +89,9 @@ bool ViewObjectContactOfSdrObj::isPrimitiveVisible(const 
DisplayInfo& rDisplayIn
         return false;
     }
 
+    if (GetObjectContact().isOutputToPDFFile() && rObject.isAnnotationObject())
+        return false;
+
     // Test for Calc object hiding (for OLE and Graphic it's extra, see there)
     const SdrPageView* pSdrPageView = GetObjectContact().TryToGetSdrPageView();
 

Reply via email to