summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-05-14 15:44:10 +0200
committerLászló Németh <laszlo.nemeth@collabora.com>2015-05-15 00:19:18 +0200
commiteb15e15740f65d1a84ffecb894af6bd0fa77be53 (patch)
treee87b934a79d8a02d0f386be027fc0e99d3d24266
parentf186e84dfb850a20dafb869e6d04b6bcd7585160 (diff)
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
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
1 files changed, 11 insertions, 0 deletions
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<text::XTextRange> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFrame->getString().startsWith( "Lorem ipsum" ) );
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3454), getProperty<sal_Int32>(xFrame, "Height"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo74357, "fdo74357.docx")
{
// Floating table wasn't converted to a textframe.