Kaydet (Commit) f0d9beb8 authored tarafından Miklos Vajna's avatar Miklos Vajna

DOCX drawingML shape import: handle margins

Change-Id: Ia89552658dc79568cc46b92e949fc1935434e43d
üst 03b0ee80
......@@ -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")
......
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment