diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-26 14:24:02 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-26 14:59:27 +0100 |
commit | 55650f65de478bcee65fe1e1cf19f106e407f999 (patch) | |
tree | f409d59d6c1dfec7d6db07a2827e9957d3a2125b /xmloff/source | |
parent | 70483089425d5bb22e036867290e06a6fc8d99fb (diff) |
xmloff: ODF export: don't write LO_EXT attribute unless ODF expended
The loext namespace is not defined when exporting standard ODF
versions, which triggers an assert() in SvXMLNamespaceMap.
(regression from 4469b29faeb8dbf7793a5d81d9c5ddebacf3015f)
Change-Id: Ic93fb0ea8fe092463d3fd18a0fbf4429d8652642
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 656c33a6cbb2..c5baccfe79fc 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3141,7 +3141,11 @@ void XMLTextParagraphExport::_exportTextGraphic( const OString aExt( OUStringToOString( aSourceMimeType, RTL_TEXTENCODING_ASCII_US ) ); aSourceMimeType = comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension( aExt ); } + + if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + { GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", aSourceMimeType); + } { SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_DRAW, |