From a7062ae8ee7e24437b490abea605524a2d3a8486 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 14 Jan 2010 13:36:46 +0000 Subject: #i108313# & #i108281# pie charts without series crashes office --- chart2/source/tools/ChartTypeHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chart2') diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx index 9e521fa76dae..243e30093ff3 100644 --- a/chart2/source/tools/ChartTypeHelper.cxx +++ b/chart2/source/tools/ChartTypeHelper.cxx @@ -549,7 +549,7 @@ sal_Int32 ChartTypeHelper::getNumberOfDisplayedSeries( if( (xChartTypeProp->getPropertyValue( C2U("UseRings")) >>= bDonut) && !bDonut ) { - return 1; + return nNumberOfSeries>0 ? 1 : 0; } } } -- cgit From 0203776ff2c1253188f488be8cc9d80c38d982ce Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 14 Jan 2010 13:37:50 +0000 Subject: #i108122# data label from categories crashes office when having no categories --- chart2/source/view/charttypes/VSeriesPlotter.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chart2') diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index c8f473d226d0..864a9f8accfa 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -537,6 +537,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re createText( xTarget_, aText.makeStringAndClear() , *pPropNames, *pPropValues, ShapeFactory::makeTransformation( aScreenPosition2D ) ); + if( !xTextShape.is() ) + return xTextShape; + const awt::Point aUnrotatedTextPos( xTextShape->getPosition() ); if( fRotationDegrees != 0.0 ) { @@ -547,7 +550,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re LabelPositionHelper::correctPositionForRotation( xTextShape, eAlignment, fRotationDegrees, true /*bRotateAroundCenter*/ ); } - if( xSymbol.is() && xTextShape.is() ) + if( xSymbol.is() ) { const awt::Point aOldTextPos( xTextShape->getPosition() ); awt::Point aNewTextPos( aOldTextPos ); -- cgit