diff options
author | Povilas Kanapickas <povilas.kanapickas@gmail.com> | 2010-10-18 19:37:48 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-18 19:38:00 +0100 |
commit | 6a007ed1754b45ab00c3021dc3724edea53f1ed1 (patch) | |
tree | 96944dc9fb6158d90ae57a2c2778090cdc3c7f3e /framework | |
parent | ba0251a0767b802b20e4f017005d0752add77607 (diff) |
remove non-compiled code
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/classes/menumanager.hxx | 8 | ||||
-rw-r--r-- | framework/inc/services/license.hxx | 4 | ||||
-rw-r--r-- | framework/source/application/framework.cxx | 22 | ||||
-rw-r--r-- | framework/source/classes/menumanager.cxx | 105 | ||||
-rw-r--r-- | framework/source/services/license.cxx | 16 |
5 files changed, 3 insertions, 152 deletions
diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx index f42284702d..a8bfeec420 100644 --- a/framework/inc/classes/menumanager.hxx +++ b/framework/inc/classes/menumanager.hxx @@ -82,14 +82,6 @@ class MenuManager : public ThreadHelpBase , Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); -#if 0 - MenuManager( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - REFERENCE< XFRAME >& rFrame, - AddonMenu* pAddonMenu, - sal_Bool bDelete, - sal_Bool bDeleteChildren ); -#endif virtual ~MenuManager(); diff --git a/framework/inc/services/license.hxx b/framework/inc/services/license.hxx index 0d4f8735ce..2ebc226662 100644 --- a/framework/inc/services/license.hxx +++ b/framework/inc/services/license.hxx @@ -88,10 +88,6 @@ namespace framework FWK_DECLARE_XTYPEPROVIDER DECLARE_XSERVICEINFO -#if 0 - DECL_STATIC_LINK( License, Terminate, void* ); -#endif - /* XJob... any execute([in] sequence< ::com::sun::star::beans::NamedValue > Arguments ) diff --git a/framework/source/application/framework.cxx b/framework/source/application/framework.cxx index 5888ed0ea4..2bdb3ab54b 100644 --- a/framework/source/application/framework.cxx +++ b/framework/source/application/framework.cxx @@ -219,28 +219,6 @@ void FrameWork::Main() // c) Initialize connection to possible PlugIn dll. // OPipeConnection removed, connection to plugin now uses acceptor service -#if 0 - if ( m_bUsePlugIn == sal_True ) - { - Reference< XConnection > xConnection = new OPipeConnection( xGlobalServiceManager ); - Reference< XBridgeFactory > xBridgeFactory ( xGlobalServiceManager->createInstance( SERVICENAME_BRIDGEFACTORY ), UNO_QUERY ); - if ( - ( xConnection.is() == sal_True ) && - ( xBridgeFactory.is() == sal_True ) - ) - { - Reference< XBridge > xBridge = xBridgeFactory->createBridge( NAME_PLUGINBRIDGE , - PROTOCOL_PLUGINBRIDGE , - xConnection , - new OInstanceProvider( xGlobalServiceManager ) ); - } - else - { - // Error handling ... !? - LOG_ASSERT( sal_False, "FrameWork::Main()\nNo connection to plugin. Initialization of bridge failed.\n" ) - } - } -#endif //--------------------------------------------------------------------------------------------------------- // d) Initialize new task with a HTML-URL in it. diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index e47ec067dc..43f3dde635 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -157,9 +157,7 @@ MenuManager::MenuManager( m_bShowMenuImages = rSettings.GetUseImagesInMenus(); sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength(); -#if 0 - ::std::vector< USHORT > aQueryLabelItemIdVector; -#endif + USHORT nItemCount = pMenu->GetItemCount(); m_aMenuItemHandlerVector.reserve(nItemCount); @@ -185,10 +183,6 @@ MenuManager::MenuManager( { // #110897# // MenuManager* pSubMenuManager = new MenuManager( rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren ); -#if 0 - if ( pMenu->GetItemText( nItemId ).Len() == 0 ) - aQueryLabelItemIdVector.push_back( nItemId ); -#endif // Create addon popup menu if there exist elements and this is the tools popup menu if (( nItemId == SID_ADDONLIST || @@ -216,10 +210,6 @@ MenuManager::MenuManager( // #110897# // MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False ); AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False); -#if 0 - if ( pMenu->GetItemText( nItemId ).Len() == 0 ) - aQueryLabelItemIdVector.push_back( nItemId ); -#endif // Set image for the addon popup menu item if ( bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST )) { @@ -248,11 +238,6 @@ MenuManager::MenuManager( // #110897# // MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False ); AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False); -#if 0 - if ( pMenu->GetItemText( nItemId ).Len() == 0 ) - aQueryLabelItemIdVector.push_back( nItemId ); -#endif - if ( bShowMenuImages && !pMenu->GetItemImage( nItemId )) { Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); @@ -273,10 +258,7 @@ MenuManager::MenuManager( // #110897# // MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False ); AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False); -#if 0 - if ( pMenu->GetItemText( nItemId ).Len() == 0 ) - aQueryLabelItemIdVector.push_back( nItemId ); -#endif + if ( bShowMenuImages && !pMenu->GetItemImage( nItemId )) { @@ -324,98 +306,17 @@ MenuManager::MenuManager( REFERENCE< XDISPATCH > aXDispatchRef; m_aMenuItemHandlerVector.push_back( new MenuItemHandler( nItemId, NULL, aXDispatchRef )); -#if 0 - if ( pMenu->GetItemText( nItemId ).Len() == 0 ) - aQueryLabelItemIdVector.push_back( nItemId ); -#endif + } } } // retrieve label information for all menu items without item text -#if 0 - if ( aQueryLabelItemIdVector.size() > 0 ) - { - Sequence< ::rtl::OUString > aURLSequence( aQueryLabelItemIdVector.size() ); - Sequence< ::rtl::OUString > aLabelSequence( aQueryLabelItemIdVector.size() ); - - sal_uInt32 nPos = 0; - ::std::vector< USHORT >::iterator p; - for ( p = aQueryLabelItemIdVector.begin(); p != aQueryLabelItemIdVector.end(); p++ ) - aURLSequence[nPos++] = pMenu->GetItemCommand( *p ); - Reference< XDispatchInformationProvider > xDIP( xFrame, UNO_QUERY ); - if ( xDIP.is() ) - { - nPos = 0; - xDIP->queryDispatchInformations( aURLSequence, aLabelSequence ); - for ( p = aQueryLabelItemIdVector.begin(); p != aQueryLabelItemIdVector.end(); p++ ) - pMenu->SetItemText( *p, aLabelSequence( nPos++ )); - } - } -#endif SetHdl(); } -#if 0 -// #110897# -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 ) -: // #110897# - ThreadHelpBase( &Application::GetSolarMutex() ), - mxServiceFactory(xServiceFactory) -{ - m_bActive = sal_False; - m_bDeleteMenu = bDelete; - m_bDeleteChildren = bDeleteChildren; - m_pVCLMenu = pAddonMenu; - m_xFrame = rFrame; - m_bInitialized = sal_False; - m_bIsBookmarkMenu = sal_True; - - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - m_bWasHiContrast = rSettings.GetHighContrastMode(); - - SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire(); - - USHORT nItemCount = pAddonMenu->GetItemCount(); - m_aMenuItemHandlerVector.reserve(nItemCount); - ::rtl::OUString aItemCommand; - for ( USHORT i = 0; i < nItemCount; i++ ) - { - USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); - - PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId ); - if ( pPopupMenu ) - { - // #110897# - // MenuManager* pSubMenuManager = new MenuManager( rFrame, pPopupMenu, bDeleteChildren, bDeleteChildren ); - AddMenu(pPopupMenu,aItemCommand,nItemId,bDeleteChildren,bDeleteChildren); - } - else - { - if ( pAddonMenu->GetItemType( i ) != MENUITEM_SEPARATOR ) - { - MenuConfiguration::Attributes* pAddonAttributes = (MenuConfiguration::Attributes *)(pAddonMenu->GetUserValue( nItemId )); - REFERENCE< XDISPATCH > aXDispatchRef; - MenuItemHandler* pMenuItemHandler = new MenuItemHandler( nItemId, NULL, aXDispatchRef ); - - if ( pAddonAttributes ) - { - // read additional attributes from attributes struct and AddonMenu implementation will delete all attributes itself!! - pMenuItemHandler->aTargetFrame = pAddonAttributes->aTargetFrame; - } - - m_aMenuItemHandlerVector.push_back( pMenuItemHandler ); - } - } - } - - SetHdl(); -} -#endif void MenuManager::SetHdl() { diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index a7a8d552ac..61754bd1ab 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -165,22 +165,6 @@ DEFINE_INIT_SERVICE ( License, ) -#if 0 -IMPL_STATIC_LINK_NOINSTANCE( License, Terminate, void*, EMPTYARG ) -{ - /* - Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); - Reference< XDesktop > xDesktop(xFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY); - if (xDesktop.is()) - xDesktop->terminate(); - */ - /* - _exit(0); - */ - return 0; -} -#endif static DateTime _oslDateTimeToDateTime(const oslDateTime& aDateTime) { |