diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-05-23 16:09:36 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-05-23 16:59:13 +0200 |
commit | d2ec94f0576af3f0675b171c74528cae735adef4 (patch) | |
tree | e1f1ab6a533dc20384663f6a098735273caf355d /xmloff/source | |
parent | 4f1546ca3cb47d4987a4c2d841a30a5ad376660f (diff) |
prevent invalid files if file contains currency formats
A regression from writing error cell information into the file.
Change-Id: Idb55646094fcd76912bdcd2102370681bcc8703d
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/style/numehelp.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index f510bd5eddf9..33396f1ce78b 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -517,13 +517,17 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes( } void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes( - const sal_Int32 nNumberFormat, const double& rValue, sal_Bool bExportValue, sal_uInt16 nNamespace) + const sal_Int32 nNumberFormat, const double& rValue, sal_Bool bExportValue, + sal_uInt16 nNamespace, bool bExportCurrencySymbol) { if (pExport) { bool bIsStandard; OUString sCurrency; sal_Int16 nTypeKey = GetCellType(nNumberFormat, sCurrency, bIsStandard); + if(!bExportCurrencySymbol) + sCurrency = OUString(); + WriteAttributes(nTypeKey, rValue, sCurrency, bExportValue, nNamespace); } else { |