summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scaddins/source/analysis/analysishelper.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 3206b650b30b..2e799c9d1588 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2689,23 +2689,23 @@ void ScaAnyConverter::init( const uno::Reference< beans::XPropertySet >& xPropSe
{
// try to get default number format
bHasValidFormat = false;
- if( xFormatter.is() )
+ if( !xFormatter.is() )
+ return;
+
+ // get XFormatsSupplier from outer XPropertySet
+ uno::Reference< util::XNumberFormatsSupplier > xFormatsSupp( xPropSet, uno::UNO_QUERY );
+ if( !xFormatsSupp.is() )
+ return;
+
+ // get XNumberFormatTypes from XNumberFormatsSupplier to get standard index
+ uno::Reference< util::XNumberFormats > xFormats( xFormatsSupp->getNumberFormats() );
+ uno::Reference< util::XNumberFormatTypes > xFormatTypes( xFormats, uno::UNO_QUERY );
+ if( xFormatTypes.is() )
{
- // get XFormatsSupplier from outer XPropertySet
- uno::Reference< util::XNumberFormatsSupplier > xFormatsSupp( xPropSet, uno::UNO_QUERY );
- if( xFormatsSupp.is() )
- {
- // get XNumberFormatTypes from XNumberFormatsSupplier to get standard index
- uno::Reference< util::XNumberFormats > xFormats( xFormatsSupp->getNumberFormats() );
- uno::Reference< util::XNumberFormatTypes > xFormatTypes( xFormats, uno::UNO_QUERY );
- if( xFormatTypes.is() )
- {
- lang::Locale eLocale;
- nDefaultFormat = xFormatTypes->getStandardIndex( eLocale );
- xFormatter->attachNumberFormatsSupplier( xFormatsSupp );
- bHasValidFormat = true;
- }
- }
+ lang::Locale eLocale;
+ nDefaultFormat = xFormatTypes->getStandardIndex( eLocale );
+ xFormatter->attachNumberFormatsSupplier( xFormatsSupp );
+ bHasValidFormat = true;
}
}