sw/qa/extras/ooxmlimport/data/bnc865381.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 ++++++++++ writerfilter/source/dmapper/DomainMapperTableManager.cxx | 12 ++++++++---- 3 files changed, 18 insertions(+), 4 deletions(-)
New commits: commit 48b5b7641d0df960558082e8948da8598f801264 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Mar 12 11:42:34 2014 +0100 bnc#865381 DOCX import: fix btLr cell direction when having vertical merge Change-Id: I527955671e1100f05da717bffe002131baaf0291 diff --git a/sw/qa/extras/ooxmlimport/data/bnc865381.docx b/sw/qa/extras/ooxmlimport/data/bnc865381.docx new file mode 100755 index 0000000..bb125cc Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/bnc865381.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index bff4e1e..809e763 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 103befa..773da17 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits