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:15:53 +0200 |
commit | be9034ec5c43a3dcbebaa75e9eb47a024d4c6072 (patch) | |
tree | 3dc65ce8b49e0237d30d2da80964d7163a241a1c /xmloff/source | |
parent | cb92803765275eb2a9b4f92b63dd01350ee81c32 (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 { |