diff options
Diffstat (limited to 'chart2/source/view/axes/VPolarCoordinateSystem.cxx')
-rw-r--r-- | chart2/source/view/axes/VPolarCoordinateSystem.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.cxx b/chart2/source/view/axes/VPolarCoordinateSystem.cxx index 50a8ce538633..fe5caa467bd7 100644 --- a/chart2/source/view/axes/VPolarCoordinateSystem.cxx +++ b/chart2/source/view/axes/VPolarCoordinateSystem.cxx @@ -62,11 +62,16 @@ uno::Sequence< sal_Int32 > VPolarCoordinateSystem::getCoordinateSystemResolution } void VPolarCoordinateSystem::createVAxisList( - const uno::Reference< util::XNumberFormatsSupplier > & xNumberFormatsSupplier + const uno::Reference<chart2::XChartDocument> & xChartDoc , const awt::Size& rFontReferenceSize , const awt::Rectangle& rMaximumSpaceForLabels ) { + // note: using xChartDoc itself as XNumberFormatsSupplier would cause + // a leak from VPolarAxis due to cyclic reference + uno::Reference<util::XNumberFormatsSupplier> const xNumberFormatsSupplier( + dynamic_cast<ChartModel*>(xChartDoc.get())->getNumberFormatsSupplier()); + m_aAxisMap.clear(); sal_Int32 nDimensionCount = m_xCooSysModel->getDimension(); sal_Int32 nDimensionIndex = 0; @@ -83,7 +88,7 @@ void VPolarCoordinateSystem::createVAxisList( AxisProperties aAxisProperties(xAxis,this->getExplicitCategoriesProvider()); aAxisProperties.init(); if(aAxisProperties.m_bDisplayLabels) - aAxisProperties.m_nNumberFormatKey = this->getNumberFormatKeyForAxis( xAxis, xNumberFormatsSupplier ); + aAxisProperties.m_nNumberFormatKey = this->getNumberFormatKeyForAxis(xAxis, xChartDoc); ::boost::shared_ptr< VAxisBase > apVAxis( VPolarAxis::createAxis( aAxisProperties,xNumberFormatsSupplier,nDimensionIndex,nDimensionCount) ); tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex ); |