[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sfx2/source

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Nov 30 00:46:38 PST 2010


 sfx2/source/appl/sfxhelp.cxx |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit f239d1c0c9c54987a04a7c467425ed12ab619d02
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Tue Nov 30 09:43:35 2010 +0100

    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.

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index b3e52bb..339e664 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 );
 


More information about the Libreoffice-commits mailing list