summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-11-27 14:18:01 +0100
committerEike Rathke <erack@redhat.com>2015-11-28 00:29:40 +0100
commit8cd082adec3860ed0bf91218db8781308fadd75c (patch)
tree310a9661d77543147a387cb809bbd33d67f3d150 /svl
parentcf35b95acbcbbae357518bf4fc39feccb4a9a76d (diff)
introduce SvNumberFormatter::FillKeywordTableForExcel()
... to conflate the places that do this on their own. Change-Id: Idde2173780e0515ad982b4be46fc4df23a7577ad (cherry picked from commit b55548043e969a6aa4c211217cfc3fb85d50d2da)
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 53b421376b8c..f12ee01405ba 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -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);