diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 15:34:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-31 14:38:00 +0200 |
commit | 8f35503fb9273843a0153084e6ec79fead301972 (patch) | |
tree | 60fd73004442d8cd66abeb6bc3da820bbbff5169 /editeng | |
parent | cba7acca97ac0245b93e27ba46351285fd7c5ff2 (diff) |
loplugin:returnconstant in editeng
Change-Id: I9e38c1634466e580af29547df554d620b5b7860c
Reviewed-on: https://gerrit.libreoffice.org/58336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 5 | ||||
-rw-r--r-- | editeng/source/uno/unoedhlp.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unofored.cxx | 3 | ||||
-rw-r--r-- | editeng/source/uno/unoforou.cxx | 3 |
4 files changed, 6 insertions, 9 deletions
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 |