diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:43:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:43:56 +0000 |
commit | 030eda2c4d6cad6d44c35499bcfc43ba89c88bb9 (patch) | |
tree | ed84eab0aa326f0af8421e20e99d57d62eab22e7 /chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx | |
parent | Adding upstream version 4:24.2.1. (diff) | |
download | libreoffice-030eda2c4d6cad6d44c35499bcfc43ba89c88bb9.tar.xz libreoffice-030eda2c4d6cad6d44c35499bcfc43ba89c88bb9.zip |
Adding upstream version 4:24.2.2.upstream/4%24.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 84b98f0d80..7988ef90df 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -121,6 +121,11 @@ struct lcl_AllOperator : public lcl_Operator virtual bool setsCategories( bool /*bDataInColumns*/ ) override { + // Do not force creation of categories, when original has no categories + if (auto pDataWrapper = dynamic_cast<const ChartDataWrapper*>(m_xDataToApply.get())) + if (auto xChartModel = pDataWrapper->getChartModel()) + if (auto xDiagram = xChartModel->getFirstChartDiagram()) + return xDiagram->getCategories().is(); return true; } @@ -698,6 +703,11 @@ css::uno::Sequence< OUString > SAL_CALL ChartDataWrapper::getSupportedServiceNam }; } +rtl::Reference<ChartModel> ChartDataWrapper::getChartModel() const +{ + return m_spChart2ModelContact->getDocumentModel(); +} + } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |