chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 4862b5efbd6724d01e04b0951188f2a18c9362e8 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Aug 8 10:51:41 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Aug 8 16:27:23 2025 +0200 tdf#167859: check xChartType before commit f355ddcbf2bf037263e336724829b5467b94ef40 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Sun Apr 13 11:36:05 2025 +0900 chart2: fold isSupported* functions into ChartType ChartTypeHelper::isSupportingAxisPositioning, ChartTypeHelper::isSupportingBaseValue and ChartTypeHelper::isSupportingBaseValue checked if xChartType was not nullptr inside them TODO: add UItest for it. Change-Id: I908d41ccc88208ab57576bd6369590556aafcce5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189171 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 2b13ce025de8..ce037079cf45 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -192,10 +192,10 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM { xChartType = AxisHelper::getFirstChartTypeWithSeriesAttachedToAxisIndex( xDiagram, nAxisIndex ); //show positioning controls only if they make sense - m_bSupportingAxisPositioning = xChartType->isSupportingAxisPositioning(nDimensionCount, nDimensionIndex); + m_bSupportingAxisPositioning = xChartType.is() && xChartType->isSupportingAxisPositioning(nDimensionCount, nDimensionIndex); //show axis origin only for secondary y axis - if( nDimensionIndex==1 && nAxisIndex==1 && xChartType->isSupportingBaseValue()) + if( nDimensionIndex==1 && nAxisIndex==1 && xChartType.is() && xChartType->isSupportingBaseValue()) m_bShowAxisOrigin = true; if ( nDimensionIndex == 0 && ( aData.AxisType == chart2::AxisType::CATEGORY || aData.AxisType == chart2::AxisType::DATE ) ) @@ -207,7 +207,7 @@ void ObjectPropertiesDialogParameter::init( const rtl::Reference<::chart::ChartM } if (!m_bComplexCategoriesAxis) - m_bSupportingCategoryPositioning = xChartType->isSupportingCategoryPositioning(nDimensionCount); + m_bSupportingCategoryPositioning = xChartType.is() && xChartType->isSupportingCategoryPositioning(nDimensionCount); } } }