diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-04-24 14:46:32 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-04-24 19:26:32 +0200 |
commit | 1b7235573643b898602ccc31eb983c71941aa12c (patch) | |
tree | 2de6f50a97214679c77431bb2949dcb703573509 /reportdesign | |
parent | f4b9d3f0cfbcd4dfb1f8234e4009641822747cd6 (diff) |
fdo#33091 recognise General format in all languages
As opposed to only the current UI language
Change-Id: Iaaaec78e9cbe1891c3e42f207a6da552b2a2bf7d
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 14 |
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); |