diff options
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/bnc865381.docx | bin | 0 -> 19510 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 12 |
3 files changed, 18 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/bnc865381.docx b/sw/qa/extras/ooxmlimport/data/bnc865381.docx Binary files differnew file mode 100755 index 000000000000..bb125cc73095 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/bnc865381.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index bff4e1ee6f74..809e7639cfa9 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1100,6 +1100,16 @@ DECLARE_OOXMLIMPORT_TEST(testTbLrHeight, "tblr-height.docx") CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX, getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType")); } +DECLARE_OOXMLIMPORT_TEST(testBnc865381, "bnc865381.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); + uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY); + // Second row has a vertically merged cell, make sure size type is MIN in that case (otherwise B2 is not readable). + CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xTableRows->getByIndex(1), "SizeType")); +} + DECLARE_OOXMLIMPORT_TEST(testFdo53985, "fdo53985.docx") { // Unhandled excetion prevented import of the rest of the document. diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 103befa5fbea..773da178d9f4 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -346,10 +346,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue ); // We're faking a text direction, so don't allow multiple lines. - TablePropertyMapPtr pRowPropMap( new TablePropertyMap ); - pRowPropMap->Insert(PROP_SIZE_TYPE, uno::makeAny(text::SizeType::FIX)); - m_bRowSizeTypeInserted = true; - insertRowProps(pRowPropMap); + if (!getCellProps() || getCellProps()->find(PROP_VERTICAL_MERGE) == getCellProps()->end()) + { + // Though in case there will be a vertical merge, don't do this, it hides text that is supposed to be visible. + TablePropertyMapPtr pRowPropMap( new TablePropertyMap ); + pRowPropMap->Insert(PROP_SIZE_TYPE, uno::makeAny(text::SizeType::FIX)); + m_bRowSizeTypeInserted = true; + insertRowProps(pRowPropMap); + } } break; case 4: // lrTbV |