From 29c460d124dba19c95f3deda42a5810e7509073b Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 30 Nov 2010 11:13:07 +0100 Subject: help: Avoid some copy-n-paste. --- sfx2/source/appl/sfxhelp.cxx | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'sfx2/source/appl/sfxhelp.cxx') diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 3655fe24ce..fa0f01eb58 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -643,28 +643,7 @@ String SfxHelp::CreateHelpURL_Impl( const String& aCommandURL, const String& rMo String aModuleName( rModuleName ); if ( aModuleName.Len() == 0 ) - { - // no active module (quicklaunch?) -> detect default module - SvtModuleOptions aModOpt; - if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) ) - aModuleName = DEFINE_CONST_UNICODE("swriter"); - else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) ) - aModuleName = DEFINE_CONST_UNICODE("scalc"); - else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ) - aModuleName = DEFINE_CONST_UNICODE("simpress"); - else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) ) - aModuleName = DEFINE_CONST_UNICODE("sdraw"); - else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) ) - aModuleName = DEFINE_CONST_UNICODE("smath"); - else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SCHART ) ) - aModuleName = DEFINE_CONST_UNICODE("schart"); - else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::E_SBASIC ) ) - aModuleName = DEFINE_CONST_UNICODE("sbasic"); - else - { - DBG_ERRORFILE( "no installed module found" ); - } - } + aModuleName = getDefaultModule_Impl(); aHelpURL = String::CreateFromAscii("vnd.sun.star.help://"); aHelpURL += aModuleName; -- cgit v1.2.3