diff options
Diffstat (limited to 'framework/source/classes/menumanager.cxx')
-rw-r--r-- | framework/source/classes/menumanager.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index b245cff3ad..8928bf6ea7 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,8 +66,8 @@ #include <comphelper/extract.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/historyoptions.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/historyoptions.hxx> +#include <unotools/pathoptions.hxx> #include <unotools/localfilehelper.hxx> #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ @@ -140,11 +140,11 @@ const ::rtl::OUString aSpecialWindowCommand( RTL_CONSTASCII_USTRINGPARAM( "Windo const ::rtl::OUString UNO_COMMAND( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); // #110897# -MenuManager::MenuManager( +MenuManager::MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) + REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) : // #110897# - ThreadHelpBase( &Application::GetSolarMutex() ), + ThreadHelpBase( &Application::GetSolarMutex() ), mxServiceFactory(xServiceFactory) { m_bActive = sal_False; @@ -191,13 +191,13 @@ MenuManager::MenuManager( aItemCommand == aSlotSpecialToolsMenu ) && AddonMenuManager::HasAddonMenuElements() ) { - USHORT nCount = 0; + USHORT nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { if ( pPopupMenu->GetItemType( nCount-1 ) != MENUITEM_SEPARATOR ) pPopupMenu->InsertSeparator(); - + // Use resource to load popup menu title String aAddonsStrRes = String( FwkResId( STR_MENU_ADDONS )); pPopupMenu->InsertItem( ITEMID_ADDONLIST, aAddonsStrRes ); @@ -208,7 +208,7 @@ MenuManager::MenuManager( aItemCommand = aSlotString; aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)ITEMID_ADDONLIST ); pPopupMenu->SetItemCommand( ITEMID_ADDONLIST, aItemCommand ); - + // #110897# // MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False ); AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False); @@ -248,7 +248,7 @@ MenuManager::MenuManager( if ( pMenu->GetItemText( nItemId ).Len() == 0 ) aQueryLabelItemIdVector.push_back( nItemId ); #endif - + if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId )) { Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); @@ -273,7 +273,7 @@ MenuManager::MenuManager( if ( pMenu->GetItemText( nItemId ).Len() == 0 ) aQueryLabelItemIdVector.push_back( nItemId ); #endif - + if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId )) { Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); @@ -290,7 +290,7 @@ MenuManager::MenuManager( // Add-Ons uses a images from different places Image aImage; rtl::OUString aImageId; - + MenuConfiguration::Attributes* pMenuAttributes = (MenuConfiguration::Attributes*)pMenu->GetUserValue( nItemId ); @@ -306,7 +306,7 @@ MenuManager::MenuManager( if ( !aImage ) aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE, m_bWasHiContrast ); } - + if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -317,7 +317,7 @@ MenuManager::MenuManager( pMenu->SetItemImage( nItemId, aImage ); } } - + REFERENCE< XDISPATCH > aXDispatchRef; m_aMenuItemHandlerVector.push_back( new MenuItemHandler( nItemId, NULL, aXDispatchRef )); #if 0 @@ -355,11 +355,11 @@ MenuManager::MenuManager( } // #110897# -MenuManager::MenuManager( +MenuManager::MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) + REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) : // #110897# - ThreadHelpBase( &Application::GetSolarMutex() ), + ThreadHelpBase( &Application::GetSolarMutex() ), mxServiceFactory(xServiceFactory) { m_bActive = sal_False; @@ -788,7 +788,7 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XMultiSe { Reference< XFrame > xFrame; xList->getByIndex(i) >>= xFrame; - + if (xFrame.is()) { if ( xFrame == xCurrentFrame ) @@ -1033,7 +1033,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) { Reference< XFrame > xFrame; xList->getByIndex(i) >>= xFrame; - + if ( xFrame.is() && nTaskId == nCurItemId ) { Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); @@ -1096,7 +1096,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFac void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren) { MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), m_xFrame, _pPopupMenu, _bDelete, _bDeleteChildren ); - + // store menu item command as we later have to know which menu is active (see Activate handler) pSubMenuManager->m_aMenuItemCommand = _sItemCommand; @@ -1158,7 +1158,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, FALSE, bIsHiContrast ); if ( !aImage ) aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, FALSE, bIsHiContrast ); - + _pMenu->SetItemImage( nId, aImage ); } } |