sw/source/uibase/app/docst.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 36ec19859c5a2e761649215d06e5d723b965faad Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Tue Aug 13 22:07:35 2019 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sun Aug 18 21:03:02 2019 +0200 Save a couple lines of code by using ::sw::UndoGuard Change-Id: Ib6a0406f8ae587902dcd61f865748bda458f642b Reviewed-on: https://gerrit.libreoffice.org/77439 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 9101d131a3f9..562e71f7c7a6 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -683,10 +683,8 @@ void SwDocShell::Edit( { // 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 - const bool bDoesUndo = GetDoc()->GetIDocumentUndoRedo().DoesUndo(); - GetDoc()->GetIDocumentUndoRedo().DoUndo( false ); + ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo()); pStyle = &m_xBasePool->Make( rName, nFamily, nMask ); - GetDoc()->GetIDocumentUndoRedo().DoUndo( bDoesUndo ); } else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits