diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 16:03:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-25 17:19:22 +0200 |
commit | d116894b26f538793a0d5dc5847efd2fb53e7acb (patch) | |
tree | 5d99d51c14bccc6a08d646b32246814c8b1bd61d /framework/source/layoutmanager | |
parent | 3361e28f944d9f752f0e0df91968559f1ae55f72 (diff) |
loplugin:oncevar in formula..framework
Change-Id: I96d6af49c1994ebd7d6dcc41469127e3151b4350
Reviewed-on: https://gerrit.libreoffice.org/39186
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/layoutmanager')
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 6 | ||||
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 55da5a72ea81..6533828a060c 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2860,12 +2860,11 @@ void SAL_CALL LayoutManager::elementInserted( const ui::ConfigurationEvent& Even Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); if ( xElementSettings.is() ) { - OUString aConfigSourcePropName( "ConfigurationSource" ); uno::Reference< XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); if ( xPropSet.is() ) { if ( Event.Source == uno::Reference< uno::XInterface >( m_xDocCfgMgr, uno::UNO_QUERY )) - xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); + xPropSet->setPropertyValue( "ConfigurationSource", makeAny( m_xDocCfgMgr )); } xElementSettings->updateSettings(); } @@ -2991,12 +2990,11 @@ void SAL_CALL LayoutManager::elementReplaced( const ui::ConfigurationEvent& Even Reference< XUIElementSettings > xElementSettings( xUIElement, UNO_QUERY ); if ( xElementSettings.is() ) { - OUString aConfigSourcePropName( "ConfigurationSource" ); Reference< XInterface > xElementCfgMgr; Reference< XPropertySet > xPropSet( xElementSettings, UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + xPropSet->getPropertyValue( "ConfigurationSource" ) >>= xElementCfgMgr; if ( !xElementCfgMgr.is() ) return; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 37c86960a9b5..be24d67a0262 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1092,7 +1092,6 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() uno::Reference< ui::XUIElement > xUIElement; sal_uInt32 nCount = m_pAddonOptions->GetAddonsToolBarCount(); - OUString aElementType( "toolbar" ); uno::Sequence< beans::PropertyValue > aPropSeq( 2 ); aPropSeq[0].Name = "Frame"; @@ -1151,7 +1150,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() else { // Create new UI element and try to read its state data - UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement ); + UIElement aNewToolbar( aAddonToolBarName, "toolbar", xUIElement ); aNewToolbar.m_bFloating = true; implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); implts_setElementData( aNewToolbar, xDockWindow ); @@ -3798,12 +3797,11 @@ void SAL_CALL ToolbarLayoutManager::elementInserted( const ui::ConfigurationEven uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); if ( xElementSettings.is() ) { - OUString aConfigSourcePropName( "ConfigurationSource" ); uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); if ( xPropSet.is() ) { if ( rEvent.Source == uno::Reference< uno::XInterface >( m_xDocCfgMgr, uno::UNO_QUERY )) - xPropSet->setPropertyValue( aConfigSourcePropName, makeAny( m_xDocCfgMgr )); + xPropSet->setPropertyValue( "ConfigurationSource", makeAny( m_xDocCfgMgr )); } xElementSettings->updateSettings(); } @@ -3908,12 +3906,11 @@ void SAL_CALL ToolbarLayoutManager::elementReplaced( const ui::ConfigurationEven uno::Reference< ui::XUIElementSettings > xElementSettings( aUIElement.m_xUIElement, uno::UNO_QUERY ); if ( xElementSettings.is() ) { - OUString aConfigSourcePropName( "ConfigurationSource" ); uno::Reference< uno::XInterface > xElementCfgMgr; uno::Reference< beans::XPropertySet > xPropSet( xElementSettings, uno::UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue( aConfigSourcePropName ) >>= xElementCfgMgr; + xPropSet->getPropertyValue( "ConfigurationSource" ) >>= xElementCfgMgr; if ( !xElementCfgMgr.is() ) return; |