sw/source/core/text/redlnitr.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 2ae71afbef8e767a313584949268b62e5e695279
Author:     Michael Stahl <[email protected]>
AuthorDate: Thu Oct 9 15:22:49 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Oct 9 16:34:25 2025 +0200

    sw: fix too early reset of m_oParagraphBreak
    
    Thanks to Mike Kaganski for finding this
    
    (regression from commit 0849ddd0b1b3c384c5f3de8fe0bbb9df558fa786)
    
    Change-Id: I1dd68f2b45f346f4dc0ac5242900d67970998dfa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192105
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 99710e5b20d7..5c88502ed2c9 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -111,7 +111,6 @@ public:
     // Note: caller is responsible for checking for immediately adjacent hides
     bool Next()
     {
-        m_oParagraphBreak.reset();
         SwPosition const* pNextRedlineHide(nullptr);
         assert(m_pEndPos);
         if (m_isHideRedlines)
@@ -204,6 +203,7 @@ public:
             m_pStartPos = pRed->Start();
             m_pEndPos = pRed->End();
             ++m_RedlineIndex;
+            m_oParagraphBreak.reset();
             return true;
         }
         else if (m_oNextFieldmarkHide)
@@ -211,6 +211,7 @@ public:
             assert(!pNextRedlineHide || *m_oNextFieldmarkHide <= 
*pNextRedlineHide);
             m_pStartPos = &*m_oNextFieldmarkHide;
             m_pEndPos = &*m_Fieldmark.second;
+            m_oParagraphBreak.reset();
             return true;
         }
         else
@@ -271,6 +272,7 @@ public:
             {
                 m_pStartPos = nullptr;
                 m_pEndPos = nullptr;
+                m_oParagraphBreak.reset();
                 return false;
             }
         }

Reply via email to