From eb15e15740f65d1a84ffecb894af6bd0fa77be53 Mon Sep 17 00:00:00 2001 From: László Németh Date: Thu, 14 May 2015 15:44:10 +0200 Subject: tdf#91260: unit test for textbox shrinking When the textboxes extend beyond the page bottom, the fix for tdf#91260 keeps the original vertical position of the text frame by changing its height. Change-Id: I691b46640876bd082bd83da1bbd43f1e33ec807d --- sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index cdf5b1bf6b68..2014bc870df4 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -882,6 +882,17 @@ DECLARE_OOXMLIMPORT_TEST(testTDF91122, "tdf91122.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::TOP, nValue); } +DECLARE_OOXMLIMPORT_TEST(testTDF91260, "tdf91260.docx") +{ + /* + * textbox can't extend beyond the page bottom + * solution: shrinking textbox (its text frame) height, if needed + */ + uno::Reference xFrame(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xFrame->getString().startsWith( "Lorem ipsum" ) ); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3454), getProperty(xFrame, "Height")); +} + DECLARE_OOXMLIMPORT_TEST(testFdo74357, "fdo74357.docx") { // Floating table wasn't converted to a textframe. -- cgit v1.2.3