sw/source/uibase/wrtsh/wrtsh1.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 85ed867e6039d4e3c160e972014a885ea427535d Author: Jim Raykowski <[email protected]> AuthorDate: Thu Sep 25 22:04:12 2025 -0800 Commit: Jim Raykowski <[email protected]> CommitDate: Sat Sep 27 08:49:23 2025 +0200 lcl_FoldedOutlineNodeEndOfParaSplit: Provide for outline level undo redo when the outline level is set by direct formatting Change-Id: I4c6c09269993592c6e66a13e4b62b4a9cebccf1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191525 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index e7c0b4213946..d64636914d6c 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -127,6 +127,8 @@ #include <formatcontentcontrol.hxx> #include <textcontentcontrol.hxx> +#include <UndoAttribute.hxx> + using namespace sw::mark; using namespace com::sun::star; namespace { @@ -1409,6 +1411,11 @@ static bool lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThis) pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoInsert>(*pNd)); pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoFormatColl> (SwPaM(*pNd), pNd->GetTextColl(), true, true)); + if (!pNd->GetTextColl()->GetAttrOutlineLevel()) + pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoAttr>( + SwPaM(*pNd), + SfxUInt16Item(RES_PARATR_OUTLINELEVEL, pNd->GetAttrOutlineLevel()), + SetAttrMode::DEFAULT)); } pThis->SetModified();
