summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-08 14:56:26 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-08 17:30:34 +0100
commitcbf2d103a67b2a1b2a55989cca71ee99bfa4a329 (patch)
tree6712737fac37d34d1af379455a56135805f5a3a2
parent4eb1bb9ab40df27ceb1b3c386d4f70d3bca00d10 (diff)
CppunitTest_sw_uiwriter: don't assert the size of the last page
The size of the last page will change in a bit in Hide Whitespace mode, the intention of the test is to check the behavior of the normal (non-last) pages. Change-Id: I69b9072c59b6ca4dc5d93062c21726a0f5c03c05 (cherry picked from commit cd51e0153a25f3950be54dd7fd58a0de6e148ae2)
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 47924fe9d9ae..64ded0d60e0a 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1202,7 +1202,11 @@ void SwUiWriterTest::testTdf96536()
aViewOptions.SetHideWhitespaceMode(true);
pWrtShell->ApplyViewOptions(aViewOptions);
- // Insert a new paragraph at the end of the document, and then delete it.
+ // Insert a page break and go back to the first page.
+ pWrtShell->InsertPageBreak();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+
+ // Insert a new paragraph at the end of the page, and then delete it.
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XParagraphAppend> xParagraphAppend(xTextDocument->getText(), uno::UNO_QUERY);
xParagraphAppend->finishParagraph(uno::Sequence<beans::PropertyValue>());
@@ -1214,7 +1218,7 @@ void SwUiWriterTest::testTdf96536()
// This was 552, page did not shrink after deleting the second paragraph.
// Expected 276, which is 12pt font size + default line spacing (15%), but
// tolerate some difference to that.
- CPPUNIT_ASSERT(parseDump("/root/infos/bounds", "height").toInt32() <= 276);
+ CPPUNIT_ASSERT(parseDump("/root/page[1]/infos/bounds", "height").toInt32() <= 276);
}
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);