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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 14 12:00:33 UTC 2018


 sw/inc/editsh.hxx                 |    2 +-
 sw/source/core/edit/edtox.cxx     |    3 +--
 sw/source/uibase/wrtsh/wrtsh2.cxx |    6 ++----
 3 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit c5155f59e9fb7f5841de8a6a6fae2219400ac508
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 13 11:21:28 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 14 14:00:10 2018 +0200

    loplugin:returnconstant in SwEditShell
    
    Change-Id: I0daa8938e81017f8c6db4da55aed297f767799b7
    Reviewed-on: https://gerrit.libreoffice.org/58959
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 72bd50130ff0..05c6c7962c04 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -453,7 +453,7 @@ public:
     /// Insert content table. Renew if required.
     void                InsertTableOf(const SwTOXBase& rTOX,
                                         const SfxItemSet* pSet = nullptr);
-    bool                UpdateTableOf(const SwTOXBase& rTOX,
+    void                UpdateTableOf(const SwTOXBase& rTOX,
                                         const SfxItemSet* pSet = nullptr);
     const SwTOXBase*    GetCurTOX() const;
     const SwTOXBase*    GetDefaultTOXBase( TOXTypes eTyp, bool bCreate = false );
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 3a9f0f94c7d2..80526cc81b5f 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -154,7 +154,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
 }
 
 /// update tables of content
-bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
+void SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
 {
     OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOX) !=  nullptr,  "no TOXBaseSection!" );
     SwTOXBaseSection* pTOX = const_cast<SwTOXBaseSection*>(static_cast<const SwTOXBaseSection*>(&rTOX));
@@ -191,7 +191,6 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
         ::EndProgress( pDocSh );
         EndAllAction();
     }
-    return false;
 }
 
 /// Get current listing before or at the Cursor
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index ecf9a023995d..1dfaa712ecfe 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -320,11 +320,9 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
 
 bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
 {
-    bool bResult = false;
-
     if(CanInsert())
     {
-        bResult = SwEditShell::UpdateTableOf(rTOX, pSet);
+        SwEditShell::UpdateTableOf(rTOX, pSet);
 
         if (pSet == nullptr)
         {
@@ -336,7 +334,7 @@ bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
         }
     }
 
-    return bResult;
+    return false;
 }
 
 // handler for click on the field given as parameter.


More information about the Libreoffice-commits mailing list