xmloff/source/text/txtparae.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f884e99aea2bf53a8cdc51a8de97cdb4d829576f
Author: Michael Stahl <mst...@redhat.com>
Date:   Fri Jan 26 14:24:02 2018 +0100

    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.mehrbr...@cib.de>
    Tested-by: Michael Stahl <mst...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to