summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-11-27 19:08:50 +0100
committerEike Rathke <erack@redhat.com>2015-11-27 23:21:35 +0100
commit2011b5412c4daa47bc5624a2efc996960e19c2a9 (patch)
tree5c96b320c6dc6a3368cafcd9083ef603462971fd /include/svl
parentea1db935b085507f11d05f8606a680d521db4838 (diff)
introduce SvNumberFormatter::GetFormatStringForExcel()
Taking implementation from sc/source/filter/excel/xestyle.cxx GetNumberFormatCode(), slightly modified to ensure valid conversion and force en-US locale data. Also don't unnecessarily convert if format is for system locale and system locale is en-US. Change-Id: I9223eaa655132b4106a35c94cb0005559d7575b1
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/zforlist.hxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 159763b451d8..932fd8615907 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -759,9 +759,19 @@ public:
void FillKeywordTable( NfKeywordTable& rKeywords, LanguageType eLang );
/** Fill a NfKeywordIndex table with keywords usable in Excel export with
- GetMappedFormatstring() */
+ GetFormatStringForExcel() or SvNumberformat::GetMappedFormatstring() */
void FillKeywordTableForExcel( NfKeywordTable& rKeywords );
+ /** Return a format code string suitable for Excel export.
+
+ @param rTempFormatter
+ SvNumberFormatter to use if a non-en-US format code needs to be
+ converted and put, should not be the same formatter to not
+ pollute the entries of this one here.
+ */
+ OUString GetFormatStringForExcel( sal_uInt32 nKey, const NfKeywordTable& rKeywords,
+ SvNumberFormatter& rTempFormatter ) const;
+
/** Return a keyword for a language/country and NfKeywordIndex
for XML import, to generate number format strings. */
OUString GetKeyword( LanguageType eLnge, sal_uInt16 nIndex );