reportdesign/source/core/api/ReportDefinition.cxx | 15 ++++++++------- reportdesign/source/core/inc/Functions.hxx | 4 ++-- reportdesign/source/core/inc/Groups.hxx | 4 ++-- reportdesign/source/core/inc/ReportControlModel.hxx | 4 ++-- reportdesign/source/core/inc/Section.hxx | 4 ++-- reportdesign/source/ui/inc/ReportController.hxx | 4 ++-- reportdesign/source/ui/report/ReportController.cxx | 2 +- 7 files changed, 19 insertions(+), 18 deletions(-)
New commits: commit e7f2dcf29ba3d726549c38060723d8ae5f443c88 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Fri Nov 26 18:44:27 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Nov 27 15:53:12 2021 +0100 use more OInterfaceContainerHelper3 in reportdesign Change-Id: I742f8a684bb689af8593c3ad5d8918b30c6a7ab1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 39785167d6c0..116de59b0690 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -91,6 +91,7 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/uno3.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <connectivity/CommonTools.hxx> #include <connectivity/dbtools.hxx> #include <cppuhelper/exc_hlp.hxx> @@ -451,11 +452,11 @@ uno::Sequence< uno::Any > SAL_CALL OStyle::getPropertyDefaults( const uno::Seque struct OReportDefinitionImpl { uno::WeakReference< uno::XInterface > m_xParent; - ::comphelper::OInterfaceContainerHelper2 m_aStorageChangeListeners; - ::comphelper::OInterfaceContainerHelper2 m_aCloseListener; - ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners; - ::comphelper::OInterfaceContainerHelper2 m_aLegacyEventListeners; - ::comphelper::OInterfaceContainerHelper2 m_aDocEventListeners; + ::comphelper::OInterfaceContainerHelper3<document::XStorageChangeListener> m_aStorageChangeListeners; + ::comphelper::OInterfaceContainerHelper3<util::XCloseListener> m_aCloseListener; + ::comphelper::OInterfaceContainerHelper3<util::XModifyListener> m_aModifyListeners; + ::comphelper::OInterfaceContainerHelper3<document::XEventListener> m_aLegacyEventListeners; + ::comphelper::OInterfaceContainerHelper3<document::XDocumentEventListener> m_aDocEventListeners; ::std::vector< uno::Reference< frame::XController> > m_aControllers; uno::Sequence< beans::PropertyValue > m_aArgs; @@ -1069,7 +1070,7 @@ void SAL_CALL OReportDefinition::close(sal_Bool bDeliverOwnership) // notify our container listeners lang::EventObject aEvt( static_cast< ::cppu::OWeakObject* >( this ) ); aGuard.clear(); - m_pImpl->m_aCloseListener.forEach<util::XCloseListener>( + m_pImpl->m_aCloseListener.forEach( [&aEvt, &bDeliverOwnership] (uno::Reference<util::XCloseListener> const& xListener) { return xListener->queryClosing(aEvt, bDeliverOwnership); }); @@ -1418,7 +1419,7 @@ void SAL_CALL OReportDefinition::switchToStorage( m_pImpl->m_pObjectContainer->SwitchPersistence(m_pImpl->m_xStorage); } // notify our container listeners - m_pImpl->m_aStorageChangeListeners.forEach<document::XStorageChangeListener>( + m_pImpl->m_aStorageChangeListeners.forEach( [this, &xStorage] (uno::Reference<document::XStorageChangeListener> const& xListener) { return xListener->notifyStorageChange(static_cast<OWeakObject*>(this), xStorage); }); diff --git a/reportdesign/source/core/inc/Functions.hxx b/reportdesign/source/core/inc/Functions.hxx index 84a35bc5e285..94a54beeb02d 100644 --- a/reportdesign/source/core/inc/Functions.hxx +++ b/reportdesign/source/core/inc/Functions.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/report/XFunctions.hpp> #include <com/sun/star/report/XFunctionsSupplier.hpp> #include <cppuhelper/compbase.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <cppuhelper/basemutex.hxx> #include <com/sun/star/uno/XComponentContext.hpp> #include <vector> @@ -39,7 +39,7 @@ namespace reportdesign public FunctionsBase { typedef ::std::vector< css::uno::Reference< css::report::XFunction > > TFunctions; - ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners; + ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners; css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::WeakReference< css::report::XFunctionsSupplier > m_xParent; TFunctions m_aFunctions; diff --git a/reportdesign/source/core/inc/Groups.hxx b/reportdesign/source/core/inc/Groups.hxx index 82dcb82bf83b..9897abd3af76 100644 --- a/reportdesign/source/core/inc/Groups.hxx +++ b/reportdesign/source/core/inc/Groups.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/report/XGroups.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <com/sun/star/uno/XComponentContext.hpp> #include <vector> @@ -38,7 +38,7 @@ namespace reportdesign public GroupsBase { typedef ::std::vector< css::uno::Reference< css::report::XGroup > > TGroups; - ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners; + ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners; css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::WeakReference< css::report::XReportDefinition > m_xParent; TGroups m_aGroups; diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx index 1c5a1ef3c8f8..98d209fc6c0f 100644 --- a/reportdesign/source/core/inc/ReportControlModel.hxx +++ b/reportdesign/source/core/inc/ReportControlModel.hxx @@ -27,7 +27,7 @@ #include <com/sun/star/container/XContainer.hpp> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> namespace reportdesign @@ -73,7 +73,7 @@ namespace reportdesign OReportControlModel(OReportControlModel const &) = delete; void operator =(OReportControlModel const &) = delete; public: - ::comphelper::OInterfaceContainerHelper2 aContainerListeners; + ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> aContainerListeners; OReportComponentProperties aComponent; OFormatProperties aFormatProperties; css::container::XContainer* m_pOwner; diff --git a/reportdesign/source/core/inc/Section.hxx b/reportdesign/source/core/inc/Section.hxx index 0fca2067c5f9..b5a18dfdf3e5 100644 --- a/reportdesign/source/core/inc/Section.hxx +++ b/reportdesign/source/core/inc/Section.hxx @@ -24,7 +24,7 @@ #include <comphelper/broadcasthelper.hxx> #include <comphelper/uno3.hxx> #include <cppuhelper/propertysetmixin.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XShapeGrouper.hpp> @@ -51,7 +51,7 @@ namespace reportdesign public SectionBase, public SectionPropertySet { - ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners; + ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners; css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage; css::uno::Reference< css::drawing::XShapeGrouper > m_xDrawPage_ShapeGrouper; css::uno::Reference< css::form::XFormsSupplier2 > m_xDrawPage_FormSupplier; diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx index 92ab4f3fe712..cb86ce7cf235 100644 --- a/reportdesign/source/ui/inc/ReportController.hxx +++ b/reportdesign/source/ui/inc/ReportController.hxx @@ -42,7 +42,7 @@ #include <comphelper/propertystatecontainer.hxx> #include <comphelper/uno3.hxx> #include <cppuhelper/implbase5.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svl/lstner.hxx> #include <vcl/transfer.hxx> @@ -77,7 +77,7 @@ namespace rptui ,public ::comphelper::OPropertyArrayUsageHelper < OReportController_BASE > { private: - ::comphelper::OInterfaceContainerHelper2 + ::comphelper::OInterfaceContainerHelper3<css::view::XSelectionChangeListener> m_aSelectionListeners; css::uno::Sequence< css::beans::PropertyValue> m_aCollapsedSections; diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index d765dee29783..af893f91d253 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2577,7 +2577,7 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi InvalidateAll(); } lang::EventObject aEvent(*this); - m_aSelectionListeners.forEach<view::XSelectionChangeListener>( + m_aSelectionListeners.forEach( [&aEvent] (uno::Reference<view::XSelectionChangeListener> const& xListener) { return xListener->selectionChanged(aEvent); });