sw/qa/extras/ooxmlimport/data/ink.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 20 ++++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-)
New commits: commit fd2e3ff7b79d24a6b44b1e5b878b7b0ac4236b3e Author: Miklos Vajna <[email protected]> Date: Wed Sep 19 16:37:30 2012 +0200 DOCX ink testcase Change-Id: I0d38edfe1bac8a6db0227d9bbd0d9fbf9cdd93fd diff --git a/sw/qa/extras/ooxmlimport/data/ink.docx b/sw/qa/extras/ooxmlimport/data/ink.docx new file mode 100644 index 0000000..0b953d0 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/ink.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index e2ab2b0..ab39e8f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -52,10 +52,6 @@ #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) - - -using rtl::OString; -using rtl::OUString; using rtl::OUStringBuffer; class Test : public SwModelTestBase @@ -92,6 +88,7 @@ public: void testN778836(); void testN778140(); void testN778828(); + void testInk(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -126,6 +123,7 @@ public: CPPUNIT_TEST(testN778836); CPPUNIT_TEST(testN778140); CPPUNIT_TEST(testN778828); + CPPUNIT_TEST(testInk); #endif CPPUNIT_TEST_SUITE_END(); @@ -847,6 +845,20 @@ void Test::testN778828() CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage()); } +void Test::testInk() +{ + /* + * The problem was that ~nothing was imported, except an empty CustomShape. + * + * xray ThisComponent.DrawPage(0).supportsService("com.sun.star.drawing.OpenBezierShape") + */ + load("ink.docx"); + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<lang::XServiceInfo> xServiceInfo(xDraws->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.OpenBezierShape")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
