summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorTushar Bende <tushar.bende@synerzip.com>2014-04-11 22:47:33 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-16 08:43:57 +0000
commitcebb4abec105c2576b065853eb48af9be1d9fde6 (patch)
tree669d8a6df1f8bc35a407440b84f2d013f41c9737 /sw/qa/extras/ooxmlimport
parent4be3e38439672e6b3f42617a050494b16535afea (diff)
fdo#74652 : Extra image gets added to the document body after RT.
Description: There was a problem for some documents, that when opened in LibreOffice extra image was getting added to the first page of the doc and same could be noticed even in RoundTripped doc. The root cause was if picture bullet is added to the doc and there is no <w:lvlPicBulletId> tag in <w:lvl> of <w:abstractNum> then removal of extra added graphic object from document body was getting missed because currently that is handled in ListsManager::lcl_sprm() inside "case NS_ooxml::LN_CT_Lvl_lvlPicBulletId". Checking if there is any remaining item in m_aNumPicBullets when LO hits the ListsManager destructor. If there is any calling dispose() for all of them. Change-Id: Ibfc3c93b68ff7d6ef0909fe789dda6db67ac11e2 Reviewed-on: https://gerrit.libreoffice.org/8940 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/data/test_extra_image.docxbin0 -> 120620 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx8
2 files changed, 8 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/test_extra_image.docx
Binary files 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<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xDraws->getCount());
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo74401, "fdo74401.docx")
{
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);