diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 121a3818c103..dc785d07e585 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -521,10 +521,17 @@ void SvXMLNumFmtExport::WriteMinutesElement_Impl( bool bLong ) void SvXMLNumFmtExport::WriteRepeatedElement_Impl( sal_Unicode nChar ) { - FinishTextElement_Impl(true); - SvXMLElementExport aElem( rExport, XML_NAMESPACE_LO_EXT, XML_FILL_CHARACTER, - true, false ); - rExport.Characters( OUString( nChar ) ); + // Export only for 1.2 with extensions or 1.3 and later. + SvtSaveOptions::ODFSaneDefaultVersion eVersion = rExport.getSaneDefaultVersion(); + if (eVersion > SvtSaveOptions::ODFSVER_012) + { + FinishTextElement_Impl(true); + // For 1.2+ use loext namespace, for 1.3 use number namespace. + SvXMLElementExport aElem( rExport, + ((eVersion < SvtSaveOptions::ODFSVER_013) ? XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER), + XML_FILL_CHARACTER, true, false ); + rExport.Characters( OUString( nChar ) ); + } } void SvXMLNumFmtExport::WriteSecondsElement_Impl( bool bLong, sal_uInt16 nDecimals ) |