sw/source/uibase/wrtsh/wrtsh1.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 5b9e275838ec1cd08f1c1755de545b4f7f34c7d1 Author: Jim Raykowski <[email protected]> AuthorDate: Wed Sep 24 17:09:25 2025 -0800 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Sep 25 12:33:29 2025 +0200 tdf#166713 Fix crash in lcl_FoldedOutlineNodeEndOfParaSplit by handling the case of a paragraph outline level set by direct formatting. Change-Id: Ida0c8f91f0fb0584b39c16b3ddf2201429c6943f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191471 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> (cherry picked from commit fd9ae53e39f3219474461d1e8e3220d8efdfcecb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191482 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index bf055e729c4e..0b2044c90def 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1396,6 +1396,10 @@ static bool lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThis) SwTextNode* pNd = pDoc->GetNodes().MakeTextNode(*pEndNd, pTextNode->GetTextColl(), true); + // if the outline level is not set in style then it is set in direct formatting + if (!pTextNode->GetTextColl()->GetAttrOutlineLevel()) + pNd->SetAttrOutlineLevel(pTextNode->GetAttrOutlineLevel()); + (void) rOutlineNodes.Seek_Entry(pNd, &nPos); pThis->GotoOutline(nPos);
