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

introduce SvNumberFormatter::FillKeywordTableForExcel()

... to conflate the places that do this on their own.

Change-Id: Idde2173780e0515ad982b4be46fc4df23a7577ad
üst e5cc49db
......@@ -758,6 +758,10 @@ public:
/// Fill a NfKeywordIndex table with keywords of a language/country
void FillKeywordTable( NfKeywordTable& rKeywords, LanguageType eLang );
/** Fill a NfKeywordIndex table with keywords usable in Excel export with
GetMappedFormatstring() */
void FillKeywordTableForExcel( NfKeywordTable& rKeywords );
/** Return a keyword for a language/country and NfKeywordIndex
for XML import, to generate number format strings. */
OUString GetKeyword( LanguageType eLnge, sal_uInt16 nIndex );
......
......@@ -775,6 +775,20 @@ void SvNumberFormatter::FillKeywordTable( NfKeywordTable& rKeywords,
}
void SvNumberFormatter::FillKeywordTableForExcel( NfKeywordTable& rKeywords )
{
FillKeywordTable( rKeywords, LANGUAGE_ENGLISH_US );
// Remap codes unknown to Excel.
rKeywords[ NF_KEY_NN ] = "DDD";
rKeywords[ NF_KEY_NNN ] = "DDDD";
// NNNN gets a separator appended in SvNumberformat::GetMappedFormatString()
rKeywords[ NF_KEY_NNNN ] = "DDDD";
// Export the Thai T NatNum modifier.
rKeywords[ NF_KEY_THAI_T ] = "T";
}
OUString SvNumberFormatter::GetKeyword( LanguageType eLnge, sal_uInt16 nIndex )
{
ChangeIntl(eLnge);
......
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