diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-08 14:56:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-08 17:26:45 +0100 |
commit | cd51e0153a25f3950be54dd7fd58a0de6e148ae2 (patch) | |
tree | 0eb744cecf34a37e9f7fc85e6a29779edc713f07 | |
parent | da8f57d9c9b4c6efb211d1d69f7e240523d0bc43 (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
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index b001d0444c02..f87b17682180 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -2973,7 +2973,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>()); @@ -2985,7 +2989,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); } void SwUiWriterTest::testTdf96479() |