diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-01-08 12:56:24 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-08 14:17:28 +0100 |
commit | d7853c1fab14c943b6b2535580f64810b22e225d (patch) | |
tree | d5daf81c5102d6b8b03681f45d47b02aaf0c15ae /sw/qa/extras | |
parent | bdfc6363d66aa079512cc8008996b633f693fed1 (diff) |
n#793998 testcase
Diffstat (limited to 'sw/qa/extras')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/n793998.docx | bin | 0 -> 13167 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n793998.docx b/sw/qa/extras/ooxmlimport/data/n793998.docx Binary files differnew file mode 100755 index 000000000000..fc96e2e97f74 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n793998.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 813b6536b537..28db45e512f8 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -112,6 +112,7 @@ public: void testFineTableDash(); void testN792778(); void testN793262(); + void testN793998(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -176,6 +177,7 @@ void Test::run() {"tableborder-finedash.docx", &Test::testFineTableDash}, {"n792778.docx", &Test::testN792778}, {"n793262.docx", &Test::testN793262}, + {"n793998.docx", &Test::testN793998}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1114,6 +1116,16 @@ void Test::testN793262() CPPUNIT_ASSERT_EQUAL(sal_Int32(76), getProperty<sal_Int32>(xTable->getCellByName("A1"), "TopBorderDistance")); } +void Test::testN793998() +{ + sal_Int32 nTextPortion = parseDump("/root/page/body/txt/Text[1]", "nWidth").toInt32(); // Width of the first (text) portion + sal_Int32 nTabPortion = parseDump("/root/page/body/txt/Text[2]", "nWidth").toInt32(); // Width of the second (tab) portion + sal_Int32 nParagraph = parseDump("/root/page/body/txt/infos/bounds", "width").toInt32(); // Width of the paragraph + sal_Int32 nRightMargin = 3000; + // The problem was that the tab portion didn't ignore the right margin, so text + tab width wasn't larger than body (paragraph - right margin) width. + CPPUNIT_ASSERT(nTextPortion + nTabPortion > nParagraph - nRightMargin); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |