Kaydet (Commit) f05714c3 authored tarafından Mark Hung's avatar Mark Hung

tdf#101729 add test case to make sure that the text is inside the cell.

Change-Id: Icffbf20f7bbca3d645a769cc294a3fd7acb51d97
Reviewed-on: https://gerrit.libreoffice.org/31870Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMark Hung <marklh9@gmail.com>
üst 96b95f50
......@@ -761,5 +761,15 @@ DECLARE_ODFIMPORT_TEST(testTdf75221, "tdf75221.odt")
CPPUNIT_ASSERT(top.toInt32() > 0);
}
DECLARE_ODFIMPORT_TEST(testTdf101729, "tdf101729.odt")
{
sal_Int32 l = parseDump("/root/page/body/tab/row/cell[1]/infos/bounds", "left").toInt32();
sal_Int32 w = parseDump("/root/page/body/tab/row/cell[1]/infos/bounds", "width").toInt32();
sal_Int32 x = parseDump("/root/page/body/tab/row/cell[1]/txt/infos/bounds", "left").toInt32();
// Make sure the text does not go outside and verify it is centered roughly
CPPUNIT_ASSERT( l + w / 4 < x );
CPPUNIT_ASSERT( x < l + 3 * w / 4);
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment