[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/qa writerfilter/source

Bakos Attila (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 4 09:56:07 UTC 2020


 sw/qa/extras/ooxmlexport/data/tdf123873.docx      |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx        |   10 ++++++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    2 ++
 3 files changed, 12 insertions(+)

New commits:
commit 612a8bd9cfda531b6c610118f7c3b22fef047e83
Author:     Bakos Attila <bakos.attilakaroly at nisz.hu>
AuthorDate: Thu Feb 6 12:01:17 2020 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Mar 4 10:55:32 2020 +0100

    tdf#123873 DOCX IMPORT: fix unhandled textwrap for objects
    
    The OLE objects (in this case charts) had bad wrap option setting
    and this lead to misplaced objects. Now this parameter is set
    according to the file.
    
    Change-Id: I506be91b6801f0ffc3942e514f81119d895fdcb8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88091
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    Tested-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit affe9c8384475fc85027703332bc0f1b36eaa0a6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89908
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf123873.docx b/sw/qa/extras/ooxmlexport/data/tdf123873.docx
new file mode 100644
index 000000000000..b1de7f71f75a
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf123873.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 2365be2a5984..5c1bdc0582b9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -43,6 +43,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128207, "tdf128207.docx")
     assertXPathContent(p_XmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor/wp:positionH/wp:posOffset", "4445");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123873, "tdf123873.docx")
+{
+    //OLE Object were overlapped due to missing wrap import
+    xmlDocPtr p_XmlDoc = parseExport("word/document.xml");
+    CPPUNIT_ASSERT(p_XmlDoc);
+    assertXPath(
+        p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:drawing/wp:anchor/wp:wrapTopAndBottom");
+}
+
+
 DECLARE_OOXMLIMPORT_TEST(testTdf129888vml, "tdf129888vml.docx")
 {
     //the line shape has anchor in the first cell however it has to
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fc189d7dcf9d..8e13daa08efb 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6142,6 +6142,8 @@ void  DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties
             xEmbeddedProps->setPropertyValue("VertOrient", xShapeProps->getPropertyValue("VertOrient"));
             xEmbeddedProps->setPropertyValue("VertOrientPosition", xShapeProps->getPropertyValue("VertOrientPosition"));
             xEmbeddedProps->setPropertyValue("VertOrientRelation", xShapeProps->getPropertyValue("VertOrientRelation"));
+            //tdf123873 fix missing textwrap import
+            xEmbeddedProps->setPropertyValue("TextWrap", xShapeProps->getPropertyValue("TextWrap"));
         }
     }
     //insert it into the document at the current cursor position


More information about the Libreoffice-commits mailing list