summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngrid Halama <iha@openoffice.org>2010-01-14 13:37:50 +0000
committerIngrid Halama <iha@openoffice.org>2010-01-14 13:37:50 +0000
commit0203776ff2c1253188f488be8cc9d80c38d982ce (patch)
tree60d809d0720b686984fc90f06002fbdd563f8b43
parenta7062ae8ee7e24437b490abea605524a2d3a8486 (diff)
#i108122# data label from categories crashes office when having no categories
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx5
1 files changed, 4 insertions, 1 deletions
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 );