diff options
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/TitleWrapper.cxx')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/TitleWrapper.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index c74045752aa2..5355c72150c5 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -308,21 +308,21 @@ void TitleWrapper::setFastCharacterPropertyValue( nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP ); Reference< chart2::XTitle > xTitle( getTitleObject() ); - if( xTitle.is()) - { - Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText()); - const WrappedProperty* pWrappedProperty = getWrappedProperty( nHandle ); + if( !xTitle.is()) + return; - for( sal_Int32 i = 0; i < aStrings.getLength(); ++i ) - { - Reference< beans::XFastPropertySet > xFastPropertySet( aStrings[ i ], uno::UNO_QUERY ); - Reference< beans::XPropertySet > xPropSet( xFastPropertySet, uno::UNO_QUERY ); + Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText()); + const WrappedProperty* pWrappedProperty = getWrappedProperty( nHandle ); - if( pWrappedProperty ) - pWrappedProperty->setPropertyValue( rValue, xPropSet ); - else if( xFastPropertySet.is() ) - xFastPropertySet->setFastPropertyValue( nHandle, rValue ); - } + for( sal_Int32 i = 0; i < aStrings.getLength(); ++i ) + { + Reference< beans::XFastPropertySet > xFastPropertySet( aStrings[ i ], uno::UNO_QUERY ); + Reference< beans::XPropertySet > xPropSet( xFastPropertySet, uno::UNO_QUERY ); + + if( pWrappedProperty ) + pWrappedProperty->setPropertyValue( rValue, xPropSet ); + else if( xFastPropertySet.is() ) + xFastPropertySet->setFastPropertyValue( nHandle, rValue ); } } |