Kaydet (Commit) 5c875534 authored tarafından Luboš Luňák's avatar Luboš Luňák

testcase for a recent bnc#773061 fix

Change-Id: I60874c6ad8ccb9767961ed0064b9a15bfc1b07d5
üst f2c55815
......@@ -107,6 +107,7 @@ public:
void testN783638();
void testFdo52208();
void testN785767();
void testN773061();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
......@@ -166,6 +167,7 @@ void Test::run()
{"n783638.docx", &Test::testN783638},
{"fdo52208.docx", &Test::testFdo52208},
{"n785767.docx", &Test::testN785767},
{"n773061.docx", &Test::testN773061},
};
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
{
......@@ -1015,6 +1017,17 @@ void Test::testN785767()
// Check the A1 and B1 cells, the width of both of them was the default value (10000 / 9, as there were 9 cells in the row).
CPPUNIT_ASSERT_MESSAGE("A1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
CPPUNIT_ASSERT_MESSAGE("B1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position);
void Test::testN773061()
{
// xray ThisComponent.TextFrames(0).LeftBorderDistance
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "LeftBorderDistance" ), sal_Int32( 0 ));
CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "TopBorderDistance" ), sal_Int32( 0 ));
CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "RightBorderDistance" ), sal_Int32( 0 ));
CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "BottomBorderDistance" ), sal_Int32( 0 ));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
......
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