--- a/svl/source/numbers/zformat.cxx 2010-09-17 11:13:51.000000000 +0700 +++ b/svl/source/numbers/zformat.cxx 2010-09-22 09:32:38.000000000 +0700 @@ -1143,6 +1143,22 @@ short SvNumberformat::ImpNextSymbol(Stri xub_StrLen& nPos, String& sSymbol) { + xub_StrLen pos; + if ( ( pos = rString.SearchAscii( "[$-", 0 ) ) != STRING_NOTFOUND ) + { + if ( rString.GetChar(pos+10) == ']' ) + { + if ( rString.GetChar(4) == '0' && rString.GetChar(5) == '7' ) + { + rString.InsertAscii( "[~buddhist]", pos+11 ); + } + if ( rString.GetChar(3) == 'D' ) + { + rString.InsertAscii( "[NatNum1]", pos+11 ); + } + } + } + short eSymbolType = BRACKET_SYMBOLTYPE_FORMAT; sal_Unicode cToken; sal_Unicode cLetter = ' '; // Zwischenergebnis @@ -4209,6 +4225,7 @@ String SvNumberformat::GetMappedFormatst nSem++; String aPrefix; + bool LCIDInserted = FALSE; if ( !bDefaults ) { @@ -4242,14 +4259,6 @@ String SvNumberformat::GetMappedFormatst } const SvNumberNatNum& rNum = NumFor[n].GetNatNum(); - // The Thai T NatNum modifier during Xcl export. - if (rNum.IsSet() && rNum.GetNatNum() == 1 && - rKeywords[NF_KEY_THAI_T].EqualsAscii( "T") && - MsLangId::getRealLanguage( rNum.GetLang()) == - LANGUAGE_THAI) - { - aPrefix += 't'; // must be lowercase, otherwise taken as literal - } USHORT nAnz = NumFor[n].GetnAnz(); if ( nSem && (nAnz || aPrefix.Len()) ) @@ -4309,6 +4318,24 @@ String SvNumberformat::GetMappedFormatst aStr += '"'; } break; + case NF_SYMBOLTYPE_CALDEL : + if ( pStr[j+1].EqualsAscii("buddhist") ) + { + aStr.InsertAscii( "[$-", aStr.Len() ); + if ( rNum.IsSet() && rNum.GetNatNum() == 1 && + MsLangId::getRealLanguage( rNum.GetLang() ) == + LANGUAGE_THAI ) + { + aStr.InsertAscii( "D07041E]", aStr.Len() ); + } + else + { + aStr.InsertAscii( "107041E]", aStr.Len() ); + } + j = j+2; + } + LCIDInserted = TRUE; + break; default: aStr += pStr[j]; } @@ -4316,6 +4343,15 @@ String SvNumberformat::GetMappedFormatst } } } + // The Thai T NatNum modifier during Xcl export. + if (rNum.IsSet() && rNum.GetNatNum() == 1 && + rKeywords[NF_KEY_THAI_T].EqualsAscii( "T") && + MsLangId::getRealLanguage( rNum.GetLang()) == + LANGUAGE_THAI && !LCIDInserted ) + { + + aStr.InsertAscii( "[$-D00041E]", 0 ); + } } for ( ; nSub<4 && bDefault[nSub]; ++nSub ) { // append empty subformats