Kaydet (Commit) f318e305 authored tarafından Eike Rathke's avatar Eike Rathke

don't assume Country to be always present, tdf#85432 follow-up

For example, 'C' was displayed as "C_"
Also, append Variant if present to display the full locale identifier,
for example "en_US.UTF-8"

Change-Id: I00c7bf832df25c00cc014589c4662806f8bf1137
üst aff76b56
......@@ -239,9 +239,14 @@ OUString AboutDialog::GetLocaleString()
osl_getProcessLocale( &pLocale );
if ( pLocale && pLocale->Language && pLocale->Country )
if ( pLocale && pLocale->Language )
{
pLocaleStr = OUString(pLocale->Language) + "_" + OUString(pLocale->Country);
if (pLocale->Country && rtl_uString_getLength( pLocale->Country) > 0)
pLocaleStr = OUString(pLocale->Language) + "_" + OUString(pLocale->Country);
else
pLocaleStr = OUString(pLocale->Language);
if (pLocale->Variant && rtl_uString_getLength( pLocale->Variant) > 0)
pLocaleStr += OUString(pLocale->Variant);
}
return pLocaleStr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment