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 11:09:27 +0100
commitcd8e51b83dfb61cd6f55cf0fad8a8d7e09ca9f38 (patch)
tree2763b5f87ff86f2112db722c35970e87b99336e1
parenteb14a00d4538da480cd57c1f9a37dad383308e69 (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 78a050c891..3655fe24ce 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 );