summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-11-27 19:08:50 +0100
committerEike Rathke <erack@redhat.com>2015-11-28 00:29:41 +0100
commitf9c565ff7c8c65610890af50eda560a56e2d03af (patch)
tree2ecf4bfdd3daa9b221d12b4e775ee482855e3408 /include
parente96c66210c779a200765efae5b5c03ff3bdc34fe (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 (cherry picked from commit 2011b5412c4daa47bc5624a2efc996960e19c2a9)
Diffstat (limited to 'include')
-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 );