From dad6be8af0e670a56d3d399a1b0a35859bd7b093 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 11 Jul 2015 02:52:42 +0200 Subject: write trailing text subformat also to Excel .xls and .xlsx, tdf#92457 ... without generating 0;;;@ from 0;@ that has different semantics. Introduce css::util::NumberFormat::EMPTY to properly flag empty subformats and distinguish from UNDEFINED, everything else would be an ugly hack. SvNumberformat::GetMappedFormatstring() now correctly supports the trailing text subformat, so exports using it should get that automatically. Change-Id: If9a1bcc5ec5dfcf46688035e2b1428ab4747a68d --- xmloff/source/style/xmlnumfe.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 3ccf07408e1d..d0da09b7c968 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1006,9 +1006,6 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt // #101606# An empty subformat is a valid number-style resulting in an // empty display string for the condition of the subformat. - if ( nFmtType == css::util::NumberFormat::UNDEFINED && rFormat.GetNumForType( nPart, - 0, false ) == 0 ) - nFmtType = 0; XMLTokenEnum eType = XML_TOKEN_INVALID; switch ( nFmtType ) @@ -1016,6 +1013,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt // type is 0 if a format contains no recognized elements // (like text only) - this is handled as a number-style. case 0: + case css::util::NumberFormat::EMPTY: case css::util::NumberFormat::NUMBER: case css::util::NumberFormat::SCIENTIFIC: case css::util::NumberFormat::FRACTION: -- cgit