summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-11 11:30:46 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-21 13:28:38 +0200
commit1ea6795a0f6a2868603eebda0fdafdf3ae254e81 (patch)
tree1544842d9196cd419a33696daeeca5b8e25d9dc7 /chart2
parenta2f43d39394621a8146646543b72028f46e3aa73 (diff)
tdf#155231 CRASH: with embedded OLE chart
regressions from commits like commit 70595c0291e4cc137158c77f6136025b10ce6728 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Mar 16 09:20:17 2023 +0200 move setDimension/getDimension inside chart2::Diagram Change-Id: I535d8e74d621821bde7d31894fe7f0350e91c941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151664 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151735
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx3
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 3a8859820c92..779d3f7bfeaf 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -253,7 +253,8 @@ void ChartTypeTabPage::selectMainType()
rtl::Reference< Diagram > xDiagram = ChartModelHelper::findDiagram(m_xChartModel);
try
{
- xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+ if (xDiagram)
+ xDiagram->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
}
catch ( const uno::Exception& )
{
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 40edf87d2f30..960642c0b367 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -92,6 +92,8 @@ void ReferenceSizeProvider::setValuesAtTitle(
void ReferenceSizeProvider::setValuesAtAllDataSeries()
{
rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( m_xChartDoc ));
+ if (!xDiagram)
+ return;
// DataSeries/Points
std::vector< rtl::Reference< DataSeries > > aSeries =