Kaydet (Commit) 50c0ce4b authored tarafından Miklos Vajna's avatar Miklos Vajna

testcase for 6718482c

Change-Id: I32643128598e584076af41d0e4a2ceb58817a4d7
üst 584322cb
...@@ -123,6 +123,7 @@ public: ...@@ -123,6 +123,7 @@ public:
void testToolsLineNumbering(); void testToolsLineNumbering();
void testFdo60922(); void testFdo60922();
void testFdo59273(); void testFdo59273();
void testTableWidth();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT) #if !defined(MACOSX) && !defined(WNT)
...@@ -197,6 +198,7 @@ void Test::run() ...@@ -197,6 +198,7 @@ void Test::run()
{"tools-line-numbering.docx", &Test::testToolsLineNumbering}, {"tools-line-numbering.docx", &Test::testToolsLineNumbering},
{"fdo60922.docx", &Test::testFdo60922}, {"fdo60922.docx", &Test::testFdo60922},
{"fdo59273.docx", &Test::testFdo59273}, {"fdo59273.docx", &Test::testFdo59273},
{"table_width.docx", &Test::testTableWidth},
}; };
header(); header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
...@@ -1300,6 +1302,14 @@ void Test::testFdo59273() ...@@ -1300,6 +1302,14 @@ void Test::testFdo59273()
CPPUNIT_ASSERT_EQUAL(sal_Int16(7499), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position); CPPUNIT_ASSERT_EQUAL(sal_Int16(7499), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position);
} }
void Test::testTableWidth()
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
// Relative width wasn't recognized during import.
CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(xTables->getByIndex(0), "IsWidthRelative")));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
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