svx/source/tbxctrls/tbunocontroller.cxx            |   31 ---
 svx/source/tbxctrls/tbunosearchcontrollers.cxx     |  217 ++-------------------
 sw/source/core/unocore/unostyle.cxx                |   28 --
 sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx |   50 ----
 sw/source/uibase/inc/unotxvw.hxx                   |   33 +--
 sw/source/uibase/inc/workctrl.hxx                  |    8 
 sw/source/uibase/ribbar/workctrl.cxx               |   53 -----
 sw/source/uibase/uno/unotxvw.cxx                   |   97 ---------
 8 files changed, 54 insertions(+), 463 deletions(-)

New commits:
commit 705594fc805012b5bf6167d7f9fee63bb1b90a1b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Dec 14 16:14:02 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Dec 14 18:24:45 2022 +0000

    loplugin:implinheritancehelper in sw
    
    use more ImplInheritanceHelper to reduce boilerplate
    
    Change-Id: I0bf96b2e3d897d19d4883c2958c72fbfe3b61080
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144164
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 54292da78c9c..cd2097cc3db5 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -630,23 +630,18 @@ public:
     void PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& 
rPropSet, const SfxItemPropertyMapEntry& rEntry, const uno::Any& rVal, 
SwStyleBase_Impl& rBaseImpl);
 };
 
+typedef cppu::ImplInheritanceHelper< SwXStyle, css::document::XEventsSupplier> 
SwXFrameStyle_Base;
 class SwXFrameStyle
-    : public SwXStyle
-    , public css::document::XEventsSupplier
+    : public SwXFrameStyle_Base
     , public sw::ICoreFrameStyle
 {
 public:
     SwXFrameStyle(SfxStyleSheetBasePool& rPool,
                                 SwDoc*  pDoc,
                                 const OUString& rStyleName) :
-        SwXStyle(&rPool, SfxStyleFamily::Frame, pDoc, rStyleName){}
+        SwXFrameStyle_Base(&rPool, SfxStyleFamily::Frame, pDoc, rStyleName){}
     explicit SwXFrameStyle(SwDoc *pDoc);
 
-    virtual void SAL_CALL acquire(  ) noexcept override {SwXStyle::acquire();}
-    virtual void SAL_CALL release(  ) noexcept override {SwXStyle::release();}
-
-    virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType 
) override;
     virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL 
getEvents(  ) override;
 
     //ICoreStyle
@@ -3343,7 +3338,7 @@ void SwXPageStyle::setPropertyValue(const OUString& 
rPropertyName, const uno::An
 }
 
 SwXFrameStyle::SwXFrameStyle(SwDoc *pDoc)
-    : SwXStyle(pDoc, SfxStyleFamily::Frame, false)
+    : SwXFrameStyle_Base(pDoc, SfxStyleFamily::Frame, false)
 { }
 
 void SwXFrameStyle::SetItem(sal_uInt16 eAtr, const SfxPoolItem& rItem)
@@ -3369,21 +3364,6 @@ const SfxPoolItem* SwXFrameStyle::GetItem(sal_uInt16 
eAtr)
     return &xStyle->GetItemSet().Get(eAtr);
 }
 
-uno::Sequence<uno::Type> SwXFrameStyle::getTypes()
-{
-    return cppu::OTypeCollection(
-            cppu::UnoType<XEventsSupplier>::get(),
-            SwXStyle::getTypes()
-        ).getTypes();
-}
-
-uno::Any SwXFrameStyle::queryInterface(const uno::Type& rType)
-{
-    if(rType == cppu::UnoType<XEventsSupplier>::get())
-        return uno::Any(uno::Reference<XEventsSupplier>(this));
-    return SwXStyle::queryInterface(rType);
-}
-
 uno::Reference<container::XNameReplace> SwXFrameStyle::getEvents()
 {
     return new SwFrameStyleEventDescriptor(*this);
diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx 
b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
index a97974f57f34..1603d11b2608 100644
--- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
+++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
@@ -97,7 +97,8 @@ IMPL_LINK(CurrentEdit, KeyInputHdl, const KeyEvent&, rKEvt, 
bool)
 }
 
 /// Controller for .uno:MailMergeCurrentEntry toolbar checkbox: creates the 
