summaryrefslogtreecommitdiff
path: root/chart2/source/inc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-13 19:20:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-14 08:18:56 +0100
commitbd1fbe307840eedadcb0266ed097a21765d3e579 (patch)
treecabb0eb1b258e1d3a2ad0a6625fe77cd6885f8b5 /chart2/source/inc
parentb0d0b80d8e5428393b7e5185582fed78ed1b2bbe (diff)
use more concrete types in chart2
in this case, ModifyEventForwarder. Instead of doing UNO_QUERY and implicitly relying on it's implementation, make it obvious what we are doing Change-Id: Ie02a11f115da9c8af7d4ca85bda9fb9a69c5d52f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128392 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/inc')
-rw-r--r--chart2/source/inc/CachedDataSequence.hxx4
-rw-r--r--chart2/source/inc/ErrorBar.hxx4
-rw-r--r--chart2/source/inc/LabeledDataSequence.hxx3
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx12
4 files changed, 14 insertions, 9 deletions
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index bd6fdc594bf6..e9c1b9d50d25 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -32,7 +32,7 @@
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include "ModifyListenerHelper.hxx"
namespace com::sun::star::uno { class XComponentContext; }
@@ -156,7 +156,7 @@ private:
css::uno::Sequence< double > m_aNumericalSequence;
css::uno::Sequence< OUString > m_aTextualSequence;
css::uno::Sequence< css::uno::Any > m_aMixedSequence;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index 7e2638eba133..bf31ed364d72 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -35,7 +35,7 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include "ModifyListenerHelper.hxx"
#include <vector>
@@ -132,7 +132,7 @@ private:
css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
tDataSequenceContainer m_aDataSequences;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx
index 37b067d1a607..594d0c89dd6e 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/chart2/data/XLabeledDataSequence2.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include "ModifyListenerHelper.hxx"
namespace com::sun::star::chart2::data { class XDataSequence; }
namespace com::sun::star::util { class XCloneable; }
@@ -80,7 +81,7 @@ private:
css::uno::Reference< css::chart2::data::XDataSequence > m_xData;
css::uno::Reference< css::chart2::data::XDataSequence > m_xLabel;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index 468779bcbaaa..0e479395ffb3 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
+#include <rtl/ref.hxx>
#include <vector>
#include <algorithm>
@@ -30,11 +31,9 @@
namespace com::sun::star::uno { class XWeak; }
namespace com::sun::star::uno { template <class interface_type> class WeakReference; }
-namespace chart::ModifyListenerHelper
+namespace chart
{
-css::uno::Reference< css::util::XModifyListener > createModifyEventForwarder();
-
/** This helper class serves as forwarder of modify events. It can be used
whenever an object has to send modify events after it gets a modify event of
one of its children.
@@ -57,7 +56,6 @@ public:
void RemoveListener(
const css::uno::Reference< css::util::XModifyListener >& aListener );
-protected:
// ____ XModifyBroadcaster ____
virtual void SAL_CALL addModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
@@ -68,6 +66,7 @@ protected:
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
+protected:
// ____ XEventListener (base of XModifyListener) ____
virtual void SAL_CALL disposing(
const css::lang::EventObject& Source ) override;
@@ -92,6 +91,11 @@ private:
tListenerMap m_aListenerMap;
};
+}
+
+namespace chart::ModifyListenerHelper
+{
+
namespace impl
{