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

New commits:
commit e62058cddd3a55707abd022cddae5b30866e21ca
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)
    
    (cherry picked from commit 55650f65de478bcee65fe1e1cf19f106e407f999)
    
    Change-Id: Ic93fb0ea8fe092463d3fd18a0fbf4429d8652642
    Reviewed-on: https://gerrit.libreoffice.org/48693
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Jenkins <c...@libreoffice.org>
    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 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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to