diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-08 16:12:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-09 08:28:56 +0200 |
commit | 719a2adfbdac8ce26a035e5fedeeaade8706832d (patch) | |
tree | 541a185d2c60d83da75306bab6bd93527c9b4d73 /framework | |
parent | 4763091bbecab8722a43d0ed73eafc0a1f596242 (diff) |
remove unnecessary empty OUString fields and vars
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7
Reviewed-on: https://gerrit.libreoffice.org/37394
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/fwe/classes/addonsoptions.cxx | 19 | ||||
-rw-r--r-- | framework/source/uielement/toolbarsmenucontroller.cxx | 9 |
2 files changed, 13 insertions, 15 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index ad82adad4784..96cb03bdbc5f 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -288,7 +288,6 @@ class AddonsOptions_Impl : public ConfigItem OUString m_aPropMergeMenuNames[PROPERTYCOUNT_MERGE_MENUBAR]; OUString m_aPropMergeToolbarNames[PROPERTYCOUNT_MERGE_TOOLBAR]; OUString m_aPropMergeStatusbarNames[PROPERTYCOUNT_MERGE_STATUSBAR]; - OUString m_aEmpty; OUString m_aPathDelimiter; OUString m_aRootAddonPopupMenuURLPrexfix; Sequence< Sequence< PropertyValue > > m_aCachedMenuProperties; @@ -1078,7 +1077,7 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence< // A popup menu must have a title and can have a URL and ImageIdentifier // Set the other property values to empty aMenuItem[ OFFSET_MENUITEM_URL ].Value <<= aPopupMenuURL; - aMenuItem[ OFFSET_MENUITEM_TARGET ].Value <<= m_aEmpty; + aMenuItem[ OFFSET_MENUITEM_TARGET ].Value <<= OUString(); aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER ].Value <<= aPopupMenuImageId; aMenuItem[ OFFSET_MENUITEM_CONTEXT ].Value = aMenuItemNodePropValues[ OFFSET_MENUITEM_CONTEXT ]; @@ -1113,9 +1112,9 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence< { // Separator aMenuItem[ OFFSET_MENUITEM_URL ].Value <<= aStrValue; - aMenuItem[ OFFSET_MENUITEM_TARGET ].Value <<= m_aEmpty; - aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER ].Value <<= m_aEmpty; - aMenuItem[ OFFSET_MENUITEM_CONTEXT ].Value <<= m_aEmpty; + aMenuItem[ OFFSET_MENUITEM_TARGET ].Value <<= OUString(); + aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER ].Value <<= OUString(); + aMenuItem[ OFFSET_MENUITEM_CONTEXT ].Value <<= OUString(); aMenuItem[ OFFSET_MENUITEM_SUBMENU ].Value <<= Sequence< Sequence< PropertyValue > >(); // Submenu set! bResult = true; } @@ -1194,11 +1193,11 @@ bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName, { // A separator toolbar item only needs a URL aToolBarItem[ OFFSET_TOOLBARITEM_URL ].Value <<= aURL; - aToolBarItem[ OFFSET_TOOLBARITEM_TITLE ].Value <<= m_aEmpty; - aToolBarItem[ OFFSET_TOOLBARITEM_TARGET ].Value <<= m_aEmpty; - aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER ].Value <<= m_aEmpty; - aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT ].Value <<= m_aEmpty; - aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE ].Value <<= m_aEmpty; + aToolBarItem[ OFFSET_TOOLBARITEM_TITLE ].Value <<= OUString(); + aToolBarItem[ OFFSET_TOOLBARITEM_TARGET ].Value <<= OUString(); + aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER ].Value <<= OUString(); + aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT ].Value <<= OUString(); + aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE ].Value <<= OUString(); aToolBarItem[ OFFSET_TOOLBARITEM_WIDTH ].Value <<= sal_Int32( 0 ); bResult = true; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 88c527669710..2f5805ddc0ca 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -286,7 +286,6 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_aCommandVector.clear(); // Retrieve layout manager for additional information - OUString aEmptyString; Reference< XLayoutManager > xLayoutManager( getLayoutManagerFromFrame( m_xFrame )); m_bResetActive = false; @@ -414,11 +413,11 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { if ( m_aModuleIdentifier == "com.sun.star.drawing.DrawingDocument" || m_aModuleIdentifier == "com.sun.star.presentation.PresentationDocument" ) - addCommand( m_xPopupMenu, ".uno:ColorControl", aEmptyString ); + addCommand( m_xPopupMenu, ".uno:ColorControl", "" ); else if ( m_aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument" ) - addCommand( m_xPopupMenu, ".uno:InputLineVisible", aEmptyString ); + addCommand( m_xPopupMenu, ".uno:InputLineVisible", "" ); else - addCommand( m_xPopupMenu, ".uno:InsertFormula", aEmptyString ); + addCommand( m_xPopupMenu, ".uno:InsertFormula", "" ); } bool bAddCommand( true ); @@ -441,7 +440,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_xPopupMenu->insertSeparator( nItemCount+1 ); } - addCommand( m_xPopupMenu, aConfigureToolbar, aEmptyString ); + addCommand( m_xPopupMenu, aConfigureToolbar, "" ); } // Add separator if no configure has been added |