From be9034ec5c43a3dcbebaa75e9eb47a024d4c6072 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 23 May 2013 16:09:36 +0200 Subject: prevent invalid files if file contains currency formats A regression from writing error cell information into the file. Change-Id: Idb55646094fcd76912bdcd2102370681bcc8703d --- xmloff/source/style/numehelp.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xmloff') 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 { -- cgit