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>
This commit is contained in:
Noel Grandin 2022-12-14 15:28:51 +02:00
parent c7b93e2687
commit c43a4b0ffd
2 changed files with 3 additions and 29 deletions

View file

@ -174,7 +174,7 @@ IMPL_LINK_NOARG(LimitBox, ActivateHdl, weld::ComboBox&, bool)
LimitBoxController::LimitBoxController( LimitBoxController::LimitBoxController(
const uno::Reference< uno::XComponentContext >& rxContext ) : const uno::Reference< uno::XComponentContext >& rxContext ) :
svt::ToolboxController( rxContext, LimitBoxController_Base( rxContext,
uno::Reference< frame::XFrame >(), uno::Reference< frame::XFrame >(),
".uno:DBLimit" ), ".uno:DBLimit" ),
m_xLimitBox( nullptr ) 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 /// XServiceInfo
OUString SAL_CALL LimitBoxController::getImplementationName() OUString SAL_CALL LimitBoxController::getImplementationName()
{ {

View file

@ -24,19 +24,14 @@ class LimitBox;
* It is communicating with querycontroller and this channel make enable * It is communicating with querycontroller and this channel make enable
* to set\get the value of limitbox when switching between views * to set\get the value of limitbox when switching between views
*/ */
class LimitBoxController: public svt::ToolboxController, typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, css::lang::XServiceInfo> LimitBoxController_Base;
public css::lang::XServiceInfo class LimitBoxController: public LimitBoxController_Base
{ {
public: public:
explicit LimitBoxController( explicit LimitBoxController(
const css::uno::Reference< css::uno::XComponentContext >& rxContext ); const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~LimitBoxController() override; 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 /// XServiceInfo
DECLARE_SERVICE_INFO(); DECLARE_SERVICE_INFO();