diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-05-28 21:56:14 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-05-30 22:13:12 +0000 |
commit | b07e0a11766f2d2878a0dc2681feddb0c381c68d (patch) | |
tree | ba6ebd5db1c2b7a2cd6ba35900a10e03a87a914e /xmloff | |
parent | c75ce37560c05271ba56c9dd0d98c5001e83cc2f (diff) |
Choose ODF version for fill-character
OASIS reference: https://issues.oasis-open.org/browse/OFFICE-3765
XML_TEXT in FinishTextElement_Impl follows a different logic
See https://cgit.freedesktop.org/libreoffice/core/commit?id=66c6d1ef204f3507e7663a1b8b1be05b9ec71092
Change-Id: Iac966f74c26c2b72ed54db26cf17a35717263007
Reviewed-on: https://gerrit.libreoffice.org/25590
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
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 ) |