Kaydet (Commit) 1b723557 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

fdo#33091 recognise General format in all languages

As opposed to only the current UI language

Change-Id: Iaaaec78e9cbe1891c3e42f207a6da552b2a2bf7d
üst f4b9d3f0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment