summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-05-02 19:47:03 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2023-05-03 11:19:47 +0200
commit336a3c3d5b5b8e502cb6edfecf4f5fa1780b13e3 (patch)
tree8de7d58353a5f3c06dc632b205d7eb8e7f982468
parent8c78361b05ba3cefe5b0f31f35113f7890fd2296 (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.cxx3
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);