summaryrefslogtreecommitdiff
path: root/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-11-23 19:08:14 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-11-25 11:47:13 +0100
commit78681cd0829dcb6a73690e1a63ae3808d297677a (patch)
tree68970b16e2a384a4ab263da94e9289cdb33fa048 /include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
parent5f249506ff2eddeaac47d521509bf1dde0b58d01 (diff)
tdf#57423 drawinglayer: PDF/UA export: more Alt texts for SdrObjects
Currently /Alt texts are generated from ObjectInfoPrimitive2D, but this is only evaluated in VclMetafileProcessor2D::processGraphicPrimitive2D() so while it's created for every SdrObject, it's ignored in most cases. There doesn't appear to be a reason why this is done in processGraphicPrimitive2D() and not a more generic location, the special conditions that are checked there don't have anything to do with Alt texts, they effectively guard some optimisation done to bitmaps in PageSyncData::PlaySyncPageAct(). There is another issue in that not every SdrObject gets a StructureTagPrimitive2D, and even if there is a StructureTagPrimitive2D it may be ignored if it's in the background. The Alt text must only be produced if there is a structure element for the same SdrObject, else it would end up on some unrelated structure element. Fix all this by moving processing to a new function which checks that there is a current StructureTagPrimitive2D for a SdrObject in effect. The only problem with this is that previously Writer images produced Alt text, and now they don't - but Writer needs some fixing anyway. Change-Id: I2a362e8a9cd93e5bc817c6eed546c46b46e14980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143189 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'include/drawinglayer/primitive2d/structuretagprimitive2d.hxx')
-rw-r--r--include/drawinglayer/primitive2d/structuretagprimitive2d.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx b/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
index bf8a48f98748..40ad422c2b9a 100644
--- a/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/structuretagprimitive2d.hxx
@@ -65,6 +65,7 @@ namespace drawinglayer::primitive2d
const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; }
bool isBackground() const { return mbBackground; }
bool isImage() const { return mbIsImage; }
+ bool isTaggedSdrObject() const;
sal_Int32 GetAnchorStructureElementId() const { return m_nAnchorStructureElementId; }
/// compare operator