summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-14 13:54:18 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-14 15:55:44 +0200
commitd1278ef4849661b9ae0eb7aaf4d74fbf91ccaf11 (patch)
tree07e1c063cbd015b90c8be638197ad6e15e531b07 /sw
parentffdc8780eba3ec34e502b01b9a54401627ee25c5 (diff)
bnc#865381 DOCX import: handle <w:hideMark> table cell property
Change-Id: Id0dd34110376168e34df4956869608895b86abfe
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/hidemark.docxbin0 -> 12816 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
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
new file mode 100644
index 000000000000..4a273d6039bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/hidemark.docx
Binary files 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 <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();