diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-29 09:07:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-29 23:42:26 +0000 |
commit | 309574394bd4ae3e9e10e5ff0d64bdd7bbbc8b83 (patch) | |
tree | f8b8cea0a81bc74ca34e8bda2d0dfce939b28ce0 /svtools | |
parent | 20deac4903fc0697477e855feeff482b3da234f9 (diff) |
callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after...
commit b44cbb26efe1d0b0950b1e1613e131b506dc3876
Author: Noel Grandin <noel@peralex.com>
Date: Tue Jan 20 12:38:10 2015 +0200
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/vclxaccessibleheaderbaritem.hxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 15 | ||||
-rw-r--r-- | svtools/source/contnr/ivctrl.cxx | 5 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/accessibleruler.cxx | 42 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenuacc.cxx | 31 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenuimp.hxx | 2 | ||||
-rw-r--r-- | svtools/source/control/valueacc.cxx | 43 | ||||
-rw-r--r-- | svtools/source/control/valueimp.hxx | 2 | ||||
-rw-r--r-- | svtools/source/control/vclxaccessibleheaderbaritem.cxx | 13 | ||||
-rw-r--r-- | svtools/source/table/tabledatawindow.cxx | 13 | ||||
-rw-r--r-- | svtools/source/table/tabledatawindow.hxx | 2 |
12 files changed, 4 insertions, 173 deletions
diff --git a/svtools/inc/vclxaccessibleheaderbaritem.hxx b/svtools/inc/vclxaccessibleheaderbaritem.hxx index 3274c7e72b36..301036cb04b5 100644 --- a/svtools/inc/vclxaccessibleheaderbaritem.hxx +++ b/svtools/inc/vclxaccessibleheaderbaritem.hxx @@ -58,7 +58,6 @@ private: protected: - void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); // OCommonAccessibleComponent diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 713b4c9ad774..fe8d62d3864a 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -3425,22 +3425,15 @@ void SvxIconChoiceCtrl_Impl::InitSettings() { // unit (from settings) is Point vcl::Font aFont( rStyleSettings.GetFieldFont() ); - //const vcl::Font& rFont = pView->GetFont(); - //if( pView->HasFontTextColor() ) - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - //if( pView->HasFontFillColor() ) - //aFont.SetFillColor( rFont.GetFillColor() ); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); pView->SetPointFont( aFont ); SetDefaultTextSize(); } - //if( !pView->HasFontTextColor() ) - pView->SetTextColor( rStyleSettings.GetFieldTextColor() ); - //if( !pView->HasFontFillColor() ) - pView->SetTextFillColor(); + pView->SetTextColor( rStyleSettings.GetFieldTextColor() ); + pView->SetTextFillColor(); - //if( !pView->HasBackground() ) - pView->SetBackground( rStyleSettings.GetFieldColor()); + pView->SetBackground( rStyleSettings.GetFieldColor()); long nScrBarSize = rStyleSettings.GetScrollBarSize(); if( nScrBarSize != nHorSBarHeight || nScrBarSize != nVerSBarWidth ) diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index e60e62f50cb7..6531f877736f 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -131,11 +131,6 @@ bool SvtIconChoiceCtrl::HasFont() const return false; } -bool SvtIconChoiceCtrl::HasFontTextColor() const -{ - return true; -} - bool SvtIconChoiceCtrl::HasFontFillColor() const { return true; diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index aadadd673070..f726a6a8fd80 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3633,10 +3633,6 @@ void SvTreeListBox::RequestHelp( const HelpEvent& rHEvt ) Control::RequestHelp( rHEvt ); } -void SvTreeListBox::CursorMoved( SvTreeListEntry* ) -{ -} - IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData ) { const SvTreeListEntry* pLeft = pData->pLeft; @@ -3933,10 +3929,6 @@ void SvTreeListBox::CallImplEventListeners(sal_uLong nEvent, void* pData) CallEventListeners(nEvent, pData); } -void SvTreeListBox::FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& /*rStateSet*/ ) const -{ -} - void SvTreeListBox::set_min_width_in_chars(sal_Int32 nChars) { nMinWidthInChars = nChars; diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx index c9262a8eba7c..493ccc8beed4 100644 --- a/svtools/source/control/accessibleruler.cxx +++ b/svtools/source/control/accessibleruler.cxx @@ -132,13 +132,7 @@ bool SAL_CALL SvtRulerAccessible::isVisible() throw( RuntimeException ) return mpRepr->IsVisible(); } -bool SAL_CALL SvtRulerAccessible::isFocusTraversable() throw( RuntimeException ) -{ - return true; -} - //===== XAccessibleContext ================================================== - sal_Int32 SAL_CALL SvtRulerAccessible::getAccessibleChildCount( void ) throw( RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -293,36 +287,6 @@ void SAL_CALL SvtRulerAccessible::removeAccessibleEventListener( const uno::Refe } } -void SAL_CALL SvtRulerAccessible::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) - throw( RuntimeException ) -{ - if( xListener.is() ) - { - ::osl::MutexGuard aGuard( m_aMutex ); - - ThrowExceptionIfNotAlive(); - - uno::Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( mpRepr ); - if( xWindow.is() ) - xWindow->addFocusListener( xListener ); - } -} - -void SAL_CALL SvtRulerAccessible::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener ) - throw (RuntimeException) -{ - if( xListener.is() ) - { - ::osl::MutexGuard aGuard( m_aMutex ); - - ThrowExceptionIfNotAlive(); - - uno::Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( mpRepr ); - if( xWindow.is() ) - xWindow->removeFocusListener( xListener ); - } -} - void SAL_CALL SvtRulerAccessible::grabFocus() throw( RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; @@ -333,12 +297,6 @@ void SAL_CALL SvtRulerAccessible::grabFocus() throw( RuntimeException, std::exce mpRepr->GrabFocus(); } -Any SAL_CALL SvtRulerAccessible::getAccessibleKeyBinding() throw( RuntimeException ) -{ - // here is no implementation, because here are no KeyBindings for every object - return Any(); -} - sal_Int32 SvtRulerAccessible::getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) { diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 8aab2122293b..14d05edd3df7 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -427,8 +427,6 @@ awt::Size SAL_CALL ToolbarMenuAcc::getSize() throw (RuntimeException, std::excep return awt::Size( aOutSize.Width(), aOutSize.Height() ); } - - void SAL_CALL ToolbarMenuAcc::grabFocus() throw (RuntimeException, std::exception) { ThrowIfDisposed(); @@ -436,16 +434,6 @@ void SAL_CALL ToolbarMenuAcc::grabFocus() throw (RuntimeException, std::exceptio mpParent->mrMenu.GrabFocus(); } - - -Any SAL_CALL ToolbarMenuAcc::getAccessibleKeyBinding() throw (RuntimeException) -{ - ThrowIfDisposed(); - return Any(); -} - - - sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException, std::exception) { ThrowIfDisposed(); @@ -453,8 +441,6 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException, std: return static_cast<sal_Int32>(nColor); } - - sal_Int32 SAL_CALL ToolbarMenuAcc::getBackground() throw (RuntimeException, std::exception) { ThrowIfDisposed(); @@ -462,8 +448,6 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getBackground() throw (RuntimeException, std: return static_cast<sal_Int32>(nColor); } - - void SAL_CALL ToolbarMenuAcc::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { const SolarMutexGuard aSolarGuard; @@ -472,8 +456,6 @@ void SAL_CALL ToolbarMenuAcc::selectAccessibleChild( sal_Int32 nChildIndex ) thr mpParent->selectAccessibleChild( nChildIndex ); } - - sal_Bool SAL_CALL ToolbarMenuAcc::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { const SolarMutexGuard aSolarGuard; @@ -909,29 +891,16 @@ awt::Size SAL_CALL ToolbarMenuEntryAcc::getSize() throw (RuntimeException, std:: return aRet; } - - void SAL_CALL ToolbarMenuEntryAcc::grabFocus() throw (RuntimeException, std::exception) { // nothing to do } - - -Any SAL_CALL ToolbarMenuEntryAcc::getAccessibleKeyBinding() throw (RuntimeException) -{ - return Any(); -} - - - sal_Int32 SAL_CALL ToolbarMenuEntryAcc::getForeground( ) throw (RuntimeException, std::exception) { return static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor()); } - - sal_Int32 SAL_CALL ToolbarMenuEntryAcc::getBackground( ) throw (RuntimeException, std::exception) { return static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor()); diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx index 55aca40b9cf4..8029dea5b303 100644 --- a/svtools/source/control/toolbarmenuimp.hxx +++ b/svtools/source/control/toolbarmenuimp.hxx @@ -162,7 +162,6 @@ public: virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -250,7 +249,6 @@ public: virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 56f515c3877a..f552ee5d030c 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -527,8 +527,6 @@ awt::Size SAL_CALL ValueSetAcc::getSize() return aRet; } - - void SAL_CALL ValueSetAcc::grabFocus() throw (uno::RuntimeException, std::exception) { @@ -537,17 +535,6 @@ void SAL_CALL ValueSetAcc::grabFocus() mpParent->GrabFocus(); } - - -uno::Any SAL_CALL ValueSetAcc::getAccessibleKeyBinding() - throw (uno::RuntimeException) -{ - ThrowIfDisposed(); - return uno::Any(); -} - - - sal_Int32 SAL_CALL ValueSetAcc::getForeground( ) throw (uno::RuntimeException, std::exception) { @@ -556,8 +543,6 @@ sal_Int32 SAL_CALL ValueSetAcc::getForeground( ) return static_cast<sal_Int32>(nColor); } - - sal_Int32 SAL_CALL ValueSetAcc::getBackground( ) throw (uno::RuntimeException, std::exception) { @@ -566,8 +551,6 @@ sal_Int32 SAL_CALL ValueSetAcc::getBackground( ) return static_cast<sal_Int32>(nColor); } - - void SAL_CALL ValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception) { @@ -1090,8 +1073,6 @@ sal_Bool SAL_CALL ValueItemAcc::containsPoint( const awt::Point& aPoint ) return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint ); } - - uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibleAtPoint( const awt::Point& ) throw (uno::RuntimeException, std::exception) { @@ -1099,8 +1080,6 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueItemAcc::getAccessibl return xRet; } - - awt::Rectangle SAL_CALL ValueItemAcc::getBounds() throw (uno::RuntimeException, std::exception) { @@ -1124,8 +1103,6 @@ awt::Rectangle SAL_CALL ValueItemAcc::getBounds() return aRet; } - - awt::Point SAL_CALL ValueItemAcc::getLocation() throw (uno::RuntimeException, std::exception) { @@ -1138,8 +1115,6 @@ awt::Point SAL_CALL ValueItemAcc::getLocation() return aRet; } - - awt::Point SAL_CALL ValueItemAcc::getLocationOnScreen() throw (uno::RuntimeException, std::exception) { @@ -1158,8 +1133,6 @@ awt::Point SAL_CALL ValueItemAcc::getLocationOnScreen() return aRet; } - - awt::Size SAL_CALL ValueItemAcc::getSize() throw (uno::RuntimeException, std::exception) { @@ -1172,24 +1145,12 @@ awt::Size SAL_CALL ValueItemAcc::getSize() return aRet; } - - void SAL_CALL ValueItemAcc::grabFocus() throw (uno::RuntimeException, std::exception) { // nothing to do } - - -uno::Any SAL_CALL ValueItemAcc::getAccessibleKeyBinding() - throw (uno::RuntimeException) -{ - return uno::Any(); -} - - - sal_Int32 SAL_CALL ValueItemAcc::getForeground( ) throw (uno::RuntimeException, std::exception) { @@ -1197,8 +1158,6 @@ sal_Int32 SAL_CALL ValueItemAcc::getForeground( ) return static_cast<sal_Int32>(nColor); } - - sal_Int32 SAL_CALL ValueItemAcc::getBackground( ) throw (uno::RuntimeException, std::exception) { @@ -1210,8 +1169,6 @@ sal_Int32 SAL_CALL ValueItemAcc::getBackground( ) return static_cast<sal_Int32>(nColor); } - - sal_Int64 SAL_CALL ValueItemAcc::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw( uno::RuntimeException, std::exception ) { sal_Int64 nRet; diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 9773363eb213..d04207434810 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -138,7 +138,6 @@ public: virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -258,7 +257,6 @@ public: virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/svtools/source/control/vclxaccessibleheaderbaritem.cxx b/svtools/source/control/vclxaccessibleheaderbaritem.cxx index 80c566687ce4..dd504066c4c6 100644 --- a/svtools/source/control/vclxaccessibleheaderbaritem.cxx +++ b/svtools/source/control/vclxaccessibleheaderbaritem.cxx @@ -55,22 +55,12 @@ VCLXAccessibleHeaderBarItem::VCLXAccessibleHeaderBarItem( HeaderBar* pHeadBar m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() ); } - - VCLXAccessibleHeaderBarItem::~VCLXAccessibleHeaderBarItem() { delete m_pExternalLock; m_pExternalLock = NULL; } - - -void VCLXAccessibleHeaderBarItem::ProcessWindowEvent( const VclWindowEvent& ) -{ -} - - - void VCLXAccessibleHeaderBarItem::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) { if ( m_pHeadBar ) @@ -87,10 +77,7 @@ void VCLXAccessibleHeaderBarItem::FillAccessibleStateSet( utl::AccessibleStateSe } } - // OCommonAccessibleComponent - - awt::Rectangle VCLXAccessibleHeaderBarItem::implGetBounds() throw (RuntimeException) { awt::Rectangle aBounds; diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 9b5bcc5538f4..cddaf452732c 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -49,13 +49,11 @@ namespace svt { namespace table SetFillColor( aWindowColor ); } - TableDataWindow::~TableDataWindow() { impl_hideTipWindow(); } - void TableDataWindow::Paint( const Rectangle& rUpdateRect ) { m_rTableControl.doPaintContent( rUpdateRect ); @@ -66,17 +64,6 @@ namespace svt { namespace table Window::SetBackground( rColor ); } - void TableDataWindow::SetControlBackground( const Color& rColor ) - { - Window::SetControlBackground( rColor ); - } - - void TableDataWindow::SetControlBackground() - { - Window::SetControlBackground(); - } - - void TableDataWindow::RequestHelp( const HelpEvent& rHEvt ) { HelpEventMode const nHelpMode = rHEvt.GetMode(); diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index 2c6848e0a4ff..13e1f1fcb0a7 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -59,8 +59,6 @@ namespace svt { namespace table virtual void MouseButtonDown( const MouseEvent& rMEvt) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt) SAL_OVERRIDE; virtual bool Notify(NotifyEvent& rNEvt) SAL_OVERRIDE; - void SetControlBackground(const Color& rColor); - void SetControlBackground(); virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE; void SetBackground(const Wallpaper& rColor); |