summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-11-09 10:42:47 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-11-09 10:55:15 +0100
commitbd6ae389008e110be62a335dfcd82c655d512e63 (patch)
treea29be0c92f7da7ef8977a3b4539c3452b7702df7 /sw/qa
parent52a7a8e81a0cc3327de5ee27d02f9320c2cee3e4 (diff)
fdo#51550 fix DOCX export dataloss on non-math/chart OLE export
This is still not complete, but having the replacement graphic only is far better than having nothing. Change-Id: I141a3de1a449f4261c7086e10f2c141b3f6cdb10
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo51550.odtbin0 -> 13611 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo51550.odt b/sw/qa/extras/ooxmlexport/data/fdo51550.odt
new file mode 100644
index 000000000000..4cade5b21b9c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo51550.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 24618ff472aa..1a1c15791b16 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -65,6 +65,7 @@ public:
void testTablePosition();
void testFdo47669();
void testTableBorders();
+ void testFdo51550();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -101,6 +102,7 @@ void Test::run()
{"table-position.docx", &Test::testTablePosition},
{"fdo47669.docx", &Test::testFdo47669},
{"table-borders.docx", &Test::testTableBorders},
+ {"fdo51550.odt", &Test::testFdo51550},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -472,6 +474,14 @@ void Test::testTableBorders() {
}
}
+void Test::testFdo51550()
+{
+ // The problem was that we lacked the fallback to export the replacement graphic for OLE objects.
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();