diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf140597.docx | bin | 0 -> 13966 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 13 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TableManager.hxx | 11 |
3 files changed, 23 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140597.docx b/sw/qa/extras/ooxmlexport/data/tdf140597.docx Binary files differnew file mode 100644 index 000000000000..36db7d9bea2b --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf140597.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 95f60995f933..404db9c59ef9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -749,6 +749,19 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138612, "tdf138612.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge", 0); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140597, "tdf140597.docx") +{ + xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); + + // There were missing tblPrEx table exception borders + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:top"); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:start"); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:top"); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:start"); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:top"); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:start"); +} + 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/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx index 2dcf679e135f..3bae3223d72a 100644 --- a/writerfilter/source/dmapper/TableManager.hxx +++ b/writerfilter/source/dmapper/TableManager.hxx @@ -112,7 +112,14 @@ class TableManager : public virtual SvRefBase void resetCellProps() { - mpCellProps = getTableExceptionProps(); + // copy tblPrEx table exception properties, if they exist + if (getTableExceptionProps().is()) + { + mpCellProps = new TablePropertyMap; + mpCellProps->InsertProps(getTableExceptionProps().get()); + } + else + mpCellProps.clear(); } void setCellProps(TablePropertyMapPtr pProps) @@ -147,6 +154,8 @@ class TableManager : public virtual SvRefBase void setTableExceptionProps(TablePropertyMapPtr pProps) { mpTableExceptionProps = pProps; + // set table exception properties of the first cell + resetCellProps(); } const TablePropertyMapPtr& getTableExceptionProps() const |