summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size2.docxbin0 -> 12907 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx11
3 files changed, 10 insertions, 10 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size2.docx b/sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size2.docx
new file mode 100644
index 000000000000..2125f09da790
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 39925645338e..d4d17663fdec 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1393,6 +1393,15 @@ DECLARE_OOXMLIMPORT_TEST(testTableAutoColumnFixedSize, "table-auto-column-fixed-
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(3996)), getProperty<sal_Int32>(xTextTable, "Width"));
}
+DECLARE_OOXMLIMPORT_TEST(testTableAutoColumnFixedSize2, "table-auto-column-fixed-size2.docx")
+{
+ 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);
+ // This was 17907, i.e. the sum of the width of the 3 cells (10152 twips each), which is too wide.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16891), getProperty<sal_Int32>(xTextTable, "Width"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo46361, "fdo46361.docx")
{
uno::Reference<container::XIndexAccess> xGroupShape(getShape(1), uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index cad79e9f350b..0caba6530041 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -202,16 +202,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
}
// Check whether the total width of given row is compared with the maximum value of rows (m_nMaxFixedWidth).
- if (bFixed )
- {
- // Check if total width
- if (m_nMaxFixedWidth < nRowFixedWidth)
- m_nMaxFixedWidth = nRowFixedWidth;
-
- pPropMap->setValue( TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::FIX );
- pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, m_nMaxFixedWidth );
- }
- else
+ if (!bFixed)
{
// Set the width type of table with 'Auto' and set the width value to 100(%)
pPropMap->setValue( TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::VARIABLE );