summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-01-19 19:45:45 +0200
committerNoel Grandin <noel@peralex.com>2016-01-25 08:52:03 +0200
commit752cd07d085ac0aadc99bd512d49072843139032 (patch)
tree21ff2f55761b34bfdd721b5e1ed43333e8874e46 /reportdesign
parent0e7cd653ea90da388820220bf6a3eb140b57bbd6 (diff)
InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer. It uses a std::vector instead of a Sequence for the mutable listener list, which provides far better performance. Switch all our internal use-sites to the new class. Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx10
-rw-r--r--reportdesign/source/core/inc/Functions.hxx3
-rw-r--r--reportdesign/source/core/inc/Groups.hxx3
-rw-r--r--reportdesign/source/core/inc/ReportControlModel.hxx4
-rw-r--r--reportdesign/source/core/inc/Section.hxx3
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx3
6 files changed, 15 insertions, 11 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index b8e5314f46f0..cc825ea36882 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -475,11 +475,11 @@ uno::Sequence< uno::Any > SAL_CALL OStyle::getPropertyDefaults( const uno::Seque
struct OReportDefinitionImpl
{
uno::WeakReference< uno::XInterface > m_xParent;
- ::cppu::OInterfaceContainerHelper m_aStorageChangeListeners;
- ::cppu::OInterfaceContainerHelper m_aCloseListener;
- ::cppu::OInterfaceContainerHelper m_aModifyListeners;
- ::cppu::OInterfaceContainerHelper m_aLegacyEventListeners;
- ::cppu::OInterfaceContainerHelper m_aDocEventListeners;
+ ::comphelper::OInterfaceContainerHelper2 m_aStorageChangeListeners;
+ ::comphelper::OInterfaceContainerHelper2 m_aCloseListener;
+ ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners;
+ ::comphelper::OInterfaceContainerHelper2 m_aLegacyEventListeners;
+ ::comphelper::OInterfaceContainerHelper2 m_aDocEventListeners;
::std::vector< uno::Reference< frame::XController> > m_aControllers;
uno::Sequence< beans::PropertyValue > m_aArgs;
diff --git a/reportdesign/source/core/inc/Functions.hxx b/reportdesign/source/core/inc/Functions.hxx
index a0b20c8cb435..355a328759fd 100644
--- a/reportdesign/source/core/inc/Functions.hxx
+++ b/reportdesign/source/core/inc/Functions.hxx
@@ -22,6 +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/broadcasthelper.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <list>
@@ -38,7 +39,7 @@ namespace reportdesign
public FunctionsBase
{
typedef ::std::list< css::uno::Reference< css::report::XFunction > > TFunctions;
- ::cppu::OInterfaceContainerHelper m_aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper2 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 44155ce1c113..88920da6849a 100644
--- a/reportdesign/source/core/inc/Groups.hxx
+++ b/reportdesign/source/core/inc/Groups.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/report/XGroups.hpp>
#include <cppuhelper/compbase.hxx>
+#include <comphelper/interfacecontainer2.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <list>
@@ -37,7 +38,7 @@ namespace reportdesign
public GroupsBase
{
typedef ::std::list< css::uno::Reference< css::report::XGroup > > TGroups;
- ::cppu::OInterfaceContainerHelper m_aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper2 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 eca3b2194d5a..48b457041efb 100644
--- a/reportdesign/source/core/inc/ReportControlModel.hxx
+++ b/reportdesign/source/core/inc/ReportControlModel.hxx
@@ -28,7 +28,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <comphelper/uno3.hxx>
-#include <cppuhelper/interfacecontainer.h>
+#include <comphelper/interfacecontainer2.hxx>
namespace reportdesign
@@ -81,7 +81,7 @@ namespace reportdesign
OReportControlModel(OReportControlModel&) = delete;
void operator =(OReportControlModel&) = delete;
public:
- ::cppu::OInterfaceContainerHelper aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper2 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 e72e545bf4cd..a42b607dca83 100644
--- a/reportdesign/source/core/inc/Section.hxx
+++ b/reportdesign/source/core/inc/Section.hxx
@@ -25,6 +25,7 @@
#include <comphelper/uno3.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/propertysetmixin.hxx>
+#include <comphelper/interfacecontainer2.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XShapeGrouper.hpp>
@@ -52,7 +53,7 @@ namespace reportdesign
public SectionBase,
public SectionPropertySet
{
- ::cppu::OInterfaceContainerHelper m_aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage;
css::uno::Reference< css::drawing::XShapeGrouper > m_xDrawPage_ShapeGrouper;
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 092a2a2edab5..2408d8a82e9f 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -48,6 +48,7 @@
#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase5.hxx>
+#include <comphelper/interfacecontainer2.hxx>
#include <dbaccess/dbsubcomponentcontroller.hxx>
#include <svl/lstner.hxx>
#include <svtools/transfer.hxx>
@@ -86,7 +87,7 @@ namespace rptui
{
private:
OModuleClient m_aModuleClient;
- ::cppu::OInterfaceContainerHelper
+ ::comphelper::OInterfaceContainerHelper2
m_aSelectionListeners;
css::uno::Sequence< css::beans::PropertyValue>
m_aCollapsedSections;