summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-07-11 14:04:14 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2023-07-28 20:13:10 +0200
commit839e31677935e9ee001887915478d62704ce359a (patch)
tree084b0b17ceb9a6ae00a67cf70aefb04dc40096f2
parent7ed6caefb62069e0aea86df80bbb10ea6439db02 (diff)
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.stahl@allotropia.de> (cherry picked from commit 9a148e4fb402d203ab0d2683dc316aa8217b576c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154425 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 00c7728e128c52c6acecf022823408da2cee0be9)
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 6e1f07efefbb..e529dbe13c1c 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -926,6 +926,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.
@@ -963,9 +966,6 @@ void VclMetafileProcessor2D::processObjectInfoPrimitive2D(
}
}
}
-
- // process content
- process(rObjectInfoPrimitive2D.getChildren());
}
void VclMetafileProcessor2D::processGraphicPrimitive2D(