sw/source/core/text/porlay.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d367afff67d166d292f461fccc6075cbf0997419
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Mar 23 18:54:36 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Mar 24 10:36:28 2023 +0000

    sw: fix crashtesting assert on ooo90040-2.doc
    
    itrpaint.cxx:421: void SwTextPainter::DrawTextLine: Assertion 
`!roTaggedParagraph' failed
    
    because the first portion is a SwKernPortion due to some text grid.
    
    (regression from commit 9b38beadf9eaf027b201cdf0ecb2bce5611014dd)
    
    Change-Id: I95b87871b7db3c7ced223b477b9f7522c1622d69
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149469
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 271c76efed02..7111709aa6bc 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2690,7 +2690,7 @@ bool SwParaPortion::HasNumberingPortion(FootnoteOrNot 
const eFootnote) const
     for (SwLineLayout const* pLine = this; pLine && !pPortion; pLine = 
pLine->GetNext())
     {
         pPortion = pLine->GetFirstPortion();
-        while (pPortion && (pPortion->InGlueGrp() || pPortion->IsFlyPortion()))
+        while (pPortion && (pPortion->InGlueGrp() || pPortion->IsKernPortion() 
|| pPortion->IsFlyPortion()))
         {   // skip margins and fly spacers - numbering should be first then
             pPortion = pPortion->GetNextPortion();
         }
@@ -2705,7 +2705,7 @@ bool SwParaPortion::HasContentPortions() const
     for (SwLineLayout const* pLine = this; pLine && !pPortion; pLine = 
pLine->GetNext())
     {
         pPortion = pLine->GetFirstPortion();
-        while (pPortion && (pPortion->InGlueGrp() || pPortion->IsFlyPortion()))
+        while (pPortion && (pPortion->InGlueGrp() || pPortion->IsKernPortion() 
|| pPortion->IsFlyPortion()))
         {   // skip margins and fly spacers
             pPortion = pPortion->GetNextPortion();
         }

Reply via email to