summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-01-15 15:13:13 +0100
committerKurt Zenker <kz@openoffice.org>2010-01-15 15:13:13 +0100
commit3894ee4d0cd901835d9147bc11093f47f4b10292 (patch)
treec8187838c033a530516316510e5beaabd3b1a15c /framework
parent36f7b64c6c83a8023e0525ae3c527613243a9056 (diff)
parent8da0b34d6ee5201d3601e16673f78e9ad3638d31 (diff)
CWS-TOOLING: integrate CWS fwk120
Diffstat (limited to 'framework')
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx1
-rw-r--r--framework/source/services/backingwindow.cxx36
2 files changed, 37 insertions, 0 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 01934dfb47df..121436998efa 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -245,6 +245,7 @@ bool LayoutManager::UIElement::operator< ( const LayoutManager::UIElement& aUIEl
LayoutManager::UIElement& LayoutManager::UIElement::operator= ( const LayoutManager::UIElement& rUIElement )
{
+ if (this == &rUIElement) { return *this; }
m_aType = rUIElement.m_aType;
m_aName = rUIElement.m_aName;
m_aUIName = rUIElement.m_aUIName;
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index a354b01d3c32..3e9071052011 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -49,6 +49,7 @@
#include "comphelper/processfactory.hxx"
#include "comphelper/sequenceashashmap.hxx"
+#include "comphelper/configurationhelper.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/ustrbuf.hxx"
@@ -745,6 +746,41 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
Any value( xNameAccess->getByName(rtl::OUString::createFromAscii(pNode)) );
sURL = value.get<rtl::OUString> ();
+ // 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");
+ ::rtl::OUString sRelPath = ::rtl::OUString::createFromAscii("L10N");
+ ::rtl::OUString sKey = ::rtl::OUString::createFromAscii("ooLocale");
+
+ try
+ {
+ ::comphelper::ConfigurationHelper::readDirectKey(comphelper::getProcessServiceFactory(),
+ sPackage,
+ sRelPath,
+ sKey,
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= sLocale;
+ }
+ catch(const com::sun::star::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const com::sun::star::uno::Exception&)
+ { sLocale = ::rtl::OUString::createFromAscii("en-US"); }
+
+ aURLBuf.append(sLocale);
+
+ sParam = aURLBuf.makeStringAndClear();
+
+ aURLObj.SetParam( sParam );
+ sURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
+
Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
comphelper::getProcessServiceFactory()->createInstance(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),