summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx3
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx1
2 files changed, 4 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index b399ef562924..f4df997ea429 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 64b056136d4f..e75449fb3c15 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);
}
}
}