diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-08-21 01:57:38 +0800 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-08-27 02:22:01 +0800 |
commit | 3678ed62f61c79d28ac549690ef6d41a6b817cc0 (patch) | |
tree | 3801355c1a89a5903ca7287191866723dd15bf41 | |
parent | 862988200a9844573586029430ebccd9d4ea804c (diff) |
update chart styles sidebar
Change-Id: I83edde38c4c76624916ee023f43242a22d8f27b9
-rw-r--r-- | chart2/source/controller/sidebar/ChartStylesPanel.cxx | 2 | ||||
-rw-r--r-- | chart2/source/inc/ChartStyle.hxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 4 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/ChartStyle.cxx | 7 | ||||
-rw-r--r-- | offapi/com/sun/star/chart2/XChartStyle.idl | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/chart2/source/controller/sidebar/ChartStylesPanel.cxx b/chart2/source/controller/sidebar/ChartStylesPanel.cxx index 07d3fbea8514..2f6452fdf10c 100644 --- a/chart2/source/controller/sidebar/ChartStylesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartStylesPanel.cxx @@ -175,7 +175,7 @@ IMPL_LINK(ChartStylesPanel, SelHdl, ListBox&, rBox, void) { OUString aNewStyleName; vcl::Window* pWin = Application::GetDefDialogParent(); - QueryString aQuery(pWin ? pWin->GetFrameWeld() : nullptr, "", aNewStyleName); + QueryString aQuery(pWin ? pWin->GetFrameWeld() : nullptr, "Select name for new chart style:", aNewStyleName); int nReturnCode = aQuery.run(); if (nReturnCode == RET_OK) diff --git a/chart2/source/inc/ChartStyle.hxx b/chart2/source/inc/ChartStyle.hxx index 047e12d241f4..fbe60d266087 100644 --- a/chart2/source/inc/ChartStyle.hxx +++ b/chart2/source/inc/ChartStyle.hxx @@ -107,7 +107,7 @@ public: SAL_CALL getStyleForObject(const sal_Int16 nChartObjectType) override; virtual void SAL_CALL - applyStyleToDiagram(const css::uno::Reference<css::chart2::XDiagram>& xDiagram) override; + applyStyleToDiagram(const css::uno::Reference<css::chart2::XChartDocument>& xChartDocument) override; virtual void SAL_CALL applyStyleToTitle(const css::uno::Reference<css::chart2::XTitle>& xTitle) override; diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 37e3b0c4165e..982c0aa80d11 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -689,7 +689,7 @@ void SAL_CALL ChartModel::setFirstDiagram( const uno::Reference< chart2::XDiagra ModifyListenerHelper::addListener( xDiagram, xListener ); setModified( true ); - m_xChartStyle->applyStyleToDiagram(xDiagram); + m_xChartStyle->applyStyleToDiagram(this); } Reference< chart2::data::XDataSource > ChartModel::impl_createDefaultData() @@ -951,7 +951,7 @@ void SAL_CALL ChartModel::setChartStyle(const css::uno::Reference<css::chart2::X MutexGuard aGuard( m_aModelMutex ); m_xChartStyle = xChartStyle; - m_xChartStyle->applyStyleToDiagram(m_xDiagram); + m_xChartStyle->applyStyleToDiagram(this); } // ____ XInterface (for old API wrapper) ____ diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 1bfc4c310e84..8a41cb048d5e 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -724,9 +724,8 @@ void SAL_CALL ChartModel::modified( const lang::EventObject& rEvenObject) { if (m_xChartStyle.is()) { - m_xChartStyle->applyStyleToTitle(getTitleObject()); m_xChartStyle->applyStyleToBackground(getPageBackground()); - m_xChartStyle->applyStyleToDiagram(xDiagram); + m_xChartStyle->applyStyleToDiagram(this); } } diff --git a/chart2/source/tools/ChartStyle.cxx b/chart2/source/tools/ChartStyle.cxx index dec56c485446..3130bd99f45d 100644 --- a/chart2/source/tools/ChartStyle.cxx +++ b/chart2/source/tools/ChartStyle.cxx @@ -266,9 +266,10 @@ void ChartStyle::applyStyleToCoordinates( } } -void SAL_CALL -ChartStyle::applyStyleToDiagram(const css::uno::Reference<css::chart2::XDiagram>& xDiagram) +void SAL_CALL ChartStyle::applyStyleToDiagram( + const css::uno::Reference<css::chart2::XChartDocument>& xChartDocument) { + css::uno::Reference<css::chart2::XDiagram> xDiagram = xChartDocument->getFirstDiagram(); css::uno::Reference<css::style::XStyleSupplier> xLegendStyle(xDiagram->getLegend(), css::uno::UNO_QUERY); if (xLegendStyle.is()) @@ -287,7 +288,7 @@ ChartStyle::applyStyleToDiagram(const css::uno::Reference<css::chart2::XDiagram> css::uno::UNO_QUERY_THROW)); } - css::uno::Reference<css::chart2::XTitled> xTitled(xDiagram, css::uno::UNO_QUERY); + css::uno::Reference<css::chart2::XTitled> xTitled(xChartDocument, css::uno::UNO_QUERY); if (xTitled.is()) { css::uno::Reference<css::chart2::XTitle> xTitle = xTitled->getTitleObject(); diff --git a/offapi/com/sun/star/chart2/XChartStyle.idl b/offapi/com/sun/star/chart2/XChartStyle.idl index 81937f48da2e..3a80cb978fad 100644 --- a/offapi/com/sun/star/chart2/XChartStyle.idl +++ b/offapi/com/sun/star/chart2/XChartStyle.idl @@ -26,7 +26,7 @@ interface XChartStyle : ::com::sun::star::uno::XInterface { com::sun::star::beans::XPropertySet getStyleForObject([in] short chartObjectType); - void applyStyleToDiagram([in] XDiagram chartDiagram); + void applyStyleToDiagram([in] XChartDocument chartDiagram); void applyStyleToTitle([in] XTitle chartTitle); |