sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 10 ++++++++++ writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 4 ++++ 3 files changed, 14 insertions(+)
New commits: commit 4b5fcd417587cfb9e6d8b61ecb037ab165eeb5b9 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Mon Aug 27 20:26:15 2018 +0300 Commit: Miklos Vajna <vmik...@collabora.co.uk> CommitDate: Mon Sep 3 10:43:36 2018 +0200 tdf#82177 ooxmlimport: ignore direct insideV/H cell borders 17.4.25 insideV (Table Cell Inside Vertical Edges Border) This element specifies the border which shall be displayed on all interior vertical edges of the current group of table cells. [Note: Although individual table cells have no concept of n internal edge, which would render this property useless in most cases, it is used to determine the cell borders to apply to a specific group of cells as part of table conditional formatting in a table style, for example, the inside vertical edges on the set of cells in the header row. end note] So, I interpret this as insideV/H having meaning only within table styles, and not when directly applied to a cell. The only documents I've seen with insideV/H directly applied to a cell seem to have been created by LO - which dumps them everywhere, redundantly. Change-Id: Ie76e9af6845cc87b0b847050b031e57d95b1a31b Reviewed-on: https://gerrit.libreoffice.org/59674 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx new file mode 100644 index 000000000000..f1f0d272d0a4 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index e5ef60d164b6..33650378b229 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -485,6 +485,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82177_outsideCellBorders, "tdf82177_outsideCellB CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "LeftBorder").LineWidth); } +DECLARE_OOXMLEXPORT_TEST(testTdf82177_insideCellBorders, "tdf82177_insideCellBorders.docx") +{ + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY ); + uno::Reference< table::XCell > xCell = xTable->getCellByName( "E4" ); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "LeftBorder").LineWidth); +} + DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx") { // This was 0, relative size of shape after bitmap was ignored. diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 94861a74175a..bf9421c3aaad 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -669,6 +669,10 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl //aCellIterator points to a PropertyMapPtr; if( *aCellIterator ) { + // remove directly applied insideV/H borders since they are meaningless without a context (tdf#82177) + (*aCellIterator)->Erase(META_PROP_VERTICAL_BORDER); + (*aCellIterator)->Erase(META_PROP_HORIZONTAL_BORDER); + pAllCellProps->InsertProps(rInfo.pTableDefaults); sal_Int32 nCellStyleMask = 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits