diff options
author | Eike Rathke <erack@redhat.com> | 2013-02-18 19:52:08 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-02-18 20:07:06 +0100 |
commit | 9bf31cf6bc3f4df79ddf69ca17e3cbdb0978239b (patch) | |
tree | dc3137cf36e10054ab7b26fadf551cea2789f169 /connectivity | |
parent | 5fa05c96d6bd5021141efc0649a8c3c3dc4ca222 (diff) |
use LanguageTag(rtl_Locale)
Change-Id: I4bcef6a58915226ec80d7546b4bc5d60abdaeeaf
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/Library_hsqldb.mk | 1 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 11 |
2 files changed, 3 insertions, 9 deletions
diff --git a/connectivity/Library_hsqldb.mk b/connectivity/Library_hsqldb.mk index 37655e7b8d31..3c26517e16d4 100644 --- a/connectivity/Library_hsqldb.mk +++ b/connectivity/Library_hsqldb.mk @@ -48,6 +48,7 @@ $(eval $(call gb_Library_use_libraries,hsqldb,\ sal \ tl \ utl \ + i18nisolang1 \ $(gb_UWINAPI) \ )) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 193adbbf9247..5e31646f60f5 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -50,6 +50,7 @@ #include <unotools/ucbstreamhelper.hxx> #include "resource/hsqldb_res.hrc" #include "resource/sharedresources.hxx" +#include <i18npool/languagetag.hxx> #include <o3tl/compat_functional.hxx> @@ -862,15 +863,7 @@ namespace connectivity { rtl_Locale* pProcessLocale = NULL; osl_getProcessLocale( &pProcessLocale ); - - ::rtl::OUStringBuffer aProcLocale; - aProcLocale.append( pProcessLocale->Language->buffer, pProcessLocale->Language->length ); - if ( pProcessLocale->Country->length ) - { - aProcLocale.appendAscii( "-" ); - aProcLocale.append( pProcessLocale->Country->buffer, pProcessLocale->Country->length ); - } - sLocaleString = aProcLocale.makeStringAndClear(); + sLocaleString = LanguageTag( *pProcessLocale).getBcp47(); } return sLocaleString; } |