sw/source/uibase/app/docst.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
New commits: commit fb39ae1bc7e4b1cbfc3108efca52ec310faf7363 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Thu Sep 12 22:54:43 2024 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sat Sep 14 01:04:31 2024 +0200 Resolves tdf#133041 New list style is not added back after undoing and then redoing it by following the approach used by commit c4d82fc21c5e155472f6a30244b3fce806ada85c Change-Id: I09c877aecdcf49d4be5451e247bf1010856c2d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173312 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 21184a6168a2..eba940a48dfc 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -824,10 +824,10 @@ void SwDocShell::Edit( else nMask = SfxStyleSearchBits::UserDefined; - if ( nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Char || nFamily == SfxStyleFamily::Frame ) + if (nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Char + || nFamily == SfxStyleFamily::Frame || nFamily == SfxStyleFamily::Pseudo) { - // Prevent undo append from being done during paragraph, character, and frame style Make - // Do it after ok return from style dialog when derived from style is known + // Do Make undo append after an OK return from the style dialog below ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo()); pStyle = &m_xBasePool->Make( rName, nFamily, nMask ); } @@ -1055,6 +1055,16 @@ void SwDocShell::Edit( } } break; + case SfxStyleFamily::Pseudo: + { + if (GetDoc()->GetIDocumentUndoRedo().DoesUndo()) + { + GetDoc()->GetIDocumentUndoRedo().AppendUndo( + std::make_unique<SwUndoNumruleCreate>(xTmp->GetNumRule(), + *GetDoc())); + } + } + break; default: break; }