From 7a3a8a254363801bf6893b23d67f86a7461f8f3b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 28 Sep 2012 09:52:29 +0100 Subject: n#782061 testcase Change-Id: I6aa95063ac8fe825b47decc68b08a35d81e4d59d --- sw/qa/extras/ooxmlimport/data/n782061.docx | Bin 0 -> 12654 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/n782061.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlimport/data/n782061.docx b/sw/qa/extras/ooxmlimport/data/n782061.docx new file mode 100644 index 000000000000..9d8218be41f1 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n782061.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 1cefa3937875..a83a398ff593 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -96,6 +96,7 @@ public: void testN780853(); void testN780843(); void testShadow(); + void testN782061(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -138,6 +139,7 @@ public: CPPUNIT_TEST(testN780853); CPPUNIT_TEST(testN780843); CPPUNIT_TEST(testShadow); + CPPUNIT_TEST(testN782061); #endif CPPUNIT_TEST_SUITE_END(); @@ -981,6 +983,16 @@ void Test::testShadow() CPPUNIT_ASSERT_EQUAL(sal_Int32(273), sal_Int32(aShadow.ShadowWidth)); } +void Test::testN782061() +{ + /* + * The problem was that the character escapement in the second run was -58. + */ + load("n782061.docx"); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(-9), getProperty(getRun(getParagraph(1), 2), "CharEscapement")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit