diff options
-rw-r--r-- | framework/Library_fwe.mk | 1 | ||||
-rw-r--r-- | framework/inc/uielement/menubarmanager.hxx | 1 | ||||
-rw-r--r-- | framework/source/fwe/classes/menuextensionsupplier.cxx | 47 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 32 | ||||
-rw-r--r-- | include/framework/menuextensionsupplier.hxx | 43 |
5 files changed, 0 insertions, 124 deletions
diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index 52d53fcc79fd..5f70d38eb004 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -59,7 +59,6 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/classes/framelistanalyzer \ framework/source/fwe/classes/fwkresid \ framework/source/fwe/classes/imagewrapper \ - framework/source/fwe/classes/menuextensionsupplier \ framework/source/fwe/classes/rootactiontriggercontainer \ framework/source/fwe/classes/sfxhelperfunctions \ framework/source/fwe/dispatch/interaction \ diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index bc782dbeda95..e90e94d2b9c4 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -171,7 +171,6 @@ class MenuBarManager: }; void RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuShortCuts ); - void CheckAndAddMenuExtension( Menu* pMenu ); static void UpdateSpecialWindowMenu( Menu* pMenu, const css::uno::Reference< css::uno::XComponentContext >& xContext ); static void FillMenuImages( css::uno::Reference< css::frame::XFrame > const & xFrame, Menu* _pMenu, bool bShowMenuImages ); static void impl_RetrieveShortcutsFromConfiguration( const css::uno::Reference< css::ui::XAcceleratorConfiguration >& rAccelCfg, diff --git a/framework/source/fwe/classes/menuextensionsupplier.cxx b/framework/source/fwe/classes/menuextensionsupplier.cxx deleted file mode 100644 index 438696106e60..000000000000 --- a/framework/source/fwe/classes/menuextensionsupplier.cxx +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <framework/menuextensionsupplier.hxx> -#include <osl/mutex.hxx> - -static pfunc_setMenuExtensionSupplier pMenuExtensionSupplierFunc = nullptr; - -namespace framework -{ - -MenuExtensionItem SAL_CALL GetMenuExtension() -{ - MenuExtensionItem aItem; - - pfunc_setMenuExtensionSupplier pLocalMenuExtensionSupplierFunc( nullptr ); - - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - pLocalMenuExtensionSupplierFunc = pMenuExtensionSupplierFunc; - } - - if ( pLocalMenuExtensionSupplierFunc ) - return (*pLocalMenuExtensionSupplierFunc)(); - else - return aItem; -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index a9341aa85c4e..e47217a8faf1 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -24,7 +24,6 @@ #include <framework/addonsoptions.hxx> #include <classes/fwkresid.hxx> #include <helper/mischelper.hxx> -#include <framework/menuextensionsupplier.hxx> #include <strings.hrc> #include <services.h> @@ -585,35 +584,6 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source ) m_xModuleImageManager.clear(); } -void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu ) -{ - - // retrieve menu extension item - MenuExtensionItem aMenuItem( GetMenuExtension() ); - if (( !aMenuItem.aURL.isEmpty() ) && - ( !aMenuItem.aLabel.isEmpty() )) - { - // remove all old window list entries from menu - sal_uInt16 nNewItemId( 0 ); - sal_uInt16 nInsertPos( MENU_APPEND ); - sal_uInt16 nBeforePos( MENU_APPEND ); - for ( sal_uInt16 n = 0; n < pMenu->GetItemCount(); n++ ) - { - sal_uInt16 nItemId = pMenu->GetItemId( n ); - nNewItemId = std::max( nItemId, nNewItemId ); - if ( pMenu->GetItemCommand( nItemId ) == ".uno:About" ) - nBeforePos = n; - } - ++nNewItemId; - - if ( nBeforePos != MENU_APPEND ) - nInsertPos = nBeforePos; - - pMenu->InsertItem(nNewItemId, aMenuItem.aLabel, MenuItemBits::NONE, OString(), nInsertPos); - pMenu->SetItemCommand( nNewItemId, aMenuItem.aURL ); - } -} - static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId) { if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId )) @@ -1170,8 +1140,6 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF // Check if this is the help menu. Add menu item if needed if ( aItemCommand == aCmdHelpMenu ) { - // Check if this is the help menu. Add menu item if needed - CheckAndAddMenuExtension( pPopup ); } else if ( aItemCommand == aCmdToolsMenu && AddonMenuManager::HasAddonMenuElements() ) { diff --git a/include/framework/menuextensionsupplier.hxx b/include/framework/menuextensionsupplier.hxx deleted file mode 100644 index 303de1353ea6..000000000000 --- a/include/framework/menuextensionsupplier.hxx +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_FRAMEWORK_MENUEXTENSIONSUPPLIER_HXX -#define INCLUDED_FRAMEWORK_MENUEXTENSIONSUPPLIER_HXX - -#include <rtl/ustring.hxx> -#include <framework/fwedllapi.h> - -struct FWE_DLLPUBLIC MenuExtensionItem -{ - OUString aLabel; - OUString aURL; -}; - -typedef MenuExtensionItem ( *pfunc_setMenuExtensionSupplier)(); - -namespace framework -{ - -FWE_DLLPUBLIC MenuExtensionItem SAL_CALL GetMenuExtension(); - -} - -#endif // INCLUDED_FRAMEWORK_MENUEXTENSIONSUPPLIER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |