[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - xmloff/source

Michael Stahl mstahl at redhat.com
Sat Jan 27 19:58:36 UTC 2018


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

New commits:
commit e62058cddd3a55707abd022cddae5b30866e21ca
Author: Michael Stahl <mstahl at 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.Mehrbrodt at cib.de>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at 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,


More information about the Libreoffice-commits mailing list