diff options
Diffstat (limited to 'xmloff/source/chart/SchXMLPlotAreaContext.cxx')
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 61dab1fb52cb..9b6731f78da3 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -1237,18 +1237,23 @@ void SchXMLAxisContext::CreateAxis() case SCH_XML_AXIS_Z: { + bool bSettingZAxisSuccedded = false; try { - xDiaProp->setPropertyValue( - rtl::OUString::createFromAscii( "HasZAxis" ), aTrueBool ); + rtl::OUString sHasZAxis( rtl::OUString::createFromAscii( "HasZAxis" ) ); + xDiaProp->setPropertyValue( sHasZAxis, aTrueBool ); + xDiaProp->getPropertyValue( sHasZAxis ) >>= bSettingZAxisSuccedded; } catch( beans::UnknownPropertyException & ) { DBG_ERROR( "Couldn't turn on z axis" ); } - uno::Reference< chart::XAxisZSupplier > xSuppl( mxDiagram, uno::UNO_QUERY ); - if( xSuppl.is()) - xProp = xSuppl->getZAxis(); + if( bSettingZAxisSuccedded ) + { + uno::Reference< chart::XAxisZSupplier > xSuppl( mxDiagram, uno::UNO_QUERY ); + if( xSuppl.is()) + xProp = xSuppl->getZAxis(); + } } break; case SCH_XML_AXIS_UNDEF: |