diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-14 17:33:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-16 08:54:52 +0200 |
commit | 0025cb72f2b6b19d63fb1393df910845f255a6d0 (patch) | |
tree | a9c749345e573b0599d7007ee69d2fb26f70771e /sw/source/uibase | |
parent | c5ff0696bddc6fdcdc92d7585c70e2b5e202d11b (diff) |
loplugin:returnconstant in SwWrtShell
Change-Id: I1f810108a3c79f4d8b7df6ef1ad755a29dbc62b6
Reviewed-on: https://gerrit.libreoffice.org/59127
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/index/toxmgr.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh4.cxx | 10 |
4 files changed, 10 insertions, 13 deletions
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 797bd3e525da..95877cbfe9d9 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -310,7 +310,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // indexes void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr); - bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr); + void UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr); // numbering and bullets /** @@ -539,8 +539,8 @@ private: SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect = false); // take END cursor along when PageUp / -Down - SAL_DLLPRIVATE bool SttWrd(); - SAL_DLLPRIVATE bool EndWrd(); + SAL_DLLPRIVATE void SttWrd(); + SAL_DLLPRIVATE void EndWrd(); SAL_DLLPRIVATE bool NxtWrd_(); SAL_DLLPRIVATE bool PrvWrd_(); // #i92468# diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index b5b8b31e9198..d1b78368a7c3 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -443,7 +443,8 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, pDoc->ChgTOX(*pTOX, *pNewTOX); pTOX->DisableKeepExpression(); - bRet = pSh->UpdateTableOf(*pTOX, pSet); + pSh->UpdateTableOf(*pTOX, pSet); + bRet = false; pTOX->EnableKeepExpression(); if (pDoc->GetIDocumentUndoRedo().DoesUndo()) diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 1dfaa712ecfe..a00686c468da 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -318,7 +318,7 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) // Update directory - remove selection -bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) +void SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) { if(CanInsert()) { @@ -333,8 +333,6 @@ bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) } } } - - return false; } // handler for click on the field given as parameter. diff --git a/sw/source/uibase/wrtsh/wrtsh4.cxx b/sw/source/uibase/wrtsh/wrtsh4.cxx index cabec2f89244..8009ce98037b 100644 --- a/sw/source/uibase/wrtsh/wrtsh4.cxx +++ b/sw/source/uibase/wrtsh/wrtsh4.cxx @@ -27,10 +27,10 @@ // non-sentence separators on sentence separator. // The begin of paragraph is also the word beginning. -bool SwWrtShell::SttWrd() +void SwWrtShell::SttWrd() { if ( IsSttPara() ) - return true; + return; // Create temporary cursor without selection. Push(); ClearMark(); @@ -40,7 +40,6 @@ bool SwWrtShell::SttWrd() ClearMark(); // If Mark was previously set, summarize. Combine(); - return true; } // The end of a word is the follow of separator to nonseparator. @@ -48,10 +47,10 @@ bool SwWrtShell::SttWrd() // punctuation marks. // The end of a paragraph is also the end of a word. -bool SwWrtShell::EndWrd() +void SwWrtShell::EndWrd() { if ( IsEndWrd() ) - return true; + return; // Create temporary cursor without selection. Push(); ClearMark(); @@ -61,7 +60,6 @@ bool SwWrtShell::EndWrd() ClearMark(); // If Mark was previously set, summarize. Combine(); - return true; } bool SwWrtShell::NxtWrd_() |