summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-02-18 19:52:08 +0100
committerEike Rathke <erack@redhat.com>2013-02-18 20:07:06 +0100
commit9bf31cf6bc3f4df79ddf69ca17e3cbdb0978239b (patch)
treedc3137cf36e10054ab7b26fadf551cea2789f169 /connectivity/source
parent5fa05c96d6bd5021141efc0649a8c3c3dc4ca222 (diff)
use LanguageTag(rtl_Locale)
Change-Id: I4bcef6a58915226ec80d7546b4bc5d60abdaeeaf
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx11
1 files changed, 2 insertions, 9 deletions
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;
}