diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-20 12:13:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-20 10:45:14 +0000 |
commit | b18e1bc61ccba9d0c74274e2fe45b2b422c601cf (patch) | |
tree | 13d90e6939c5d152c30b948148125be7b0cb6f22 /framework/source/fwe/classes | |
parent | 8a382d4ad190cf07cbd6b1fd6b903975134b0cf1 (diff) |
loplugin:unusedfields
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24
Reviewed-on: https://gerrit.libreoffice.org/29078
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/fwe/classes')
-rw-r--r-- | framework/source/fwe/classes/addonmenu.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx index 09176d522fad..ebfcb0a494ae 100644 --- a/framework/source/fwe/classes/addonmenu.cxx +++ b/framework/source/fwe/classes/addonmenu.cxx @@ -46,8 +46,7 @@ const sal_uInt16 SID_HELPMENU = (SID_SFX_START + 410); namespace framework { -AddonMenu::AddonMenu( const css::uno::Reference< css::frame::XFrame >& rFrame ) : - m_xFrame( rFrame ) +AddonMenu::AddonMenu() { } @@ -62,8 +61,8 @@ bool AddonPopupMenu::IsCommandURLPrefix( const OUString& aCmdURL ) return aCmdURL.startsWith( ADDONSPOPUPMENU_URL_PREFIX_STR ); } -AddonPopupMenu::AddonPopupMenu( const css::uno::Reference< css::frame::XFrame >& rFrame ) : - AddonMenu( rFrame ) +AddonPopupMenu::AddonPopupMenu() : + AddonMenu() { } @@ -94,12 +93,12 @@ bool AddonMenuManager::HasAddonMenuElements() } // Factory method to create different Add-On menu types -VclPtr<PopupMenu> AddonMenuManager::CreatePopupMenuType( MenuType eMenuType, const Reference< XFrame >& rFrame ) +VclPtr<PopupMenu> AddonMenuManager::CreatePopupMenuType( MenuType eMenuType ) { if ( eMenuType == ADDON_MENU ) - return VclPtr<AddonMenu>::Create( rFrame ); + return VclPtr<AddonMenu>::Create(); else if ( eMenuType == ADDON_POPUPMENU ) - return VclPtr<AddonPopupMenu>::Create( rFrame ); + return VclPtr<AddonPopupMenu>::Create(); else return nullptr; } @@ -115,7 +114,7 @@ VclPtr<AddonMenu> AddonMenuManager::CreateAddonMenu( const Reference< XFrame >& const Sequence< Sequence< PropertyValue > >& rAddonMenuEntries = aOptions.GetAddonsMenu(); if ( rAddonMenuEntries.getLength() > 0 ) { - pAddonMenu = static_cast<AddonMenu *>(AddonMenuManager::CreatePopupMenuType( ADDON_MENU, rFrame ).get()); + pAddonMenu = static_cast<AddonMenu *>(AddonMenuManager::CreatePopupMenuType( ADDON_MENU ).get()); ::rtl::OUString aModuleIdentifier = GetModuleIdentifier( rContext, rFrame ); AddonMenuManager::BuildMenu( pAddonMenu, ADDON_MENU, MENU_APPEND, nUniqueMenuId, rAddonMenuEntries, rFrame, aModuleIdentifier ); @@ -235,7 +234,7 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, AddonMenuManager::IsCorrectContext( aModuleIdentifier, aContext )) { sal_uInt16 nId = nUniqueMenuId++; - VclPtr<AddonPopupMenu> pAddonPopupMenu = static_cast<AddonPopupMenu *>(AddonMenuManager::CreatePopupMenuType( ADDON_POPUPMENU, rFrame ).get()); + VclPtr<AddonPopupMenu> pAddonPopupMenu = static_cast<AddonPopupMenu *>(AddonMenuManager::CreatePopupMenuType( ADDON_POPUPMENU ).get()); AddonMenuManager::BuildMenu( pAddonPopupMenu, ADDON_MENU, MENU_APPEND, nUniqueMenuId, aAddonSubMenu, rFrame, aModuleIdentifier ); @@ -291,7 +290,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent VclPtr<PopupMenu> pSubMenu; if ( aAddonSubMenu.getLength() > 0 ) { - pSubMenu = AddonMenuManager::CreatePopupMenuType( nSubMenuType, rFrame ); + pSubMenu = AddonMenuManager::CreatePopupMenuType( nSubMenuType ); AddonMenuManager::BuildMenu( pSubMenu, nSubMenuType, MENU_APPEND, nUniqueMenuId, aAddonSubMenu, rFrame, rModuleIdentifier ); // Don't create a menu item for an empty sub menu |