From d1278ef4849661b9ae0eb7aaf4d74fbf91ccaf11 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 14 Aug 2014 13:54:18 +0200 Subject: bnc#865381 DOCX import: handle table cell property Change-Id: Id0dd34110376168e34df4956869608895b86abfe --- sw/qa/extras/ooxmlimport/data/hidemark.docx | Bin 0 -> 12816 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 sw/qa/extras/ooxmlimport/data/hidemark.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlimport/data/hidemark.docx b/sw/qa/extras/ooxmlimport/data/hidemark.docx new file mode 100644 index 000000000000..4a273d6039bb Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/hidemark.docx differ 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 cell property was ignored. + uno::Reference xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY); + uno::Reference xTextTable(xTables->getByIndex(0), uno::UNO_QUERY); + uno::Reference xTableRows(xTextTable->getRows(), uno::UNO_QUERY); + // Height should be minimal + CPPUNIT_ASSERT_EQUAL(convertTwipToMm100(MINLAY), getProperty(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(xTableRows->getByIndex(1), "SizeType")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3