diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-12-19 08:45:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-12-19 16:49:13 +0000 |
commit | ef503472251127d32a349f1647a83aad9ba04a78 (patch) | |
tree | 15115376bc0ceca02b4e9317acb89e4f97080abd | |
parent | 3b3738ba2b39daf5dbad00a705d04a12e5530a1d (diff) |
loplugin:implinheritancehelper in toolkit
use more ImplInheritanceHelper to reduce boilerplate
Change-Id: I209e013f84a83339d0f4a6dfd90b462a47b6beeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144441
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | toolkit/source/hatchwindow/hatchwindow.cxx | 41 | ||||
-rw-r--r-- | toolkit/source/hatchwindow/hatchwindow.hxx | 13 |
2 files changed, 2 insertions, 52 deletions
diff --git a/toolkit/source/hatchwindow/hatchwindow.cxx b/toolkit/source/hatchwindow/hatchwindow.cxx index 31b017d77fef..b421e13091f2 100644 --- a/toolkit/source/hatchwindow/hatchwindow.cxx +++ b/toolkit/source/hatchwindow/hatchwindow.cxx @@ -109,47 +109,6 @@ void VCLXHatchWindow::InplaceDeactivate() } -uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType ) -{ - // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. - - uno::Any aReturn( ::cppu::queryInterface( rType, - static_cast< embed::XHatchWindow* >( this ) ) ); - - if ( aReturn.hasValue() ) - { - return aReturn ; - } - - return VCLXWindow::queryInterface( rType ) ; -} - -void SAL_CALL VCLXHatchWindow::acquire() - noexcept -{ - VCLXWindow::acquire(); -} - -void SAL_CALL VCLXHatchWindow::release() - noexcept -{ - VCLXWindow::release(); -} - -uno::Sequence< uno::Type > SAL_CALL VCLXHatchWindow::getTypes() -{ - static cppu::OTypeCollection aTypeCollection(cppu::UnoType<embed::XHatchWindow>::get(), - VCLXWindow::getTypes()); - - return aTypeCollection.getTypes(); -} - -uno::Sequence< sal_Int8 > SAL_CALL VCLXHatchWindow::getImplementationId() -{ - return css::uno::Sequence<sal_Int8>(); -} - css::awt::Size SAL_CALL VCLXHatchWindow::getHatchBorderSize() { return aHatchBorderSize; diff --git a/toolkit/source/hatchwindow/hatchwindow.hxx b/toolkit/source/hatchwindow/hatchwindow.hxx index 52e91d12e695..128a5198f9ab 100644 --- a/toolkit/source/hatchwindow/hatchwindow.hxx +++ b/toolkit/source/hatchwindow/hatchwindow.hxx @@ -24,8 +24,8 @@ #include <toolkit/awt/vclxwindow.hxx> class SvResizeWindow; -class VCLXHatchWindow : public css::embed::XHatchWindow, - public VCLXWindow +typedef cppu::ImplInheritanceHelper< VCLXWindow, css::embed::XHatchWindow> VCLXHatchWindow_Base; +class VCLXHatchWindow : public VCLXHatchWindow_Base { css::uno::Reference< css::embed::XHatchWindowController > m_xController; css::awt::Size aHatchBorderSize; @@ -45,15 +45,6 @@ public: void Activated(); void Deactivated(); - // XInterface - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override; - void SAL_CALL acquire() noexcept override; - void SAL_CALL release() noexcept override; - - // XTypeProvider - css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // XHatchWindow virtual void SAL_CALL setController( const css::uno::Reference< css::embed::XHatchWindowController >& xController ) override; virtual css::awt::Size SAL_CALL getHatchBorderSize() override; |