i119933 - make Basic FORMAT function work with non-ASCII text

Conflicts:
	basic/source/sbx/sbxscan.cxx

Change-Id: I5b77231d1b09cbf32fa914f3d7b60d6e631e5870
This commit is contained in:
Ariel Constenla-Haile 2012-06-10 16:19:52 +00:00 committed by Eike Rathke
parent 96ef305d32
commit a63cc778d1

View file

@ -702,14 +702,17 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
{
OUString aStr = GetOUString();
SvtSysLocale aSysLocale;
const CharClass& rCharClass = aSysLocale.GetCharClass();
if( pFmt->equalsIgnoreAsciiCase( VBAFORMAT_LOWERCASE ) )
{
rRes = aStr.toAsciiLowerCase();
rRes = rCharClass.lowercase( aStr );
return;
}
if( pFmt->equalsIgnoreAsciiCase( VBAFORMAT_UPPERCASE ) )
{
rRes = aStr.toAsciiUpperCase();
rRes = rCharClass.uppercase( aStr );
return;
}