diff options
author | Matus Kukan <matus.kukan@gmail.com> | 2011-07-02 17:21:45 +0200 |
---|---|---|
committer | Matus Kukan <matus.kukan@gmail.com> | 2011-07-07 09:47:32 +0200 |
commit | ccfdbe97d8455291f925930dc0421f87529f7afd (patch) | |
tree | 60672fd73b87eef2b613f8c5a58b3b8313f0b17e /framework | |
parent | f38e701e4784c8ecb8f4adf68ac5881d6ddca69a (diff) |
Remove online registration related code
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/fwe/classes/addonmenu.cxx | 31 | ||||
-rw-r--r-- | framework/source/services/backingwindow.cxx | 19 | ||||
-rw-r--r-- | framework/source/services/backingwindow.hxx | 1 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 11 |
4 files changed, 6 insertions, 56 deletions
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx index baaf086e4702..bae9efb23419 100644 --- a/framework/source/fwe/classes/addonmenu.cxx +++ b/framework/source/fwe/classes/addonmenu.cxx @@ -66,7 +66,6 @@ using namespace ::com::sun::star::beans; // Please look at sfx2/inc/sfxsids.hrc the values are defined there. Due to build dependencies // we cannot include the header file. const sal_uInt16 SID_HELPMENU = (SID_SFX_START + 410); -const sal_uInt16 SID_ONLINE_REGISTRATION = (SID_SFX_START + 1537); namespace framework { @@ -213,40 +212,21 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me if ( pHelpMenu ) { - static const char REFERENCECOMMAND_AFTER[] = ".uno:OnlineRegistrationDlg"; static const char REFERENCECOMMAND_BEFORE[] = ".uno:About"; // Add-Ons help menu items should be inserted after the "registration" menu item - bool bAddAfter = true; sal_uInt16 nItemCount = pHelpMenu->GetItemCount(); - sal_uInt16 nRegPos = pHelpMenu->GetItemPos( SID_ONLINE_REGISTRATION ); - sal_uInt16 nInsPos = nRegPos; sal_uInt16 nInsSepAfterPos = MENU_APPEND; sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; AddonsOptions aOptions; - if ( nRegPos == USHRT_MAX ) - { - // try to detect the online registration dialog menu item with the command URL - sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_AFTER )); - nRegPos = pHelpMenu->GetItemPos( nId ); - nInsPos = nRegPos; - } - - if ( nRegPos == USHRT_MAX ) - { - // second try: - // try to detect the about menu item with the command URL - sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_BEFORE )); - nRegPos = pHelpMenu->GetItemPos( nId ); - nInsPos = nRegPos; - bAddAfter = false; - } + // try to detect the about menu item with the command URL + sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_BEFORE )); + sal_uInt16 nInsPos = pHelpMenu->GetItemPos( nId ); Sequence< Sequence< PropertyValue > > aAddonSubMenu; const Sequence< Sequence< PropertyValue > >& rAddonHelpMenuEntries = aOptions.GetAddonsHelpMenu(); - nInsPos = bAddAfter ? AddonMenuManager::GetNextPos( nInsPos ) : nInsPos; if ( nInsPos < nItemCount && pHelpMenu->GetItemType( nInsPos ) != MENUITEM_SEPARATOR ) nInsSepAfterPos = nInsPos; @@ -261,10 +241,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me if ( pHelpMenu->GetItemType( nInsSepAfterPos ) != MENUITEM_SEPARATOR ) pHelpMenu->InsertSeparator( nInsSepAfterPos ); } - if ( nRegPos < MENU_APPEND ) - pHelpMenu->InsertSeparator( nRegPos+1 ); - else - pHelpMenu->InsertSeparator( nItemCount ); + pHelpMenu->InsertSeparator( nItemCount ); } } } diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 32616a1e1d5e..a475abd93ae3 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -905,25 +905,6 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG ) pNodePath = "/org.openoffice.Office.Common/Help/StartCenter"; pNode = "AddFeatureURL"; break; - case nItemId_Reg: - try - { - // create the Desktop component which can load components - Reference < lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); - if( xFactory.is() ) - { - Reference< task::XJobExecutor > xProductRegistration( - xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.setup.ProductRegistration" ) ) ), - UNO_QUERY_THROW ); - - // tell it that the user wants to register - xProductRegistration->trigger( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RegistrationRequired" ) ) ); - } - } - catch (const Exception&) - { - } - break; case nItemId_Info: pNodePath = "/org.openoffice.Office.Common/Help/StartCenter"; pNode = "InfoURL"; diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 5eebccb80c5f..410862f51aaa 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -135,7 +135,6 @@ namespace framework std::vector< LoadRecentFile > maRecentFiles; static const int nItemId_Extensions = 1; - static const int nItemId_Reg = 2; static const int nItemId_Info = 3; static const int nItemId_TplRep = 4; static const int nShadowTop = 32; diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 3284067a5804..62ddc7338a68 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -782,7 +782,6 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source ) throw ( Run void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::CheckAndAddMenuExtension" ); - static const char REFERENCECOMMAND_AFTER[] = ".uno:OnlineRegistrationDlg"; static const char REFERENCECOMMAND_BEFORE[] = ".uno:About"; // retrieve menu extension item @@ -793,24 +792,18 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu ) // remove all old window list entries from menu sal_uInt16 nNewItemId( 0 ); sal_uInt16 nInsertPos( MENU_APPEND ); - sal_uInt16 nAfterPos( MENU_APPEND ); sal_uInt16 nBeforePos( MENU_APPEND ); - String aCommandAfter( String::CreateFromAscii ( REFERENCECOMMAND_AFTER )); String aCommandBefore( String::CreateFromAscii ( REFERENCECOMMAND_BEFORE )); for ( sal_uInt16 n = 0; n < pMenu->GetItemCount(); n++ ) { sal_uInt16 nItemId = pMenu->GetItemId( n ); nNewItemId = std::max( nItemId, nNewItemId ); - if ( pMenu->GetItemCommand( nItemId ) == aCommandAfter ) - nAfterPos = n+1; - else if ( pMenu->GetItemCommand( nItemId ) == aCommandBefore ) + if ( pMenu->GetItemCommand( nItemId ) == aCommandBefore ) nBeforePos = n; } ++nNewItemId; - if ( nAfterPos != MENU_APPEND ) - nInsertPos = nAfterPos; - else if ( nBeforePos != MENU_APPEND ) + if ( nBeforePos != MENU_APPEND ) nInsertPos = nBeforePos; pMenu->InsertItem( nNewItemId, aMenuItem.aLabel, 0, nInsertPos ); |