diff options
author | Justin Luth <justin_luth@sil.org> | 2016-12-23 13:49:19 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-04 08:43:46 +0000 |
commit | 1a58cdf8af1aba52ce0a376666dd7d742234d7cf (patch) | |
tree | 4aaaed2c8da29e81be444ecde2c2ae5b58be785d /sw | |
parent | 61aa97c1be23398acb7e9160763b621f63c13d88 (diff) |
tdf#99616 writerfilter: hideMark shouldn't force min size
hideMark in Word does not force the minimum possible row size,
but simply ignores any cell marker styles/sizings. So an empty row
then takes on the "at least" size defined for the row.
Change-Id: Id24a52f2a360a5040c2eed5c17757c0d32d03520
Reviewed-on: https://gerrit.libreoffice.org/32380
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx | bin | 0 -> 11742 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx b/sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx Binary files differnew file mode 100755 index 000000000000..825108a3cb0d --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index 7e0b03ffe026..706a359fb58e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -1737,6 +1737,19 @@ DECLARE_OOXMLEXPORT_TEST(testHidemark, "hidemark.docx") CPPUNIT_ASSERT_MESSAGE("table size is less than 7000?",sal_Int32(7000) > getProperty<sal_Int32>(xTextTable, "Width")); } +DECLARE_OOXMLEXPORT_TEST(testHidemarkb, "tdf99616_hidemarkb.docx") +{ + // Problem was that the smallest possible height was forced, not the min specified size. + 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 .5cm + CPPUNIT_ASSERT_EQUAL(sal_Int64(501), 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")); +} + DECLARE_OOXMLEXPORT_TEST(testBnc891663, "bnc891663.docx") { // The image should be inside a cell, so the text in the following cell should be below it. |