diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-14 13:54:18 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-14 15:55:44 +0200 |
commit | d1278ef4849661b9ae0eb7aaf4d74fbf91ccaf11 (patch) | |
tree | 07e1c063cbd015b90c8be638197ad6e15e531b07 /sw/qa | |
parent | ffdc8780eba3ec34e502b01b9a54401627ee25c5 (diff) |
bnc#865381 DOCX import: handle <w:hideMark> table cell property
Change-Id: Id0dd34110376168e34df4956869608895b86abfe
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/hidemark.docx | bin | 0 -> 12816 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/hidemark.docx b/sw/qa/extras/ooxmlimport/data/hidemark.docx Binary files differnew file mode 100644 index 000000000000..4a273d6039bb --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/hidemark.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 371b303b8ef0..7c8f13b25133 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2320,6 +2320,19 @@ DECLARE_OOXMLIMPORT_TEST(testFloatingTableSectionColumns, "floating-table-sectio CPPUNIT_ASSERT( tableWidth.toInt32() > 10000 ); } +DECLARE_OOXMLIMPORT_TEST(testHidemark, "hidemark.docx") +{ + // Problem was that <w:hideMark> cell property was ignored. + 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); + // Height should be minimal + CPPUNIT_ASSERT_EQUAL(convertTwipToMm100(MINLAY), getProperty<sal_Int64>(xTableRows->getByIndex(1), "Height")); + // Size type was MIN, should be FIX to avoid considering the end of paragraph marker. + CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX, getProperty<sal_Int16>(xTableRows->getByIndex(1), "SizeType")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |