sc/inc/tokenuno.hxx | 2 +- sc/source/filter/oox/defnamesbuffer.cxx | 2 +- sc/source/ui/unoobj/cellsuno.cxx | 2 +- sc/source/ui/unoobj/nameuno.cxx | 2 +- sc/source/ui/unoobj/tokenuno.cxx | 6 ++---- sw/source/uibase/inc/wrtsh.hxx | 6 +++--- sw/source/uibase/index/toxmgr.cxx | 3 ++- sw/source/uibase/wrtsh/wrtsh2.cxx | 4 +--- sw/source/uibase/wrtsh/wrtsh4.cxx | 10 ++++------ 9 files changed, 16 insertions(+), 21 deletions(-)
New commits: commit 0025cb72f2b6b19d63fb1393df910845f255a6d0 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Aug 14 17:33:40 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 16 08:54:52 2018 +0200 loplugin:returnconstant in SwWrtShell Change-Id: I1f810108a3c79f4d8b7df6ef1ad755a29dbc62b6 Reviewed-on: https://gerrit.libreoffice.org/59127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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_() commit c5ff0696bddc6fdcdc92d7585c70e2b5e202d11b Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Aug 14 17:14:18 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 16 08:54:42 2018 +0200 loplugin:returnconstant in ScTokenConversion Change-Id: I17d8d188cb4a51978af41788ee3adf9d221c8bdb Reviewed-on: https://gerrit.libreoffice.org/59126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/tokenuno.hxx b/sc/inc/tokenuno.hxx index 2eab2a816f02..4946c5b8a536 100644 --- a/sc/inc/tokenuno.hxx +++ b/sc/inc/tokenuno.hxx @@ -42,7 +42,7 @@ public: ScDocument& rDoc, ScTokenArray& rTokenArray, const css::uno::Sequence< css::sheet::FormulaToken >& rSequence ); - static SC_DLLPUBLIC bool ConvertToTokenSequence( + static SC_DLLPUBLIC void ConvertToTokenSequence( const ScDocument& rDoc, css::uno::Sequence< css::sheet::FormulaToken >& rSequence, const ScTokenArray& rTokenArray ); diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx index 84bba7249227..d424e2f662cf 100644 --- a/sc/source/filter/oox/defnamesbuffer.cxx +++ b/sc/source/filter/oox/defnamesbuffer.cxx @@ -353,7 +353,7 @@ void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalL ScTokenArray* pTokenArray = mpScRangeData->GetCode(); Sequence< FormulaToken > aFTokenSeq; - (void)ScTokenConversion::ConvertToTokenSequence( getScDocument(), aFTokenSeq, *pTokenArray ); + ScTokenConversion::ConvertToTokenSequence( getScDocument(), aFTokenSeq, *pTokenArray ); // set built-in names (print ranges, repeated titles, filter ranges) if( !isGlobalName() ) switch( mcBuiltinId ) { diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 4ede9777957f..1d951628466c 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5066,7 +5066,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellRangeObj::getArrayTokens() { const ScTokenArray* pTokenArray = pFCell1->GetCode(); if (pTokenArray) - (void)ScTokenConversion::ConvertToTokenSequence(rDoc, aSequence, *pTokenArray); + ScTokenConversion::ConvertToTokenSequence(rDoc, aSequence, *pTokenArray); } } } diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 5e5ad772c0fe..61674c9751d1 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -320,7 +320,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScNamedRangeObj::getTokens() { ScTokenArray* pTokenArray = pData->GetCode(); if ( pTokenArray ) - (void)ScTokenConversion::ConvertToTokenSequence( pDocShell->GetDocument(), aSequence, *pTokenArray ); + ScTokenConversion::ConvertToTokenSequence( pDocShell->GetDocument(), aSequence, *pTokenArray ); } return aSequence; } diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index d8df0b439ec6..a5a1bca2ffe9 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -140,7 +140,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScFormulaParserObj::parseFormula( SetCompilerFlags( aCompiler ); ScTokenArray* pCode = aCompiler.CompileString( aFormula ); - (void)ScTokenConversion::ConvertToTokenSequence( rDoc, aRet, *pCode ); + ScTokenConversion::ConvertToTokenSequence( rDoc, aRet, *pCode ); delete pCode; } @@ -353,7 +353,7 @@ bool ScTokenConversion::ConvertToTokenArray( ScDocument& rDoc, return !rTokenArray.Fill(rSequence, rDoc.GetSharedStringPool(), rDoc.GetExternalRefManager()); } -bool ScTokenConversion::ConvertToTokenSequence( const ScDocument& rDoc, +void ScTokenConversion::ConvertToTokenSequence( const ScDocument& rDoc, uno::Sequence<sheet::FormulaToken>& rSequence, const ScTokenArray& rTokenArray ) { sal_Int32 nLen = static_cast<sal_Int32>(rTokenArray.GetLen()); @@ -473,8 +473,6 @@ bool ScTokenConversion::ConvertToTokenSequence( const ScDocument& rDoc, } else rSequence.realloc(0); - - return true; } ScFormulaOpCodeMapperObj::ScFormulaOpCodeMapperObj(::std::unique_ptr<formula::FormulaCompiler> && _pCompiler) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits