[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 26 23:53:10 UTC 2019
sw/source/core/unocore/unotbl.cxx | 83 +++++++++++++-------------------------
1 file changed, 30 insertions(+), 53 deletions(-)
New commits:
commit 9ae62c148d9ff9667eac3e0d452abebbef8f4193
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Tue Feb 26 20:51:33 2019 +0100
Commit: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Wed Feb 27 00:52:44 2019 +0100
simplify lcl_SendChartEvent mess
Change-Id: I2476cbabbb3625ab0d562218102fbbcfbb08f4e6
Reviewed-on: https://gerrit.libreoffice.org/68404
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index df40b80a11a0..5cfd4d29a185 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -141,66 +141,43 @@ namespace
throw uno::RuntimeException("Table too complex", pObject);
return pTable;
}
-}
-
-#define UNO_TABLE_COLUMN_SUM 10000
-static void lcl_SendChartEvent(uno::Reference<uno::XInterface> const& xSource,
- ::cppu::OInterfaceContainerHelper & rListeners)
-{
- if (!rListeners.getLength())
- return;
- //TODO: find appropriate settings of the Event
- chart::ChartDataChangeEvent event;
- event.Source = xSource;
- event.Type = chart::ChartDataChangeType_ALL;
- event.StartColumn = 0;
- event.EndColumn = 1;
- event.StartRow = 0;
- event.EndRow = 1;
- rListeners.notifyEach(
- & chart::XChartDataChangeEventListener::chartDataChanged, event);
-}
-
-static void lcl_SendChartEvent(uno::Reference<uno::XInterface> const& xSource,
- ::comphelper::OInterfaceContainerHelper2 & rListeners)
-{
- if (!rListeners.getLength())
- return;
- //TODO: find appropriate settings of the Event
- chart::ChartDataChangeEvent event;
- event.Source = xSource;
- event.Type = chart::ChartDataChangeType_ALL;
- event.StartColumn = 0;
- event.EndColumn = 1;
- event.StartRow = 0;
- event.EndRow = 1;
- rListeners.notifyEach(
- & chart::XChartDataChangeEventListener::chartDataChanged, event);
-}
+ chart::ChartDataChangeEvent createChartEvent(uno::Reference<uno::XInterface> const& xSource)
+ {
+ //TODO: find appropriate settings of the Event
+ chart::ChartDataChangeEvent event;
+ event.Source = xSource;
+ event.Type = chart::ChartDataChangeType_ALL;
+ event.StartColumn = 0;
+ event.EndColumn = 1;
+ event.StartRow = 0;
+ event.EndRow = 1;
+ return event;
+ }
-static void lcl_SendChartEvent(::cppu::OWeakObject & rSource,
- ::comphelper::OInterfaceContainerHelper2 & rListeners)
-{
- return lcl_SendChartEvent(&rSource, rListeners);
-}
+ void lcl_SendChartEvent(
+ uno::Reference<uno::XInterface> const& xSource,
+ ::comphelper::OInterfaceContainerHelper2& rListeners)
+ {
+ rListeners.notifyEach(
+ &chart::XChartDataChangeEventListener::chartDataChanged,
+ createChartEvent(xSource));
+ }
-static void lcl_SendChartEvent(uno::Reference<uno::XInterface> const& xSource,
- ::cppu::OMultiTypeInterfaceContainerHelper const & rListeners)
-{
- ::cppu::OInterfaceContainerHelper *const pContainer(rListeners.getContainer(
- cppu::UnoType<chart::XChartDataChangeEventListener>::get()));
- if (pContainer)
+ void lcl_SendChartEvent(
+ uno::Reference<uno::XInterface> const& xSource,
+ ::cppu::OMultiTypeInterfaceContainerHelper const& rListeners)
{
- lcl_SendChartEvent(xSource, *pContainer);
+ auto pContainer(rListeners.getContainer(cppu::UnoType<chart::XChartDataChangeEventListener>::get()));
+ if (pContainer)
+ pContainer->notifyEach(
+ &chart::XChartDataChangeEventListener::chartDataChanged,
+ createChartEvent(xSource));
}
}
-static void lcl_SendChartEvent(::cppu::OWeakObject & rSource,
- ::cppu::OMultiTypeInterfaceContainerHelper const & rListeners)
-{
- return lcl_SendChartEvent(&rSource, rListeners);
-}
+#define UNO_TABLE_COLUMN_SUM 10000
+
static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine)
{
More information about the Libreoffice-commits
mailing list