editeng/source/outliner/outliner.cxx | 5 +---- editeng/source/uno/unoedhlp.cxx | 4 +--- editeng/source/uno/unofored.cxx | 3 ++- editeng/source/uno/unoforou.cxx | 3 ++- include/editeng/outliner.hxx | 2 +- include/editeng/unoedhlp.hxx | 4 +--- starmath/source/accessibility.cxx | 6 ++++-- 7 files changed, 12 insertions(+), 15 deletions(-)
New commits: commit 8f35503fb9273843a0153084e6ec79fead301972 Author: Noel Grandin <[email protected]> AuthorDate: Mon Jul 30 15:34:59 2018 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Jul 31 14:38:00 2018 +0200 loplugin:returnconstant in editeng Change-Id: I9e38c1634466e580af29547df554d620b5b7860c Reviewed-on: https://gerrit.libreoffice.org/58336 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 374fa86025f9..2f60f3daca1d 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1308,9 +1308,8 @@ void Outliner::RemoveView( OutlinerView const * pView ) } } -OutlinerView* Outliner::RemoveView( size_t nIndex ) +void Outliner::RemoveView( size_t nIndex ) { - EditView* pEditView = pEditEngine->GetView( nIndex ); pEditView->HideCursor(); // HACK @@ -1321,8 +1320,6 @@ OutlinerView* Outliner::RemoveView( size_t nIndex ) advance( it, nIndex ); aViewList.erase( it ); } - - return nullptr; // return superfluous } diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index e5ca87a63056..1dffdc82da0f 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -91,7 +91,7 @@ std::unique_ptr<SfxHint> SvxEditSourceHelper::EENotification2Hint( EENotify cons return o3tl::make_unique<SfxHint>( ); } -bool SvxEditSourceHelper::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) +void SvxEditSourceHelper::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) { // IA2 CWS introduced bInCell, but also did many other changes here. // Need to verify implementation with AT (IA2 and ATK) @@ -242,8 +242,6 @@ bool SvxEditSourceHelper::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nE } nEndIndex += aEndPos.nIndex; } - - return true; } Point SvxEditSourceHelper::EEToUserSpace( const Point& rPoint, const Size& rEESize, bool bIsVertical ) diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 69ce16ec84f0..3b4b4decd54c 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -409,7 +409,8 @@ bool SvxEditEngineForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, bool SvxEditEngineForwarder::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) const { - return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex, bInCell ); + SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex, bInCell ); + return true; } sal_Int32 SvxEditEngineForwarder::GetLineCount( sal_Int32 nPara ) const diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index c53d610b97c1..e8f4330febe4 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -377,7 +377,8 @@ bool SvxOutlinerForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sa bool SvxOutlinerForwarder::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) const { - return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex, bInCell ); + SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex, bInCell ); + return true; } sal_Int32 SvxOutlinerForwarder::GetLineCount( sal_Int32 nPara ) const diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index d534b8862771..e4258582af2a 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -690,7 +690,7 @@ public: size_t InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) ); void RemoveView( OutlinerView const * pView ); - OutlinerView* RemoveView( size_t nIndex ); + void RemoveView( size_t nIndex ); OutlinerView* GetView( size_t nIndex ) const; size_t GetViewCount() const; diff --git a/include/editeng/unoedhlp.hxx b/include/editeng/unoedhlp.hxx index 3858a5ae717d..45f51e9b38e6 100644 --- a/include/editeng/unoedhlp.hxx +++ b/include/editeng/unoedhlp.hxx @@ -87,10 +87,8 @@ public: @param nIndex The character index from which the range of similar attributed characters is requested - - @return true, if the range has been successfully determined */ - static bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false); + static void GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false); /** Convert point from edit engine to user coordinate space diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 988931c5a540..b55b264182a4 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -1259,8 +1259,10 @@ bool SmTextForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int bool SmTextForwarder::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) const { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); - return pEditEngine && - SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, *pEditEngine, nPara, nIndex, bInCell ); + if (!pEditEngine) + return false; + SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, *pEditEngine, nPara, nIndex, bInCell ); + return true; } sal_Int32 SmTextForwarder::GetLineCount( sal_Int32 nPara ) const _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
