drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9a148e4fb402d203ab0d2683dc316aa8217b576c
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Jul 11 14:04:14 2023 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Jul 14 14:54:31 2023 +0200

    tdf#154982 drawinglayer: post-order traversal of ObjectInfoPrimitive2D
    
    For the signature line, the wrong alt-text is exported to PDF, because
    the cui/source/dialogs/signature-line.svg contains lots of "desc"
    elements, which are converted to ObjectInfoPrimitive2D, and currently
    these are applied after the ObjectInfoPrimitive2D for the SdrObject.
    
    So let's try to switch the order, fixes the bugdoc at least.
    
    Change-Id: I7b5f6f4e68a3421ab33d7780995080deb6cf2238
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154308
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index aba9444b72e1..85b9ca35abf1 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -927,6 +927,9 @@ void VclMetafileProcessor2D::processBasePrimitive2D(const 
primitive2d::BasePrimi
 void VclMetafileProcessor2D::processObjectInfoPrimitive2D(
     primitive2d::ObjectInfoPrimitive2D const& rObjectInfoPrimitive2D)
 {
+    // tdf#154982 process content first, so this object overrides any nested 
one
+    process(rObjectInfoPrimitive2D.getChildren());
+
     // currently StructureTagPrimitive2D is only used for SdrObjects - have to
     // avoid adding Alt text if the SdrObject is not actually tagged, as it
     // would then end up on an unrelated structure element.
@@ -964,9 +967,6 @@ void VclMetafileProcessor2D::processObjectInfoPrimitive2D(
             }
         }
     }
-
-    // process content
-    process(rObjectInfoPrimitive2D.getChildren());
 }
 
 void VclMetafileProcessor2D::processGraphicPrimitive2D(

Reply via email to