diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-04-02 11:40:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-02 12:02:24 +0200 |
commit | c433a482cf249485e7fa3e71362b107f0eafa705 (patch) | |
tree | 5c9aad9f4bdd1461bec73610b070b167dfc81648 /sw | |
parent | f0d001a378c64ea457e722266e60c96522c72e9b (diff) |
fdo#59273 DOCX import: fix table width when w:tblW is missing
Regression from 6718482c072defe5d885030826fef5ef833732e9, put back the
table width counting in DomainMapperTableManager::endOfRowAction(), in
case the document has no explicit w:tblW token.
Change-Id: I8bd983045e1950451c9afb4f15f1deb87312524e
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f7662ffd3f94..7c4051c1d847 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1297,9 +1297,12 @@ void Test::testFdo59273() uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY); uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY); + // Was 115596 (i.e. 10 times wider than necessary), as w:tblW was missing and the importer didn't set it. + CPPUNIT_ASSERT_EQUAL(sal_Int32(12961), getProperty<sal_Int32>(xTextTable, "Width")); + uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY); // Was 9997, so the 4th column had ~zero width - CPPUNIT_ASSERT_EQUAL(sal_Int16(7499), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position); + CPPUNIT_ASSERT_EQUAL(sal_Int16(7498), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[2].Position); } void Test::testTableWidth() |