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

New commits:
commit f0d9beb80f926a05bc7dd87801c6daa7bc268cec
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Tue Nov 19 10:10:42 2013 +0100

    DOCX drawingML shape import: handle margins
    
    Change-Id: Ia89552658dc79568cc46b92e949fc1935434e43d

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index b399ef5..f4df997 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1514,6 +1514,9 @@ DECLARE_OOXMLIMPORT_TEST(testWpsOnly, "wps-only.docx")
 
     // Check position, it was 0. This is a shape, so use getPosition(), not a 
property.
     CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(671830)), 
xShape->getPosition().X);
+
+    // Left margin was 0, instead of 114300 EMU's.
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xShape, 
"LeftMargin"));
 }
 
 DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index 64b0561..e75449f 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1000,6 +1000,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
                         xShapeProps->setPropertyValue("AnchorType", 
uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
 
                         
m_xShape->setPosition(awt::Point(m_pImpl->nLeftPosition, 
m_pImpl->nTopPosition));
+                        m_pImpl->applyMargins(xShapeProps);
                     }
                 }
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to