checkbox & handles the value.
-class MMCurrentEntryController : public svt::ToolboxController, public 
lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> MMCurrentEntryController_Base;
+class MMCurrentEntryController : public MMCurrentEntryController_Base
 {
     VclPtr<CurrentEdit> m_xCurrentEdit;
 
@@ -105,31 +106,11 @@ class MMCurrentEntryController : public 
svt::ToolboxController, public lang::XSe
 
 public:
     explicit MMCurrentEntryController(const 
uno::Reference<uno::XComponentContext>& rContext)
-        : svt::ToolboxController(rContext, uno::Reference<frame::XFrame>(), 
".uno:MailMergeCurrentEntry")
+        : MMCurrentEntryController_Base(rContext, 
uno::Reference<frame::XFrame>(), ".uno:MailMergeCurrentEntry")
         , m_xCurrentEdit(nullptr)
     {
     }
 
-    // XInterface
-    virtual uno::Any SAL_CALL queryInterface(const uno::Type& aType) override
-    {
-        uno::Any a(ToolboxController::queryInterface(aType));
-        if (a.hasValue())
-            return a;
-
-        return ::cppu::queryInterface(aType, 
static_cast<lang::XServiceInfo*>(this));
-    }
-
-    void SAL_CALL acquire() noexcept override
-    {
-        ToolboxController::acquire();
-    }
-
-    void SAL_CALL release() noexcept override
-    {
-        ToolboxController::release();
-    }
-
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override
     {
@@ -208,7 +189,8 @@ IMPL_LINK(ExcludeCheckBox, KeyInputHdl, const KeyEvent&, 
rKEvt, bool)
 }
 
 /// Controller for .uno:MailMergeExcludeEntry toolbar checkbox: creates the 
checkbox & handles the value.
-class MMExcludeEntryController : public svt::ToolboxController, public 
lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> MMExcludeEntryController_Base;
+class MMExcludeEntryController : public MMExcludeEntryController_Base
 {
     VclPtr<ExcludeCheckBox> m_xExcludeCheckbox;
 
@@ -216,31 +198,11 @@ class MMExcludeEntryController : public 
svt::ToolboxController, public lang::XSe
 
 public:
     explicit MMExcludeEntryController(const 
uno::Reference<uno::XComponentContext>& rContext)
-        : svt::ToolboxController(rContext, uno::Reference<frame::XFrame>(), 
".uno:MailMergeExcludeEntry")
+        : MMExcludeEntryController_Base(rContext, 
uno::Reference<frame::XFrame>(), ".uno:MailMergeExcludeEntry")
         , m_xExcludeCheckbox(nullptr)
     {
     }
 
-    // XInterface
-    virtual uno::Any SAL_CALL queryInterface(const uno::Type& aType) override
-    {
-        uno::Any a(ToolboxController::queryInterface(aType));
-        if (a.hasValue())
-            return a;
-
-        return ::cppu::queryInterface(aType, 
static_cast<lang::XServiceInfo*>(this));
-    }
-
-    void SAL_CALL acquire() noexcept override
-    {
-        ToolboxController::acquire();
-    }
-
-    void SAL_CALL release() noexcept override
-    {
-        ToolboxController::release();
-    }
-
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName() override
     {
diff --git a/sw/source/uibase/inc/unotxvw.hxx b/sw/source/uibase/inc/unotxvw.hxx
index 9608ed619be0..cfffa3169b4b 100644
--- a/sw/source/uibase/inc/unotxvw.hxx
+++ b/sw/source/uibase/inc/unotxvw.hxx
@@ -48,18 +48,19 @@
 class SdrObject;
 class SwView;
 
-class SwXTextView final :
-    public css::view::XSelectionSupplier,
-    public css::lang::XServiceInfo,
-    public css::view::XFormLayerAccess,
-    public css::text::XTextViewCursorSupplier,
-    public css::text::XTextViewTextRangeSupplier,
-    public css::text::XRubySelection,
-    public css::view::XViewSettingsSupplier,
-    public css::beans::XPropertySet,
-    public css::datatransfer::XTransferableSupplier,
-    public css::datatransfer::XTransferableTextSupplier,
-    public SfxBaseController
+typedef cppu::ImplInheritanceHelper<
+            SfxBaseController,
+            css::view::XSelectionSupplier,
+            css::lang::XServiceInfo,
+            css::view::XFormLayerAccess,
+            css::text::XTextViewCursorSupplier,
+            css::text::XTextViewTextRangeSupplier,
+            css::text::XRubySelection,
+            css::view::XViewSettingsSupplier,
+            css::beans::XPropertySet,
+            css::datatransfer::XTransferableSupplier,
+            css::datatransfer::XTransferableTextSupplier> SwXTextView_Base;
+class SwXTextView final : public SwXTextView_Base
 {
     
::comphelper::OInterfaceContainerHelper3<css::view::XSelectionChangeListener> 
m_SelChangedListeners;
 
@@ -78,14 +79,6 @@ class SwXTextView final :
 public:
     SwXTextView(SwView* pSwView);
 
-    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;
-
-    //XTypeProvider
-    virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
-    virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) 
override;
-
     //XSelectionSupplier
     virtual css::uno::Any SAL_CALL getSelection() override;
     virtual sal_Bool SAL_CALL select(const css::uno::Any& rInterface) override;
diff --git a/sw/source/uibase/inc/workctrl.hxx 
b/sw/source/uibase/inc/workctrl.hxx
index cc1d22d5938f..d56b752331ae 100644
--- a/sw/source/uibase/inc/workctrl.hxx
+++ b/sw/source/uibase/inc/workctrl.hxx
@@ -153,17 +153,13 @@ public:
     }
 };
 
-class NavElementToolBoxControl : public svt::ToolboxController, public 
lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
lang::XServiceInfo> NavElementToolBoxControl_Base;
+class NavElementToolBoxControl : public NavElementToolBoxControl_Base
 {
 public:
     explicit NavElementToolBoxControl(
         const css::uno::Reference< css::uno::XComponentContext >& 
rServiceManager );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
diff --git a/sw/source/uibase/ribbar/workctrl.cxx 
b/sw/source/uibase/ribbar/workctrl.cxx
index 8d7338281a42..3669db6c52f2 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -661,33 +661,13 @@ bool NavElementBox_Impl::DoKeyInput(const KeyEvent& rKEvt)
 }
 
 NavElementToolBoxControl::NavElementToolBoxControl( const uno::Reference< 
uno::XComponentContext >& rxContext )
- : svt::ToolboxController( rxContext,
+ : NavElementToolBoxControl_Base( rxContext,
                            uno::Reference< frame::XFrame >(),
                            ".uno:NavElement" ),
    m_pBox( nullptr )
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL NavElementToolBoxControl::queryInterface( const 
css::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 NavElementToolBoxControl::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL NavElementToolBoxControl::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 sal_Bool SAL_CALL NavElementToolBoxControl::supportsService( const OUString& 
ServiceName )
 {
@@ -800,19 +780,14 @@ lo_writer_NavElementToolBoxController_get_implementation(
 
 namespace {
 
-class PrevNextScrollToolboxController : public svt::ToolboxController,
-                                      public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> PrevNextScrollToolboxController_Base;
+class PrevNextScrollToolboxController : public 
PrevNextScrollToolboxController_Base
 {
 public:
     enum Type { PREVIOUS, NEXT };
 
     PrevNextScrollToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext, Type eType );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -831,7 +806,7 @@ private:
 }
 
 PrevNextScrollToolboxController::PrevNextScrollToolboxController( const 
css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType )
-    : svt::ToolboxController( rxContext,
+    : PrevNextScrollToolboxController_Base( rxContext,
             css::uno::Reference< css::frame::XFrame >(),
             (eType == PREVIOUS) ? OUString( ".uno:ScrollToPrevious" ): 
OUString( ".uno:ScrollToNext" ) ),
       meType( eType )
@@ -839,26 +814,6 @@ 
PrevNextScrollToolboxController::PrevNextScrollToolboxController( const css::uno
     addStatusListener(".uno:NavElement");
 }
 
-// XInterface
-css::uno::Any SAL_CALL PrevNextScrollToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL PrevNextScrollToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL PrevNextScrollToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL PrevNextScrollToolboxController::getImplementationName()
 {
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index 16804f83f753..09862245167e 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -85,7 +85,7 @@ using namespace ::com::sun::star::frame;
 using ::com::sun::star::util::URL;
 
 SwXTextView::SwXTextView(SwView* pSwView) :
-    SfxBaseController(pSwView),
+    SwXTextView_Base(pSwView),
     m_SelChangedListeners(m_aMutex),
     m_pView(pSwView),
     m_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_VIEW ) )
@@ -126,101 +126,6 @@ void SwXTextView::Invalidate()
     m_pView = nullptr;
 }
 
-Sequence< uno::Type > SAL_CALL SwXTextView::getTypes(  )
-{
-    return cppu::OTypeCollection(
-            cppu::UnoType<XSelectionSupplier>::get(),
-            cppu::UnoType<XServiceInfo>::get(),
-            cppu::UnoType<XFormLayerAccess>::get(),
-            cppu::UnoType<XTextViewCursorSupplier>::get(),
-            cppu::UnoType<XTextViewTextRangeSupplier>::get(),
-            cppu::UnoType<XViewSettingsSupplier>::get(),
-            cppu::UnoType<XRubySelection>::get(),
-            cppu::UnoType<XPropertySet>::get(),
-            cppu::UnoType<datatransfer::XTransferableSupplier>::get(),
-            cppu::UnoType<datatransfer::XTransferableTextSupplier>::get(),
-            SfxBaseController::getTypes()
-        ).getTypes();
-}
-
-Sequence< sal_Int8 > SAL_CALL SwXTextView::getImplementationId(  )
-{
-    return css::uno::Sequence<sal_Int8>();
-}
-
-void SAL_CALL SwXTextView::acquire(  )noexcept
-{
-    SfxBaseController::acquire();
-}
-
-void SAL_CALL SwXTextView::release(  )noexcept
-{
-    SfxBaseController::release();
-}
-
-uno::Any SAL_CALL SwXTextView::queryInterface( const uno::Type& aType )
-{
-    uno::Any aRet;
-    if(aType == cppu::UnoType<view::XSelectionSupplier>::get())
-    {
-        uno::Reference<view::XSelectionSupplier> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<lang::XServiceInfo>::get())
-    {
-        uno::Reference<lang::XServiceInfo> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<view::XControlAccess>::get())
-    {
-        uno::Reference<view::XControlAccess> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<view::XFormLayerAccess>::get())
-    {
-        uno::Reference<view::XFormLayerAccess> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<text::XTextViewCursorSupplier>::get())
-    {
-        uno::Reference<text::XTextViewCursorSupplier> xRet = this;
-        aRet <<= xRet;
-    }
-    else if (aType == cppu::UnoType<text::XTextViewTextRangeSupplier>::get())
-    {
-        uno::Reference<text::XTextViewTextRangeSupplier> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<view::XViewSettingsSupplier>::get())
-    {
-        uno::Reference<view::XViewSettingsSupplier> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<XRubySelection>::get())
-    {
-        uno::Reference<XRubySelection> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<XPropertySet>::get())
-    {
-        uno::Reference<XPropertySet> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == cppu::UnoType<datatransfer::XTransferableSupplier>::get())
-    {
-        uno::Reference<datatransfer::XTransferableSupplier> xRet = this;
-        aRet <<= xRet;
-    }
-    else if(aType == 
cppu::UnoType<datatransfer::XTransferableTextSupplier>::get())
-    {
-        uno::Reference<datatransfer::XTransferableTextSupplier> xRet = this;
-        aRet <<= xRet;
-    }
-    else
-        aRet = SfxBaseController::queryInterface(aType);
-    return aRet;
-}
-
 sal_Bool SwXTextView::select(const uno::Any& aInterface)
 {
     SolarMutexGuard aGuard;
commit 9ddbce1ef9e5b27b7d6576a30936722b5c5232eb
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Dec 14 16:13:25 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Dec 14 18:24:36 2022 +0000

    loplugin:implinheritancehelper in svx
    
    use more ImplInheritanceHelper to reduce boilerplate
    
    Change-Id: I8c966d372b94c2ab1296bc7ed6613da8dae818d3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144163
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/tbxctrls/tbunocontroller.cxx 
b/svx/source/tbxctrls/tbunocontroller.cxx
index 191dfd4cc9be..6c235adc39c2 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -52,18 +52,13 @@ namespace {
 class SvxFontSizeBox_Base;
 class SvxFontSizeBox_Impl;
 
-class FontHeightToolBoxControl : public svt::ToolboxController,
-                                 public lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
lang::XServiceInfo> FontHeightToolBoxControl_Base;
+class FontHeightToolBoxControl : public FontHeightToolBoxControl_Base
 {
     public:
         explicit FontHeightToolBoxControl(
             const css::uno::Reference< css::uno::XComponentContext >& 
rServiceManager );
 
-        // 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
         virtual OUString SAL_CALL getImplementationName() override;
         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName 
) override;
@@ -353,7 +348,7 @@ IMPL_LINK(SvxFontSizeBox_Base, DumpAsPropertyTreeHdl, 
tools::JsonWriter&, rJsonW
 }
 
 FontHeightToolBoxControl::FontHeightToolBoxControl( const uno::Reference< 
uno::XComponentContext >& rxContext )
- : svt::ToolboxController( rxContext,
+ : FontHeightToolBoxControl_Base( rxContext,
                            uno::Reference< frame::XFrame >(),
                            ".uno:FontHeight" ),
    m_pBox( nullptr )
@@ -361,26 +356,6 @@ FontHeightToolBoxControl::FontHeightToolBoxControl( const 
uno::Reference< uno::X
     addStatusListener( ".uno:CharFontName");
 }
 
-// XInterface
-css::uno::Any SAL_CALL FontHeightToolBoxControl::queryInterface( const 
css::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 FontHeightToolBoxControl::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL FontHeightToolBoxControl::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 sal_Bool SAL_CALL FontHeightToolBoxControl::supportsService( const OUString& 
ServiceName )
 {
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx 
b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 087f71fc0b60..304eb8123c56 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -526,18 +526,13 @@ css::uno::Reference< css::frame::XStatusListener > 
SearchToolbarControllersManag
     return xStatusListener;
 }
 
-class FindTextToolbarController : public svt::ToolboxController,
-                                  public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> FindTextToolbarController_Base;
+class FindTextToolbarController : public FindTextToolbarController_Base
 {
 public:
 
     FindTextToolbarController( const css::uno::Reference< 
css::uno::XComponentContext > & rxContext );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -570,7 +565,7 @@ private:
 };
 
 FindTextToolbarController::FindTextToolbarController( const 
css::uno::Reference< css::uno::XComponentContext >& rxContext )
-    : svt::ToolboxController(rxContext, css::uno::Reference< 
css::frame::XFrame >(), COMMAND_FINDTEXT)
+    : FindTextToolbarController_Base(rxContext, css::uno::Reference< 
css::frame::XFrame >(), COMMAND_FINDTEXT)
     , m_pFindTextFieldControl(nullptr)
     , m_nDownSearchId(0)
     , m_nUpSearchId(0)
@@ -578,26 +573,6 @@ FindTextToolbarController::FindTextToolbarController( 
const css::uno::Reference<
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL FindTextToolbarController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL FindTextToolbarController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL FindTextToolbarController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL FindTextToolbarController::getImplementationName()
 {
@@ -703,19 +678,14 @@ void FindTextToolbarController::textfieldChanged() {
     }
 }
 
-class UpDownSearchToolboxController : public svt::ToolboxController,
-                                      public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> UpDownSearchToolboxController_Base;
+class UpDownSearchToolboxController : public UpDownSearchToolboxController_Base
 {
 public:
     enum Type { UP, DOWN };
 
     UpDownSearchToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext, Type eType );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -738,33 +708,13 @@ private:
 };
 
 UpDownSearchToolboxController::UpDownSearchToolboxController( const 
css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType )
-    : svt::ToolboxController( rxContext,
+    : UpDownSearchToolboxController_Base( rxContext,
             css::uno::Reference< css::frame::XFrame >(),
             (eType == UP) ? OUString( COMMAND_UPSEARCH ):  OUString( 
COMMAND_DOWNSEARCH ) ),
       meType( eType )
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL UpDownSearchToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL UpDownSearchToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL UpDownSearchToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL UpDownSearchToolboxController::getImplementationName()
 {
@@ -823,17 +773,12 @@ void SAL_CALL 
UpDownSearchToolboxController::statusChanged( const css::frame::Fe
 {
 }
 
-class MatchCaseToolboxController : public svt::ToolboxController,
-                                      public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> MatchCaseToolboxController_Base;
+class MatchCaseToolboxController : public MatchCaseToolboxController_Base
 {
 public:
     MatchCaseToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -856,33 +801,13 @@ private:
 };
 
 MatchCaseToolboxController::MatchCaseToolboxController( const 
css::uno::Reference< css::uno::XComponentContext >& rxContext )
-    : svt::ToolboxController( rxContext,
+    : MatchCaseToolboxController_Base( rxContext,
         css::uno::Reference< css::frame::XFrame >(),
         COMMAND_MATCHCASE )
     , m_xMatchCaseControl(nullptr)
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL MatchCaseToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL MatchCaseToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL MatchCaseToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL MatchCaseToolboxController::getImplementationName()
 {
@@ -939,17 +864,12 @@ void SAL_CALL MatchCaseToolboxController::statusChanged( 
const css::frame::Featu
 {
 }
 
-class SearchFormattedToolboxController : public svt::ToolboxController,
-                                      public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> SearchFormattedToolboxController_Base;
+class SearchFormattedToolboxController : public 
SearchFormattedToolboxController_Base
 {
 public:
     SearchFormattedToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -972,33 +892,13 @@ private:
 };
 
 SearchFormattedToolboxController::SearchFormattedToolboxController( const 
css::uno::Reference< css::uno::XComponentContext >& rxContext )
-    : svt::ToolboxController( rxContext,
+    : SearchFormattedToolboxController_Base( rxContext,
         css::uno::Reference< css::frame::XFrame >(),
         COMMAND_SEARCHFORMATTED )
     , m_xSearchFormattedControl(nullptr)
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL SearchFormattedToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL SearchFormattedToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL SearchFormattedToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL SearchFormattedToolboxController::getImplementationName()
 {
@@ -1055,17 +955,12 @@ void SAL_CALL 
SearchFormattedToolboxController::statusChanged( const css::frame:
 {
 }
 
-class FindAllToolboxController   : public svt::ToolboxController,
-                                      public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> FindAllToolboxController_Base;
+class FindAllToolboxController : public FindAllToolboxController_Base
 {
 public:
     FindAllToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -1085,32 +980,12 @@ public:
 };
 
 FindAllToolboxController::FindAllToolboxController( const css::uno::Reference< 
css::uno::XComponentContext > & rxContext )
-    : svt::ToolboxController( rxContext,
+    : FindAllToolboxController_Base( rxContext,
             css::uno::Reference< css::frame::XFrame >(),
             ".uno:FindAll" )
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL FindAllToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL FindAllToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL FindAllToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL FindAllToolboxController::getImplementationName()
 {
@@ -1162,17 +1037,12 @@ void SAL_CALL FindAllToolboxController::statusChanged( 
const css::frame::Feature
 {
 }
 
-class ExitSearchToolboxController   : public svt::ToolboxController,
-                                      public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> ExitSearchToolboxController_Base;
+class ExitSearchToolboxController : public ExitSearchToolboxController_Base
 {
 public:
     ExitSearchToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -1192,32 +1062,12 @@ public:
 };
 
 ExitSearchToolboxController::ExitSearchToolboxController( const 
css::uno::Reference< css::uno::XComponentContext > & rxContext )
-    : svt::ToolboxController( rxContext,
+    : ExitSearchToolboxController_Base( rxContext,
             css::uno::Reference< css::frame::XFrame >(),
             ".uno:ExitSearch" )
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL ExitSearchToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL ExitSearchToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL ExitSearchToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL ExitSearchToolboxController::getImplementationName()
 {
@@ -1280,17 +1130,12 @@ void SAL_CALL 
ExitSearchToolboxController::statusChanged( const css::frame::Feat
 {
 }
 
-class SearchLabelToolboxController : public svt::ToolboxController,
-                                     public css::lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> SearchLabelToolboxController_Base;
+class SearchLabelToolboxController : public SearchLabelToolboxController_Base
 {
 public:
     SearchLabelToolboxController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 
-    // 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
     virtual OUString SAL_CALL getImplementationName() override;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
@@ -1313,32 +1158,12 @@ private:
 };
 
 SearchLabelToolboxController::SearchLabelToolboxController( const 
css::uno::Reference< css::uno::XComponentContext > & rxContext )
-    : svt::ToolboxController( rxContext,
+    : SearchLabelToolboxController_Base( rxContext,
             css::uno::Reference< css::frame::XFrame >(),
             ".uno:SearchLabel" )
 {
 }
 
-// XInterface
-css::uno::Any SAL_CALL SearchLabelToolboxController::queryInterface( const 
css::uno::Type& aType )
-{
-    css::uno::Any a = ToolboxController::queryInterface( aType );
-    if ( a.hasValue() )
-        return a;
-
-    return ::cppu::queryInterface( aType, static_cast< 
css::lang::XServiceInfo* >( this ) );
-}
-
-void SAL_CALL SearchLabelToolboxController::acquire() noexcept
-{
-    ToolboxController::acquire();
-}
-
-void SAL_CALL SearchLabelToolboxController::release() noexcept
-{
-    ToolboxController::release();
-}
-
 // XServiceInfo
 OUString SAL_CALL SearchLabelToolboxController::getImplementationName()
 {

Reply via email to