sw: fix too early reset of m_oParagraphBreak

Thanks to Mike Kaganski for finding this

(regression from commit 0849ddd0b1)

Change-Id: I1dd68f2b45f346f4dc0ac5242900d67970998dfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192105
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Michael Stahl
2025-10-09 16:34:25 +02:00
parent fbbbc56214
commit 2ae71afbef
+3 -1
View File
@@ -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;
}
}