summaryrefslogtreecommitdiff
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
commitf239d1c0c9c54987a04a7c467425ed12ab619d02 (patch)
treea18ae8a20ebbbf57092dfd40bd29d342b797c013
parent7b96ed91bf380a4c6c502e8422a58a81b7ac6015 (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.
-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 b3e52bb11b..339e66411b 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 );