DOCX drawingML shape import: fix position of group shapes
Change-Id: Ib5db40ecd5782d729d406b285d3399cc2626e335
This commit is contained in:
BIN
sw/qa/extras/ooxmlimport/data/wpg-only.docx
Executable file
BIN
sw/qa/extras/ooxmlimport/data/wpg-only.docx
Executable file
Binary file not shown.
@@ -1548,6 +1548,13 @@ DECLARE_OOXMLIMPORT_TEST(textboxWpsOnly, "textbox-wps-only.docx")
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(2805), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLIMPORT_TEST(testWpgOnly, "wpg-only.docx")
|
||||
{
|
||||
uno::Reference<drawing::XShape> xShape = getShape(1);
|
||||
// Check position, it was nearly 0. This is a shape, so use getPosition(), not a property.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(548005)), xShape->getPosition().X);
|
||||
}
|
||||
|
||||
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
|
||||
{
|
||||
// The document contains a rotated bitmap
|
||||
|
@@ -1029,6 +1029,11 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
|
||||
// For non-textframes, this is handled already in oox::drawingml::Shape::createAndInsert().
|
||||
m_pImpl->applyPosition(xShapeProps);
|
||||
}
|
||||
else if (xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
|
||||
{
|
||||
// Position of the groupshape should be set after children have been added.
|
||||
m_xShape->setPosition(awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition));
|
||||
}
|
||||
|
||||
m_pImpl->applyMargins(xShapeProps);
|
||||
bool bOpaque = m_pImpl->bOpaque && !m_pImpl->rDomainMapper.IsInHeaderFooter();
|
||||
|
Reference in New Issue
Block a user