[ooo-build-commit] .: framework/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Oct 1 12:04:50 PDT 2010


 framework/source/services/backingwindow.cxx |   18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

New commits:
commit c6b9f0c3412c58a0b0d0296847c4f8df9d337bb1
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Oct 1 21:03:36 2010 +0200

    fdo #50533: Localized the links from the start center

diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index a7d8709..c524428 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -945,12 +945,6 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
                     // extend the URLs with Office locale argument
                     INetURLObject aURLObj( sURL );
 
-                    rtl::OUString sParam = aURLObj.GetParam();
-                    rtl::OUStringBuffer aURLBuf( sParam );
-                    if ( sParam.getLength() > 0 )
-                        aURLBuf.appendAscii( "&" );
-                    aURLBuf.appendAscii( "lang=" );
-
                     // read locale from configuration
                     ::rtl::OUString sLocale;
                     ::rtl::OUString sPackage = ::rtl::OUString::createFromAscii("org.openoffice.Setup");
@@ -968,13 +962,15 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
                     catch(const com::sun::star::uno::RuntimeException& exRun)
                         { throw exRun; }
                     catch(const com::sun::star::uno::Exception&)
-                    { sLocale = ::rtl::OUString::createFromAscii("en-US"); }
+                    { sLocale = ::rtl::OUString::createFromAscii("en"); }
 
-                    aURLBuf.append(sLocale);
+                    // Convert the URL to something that can be handled by the website
+                    if ( sLocale.equalsAscii( "pt-BR" ) )
+                        sLocale = ::rtl::OUString::createFromAscii( "pt-br" );
+                    else
+                        sLocale = sLocale.copy( 0, sLocale.indexOf( sal_Unicode( '-' ) ) );
 
-                    sParam = aURLBuf.makeStringAndClear();
-                    
-                    aURLObj.SetParam( sParam );
+                    aURLObj.insertName( sLocale );
                     sURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
 
                     Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(


More information about the ooo-build-commit mailing list