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

Miklos Vajna vmiklos at collabora.co.uk
Tue Nov 19 02:44:20 PST 2013


 sw/qa/extras/ooxmlimport/ooxmlimport.cxx      |    2 ++
 writerfilter/source/dmapper/GraphicImport.cxx |    1 +
 2 files changed, 3 insertions(+)

New commits:
commit 02a2203580226766c4b3b8778430774ff76f90e9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Nov 19 11:34:49 2013 +0100

    DOCX drawingML shape import: handle wrap type
    
    Change-Id: I8880c7413b10a284c9e55170afa35527dc7593ea

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index f4df997..14c8ba5 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1517,6 +1517,8 @@ DECLARE_OOXMLIMPORT_TEST(testWpsOnly, "wps-only.docx")
 
     // Left margin was 0, instead of 114300 EMU's.
     CPPUNIT_ASSERT_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xShape, "LeftMargin"));
+    // Wrap type was PARALLEL.
+    CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(xShape, "Surround"));
 }
 
 DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index e75449f..da957ce 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1001,6 +1001,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
 
                         m_xShape->setPosition(awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition));
                         m_pImpl->applyMargins(xShapeProps);
+                        xShapeProps->setPropertyValue("Surround", uno::makeAny(m_pImpl->nWrap));
                     }
                 }
             }


More information about the Libreoffice-commits mailing list