summaryrefslogtreecommitdiff
path: root/svx/source/mnuctrls/smarttagmenu.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-21 15:49:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 12:15:38 +0100
commit3fbbd74b7bc6aef4af5f0c4b23a73a6726b9afbf (patch)
treeb3a0df75c42a93645f5342863a7291c871e520eb /svx/source/mnuctrls/smarttagmenu.cxx
parent4b7490fe49bb93f895e974602a2616fa80b74019 (diff)
loplugin:flatten in svx
Change-Id: Idc4d0186ecc6f0722c2b1358486a2430f037ae29 Reviewed-on: https://gerrit.libreoffice.org/45036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/mnuctrls/smarttagmenu.cxx')
-rw-r--r--svx/source/mnuctrls/smarttagmenu.cxx62
1 files changed, 31 insertions, 31 deletions
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index a53d00de888a..401cd0545664 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -63,39 +63,39 @@ void SmartTagMenuController::statusChanged( const css::frame::FeatureStateEvent&
resetPopupMenu( m_xPopupMenu );
css::uno::Sequence< css::beans::PropertyValue > aProperties;
- if ( rEvent.IsEnabled && ( rEvent.State >>= aProperties ) )
+ if ( !rEvent.IsEnabled || !( rEvent.State >>= aProperties ) )
+ return;
+
+ css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > > aActionComponents;
+ css::uno::Sequence< css::uno::Sequence< sal_Int32 > > aActionIndices;
+ css::uno::Sequence< css::uno::Reference< css::container::XStringKeyMap > > aStringKeyMaps;
+ css::uno::Reference< css::text::XTextRange > xTextRange;
+ css::uno::Reference< css::frame::XController > xController;
+ css::lang::Locale aLocale;
+ OUString aApplicationName;
+ OUString aRangeText;
+
+ for ( const auto& aProperty : aProperties )
{
- css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > > aActionComponents;
- css::uno::Sequence< css::uno::Sequence< sal_Int32 > > aActionIndices;
- css::uno::Sequence< css::uno::Reference< css::container::XStringKeyMap > > aStringKeyMaps;
- css::uno::Reference< css::text::XTextRange > xTextRange;
- css::uno::Reference< css::frame::XController > xController;
- css::lang::Locale aLocale;
- OUString aApplicationName;
- OUString aRangeText;
-
- for ( const auto& aProperty : aProperties )
- {
- if ( aProperty.Name == "ActionComponents" )
- aProperty.Value >>= aActionComponents;
- else if ( aProperty.Name == "ActionIndices" )
- aProperty.Value >>= aActionIndices;
- else if ( aProperty.Name == "StringKeyMaps" )
- aProperty.Value >>= aStringKeyMaps;
- else if ( aProperty.Name == "TextRange" )
- aProperty.Value >>= xTextRange;
- else if ( aProperty.Name == "Controller" )
- aProperty.Value >>= xController;
- else if ( aProperty.Name == "Locale" )
- aProperty.Value >>= aLocale;
- else if ( aProperty.Name == "ApplicationName" )
- aProperty.Value >>= aApplicationName;
- else if ( aProperty.Name == "RangeText" )
- aProperty.Value >>= aRangeText;
- }
- m_pSmartTagItem.reset( new SvxSmartTagItem( 0, aActionComponents, aActionIndices, aStringKeyMaps, xTextRange, xController, aLocale, aApplicationName, aRangeText ) );
- FillMenu();
+ if ( aProperty.Name == "ActionComponents" )
+ aProperty.Value >>= aActionComponents;
+ else if ( aProperty.Name == "ActionIndices" )
+ aProperty.Value >>= aActionIndices;
+ else if ( aProperty.Name == "StringKeyMaps" )
+ aProperty.Value >>= aStringKeyMaps;
+ else if ( aProperty.Name == "TextRange" )
+ aProperty.Value >>= xTextRange;
+ else if ( aProperty.Name == "Controller" )
+ aProperty.Value >>= xController;
+ else if ( aProperty.Name == "Locale" )
+ aProperty.Value >>= aLocale;
+ else if ( aProperty.Name == "ApplicationName" )
+ aProperty.Value >>= aApplicationName;
+ else if ( aProperty.Name == "RangeText" )
+ aProperty.Value >>= aRangeText;
}
+ m_pSmartTagItem.reset( new SvxSmartTagItem( 0, aActionComponents, aActionIndices, aStringKeyMaps, xTextRange, xController, aLocale, aApplicationName, aRangeText ) );
+ FillMenu();
}
void SmartTagMenuController::FillMenu()