diff options
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/fdo80555.docx | bin | 0 -> 15018 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 7 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo80555.docx b/sw/qa/extras/ooxmlimport/data/fdo80555.docx Binary files differnew file mode 100644 index 000000000000..a15bdc1ecd31 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo80555.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 6562b974d6ff..21f5ac645708 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2230,6 +2230,13 @@ DECLARE_OOXMLIMPORT_TEST(testTableBtlrCenter, "table-btlr-center.docx") CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, getProperty<sal_Int16>(xTable->getCellByName("A2"), "VertOrient")); } +DECLARE_OOXMLIMPORT_TEST(testFdo80555, "fdo80555.docx") +{ + uno::Reference<drawing::XShape> xShape = getShape(1); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3318), xShape->getPosition().X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(245), xShape->getPosition().Y); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index cf3da2af2224..038d974557d3 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -782,9 +782,11 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) m_pImpl->applyPosition(xShapeProps); uno::Reference<lang::XServiceInfo> xServiceInfo(m_xShape, uno::UNO_QUERY_THROW); - if (xServiceInfo->supportsService("com.sun.star.drawing.GroupShape")) + if (xServiceInfo->supportsService("com.sun.star.drawing.GroupShape") || + xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape")) { // Position of the groupshape should be set after children have been added. + // fdo#80555: also set position for graphic shapes here m_xShape->setPosition(awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition)); } m_pImpl->applyRelativePosition(xShapeProps); |