diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-05-02 19:47:03 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-05-03 11:19:47 +0200 |
commit | 336a3c3d5b5b8e502cb6edfecf4f5fa1780b13e3 (patch) | |
tree | 8de7d58353a5f3c06dc632b205d7eb8e7f982468 | |
parent | 8c78361b05ba3cefe5b0f31f35113f7890fd2296 (diff) |
sw: fix crashtesting assert on ooo95981-1.odt
itrpaint.cxx:433: void SwTextPainter::DrawTextLine: Assertion `roTaggedLabel' failed
The problem is that there are 2 SwNumberingPortions, and CalcPaintOfst()
skips one of them. So the portion that doesn't have a follow may never
be iterated.
(regression from commit 9b38beadf9eaf027b201cdf0ecb2bce5611014dd)
Change-Id: If6618b183cf533f69091d4657d3a412f9d1cc4b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151298
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | sw/source/core/text/itrpaint.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index f88e6ec07c70..54935069d60d 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -406,9 +406,8 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, // multiple numbering portions are possible :( if (pPor->InNumberGrp() // also footnote label - && !static_cast<SwNumberPortion const*>(pPor)->IsFollow()) + && !roTaggedLabel) // note: CalcPaintOfst may skip some portions { - assert(!roTaggedLabel); assert(isPDFTaggingEnabled); (void) isPDFTaggingEnabled; Por_Info aPorInfo(*pPor, *this, true); // open Lbl roTaggedLabel.emplace(nullptr, nullptr, &aPorInfo, *pOut); |