diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/tools/ChartTypeHelper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 5 |
2 files changed, 5 insertions, 2 deletions
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; } } } 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 ); |