diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-22 15:52:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-24 07:56:01 +0100 |
commit | de8f6b25de6fbe813fe172542e7eff1596b37335 (patch) | |
tree | 4a2864c87395463391cd2ad40c4f1ada962f44e9 /svtools | |
parent | 182a3c7e12a0f56d664deaf67d17bc51eef6299d (diff) |
loplugin:unused-returns in vcl
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e
Reviewed-on: https://gerrit.libreoffice.org/48331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 4 | ||||
-rw-r--r-- | svtools/source/inc/svimpbox.hxx | 2 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 9 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.hxx | 2 |
4 files changed, 5 insertions, 12 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 8f4e6b0fe443..88f6dc6d691e 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2611,7 +2611,7 @@ void ImpLBSelEng::DestroyAnchor() pImp->pAnchor = nullptr; } -bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) +void ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) { SvTreeListEntry* pNewCursor = pImp->MakePointVisible( rPoint ); if( pNewCursor != pImp->pCursor ) @@ -2624,9 +2624,7 @@ bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor //if( !bDontSelectAtCursor && !pImp->bSimpleTravel ) // pImp->SelectEntry( pNewCursor, true ); pImp->SetCursor( pNewCursor, bDontSelectAtCursor ); - return true; } - return false; } bool ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint ) diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 5b69e16c479f..28fa2ed4b427 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -54,7 +54,7 @@ public: void BeginDrag() override; void CreateAnchor() override; void DestroyAnchor() override; - bool SetCursorAtPoint( const Point& rPoint, + void SetCursorAtPoint( const Point& rPoint, bool bDontSelectAtCursor=false ) override; bool IsSelectionAtPoint( const Point& rPoint ) override; void DeselectAtPoint( const Point& rPoint ) override; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 837e3f61aec9..45d5b3bb5265 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -2451,9 +2451,8 @@ namespace svt { namespace table } - bool TableFunctionSet::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) + void TableFunctionSet::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) { - bool bHandled = false; // newRow is the row which includes the point, getCurRow() is the last selected row, before the mouse click RowPos newRow = m_pTableControl->getRowAtPoint( rPoint ); if ( newRow == ROW_COL_HEADERS ) @@ -2464,13 +2463,12 @@ namespace svt { namespace table newCol = m_pTableControl->getLeftColumn(); if ( ( newRow == ROW_INVALID ) || ( newCol == COL_INVALID ) ) - return false; + return; if ( bDontSelectAtCursor ) { if ( m_pTableControl->getSelectedRowCount() > 1 ) m_pTableControl->getSelEngine()->AddAlways(true); - bHandled = true; } else if ( m_pTableControl->getAnchor() == m_pTableControl->getCurRow() ) { @@ -2496,7 +2494,6 @@ namespace svt { namespace table m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 ); } m_pTableControl->invalidateSelectedRegion( m_pTableControl->getCurRow(), newRow ); - bHandled = true; } //no region selected else @@ -2519,10 +2516,8 @@ namespace svt { namespace table m_pTableControl->getSelEngine()->AddAlways(true); m_pTableControl->invalidateRow( newRow ); - bHandled = true; } m_pTableControl->goTo( newCol, newRow ); - return bHandled; } bool TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 4a0c5a78974f..a679bf646b46 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -465,7 +465,7 @@ namespace svt { namespace table virtual void BeginDrag() override; virtual void CreateAnchor() override; virtual void DestroyAnchor() override; - virtual bool SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor = false) override; + virtual void SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor = false) override; virtual bool IsSelectionAtPoint( const Point& rPoint ) override; virtual void DeselectAtPoint( const Point& rPoint ) override; virtual void DeselectAll() override; |