summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dbui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-12-14 16:14:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-14 18:24:45 +0000
commit705594fc805012b5bf6167d7f9fee63bb1b90a1b (patch)
tree5d86b1b859cd85dea559f92adff53de88c240836 /sw/source/uibase/dbui
parent9ddbce1ef9e5b27b7d6576a30936722b5c5232eb (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dbui')
-rw-r--r--sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx50
1 files changed, 6 insertions, 44 deletions
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
{