summaryrefslogtreecommitdiffstats
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-27 18:21:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-29 11:37:56 +0100
commit2fc38f8156d3fb1f58af223133acf8c543dbf09b (patch)
treed5937a93fe20b7cec034ce2fcf3e615041d18897 /chart2/source/tools
parentsvx textcharacterspacingcontrol: allow smaller kerning (diff)
downloadcore-2fc38f8156d3fb1f58af223133acf8c543dbf09b.tar.gz
core-2fc38f8156d3fb1f58af223133acf8c543dbf09b.zip
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>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/DiagramHelper.cxx9
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;