summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-04-24 14:46:32 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-04-24 19:26:32 +0200
commit1b7235573643b898602ccc31eb983c71941aa12c (patch)
tree2de6f50a97214679c77431bb2949dcb703573509
parentf4b9d3f0cfbcd4dfb1f8234e4009641822747cd6 (diff)
fdo#33091 recognise General format in all languages
As opposed to only the current UI language Change-Id: Iaaaec78e9cbe1891c3e42f207a6da552b2a2bf7d
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index a4e03b563cc9..445248c0bdef 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -848,12 +848,16 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
if ( xFormattedField.is() )
{
sal_Int32 nFormatKey = xFormattedField->getFormatKey();
- if ( 0 != nFormatKey )
+ XMLNumberFormatAttributesExportHelper aHelper(GetNumberFormatsSupplier(),*this);
+ bool bIsStandard = false;
+ OUString sEmpty;
+ sal_Int16 nCellType = aHelper.GetCellType(nFormatKey,bIsStandard);
+ // "Standard" means "no format set, value could be anything",
+ // so don't set a format attribute in this case.
+ // P.S.: "Standard" is called "General" in some languages
+ if (!bIsStandard)
{
- XMLNumberFormatAttributesExportHelper aHelper(GetNumberFormatsSupplier(),*this);
- bool bIsStandard = false;
- OUString sEmpty;
- if ( util::NumberFormat::TEXT == aHelper.GetCellType(nFormatKey,bIsStandard) )
+ if ( nCellType == util::NumberFormat::TEXT )
aHelper.SetNumberFormatAttributes(sEmpty, sEmpty);
else
aHelper.SetNumberFormatAttributes(nFormatKey, 0.0,sal_False);