[Libreoffice-commits] core.git: scaddins/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 2 18:05:21 UTC 2020
scaddins/source/analysis/analysishelper.cxx | 32 ++++++++++++++--------------
1 file changed, 16 insertions(+), 16 deletions(-)
New commits:
commit a3695d24087b7958850d73eee7e665c1d78a041b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 2 10:48:50 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Apr 2 20:04:45 2020 +0200
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 at collabora.co.uk>
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;
}
}
More information about the Libreoffice-commits
mailing list