summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-26 14:24:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-01-27 20:58:16 +0100
commite62058cddd3a55707abd022cddae5b30866e21ca (patch)
tree70e724f524b2d57dbb07a0e16a702296e15fd21b /xmloff
parentf406d38638119fef40aa99b9412d515fb979855c (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) (cherry picked from commit 55650f65de478bcee65fe1e1cf19f106e407f999) Change-Id: Ic93fb0ea8fe092463d3fd18a0fbf4429d8652642 Reviewed-on: https://gerrit.libreoffice.org/48693 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtparae.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index cb9fdde48625..e8fefb009a3a 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3144,7 +3144,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,