diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-08-07 12:46:34 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-08-08 16:32:56 +0200 |
commit | 04628d9dc2f283fea6a8203de8b6812dfbc92014 (patch) | |
tree | 1e8c8a8dda886c56db3fe3d5815d18f30caf52a2 /sw | |
parent | 5b16f3e59afc46bea8385d236044bc4af15740e6 (diff) |
testcase for bnc#773061
Change-Id: Ibf1ad67a1776dbe966de335be93a295ba7bebe76
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/bnc773061.docx | bin | 0 -> 8872 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/bnc773061.docx b/sw/qa/extras/ooxmlimport/data/bnc773061.docx Binary files differnew file mode 100644 index 000000000000..6a7baf6c64b5 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/bnc773061.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f8cd74e858c9..ba8f903ae455 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -77,6 +77,7 @@ public: void testN766487(); void testN693238(); void testNumbering1(); + void testBnc773061(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -102,6 +103,7 @@ public: CPPUNIT_TEST(testN766487); CPPUNIT_TEST(testN693238); CPPUNIT_TEST(testNumbering1); + CPPUNIT_TEST(testBnc773061); #endif CPPUNIT_TEST_SUITE_END(); @@ -689,6 +691,21 @@ note that the indexes may get off as the implementation evolves, C++ code seache CPPUNIT_ASSERT_EQUAL( style::NumberingType::ARABIC, numberingType ); } +void Test::testBnc773061() +{ + load( "bnc773061.docx" ); + uno::Reference< text::XTextRange > paragraph = getParagraph( 1 ); + uno::Reference< text::XTextRange > normal = getRun( paragraph, 1, "Normal " ); + uno::Reference< text::XTextRange > raised = getRun( paragraph, 2, "Raised" ); + uno::Reference< text::XTextRange > lowered = getRun( paragraph, 4, "Lowered" ); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), getProperty< sal_Int32 >( normal, "CharEscapement" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 50 ), getProperty< sal_Int32 >( raised, "CharEscapement" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32( -25 ), getProperty< sal_Int32 >( lowered, "CharEscapement" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 100 ), getProperty< sal_Int32 >( normal, "CharEscapementHeight" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 100 ), getProperty< sal_Int32 >( raised, "CharEscapementHeight" )); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 100 ), getProperty< sal_Int32 >( lowered, "CharEscapementHeight" )); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |