diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-26 14:24:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-27 21:07:00 +0100 |
commit | f884e99aea2bf53a8cdc51a8de97cdb4d829576f (patch) | |
tree | 75408a886770dca5482e0643e675f39a3282d187 | |
parent | dc44111ad5965bf4179fc654b677e1e445dea2f0 (diff) |
xmloff: ODF export: don't write LO_EXT attribute unless ODF extended
The loext namespace is not defined when exporting standard ODF
versions, which triggers an assert() in SvXMLNamespaceMap.
(regression from 4469b29faeb8dbf7793a5d81d9c5ddebacf3015f)
Change-Id: Ic93fb0ea8fe092463d3fd18a0fbf4429d8652642
(cherry picked from commit 55650f65de478bcee65fe1e1cf19f106e407f999)
Reviewed-on: https://gerrit.libreoffice.org/48694
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 49f7ff0706ac..78472af3e1d9 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3117,7 +3117,10 @@ void XMLTextParagraphExport::_exportTextGraphic( // Add mimetype to make it easier for readers to get the base64 image type right, tdf#109202 OUString aSourceMimeType = getMimeType(sOrigURL); if ( !aSourceMimeType.isEmpty() ) - GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", aSourceMimeType); + if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + { + GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", aSourceMimeType); + } { SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_DRAW, |