diff options
author | László Németh <nemeth@numbertext.org> | 2020-12-04 20:47:04 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-12-07 12:57:46 +0100 |
commit | f319d6b543c2367546bc80d138e56ed03731e265 (patch) | |
tree | d69c2b460d5c5760b1503c9d622ba04ef2dd1c55 | |
parent | fbc909364c9c3964c1354169527e68446905c39b (diff) |
tdf#138612 DOCX import: fix lost part of split table cell
by removing unnecessary rewriting of cell properties
during import of w:tblPrEx.
Regression from commit da8ea444b004a0be36964ae9a778f73e752b2673
(tdf#133455 DOCX import: fix table border regression)
Change-Id: I93ce36991437644db439c8cf02e1a8503fbdfba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107239
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf138612.docx | bin | 0 -> 36179 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 17 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TablePropertiesHandler.hxx | 3 |
3 files changed, 17 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138612.docx b/sw/qa/extras/ooxmlexport/data/tdf138612.docx Binary files differnew file mode 100644 index 000000000000..dd116044b56e --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf138612.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index de4b340a6142..95f60995f933 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -732,6 +732,23 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133455, "tdf133455.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']", 0); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138612, "tdf138612.docx") +{ + xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); + + // Row 5 Col 1 - vertically merged cell + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[1]/w:tcPr/w:vMerge", "val", "restart"); + // Row 5 Col 2 - split cell + // This was w:vMerge="restart" + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[2]/w:tcPr/w:vMerge", 0); + + // Row 6 Col 1 - merged with cell in Row 5 Col 1 + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[1]/w:tcPr/w:vMerge", "val", "continue"); + // Row 6 Col 2 - split cell + // This was w:vMerge="continue" (merged with cell in Row 5 Col 2) + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge", 0); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx") { // The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden. diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx index 1bd81798c24b..6ba81cf9010f 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx @@ -76,10 +76,7 @@ private: void tableExceptionProps( TablePropertyMapPtr pProps ) { if ( m_pTableManager ) - { m_pTableManager->tableExceptionProps( pProps ); - cellProps( pProps ); - } else m_pCurrentProperties->InsertProps(pProps.get()); }; |