chart2/source/tools/DiagramHelper.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 2fc38f8156d3fb1f58af223133acf8c543dbf09b Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Thu Jan 27 18:21:45 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jan 29 11:37:56 2022 +0100 use more concrete types in chart2, ChartModel Change-Id: I3c8ec5e24cae9b44164b0ad32623cfe3c42d553e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129112 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 04c049dc2228..a7589001524f 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -888,7 +888,7 @@ Sequence< OUString > DiagramHelper::getExplicitSimpleCategories( namespace { -void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, const Reference< XAxis >& xAxis ) +void lcl_switchToDateCategories( const rtl::Reference< ChartModel >& xChartDoc, const Reference< XAxis >& xAxis ) { if( !xAxis.is() ) return; @@ -924,13 +924,12 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c } //check the numberformat at the axis Reference< beans::XPropertySet > xAxisProps( xAxis, uno::UNO_QUERY ); - Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( xChartDoc, uno::UNO_QUERY ); - if( xAxisProps.is() && xNumberFormatsSupplier.is() ) + if( xAxisProps.is() ) { sal_Int32 nNumberFormat = -1; xAxisProps->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; - Reference< util::XNumberFormats > xNumberFormats( xNumberFormatsSupplier->getNumberFormats() ); + Reference< util::XNumberFormats > xNumberFormats( xChartDoc->getNumberFormats() ); if( xNumberFormats.is() ) { Reference< beans::XPropertySet > xKeyProps; @@ -964,7 +963,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c xAxis->setScaleData( aScale ); } -void lcl_switchToTextCategories( const Reference< XChartDocument >& xChartDoc, const Reference< XAxis >& xAxis ) +void lcl_switchToTextCategories( const rtl::Reference< ChartModel >& xChartDoc, const Reference< XAxis >& xAxis ) { if( !xAxis.is() ) return;