diff --git a/sw/qa/extras/ooxmlimport/data/test_extra_image.docx b/sw/qa/extras/ooxmlimport/data/test_extra_image.docx new file mode 100644 index 000000000000..cdb05afa4456 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/test_extra_image.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 8961eed81213..6e3388b2209b 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2011,6 +2011,14 @@ DECLARE_OOXMLIMPORT_TEST(testFdo38414, "fdo38414.docx" ) CPPUNIT_ASSERT_EQUAL( height3, height4 ); } +DECLARE_OOXMLIMPORT_TEST(test_extra_image, "test_extra_image.docx" ) +{ + // fdo#74652 Check there is no shape added to the doc during import + uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xDraws->getCount()); +} + DECLARE_OOXMLIMPORT_TEST(testFdo74401, "fdo74401.docx") { uno::Reference xGroupShape(getShape(1), uno::UNO_QUERY); diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index da88e528f124..17e359ef6cee 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -710,6 +710,16 @@ ListsManager::ListsManager(DomainMapper& rDMapper, ListsManager::~ListsManager( ) { + uno::Reference xShape; + for (std::vector::iterator it = m_aNumPicBullets.begin(); it != m_aNumPicBullets.end(); ++it) + { + xShape = (*it)->GetShape(); + if (xShape.is()) + { + uno::Reference xShapeComponent(xShape, uno::UNO_QUERY); + xShapeComponent->dispose(); + } + } } void ListsManager::lcl_attribute( Id nName, Value& rVal )