diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-12-14 15:28:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-12-14 16:24:54 +0000 |
commit | c43a4b0ffd96caaba64b228b059ee5c26049f399 (patch) | |
tree | fd7f80856834a13089b0e357d18cfc72188f4b7c /dbaccess | |
parent | c7b93e2687af1bf26b0843e3d815effd129752f6 (diff) |
loplugin:implinheritancehelper in dbaccess
use more ImplInheritanceHelper to reduce boilerplate
Change-Id: Iefeccd009ae03d0dda8b9ff436408d747052b8af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144161
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 23 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/limitboxcontroller.hxx | 9 |
2 files changed, 3 insertions, 29 deletions
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx index 8b6884338063..37624aceb419 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx @@ -174,7 +174,7 @@ IMPL_LINK_NOARG(LimitBox, ActivateHdl, weld::ComboBox&, bool) LimitBoxController::LimitBoxController( const uno::Reference< uno::XComponentContext >& rxContext ) : - svt::ToolboxController( rxContext, + LimitBoxController_Base( rxContext, uno::Reference< frame::XFrame >(), ".uno:DBLimit" ), m_xLimitBox( nullptr ) @@ -185,27 +185,6 @@ LimitBoxController::~LimitBoxController() { } -/// XInterface -uno::Any SAL_CALL LimitBoxController::queryInterface( const uno::Type& aType ) -{ - uno::Any a = ToolboxController::queryInterface( aType ); - if ( a.hasValue() ) - return a; - - return ::cppu::queryInterface( aType, static_cast< lang::XServiceInfo* >( this )); -} - -void SAL_CALL LimitBoxController::acquire() noexcept -{ - ToolboxController::acquire(); -} - -void SAL_CALL LimitBoxController::release() noexcept -{ - ToolboxController::release(); -} - - /// XServiceInfo OUString SAL_CALL LimitBoxController::getImplementationName() { diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.hxx b/dbaccess/source/ui/querydesign/limitboxcontroller.hxx index af1e5a666882..142280937235 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.hxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.hxx @@ -24,19 +24,14 @@ class LimitBox; * It is communicating with querycontroller and this channel make enable * to set\get the value of limitbox when switching between views */ -class LimitBoxController: public svt::ToolboxController, - public css::lang::XServiceInfo +typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, css::lang::XServiceInfo> LimitBoxController_Base; +class LimitBoxController: public LimitBoxController_Base { public: explicit LimitBoxController( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); virtual ~LimitBoxController() override; - /// XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; - virtual void SAL_CALL acquire() noexcept override; - virtual void SAL_CALL release() noexcept override; - /// XServiceInfo DECLARE_SERVICE_INFO(); |