Kaydet (Commit) fe7032a3 authored tarafından Noel Grandin's avatar Noel Grandin

unused menu extension supplier stuff

since

    commit 5298b1b3
    Date:   Mon Aug 8 11:48:55 2011 +0100
    callcatcher: ditch some more methods

Change-Id: I123081cbe7fe351ce6613a5e7491b11e133d1d29
üst fc48a4cf
......@@ -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 \
......
......@@ -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,
......
/* -*- 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: */
......@@ -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() )
{
......
/* -*- 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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment