diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-27 18:21:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-29 11:37:56 +0100 |
commit | 2fc38f8156d3fb1f58af223133acf8c543dbf09b (patch) | |
tree | d5937a93fe20b7cec034ce2fcf3e615041d18897 | |
parent | 2334561bf15ec9b061636919efbd0e2a7b89e29b (diff) |
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.grandin@collabora.co.uk>
-rw-r--r-- | chart2/source/tools/DiagramHelper.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
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; |