[Libreoffice-commits] core.git: sw/qa writerfilter/source

Bakos Attila (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 7 17:05:42 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 affe9c8384475fc85027703332bc0f1b36eaa0a6
Author:     Bakos Attila <bakos.attilakaroly at nisz.hu>
AuthorDate: Thu Feb 6 12:01:17 2020 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Fri Feb 7 18:05:08 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>

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 9fe75ca0f2e8..7817c26ad5ac 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -49,6 +49,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 cac4cdceb49b..fa4e089192d9 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6233,6 +6233,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