summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-09-19 16:37:30 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-09-19 16:39:56 +0200
commitfd2e3ff7b79d24a6b44b1e5b878b7b0ac4236b3e (patch)
treeb80ae89d42171ac9c6def60ea44af350459d4ee6 /sw/qa/extras
parent24f9a1864d925db58c7637cc490b0a1c70159760 (diff)
DOCX ink testcase
Change-Id: I0d38edfe1bac8a6db0227d9bbd0d9fbf9cdd93fd
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/data/ink.docxbin0 -> 14339 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx20
2 files changed, 16 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/ink.docx b/sw/qa/extras/ooxmlimport/data/ink.docx
new file mode 100644
index 000000000000..0b953d00ed6f
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/ink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index e2ab2b0cfba9..ab39e8f75248 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();