summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/unocontrol.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-03 23:36:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 01:40:24 +0200
commit714d907d304fae5cc8613eced127060199639af6 (patch)
tree31e495ddd9e12b32220dacbceabfca56ea7cf99e /toolkit/source/controls/unocontrol.cxx
parent8c4a24092bd9ccd1d577d10ae0559cef406e8fae (diff)
loplugin:flatten in toolkit
Change-Id: I8f4b29620134566f256f05bbab677e83baf20ec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/controls/unocontrol.cxx')
-rw-r--r--toolkit/source/controls/unocontrol.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index aeb84bd8139a..e38a68ff8322 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -250,39 +250,39 @@ void UnoControl::ImplSetPeerProperty( const OUString& rPropName, const Any& rVal
// releases our mutex before calling here in)
// That's why this additional check
- if ( mxVclWindowPeer.is() )
- {
- Any aConvertedValue( rVal );
+ if ( !mxVclWindowPeer.is() )
+ return;
+
+ Any aConvertedValue( rVal );
- if ( mpData->bLocalizationSupport )
+ if ( mpData->bLocalizationSupport )
+ {
+ // We now support a mapping for language dependent properties. This is the
+ // central method to implement it.
+ if( rPropName == "Text" ||
+ rPropName == "Label" ||
+ rPropName == "Title" ||
+ rPropName == "HelpText" ||
+ rPropName == "CurrencySymbol" ||
+ rPropName == "StringItemList" )
{
- // We now support a mapping for language dependent properties. This is the
- // central method to implement it.
- if( rPropName == "Text" ||
- rPropName == "Label" ||
- rPropName == "Title" ||
- rPropName == "HelpText" ||
- rPropName == "CurrencySymbol" ||
- rPropName == "StringItemList" )
+ OUString aValue;
+ uno::Sequence< OUString > aSeqValue;
+ if ( aConvertedValue >>= aValue )
{
- OUString aValue;
- uno::Sequence< OUString > aSeqValue;
- if ( aConvertedValue >>= aValue )
- {
- if ( ImplCheckLocalize( aValue ) )
- aConvertedValue <<= aValue;
- }
- else if ( aConvertedValue >>= aSeqValue )
- {
- for ( auto& rValue : aSeqValue )
- ImplCheckLocalize( rValue );
- aConvertedValue <<= aSeqValue;
- }
+ if ( ImplCheckLocalize( aValue ) )
+ aConvertedValue <<= aValue;
+ }
+ else if ( aConvertedValue >>= aSeqValue )
+ {
+ for ( auto& rValue : aSeqValue )
+ ImplCheckLocalize( rValue );
+ aConvertedValue <<= aSeqValue;
}
}
-
- mxVclWindowPeer->setProperty( rPropName, aConvertedValue );
}
+
+ mxVclWindowPeer->setProperty( rPropName, aConvertedValue );
}
void UnoControl::PrepareWindowDescriptor( WindowDescriptor& )