diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-10-02 20:33:42 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-10-04 11:42:58 +0200 |
commit | a8f522f4257729ea11178ebf165fdd3a2b7be240 (patch) | |
tree | 654c6692516a89c4c0ae378336ea6870da77a55d /drawinglayer/source/processor2d | |
parent | 5cdb4e495e23be77466d8f8bbe6ae643b60d3aa6 (diff) |
vcl,drawinglayer,sw: PDF/UA export: footnote-container-in-list problem
The problem is that if there is a footnote in a list, the footnote
container becomes a child of the LI element that contains the footnote
anchor, which is of course nonsense.
This is because SwTaggedPDFHelper::CheckReopenTag() stopped using
SetCurrentStructureElement(), but unfortunately it's required so that
once the list ends, the correct parent element is restored for whatever
follows the list.
There is a similar problem in VclMetafileProcessor2D.
(regression from commit d467f1aa3d028f399826c97e2eecedcd79efcf65)
Change-Id: I03dee5dc2e11accb97279e5f325808c5b85507a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157501
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'drawinglayer/source/processor2d')
-rw-r--r-- | drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 1a7beb8affc6..d87c70c7e772 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -2527,7 +2527,7 @@ void VclMetafileProcessor2D::processStructureTagPrimitive2D( // structured tag primitive const vcl::PDFWriter::StructElement& rTagElement(rStructureTagCandidate.getStructureElement()); bool bTagUsed((vcl::PDFWriter::NonStructElement != rTagElement)); - bool bNeedEndAnchor(false); + ::std::optional<sal_Int32> oAnchorParent; if (!rStructureTagCandidate.isTaggedSdrObject()) { @@ -2543,8 +2543,8 @@ void VclMetafileProcessor2D::processStructureTagPrimitive2D( { sal_Int32 const id = mpPDFExtOutDevData->EnsureStructureElement( rStructureTagCandidate.GetAnchorStructureElementKey()); - mpPDFExtOutDevData->BeginStructureElement(id); - bNeedEndAnchor = true; + oAnchorParent.emplace(mpPDFExtOutDevData->GetCurrentStructureElement()); + mpPDFExtOutDevData->SetCurrentStructureElement(id); } mpPDFExtOutDevData->WrapBeginStructureElement(rTagElement); switch (rTagElement) @@ -2620,9 +2620,9 @@ void VclMetafileProcessor2D::processStructureTagPrimitive2D( { // write end tag mpPDFExtOutDevData->EndStructureElement(); - if (bNeedEndAnchor) + if (oAnchorParent) { - mpPDFExtOutDevData->EndStructureElement(); + mpPDFExtOutDevData->SetCurrentStructureElement(*oAnchorParent); } } } |