incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1357243 - /incubator/ooo/trunk/main/sfx2/source/appl/appserv.cxx
Date Wed, 04 Jul 2012 13:15:37 GMT
Author: arielch
Date: Wed Jul  4 13:15:37 2012
New Revision: 1357243

URL: http://svn.apache.org/viewvc?rev=1357243&view=rev
Log:
i120155 - Fix malformed help URL

Modified:
    incubator/ooo/trunk/main/sfx2/source/appl/appserv.cxx

Modified: incubator/ooo/trunk/main/sfx2/source/appl/appserv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/appl/appserv.cxx?rev=1357243&r1=1357242&r2=1357243&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/source/appl/appserv.cxx (original)
+++ incubator/ooo/trunk/main/sfx2/source/appl/appserv.cxx Wed Jul  4 13:15:37 2012
@@ -338,15 +338,20 @@ void SfxApplication::MiscExec_Impl( SfxR
                 if ( rReq.GetSlot() == SID_HELP_SUPPORTPAGE )
                 {
                     // show Support page with new URL
-                    String sHelpURL = SfxHelp::CreateHelpURL( String::CreateFromAscii(".uno:HelpSupport"),
String() );
-                    String sParams = sHelpURL.Copy( sHelpURL.Search( '?' ) );
-                    sHelpURL = String::CreateFromAscii("vnd.sun.star.help://shared/text/shared/05/00000001.xhp");
-                    sHelpURL += sParams;
-                    sHelpURL += String::CreateFromAscii("&UseDB=no");
-                    pHelp->Start( sHelpURL, NULL );
+                    // Create a dummy Help URL to get the Language and System
+                    // but don't use a real command, otherwise we may get an anchor
+                    rtl::OUString sEmpty;
+                    rtl::OUString sTmp( SfxHelp::CreateHelpURL( sEmpty, sEmpty ) );
+
+                    rtl::OUStringBuffer aBuff;
+                    aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.help://shared/text/shared/05/00000001.xhp"
) );
+                    aBuff.append( sTmp.copy( sTmp.indexOf( sal_Unicode( '?' ) ) ) );
+                    aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( "&UseDB=no" ) );
+
+                    pHelp->Start( aBuff.makeStringAndClear(), NULL );
                 }
                 else
-                    pHelp->Start( String::CreateFromAscii(".uno:HelpIndex"), NULL ); //
show start page
+                    pHelp->Start( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:HelpIndex")),
NULL ); // show start page
                 bDone = sal_True;
             }
             break;



Mime
View raw message