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

use OUStringBuffer

Change-Id: If82c2114a1145e1bfdede9205461717c04043db2
üst 562c39d7
......@@ -467,11 +467,14 @@ bool LanguageTag::canonicalize()
if (eExt == EXTRACTED_LSC)
{
// Rebuild bcp47 with proper casing of tags.
OUString aStr( aLanguage);
OUStringBuffer aBuf( aLanguage.getLength() + 1 + aScript.getLength() +
1 + aCountry.getLength());
aBuf.append( aLanguage);
if (!aScript.isEmpty())
aStr += "-" + aScript;
aBuf.append('-').append( aScript);
if (!aCountry.isEmpty())
aStr += "-" + aCountry;
aBuf.append('-').append( aCountry);
OUString aStr( aBuf.makeStringAndClear());
if (maBcp47 != aStr)
{
maBcp47 = aStr;
......
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