diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-02 10:48:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-02 20:04:45 +0200 |
commit | a3695d24087b7958850d73eee7e665c1d78a041b (patch) | |
tree | 2f1fa85c1d906028ccf45ed8a1a17068ebc6bd15 /scaddins | |
parent | 51143bbb326a7a2e7df7ba987c0e50030c609841 (diff) |
loplugin:flatten in scaddins
Change-Id: I7a973de06d36fb10e9dd7f6826991ff9d503076d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91550
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 32 |
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; } } |