summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/sfxhelp.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-11-30 09:43:35 +0100
committerJan Holesovsky <kendy@suse.cz>2010-11-30 09:43:35 +0100
commit8c9052ef188a366c94009e499ab0c8c95ba8fb75 (patch)
tree057d4965d142880f8d13e6bf7660f9545a3a3708 /sfx2/source/appl/sfxhelp.cxx
parent77f7605df22d5625fdf3410cb5f444365c4e44b6 (diff)
wikihelp: Check for the built-in help availability after creating URL.
This is to have the full help URL even for stuff like .uno:Something, when we use the on-line help instead of the built-in one.
Diffstat (limited to 'sfx2/source/appl/sfxhelp.cxx')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index b214ae3b1d99..237f5e0bf53e 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -778,23 +778,6 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
INetURLObject aParser( aHelpURL );
INetProtocol nProtocol = aParser.GetProtocol();
- // check if help is available
- String aHelpRootURL( DEFINE_CONST_OUSTRING("vnd.sun.star.help://") );
- AppendConfigToken_Impl( aHelpRootURL, sal_True );
- Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpRootURL );
- if ( 0 == aFactories.getLength() )
- {
- // no factories -> no help -> try online
- if ( nProtocol == INET_PROT_VND_SUN_STAR_HELP && impl_showOnlineHelp( rURL ) )
- return TRUE;
- else
- {
- NoHelpErrorBox aErrBox( const_cast< Window* >( pWindow ) );
- aErrBox.Execute();
- return FALSE;
- }
- }
-
// check if it's an URL or a jump mark!
::rtl::OUString sKeyword;
if ( nProtocol != INET_PROT_VND_SUN_STAR_HELP )
@@ -818,7 +801,7 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
}
else
{
- aHelpURL = CreateHelpURL_Impl( 0, GetHelpModuleName_Impl( ) );
+ aHelpURL = CreateHelpURL_Impl( 0, GetHelpModuleName_Impl( ) );
// pb i91715: strings begin with ".HelpId:" are not words of the basic ide
// they are helpid-strings used by the testtool -> so we ignore them
@@ -828,6 +811,23 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
}
}
+ // check if help is available
+ String aHelpRootURL( DEFINE_CONST_OUSTRING("vnd.sun.star.help://") );
+ AppendConfigToken_Impl( aHelpRootURL, sal_True );
+ Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpRootURL );
+ if ( 0 == aFactories.getLength() )
+ {
+ // no factories -> no help -> try online
+ if ( impl_showOnlineHelp( aHelpURL ) )
+ return TRUE;
+ else
+ {
+ NoHelpErrorBox aErrBox( const_cast< Window* >( pWindow ) );
+ aErrBox.Execute();
+ return FALSE;
+ }
+ }
+
Reference < XFrame > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );