summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Fernandez <antonio.fernandez@aentos.es>2012-11-13 16:38:09 +0000
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:53:01 +0100
commit62a803dc46c1ffb5cba7f094868ce339feeecfda (patch)
treefba6d247bf16ebe8c4d0150252349b462b8ed3a1
parentc36c5b516168ea63767e8642c0958edcb4704a1d (diff)
Removed AbstractMenu class and cleaned up useless code.
Change-Id: I4094302b83342fd42bccad4966b51624215d71ff
-rw-r--r--framework/inc/classes/menumanager.hxx22
-rw-r--r--framework/inc/uielement/menubarmanager.hxx24
-rw-r--r--framework/inc/uielement/menubarmerger.hxx16
-rw-r--r--framework/source/classes/menumanager.cxx16
-rw-r--r--framework/source/uielement/menubarmanager.cxx34
-rw-r--r--framework/source/uielement/menubarmerger.cxx18
-rw-r--r--framework/source/uielement/menubarwrapper.cxx2
-rw-r--r--vcl/inc/salmenu.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx2
-rw-r--r--vcl/inc/vcl/menu.hxx94
-rw-r--r--vcl/source/window/menu.cxx13
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx8
12 files changed, 63 insertions, 188 deletions
diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx
index 8bdbb398b888..b26ee3fa6a34 100644
--- a/framework/inc/classes/menumanager.hxx
+++ b/framework/inc/classes/menumanager.hxx
@@ -72,7 +72,7 @@ class MenuManager : public ThreadHelpBase ,
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
- AbstractMenu* pMenu,
+ Menu* pMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
@@ -84,33 +84,33 @@ class MenuManager : public ThreadHelpBase ,
// XEventListener
virtual void SAL_CALL disposing( const EVENTOBJECT& Source ) throw ( RUNTIMEEXCEPTION );
- DECL_LINK( Select, AbstractMenu * );
+ DECL_LINK( Select, Menu * );
- AbstractMenu* GetMenu() const { return m_pVCLMenu; }
+ Menu* GetMenu() const { return m_pVCLMenu; }
void RemoveListener();
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& getServiceFactory();
- static void UpdateSpecialWindowMenu( AbstractMenu* pMenu ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,IMutex& _rMutex);
+ static void UpdateSpecialWindowMenu( Menu* pMenu ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,IMutex& _rMutex);
static void FillMenuImages(
::com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame,
- AbstractMenu* _pMenu,
+ Menu* _pMenu,
sal_Bool bShowMenuImages
);
protected:
DECL_LINK(Highlight, void *);
- DECL_LINK( Activate, AbstractMenu * );
- DECL_LINK( Deactivate, AbstractMenu * );
+ DECL_LINK( Activate, Menu * );
+ DECL_LINK( Deactivate, Menu * );
private:
- void UpdateSpecialFileMenu( AbstractMenu* pMenu );
- void UpdateSpecialWindowMenu( AbstractMenu* pMenu );
+ void UpdateSpecialFileMenu( Menu* pMenu );
+ void UpdateSpecialWindowMenu( Menu* pMenu );
void ClearMenuDispatch(const EVENTOBJECT& Source = EVENTOBJECT(),bool _bRemoveOnly = true);
void SetHdl();
void AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren);
- sal_uInt16 FillItemCommand(::rtl::OUString& _rItemCommand, AbstractMenu* _pMenu,sal_uInt16 _nIndex) const;
+ sal_uInt16 FillItemCommand(::rtl::OUString& _rItemCommand, Menu* _pMenu,sal_uInt16 _nIndex) const;
struct MenuItemHandler
@@ -141,7 +141,7 @@ class MenuManager : public ThreadHelpBase ,
sal_Bool m_bIsBookmarkMenu;
sal_Bool m_bShowMenuImages;
::rtl::OUString m_aMenuItemCommand;
- AbstractMenu* m_pVCLMenu;
+ Menu* m_pVCLMenu;
REFERENCE< XFRAME > m_xFrame;
::std::vector< MenuItemHandler* > m_aMenuItemHandlerVector;
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx
index 07f352bf3bad..e708fc385d09 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -111,7 +111,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& _xURLTransformer,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
const rtl::OUString& aModuleIdentifier,
- AbstractMenu* pMenu,
+ Menu* pMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
@@ -146,22 +146,22 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
// XSystemDependentMenuPeer
virtual ::com::sun::star::uno::Any SAL_CALL getMenuHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) throw (::com::sun::star::uno::RuntimeException);
- DECL_LINK( Select, AbstractMenu * );
+ DECL_LINK( Select, Menu * );
- AbstractMenu* GetMenuBar() const { return m_pVCLMenu; }
+ Menu* GetMenuBar() const { return m_pVCLMenu; }
// Configuration methods
- static void FillMenuWithConfiguration( sal_uInt16& nId, AbstractMenu* pMenu,
+ static void FillMenuWithConfiguration( sal_uInt16& nId, Menu* pMenu,
const ::rtl::OUString& rModuleIdentifier,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rItemContainer,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& rTransformer );
static void FillMenu( sal_uInt16& nId,
- AbstractMenu* pMenu,
+ Menu* pMenu,
const ::rtl::OUString& rModuleIdentifier,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rItemContainer,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider );
- void FillMenuManager( AbstractMenu* pMenu,
+ void FillMenuManager( Menu* pMenu,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
const rtl::OUString& rModuleIdentifier,
@@ -172,8 +172,8 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
protected:
DECL_LINK(Highlight, void *);
- DECL_LINK( Activate, AbstractMenu * );
- DECL_LINK( Deactivate, AbstractMenu * );
+ DECL_LINK( Activate, Menu * );
+ DECL_LINK( Deactivate, Menu * );
DECL_LINK( AsyncSettingsHdl, Timer * );
void RemoveListener();
@@ -216,16 +216,16 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
void CreatePicklistArguments(
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsList,
const MenuItemHandler* );
- void CheckAndAddMenuExtension( AbstractMenu* pMenu );
+ void CheckAndAddMenuExtension( Menu* pMenu );
static void impl_RetrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg,
const ::com::sun::star::uno::Sequence< rtl::OUString >& rCommands,
std::vector< MenuItemHandler* >& aMenuShortCuts );
- static void MergeAddonMenus( AbstractMenu* pMenuBar, const MergeMenuInstructionContainer&, const ::rtl::OUString& aModuleIdentifier );
+ static void MergeAddonMenus( Menu* pMenuBar, const MergeMenuInstructionContainer&, const ::rtl::OUString& aModuleIdentifier );
MenuItemHandler* GetMenuItemHandler( sal_uInt16 nItemId );
sal_Bool CreatePopupMenuController( MenuItemHandler* pMenuItemHandler );
void AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId);
- sal_uInt16 FillItemCommand(::rtl::OUString& _rItemCommand, AbstractMenu* _pMenu,sal_uInt16 _nIndex) const;
+ sal_uInt16 FillItemCommand(::rtl::OUString& _rItemCommand, Menu* _pMenu,sal_uInt16 _nIndex) const;
void Init(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,AddonMenu* pAddonMenu,sal_Bool bDelete,sal_Bool bDeleteChildren,bool _bHandlePopUp = false);
void SetHdl();
@@ -241,7 +241,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener
sal_Bool m_bModuleIdentified;
::rtl::OUString m_aMenuItemCommand;
::rtl::OUString m_aModuleIdentifier;
- AbstractMenu* m_pVCLMenu;
+ Menu* m_pVCLMenu;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XUIControllerRegistration > m_xPopupMenuControllerRegistration;
diff --git a/framework/inc/uielement/menubarmerger.hxx b/framework/inc/uielement/menubarmerger.hxx
index f44c91d21f4c..57586e71c763 100644
--- a/framework/inc/uielement/menubarmerger.hxx
+++ b/framework/inc/uielement/menubarmerger.hxx
@@ -51,7 +51,7 @@ enum RPResultInfo
struct ReferencePathInfo
{
- AbstractMenu* pPopupMenu;
+ Menu* pPopupMenu;
sal_uInt16 nPos;
sal_Int32 nLevel;
RPResultInfo eResult;
@@ -64,14 +64,14 @@ class MenuBarMerger
static void RetrieveReferencePath( const ::rtl::OUString&,
std::vector< ::rtl::OUString >& aReferencePath );
- static ReferencePathInfo FindReferencePath( const std::vector< ::rtl::OUString >& aReferencePath, AbstractMenu* pMenu );
+ static ReferencePathInfo FindReferencePath( const std::vector< ::rtl::OUString >& aReferencePath, Menu* pMenu );
static sal_uInt16 FindMenuItem( const ::rtl::OUString& rCmd,
- AbstractMenu* pMenu );
+ Menu* pMenu );
static void GetMenuEntry( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rAddonMenuEntry,
AddonMenuItem& aAddonMenu );
static void GetSubMenu( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& rSubMenuEntries,
AddonMenuContainer& rSubMenu );
- static bool ProcessMergeOperation( AbstractMenu* pMenu,
+ static bool ProcessMergeOperation( Menu* pMenu,
sal_uInt16 nPos,
sal_uInt16& rItemId,
const ::rtl::OUString& rMergeCommand,
@@ -86,21 +86,21 @@ class MenuBarMerger
const ::rtl::OUString& rModuleIdentifier,
const AddonMenuContainer& rAddonMenuItems );
static bool ProcessFallbackOperation();
- static bool MergeMenuItems( AbstractMenu* pMenu,
+ static bool MergeMenuItems( Menu* pMenu,
sal_uInt16 nPos,
sal_uInt16 nModIndex,
sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
const AddonMenuContainer& rAddonMenuItems );
- static bool ReplaceMenuItem( AbstractMenu* pMenu,
+ static bool ReplaceMenuItem( Menu* pMenu,
sal_uInt16 nPos,
sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
const AddonMenuContainer& rAddonMenuItems );
- static bool RemoveMenuItems( AbstractMenu* pMenu,
+ static bool RemoveMenuItems( Menu* pMenu,
sal_uInt16 nPos,
const ::rtl::OUString& rMergeCommandParameter );
- static bool CreateSubMenu( AbstractMenu* pSubMenu,
+ static bool CreateSubMenu( Menu* pSubMenu,
sal_uInt16& nItemId,
const ::rtl::OUString& rModuleIdentifier,
const AddonMenuContainer& rAddonSubMenu );
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index b4befafdefd8..1fc665b4b603 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -120,7 +120,7 @@ const char UNO_COMMAND[] = ".uno:";
MenuManager::MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- REFERENCE< XFRAME >& rFrame, AbstractMenu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
+ REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
:
ThreadHelpBase( &Application::GetSolarMutex() ),
mxServiceFactory(xServiceFactory)
@@ -465,7 +465,7 @@ void SAL_CALL MenuManager::disposing( const EVENTOBJECT& Source ) throw ( RUNTIM
}
-void MenuManager::UpdateSpecialFileMenu( AbstractMenu* pMenu )
+void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
{
// update picklist
Sequence< Sequence< PropertyValue > > aHistoryList = SvtHistoryOptions().GetList( ePICKLIST );
@@ -631,7 +631,7 @@ void MenuManager::UpdateSpecialFileMenu( AbstractMenu* pMenu )
}
}
-void MenuManager::UpdateSpecialWindowMenu( AbstractMenu* pMenu,const Reference< XMultiServiceFactory >& xServiceFactory,framework::IMutex& _rMutex )
+void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XMultiServiceFactory >& xServiceFactory,framework::IMutex& _rMutex )
{
// update window list
::std::vector< ::rtl::OUString > aNewWindowListVector;
@@ -745,7 +745,7 @@ void MenuManager::CreatePicklistArguments( Sequence< PropertyValue >& aArgsList,
// vcl handler
//_________________________________________________________________________________________________________________
-IMPL_LINK( MenuManager, Activate, AbstractMenu *, pMenu )
+IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
{
if ( pMenu == m_pVCLMenu )
{
@@ -848,7 +848,7 @@ IMPL_LINK( MenuManager, Activate, AbstractMenu *, pMenu )
}
-IMPL_LINK( MenuManager, Deactivate, AbstractMenu *, pMenu )
+IMPL_LINK( MenuManager, Deactivate, Menu *, pMenu )
{
if ( pMenu == m_pVCLMenu )
m_bActive = sal_False;
@@ -857,7 +857,7 @@ IMPL_LINK( MenuManager, Deactivate, AbstractMenu *, pMenu )
}
-IMPL_LINK( MenuManager, Select, AbstractMenu *, pMenu )
+IMPL_LINK( MenuManager, Select, Menu *, pMenu )
{
URL aTargetURL;
Sequence<PropertyValue> aArgs;
@@ -959,7 +959,7 @@ void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCo
m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
}
-sal_uInt16 MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand, AbstractMenu* _pMenu,sal_uInt16 _nIndex) const
+sal_uInt16 MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand, Menu* _pMenu,sal_uInt16 _nIndex) const
{
sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex );
@@ -973,7 +973,7 @@ sal_uInt16 MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand, Abstract
}
return nItemId;
}
-void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame, AbstractMenu* _pMenu,sal_Bool bShowMenuImages)
+void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame, Menu* _pMenu,sal_Bool bShowMenuImages)
{
AddonsOptions aAddonOptions;
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 3d287fb2251e..d7ddeb4804af 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -184,7 +184,7 @@ MenuBarManager::MenuBarManager(
const Reference< XURLTransformer >& _xURLTransformer,
const Reference< XDispatchProvider >& rDispatchProvider,
const rtl::OUString& rModuleIdentifier,
- AbstractMenu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
+ Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren )
: ThreadHelpBase( &Application::GetSolarMutex() ), OWeakObject()
, m_bDisposed( sal_False )
, m_bRetrieveImages( sal_False )
@@ -760,7 +760,7 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source ) throw ( Run
}
-void MenuBarManager::CheckAndAddMenuExtension( AbstractMenu* pMenu )
+void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::CheckAndAddMenuExtension" );
@@ -791,7 +791,7 @@ void MenuBarManager::CheckAndAddMenuExtension( AbstractMenu* pMenu )
}
}
-static void lcl_CheckForChildren(AbstractMenu* pMenu, sal_uInt16 nItemId)
+static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId)
{
if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId ))
pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() ? true : false );
@@ -831,7 +831,7 @@ private:
}
-IMPL_LINK( MenuBarManager, Activate, AbstractMenu *, pMenu )
+IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::Activate" );
if ( pMenu == m_pVCLMenu )
@@ -1027,14 +1027,11 @@ IMPL_LINK( MenuBarManager, Activate, AbstractMenu *, pMenu )
}
}
- // Freeze the menu
- m_pVCLMenu->Freeze();
-
return 1;
}
-IMPL_LINK( MenuBarManager, Deactivate, AbstractMenu *, pMenu )
+IMPL_LINK( MenuBarManager, Deactivate, Menu *, pMenu )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::Deactivate" );
if ( pMenu == m_pVCLMenu )
@@ -1051,9 +1048,6 @@ IMPL_LINK( MenuBarManager, Deactivate, AbstractMenu *, pMenu )
}
}
-// pMenu->Freeze();
- m_pVCLMenu->Freeze();
-
return 1;
}
@@ -1073,7 +1067,7 @@ IMPL_LINK( MenuBarManager, AsyncSettingsHdl, Timer*,)
return 0;
}
-IMPL_LINK( MenuBarManager, Select, AbstractMenu *, pMenu )
+IMPL_LINK( MenuBarManager, Select, Menu *, pMenu )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::Select" );
URL aTargetURL;
@@ -1245,7 +1239,7 @@ sal_Bool MenuBarManager::CreatePopupMenuController( MenuItemHandler* pMenuItemHa
return sal_False;
}
-void MenuBarManager::FillMenuManager( AbstractMenu* pMenu, const Reference< XFrame >& rFrame, const Reference< XDispatchProvider >& rDispatchProvider, const rtl::OUString& rModuleIdentifier, sal_Bool bDelete, sal_Bool bDeleteChildren )
+void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rFrame, const Reference< XDispatchProvider >& rDispatchProvider, const rtl::OUString& rModuleIdentifier, sal_Bool bDelete, sal_Bool bDeleteChildren )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::FillMenuManager" );
m_xFrame = rFrame;
@@ -1690,7 +1684,7 @@ void MenuBarManager::RetrieveImageManagers()
void MenuBarManager::FillMenuWithConfiguration(
sal_uInt16& nId,
- AbstractMenu* pMenu,
+ Menu* pMenu,
const ::rtl::OUString& rModuleIdentifier,
const Reference< XIndexAccess >& rItemContainer,
const Reference< XURLTransformer >& rTransformer )
@@ -1700,7 +1694,7 @@ void MenuBarManager::FillMenuWithConfiguration(
MenuBarManager::FillMenu( nId, pMenu, rModuleIdentifier, rItemContainer, xEmptyDispatchProvider );
// Merge add-on menu entries into the menu bar
- MenuBarManager::MergeAddonMenus( static_cast< AbstractMenu* >( pMenu ),
+ MenuBarManager::MergeAddonMenus( static_cast< Menu* >( pMenu ),
AddonsOptions().GetMergeMenuInstructions(),
rModuleIdentifier );
@@ -1726,7 +1720,7 @@ void MenuBarManager::FillMenuWithConfiguration(
void MenuBarManager::FillMenu(
sal_uInt16& nId,
- AbstractMenu* pMenu,
+ Menu* pMenu,
const rtl::OUString& rModuleIdentifier,
const Reference< XIndexAccess >& rItemContainer,
const Reference< XDispatchProvider >& rDispatchProvider )
@@ -1836,7 +1830,7 @@ void MenuBarManager::FillMenu(
}
void MenuBarManager::MergeAddonMenus(
- AbstractMenu* pMenuBar,
+ Menu* pMenuBar,
const MergeMenuInstructionContainer& aMergeInstructionContainer,
const ::rtl::OUString& rModuleIdentifier )
{
@@ -1861,7 +1855,7 @@ void MenuBarManager::MergeAddonMenus(
MenuBarMerger::GetSubMenu( rMergeInstruction.aMergeMenu, aMergeMenuItems );
// try to find the reference point for our merge operation
- AbstractMenu* pMenu = pMenuBar;
+ Menu* pMenu = pMenuBar;
ReferencePathInfo aResult = MenuBarMerger::FindReferencePath( aMergePath, pMenu );
if ( aResult.eResult == RP_OK )
@@ -1940,7 +1934,7 @@ void MenuBarManager::SetItemContainer( const Reference< XIndexAccess >& rItemCon
sal_uInt16 nId = 1;
// Fill menu bar with container contents
- FillMenuWithConfiguration( nId, (AbstractMenu *)m_pVCLMenu, m_aModuleIdentifier, rItemContainer, m_xURLTransformer );
+ FillMenuWithConfiguration( nId, (Menu *)m_pVCLMenu, m_aModuleIdentifier, rItemContainer, m_xURLTransformer );
// Refill menu manager again
Reference< XDispatchProvider > xDispatchProvider;
@@ -2019,7 +2013,7 @@ void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUStri
m_aMenuItemHandlerVector.push_back( pMenuItemHandler );
}
-sal_uInt16 MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand, AbstractMenu* _pMenu,sal_uInt16 _nIndex) const
+sal_uInt16 MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand, Menu* _pMenu,sal_uInt16 _nIndex) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::FillItemCommand" );
sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex );
diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx
index 213ad895ab46..544c52ad2668 100644
--- a/framework/source/uielement/menubarmerger.cxx
+++ b/framework/source/uielement/menubarmerger.cxx
@@ -96,7 +96,7 @@ void MenuBarMerger::RetrieveReferencePath(
ReferencePathInfo MenuBarMerger::FindReferencePath(
const ::std::vector< ::rtl::OUString >& rReferencePath,
- AbstractMenu* pMenu )
+ Menu* pMenu )
{
sal_uInt32 i( 0 );
const sal_uInt32 nCount( rReferencePath.size() );
@@ -108,7 +108,7 @@ ReferencePathInfo MenuBarMerger::FindReferencePath(
return aResult;
}
- AbstractMenu* pCurrMenu( pMenu );
+ Menu* pCurrMenu( pMenu );
RPResultInfo eResult( RP_OK );
sal_Int32 nLevel( - 1 );
@@ -157,7 +157,7 @@ ReferencePathInfo MenuBarMerger::FindReferencePath(
return aResult;
}
-sal_uInt16 MenuBarMerger::FindMenuItem( const ::rtl::OUString& rCmd, AbstractMenu* pCurrMenu )
+sal_uInt16 MenuBarMerger::FindMenuItem( const ::rtl::OUString& rCmd, Menu* pCurrMenu )
{
for ( sal_uInt16 i = 0; i < pCurrMenu->GetItemCount(); i++ )
{
@@ -173,7 +173,7 @@ sal_uInt16 MenuBarMerger::FindMenuItem( const ::rtl::OUString& rCmd, AbstractMen
}
bool MenuBarMerger::CreateSubMenu(
- AbstractMenu* pSubMenu,
+ Menu* pSubMenu,
sal_uInt16& nItemId,
const ::rtl::OUString& rModuleIdentifier,
const AddonMenuContainer& rAddonSubMenu )
@@ -211,7 +211,7 @@ bool MenuBarMerger::CreateSubMenu(
}
bool MenuBarMerger::MergeMenuItems(
- AbstractMenu* pMenu,
+ Menu* pMenu,
sal_uInt16 nPos,
sal_uInt16 nModIndex,
sal_uInt16& nItemId,
@@ -253,7 +253,7 @@ bool MenuBarMerger::MergeMenuItems(
}
bool MenuBarMerger::ReplaceMenuItem(
- AbstractMenu* pMenu,
+ Menu* pMenu,
sal_uInt16 nPos,
sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
@@ -267,7 +267,7 @@ bool MenuBarMerger::ReplaceMenuItem(
}
bool MenuBarMerger::RemoveMenuItems(
- AbstractMenu* pMenu,
+ Menu* pMenu,
sal_uInt16 nPos,
const ::rtl::OUString& rMergeCommandParameter )
{
@@ -287,7 +287,7 @@ bool MenuBarMerger::RemoveMenuItems(
}
bool MenuBarMerger::ProcessMergeOperation(
- AbstractMenu* pMenu,
+ Menu* pMenu,
sal_uInt16 nPos,
sal_uInt16& nItemId,
const ::rtl::OUString& rMergeCommand,
@@ -336,7 +336,7 @@ bool MenuBarMerger::ProcessFallbackOperation(
}
else if ( rMergeFallback.equalsAsciiL( MERGEFALLBACK_ADDPATH, MERGEFALLBACK_ADDPATH_LEN ))
{
- AbstractMenu* pCurrMenu( aRefPathInfo.pPopupMenu );
+ Menu* pCurrMenu( aRefPathInfo.pPopupMenu );
sal_Int32 nLevel( aRefPathInfo.nLevel );
const sal_Int32 nSize( rReferencePath.size() );
bool bFirstLevel( true );
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index 1804566afdfe..cc7032a37bec 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -202,8 +202,6 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
sal_True );
m_xMenuBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pMenuBarManager ), UNO_QUERY );
-
- pVCLMenuBar->Freeze();
}
// Initialize toolkit menu bar implementation to have awt::XMenuBar for data exchange.
diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx
index 13f058c6047b..5bea40140bba 100644
--- a/vcl/inc/salmenu.hxx
+++ b/vcl/inc/salmenu.hxx
@@ -83,9 +83,7 @@ public:
virtual void RemoveMenuBarButton( sal_uInt16 nId );
// FIXME: Make the other VCL native backends to work with these new methods.
- virtual void SetItemCommand( unsigned, SalMenuItem*, const rtl::OUString& ) {}
virtual void ShowItem( unsigned nPos, sal_Bool bShow ) { EnableItem( nPos, bShow ); }
- virtual void Freeze() {}
// return an empty rectangle if not implemented
// return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 3fd65d5bf4e2..53095b8be91f 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -78,8 +78,6 @@ public:
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage);
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const rtl::OUString& rKeyName );
virtual void GetSystemMenuData( SystemMenuData* pData );
- virtual void SetItemCommand( unsigned nPos, SalMenuItem* pSalMenuItem, const rtl::OUString& aCommandStr );
- virtual void Freeze();
virtual void SetMenu( Menu* pMenu ) { mpVCLMenu = pMenu; }
virtual Menu* GetMenu() { return mpVCLMenu; }
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 6c12dc67bc0c..9bd5c0b37388 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -102,96 +102,6 @@ struct ImplMenuDelData
bool isDeleted() const { return mpMenu == 0; }
};
-// ----------------
-// - AbstractMenu -
-// ----------------
-
-class VCL_DLLPUBLIC AbstractMenu : public Resource
-{
-public:
- virtual ~AbstractMenu() {}
-
- virtual SAL_DLLPRIVATE Window* ImplGetWindow() const = 0;
-
- virtual void InsertItem( sal_uInt16 nItemId, const XubString& rStr,
- MenuItemBits nItemBits = 0,
- sal_uInt16 nPos = MENU_APPEND ) = 0;
- virtual void InsertItem( sal_uInt16 nItemId,
- const XubString& rString, const Image& rImage,
- MenuItemBits nItemBits = 0,
- sal_uInt16 nPos = MENU_APPEND ) = 0;
- virtual void InsertSeparator( sal_uInt16 nPos = MENU_APPEND ) = 0;
- virtual void RemoveItem( sal_uInt16 nPos ) = 0;
- virtual void CopyItem( const Menu& rMenu, sal_uInt16 nPos,
- sal_uInt16 nNewPos = MENU_APPEND ) = 0;
- virtual void Clear() = 0;
-
- virtual void SetMenuFlags( sal_uInt16 nFlags ) = 0;
- virtual sal_uInt16 GetMenuFlags() const = 0;
-
- virtual sal_uInt16 GetItemCount() const = 0;
- virtual sal_uInt16 GetItemId( sal_uInt16 nPos ) const = 0;
- virtual sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const = 0;
- virtual MenuItemType GetItemType( sal_uInt16 nPos ) const = 0;
- virtual sal_uInt16 GetCurItemId() const = 0;
-
- virtual void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits ) = 0;
- virtual MenuItemBits GetItemBits( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetUserValue( sal_uInt16 nItemId, sal_uLong nValue ) = 0;
- virtual sal_uLong GetUserValue( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu ) = 0;
- virtual PopupMenu* GetPopupMenu( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode ) = 0;
-
- virtual void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck = sal_True ) = 0;
- virtual sal_Bool IsItemChecked( sal_uInt16 nItemId ) const = 0;
-
- virtual void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable = sal_True ) = 0;
- virtual sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const = 0;
-
- virtual void ShowItem( sal_uInt16 nItemId, sal_Bool bVisible = sal_True ) = 0;
- virtual void HideItem( sal_uInt16 nItemId ) = 0;
-
- virtual sal_Bool IsMenuBar() const = 0;
-
- virtual void RemoveDisabledEntries( sal_Bool bCheckPopups = sal_True,
- sal_Bool bRemoveEmptyPopups = sal_False ) = 0;
-
- virtual void SetItemText( sal_uInt16 nItemId, const XubString& rStr ) = 0;
- virtual XubString GetItemText( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetItemImage( sal_uInt16 nItemId, const Image& rImage ) = 0;
- virtual Image GetItemImage( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ) = 0;
- virtual const XubString& GetItemCommand( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetTipHelpText( sal_uInt16 nItemId, const XubString& rString ) = 0;
-
- virtual void SetHelpCommand( sal_uInt16 nItemId, const XubString& rString ) = 0;
- virtual const XubString& GetHelpCommand( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId ) = 0;
- virtual rtl::OString GetHelpId( sal_uInt16 nItemId ) const = 0;
-
- virtual void SetActivateHdl( const Link& rLink ) = 0;
-
- virtual void SetDeactivateHdl( const Link& rLink ) = 0;
-
- virtual void SetHighlightHdl( const Link& rLink ) = 0;
-
- virtual void SetSelectHdl( const Link& rLink ) = 0;
-
- // Returns the system's menu handle if native menus are supported
- // pData must point to a SystemMenuData structure
- virtual sal_Bool GetSystemMenuData( SystemMenuData* pData ) const = 0;
-
- virtual void Freeze(void) = 0;
-};
-
// --------
// - Menu -
// --------
@@ -203,7 +113,7 @@ struct MenuLogo
Color aEndColor;
};
-class VCL_DLLPUBLIC Menu : public AbstractMenu
+class VCL_DLLPUBLIC Menu : public Resource
{
friend class MenuBar;
friend class MenuBarWindow;
@@ -446,8 +356,6 @@ public:
void HighlightItem( sal_uInt16 nItemPos );
void DeHighlight() { HighlightItem( 0xFFFF ); } // MENUITEMPOS_INVALID
-
- void Freeze();
};
// -----------
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index bf220a43f4c4..7fbc21a6f48c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1953,10 +1953,6 @@ void Menu::SetItemCommand( sal_uInt16 nItemId, const String& rCommand )
if ( pData )
pData->aCommandStr = rCommand;
-
- // update native menu
- if( ImplGetSalMenu() && pData->pSalMenuItem )
- ImplGetSalMenu()->SetItemCommand( nPos, pData->pSalMenuItem, rCommand );
}
const XubString& Menu::GetItemCommand( sal_uInt16 nItemId ) const
@@ -3233,15 +3229,6 @@ void Menu::HighlightItem( sal_uInt16 nItemPos )
}
}
-void Menu::Freeze(void)
-{
- SalMenu *pSalMenu = ImplGetSalMenu();
-
- if ( pSalMenu ) {
- pSalMenu->Freeze();
- }
-}
-
// -----------
// - MenuBar -
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 4b9a358d8211..7c1517e994b1 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -786,18 +786,10 @@ void GtkSalMenu::SetAccelerator( unsigned, SalMenuItem*, const KeyCode&, const r
{
}
-void GtkSalMenu::SetItemCommand( unsigned, SalMenuItem*, const rtl::OUString& )
-{
-}
-
void GtkSalMenu::GetSystemMenuData( SystemMenuData* )
{
}
-void GtkSalMenu::Freeze()
-{
-}
-
// =======================================================================
/*