[Libreoffice-commits] core.git: sw/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 18 19:04:11 UTC 2019


 sw/source/uibase/app/docst.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 36ec19859c5a2e761649215d06e5d723b965faad
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Tue Aug 13 22:07:35 2019 -0800
Commit:     Jim Raykowski <raykowj at 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 <raykowj at 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
         {


More information about the Libreoffice-commits mailing list