sw/source/core/edit/edundo.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 9c1a48f844eaefc505a5914338b6f444011bf315
Author:     Justin Luth <jl...@mail.com>
AuthorDate: Mon Jun 24 16:50:48 2024 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Wed Jun 26 03:05:52 2024 +0200

    NFC edundo.cxx: remove unused bRet
    
    Orphaned with commit 20e5f64215853bdd32c5f16394ba7f2f36745904
    Author: Noel Grandin on Fri Jan 19 14:40:12 2018 +0200
    loplugin:unused-returns in sw
        Reviewed-on: https://gerrit.libreoffice.org/48189
    
    Interestingly, Noel removed bRet from ::Repeat(),
    but not from these identical situations.
    
    Change-Id: I3544bac6b5c087bb10c8f94005d3bc89bd2727d6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169526
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 1e7f93dfc141..9fa5342f08d7 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -110,7 +110,6 @@ void SwEditShell::Undo(sal_uInt16 const nCount, sal_uInt16 
nOffset)
 
     // current undo state was not saved
     ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
-    bool bRet = false;
 
     StartAllAction();
     {
@@ -138,7 +137,7 @@ void SwEditShell::Undo(sal_uInt16 const nCount, sal_uInt16 
nOffset)
         try {
             for (sal_uInt16 i = 0; i < nCount; ++i)
             {
-                bRet = 
GetDoc()->GetIDocumentUndoRedo().UndoWithOffset(nOffset) || bRet;
+                GetDoc()->GetIDocumentUndoRedo().UndoWithOffset(nOffset);
             }
         } catch (const css::uno::Exception &) {
             TOOLS_WARN_EXCEPTION("sw.core", "SwEditShell::Undo()");
@@ -165,8 +164,6 @@ void SwEditShell::Redo(sal_uInt16 const nCount)
 
     CurrShell aCurr( this );
 
-    bool bRet = false;
-
     // undo state was not saved
     ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
 
@@ -192,8 +189,7 @@ void SwEditShell::Redo(sal_uInt16 const nCount)
         try {
             for (sal_uInt16 i = 0; i < nCount; ++i)
             {
-                bRet = GetDoc()->GetIDocumentUndoRedo().Redo()
-                    || bRet;
+                GetDoc()->GetIDocumentUndoRedo().Redo();
             }
         } catch (const css::uno::Exception &) {
             TOOLS_WARN_EXCEPTION("sw.core", "SwEditShell::Redo()");

Reply via email to