configure.ac | 2 +- sw/qa/extras/ww8import/data/tdf106799.doc |binary sw/qa/extras/ww8import/ww8import.cxx | 15 +++++++++++++++ sw/source/filter/ww8/ww8par.cxx | 4 +++- 4 files changed, 19 insertions(+), 2 deletions(-)
New commits: commit edec1e5e9c3ce19408e71eb71404ece2e55f83b6 Author: Andras Timar <andras.ti...@collabora.com> Date: Mon Mar 27 21:13:32 2017 +0200 Bump version to 5.1-24 Change-Id: I8fc85d5189c9ee8bddd1a83fa57c1f4fe096e5df diff --git a/configure.ac b/configure.ac index aa6a23245e49..2ca0f717ab72 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[5.1.10.23],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[5.1.10.24],[],[],[https://collaboraoffice.com/]) AC_PREREQ([2.59]) commit 334b06f5a44f9a5a4e08a8c9c8929a75c363fd96 Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Mon Mar 27 17:35:45 2017 +0300 tdf#106799 WW8: Accept TTP Mark without Cell Mark Paragraph mark of inner table (0x0D) sometimes has sprmPFInnerTtp, but no sprmPFInnerTableCell. This still counts as cell end (at least, MS Word treats it that way). Unit test included. Reviewed-on: https://gerrit.libreoffice.org/35763 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 59af9cbbccee600408c89e872d548d153523ab1f) Change-Id: I5589cdd486c03ca4567d61882826cc7c245a40c9 diff --git a/sw/qa/extras/ww8import/data/tdf106799.doc b/sw/qa/extras/ww8import/data/tdf106799.doc new file mode 100644 index 000000000000..0637e8cce692 Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf106799.doc differ diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 3220a523740a..a3c809cd2dac 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -562,6 +562,21 @@ DECLARE_WW8IMPORT_TEST(testTdf106291, "tdf106291.doc") CPPUNIT_ASSERT(cellHeight.toInt32() > 200); // height might depend on font size } +DECLARE_WW8IMPORT_TEST(testTdf106799, "tdf106799.doc") +{ + sal_Int32 nCellWidths[3][4] = { { 9530, 0, 0, 0 },{ 2382, 2382, 2382, 2384 },{ 2382, 2382, 2382, 2384 } }; + sal_Int32 nCellTxtLns[3][4] = { { 1, 0, 0, 0 },{ 1, 0, 0, 0},{ 1, 1, 1, 1 } }; + // Table was distorted because of missing sprmPFInnerTableCell at paragraph marks (0x0D) with sprmPFInnerTtp + for (sal_Int32 nRow : { 0, 1, 2 }) + for (sal_Int32 nCell : { 0, 1, 2, 3 }) + { + OString cellXPath("/root/page/body/tab/row/cell/tab/row[" + OString::number(nRow+1) + "]/cell[" + OString::number(nCell+1) + "]/"); + CPPUNIT_ASSERT_EQUAL_MESSAGE(cellXPath.getStr(), nCellWidths[nRow][nCell], parseDump(cellXPath + "infos/bounds", "width").toInt32()); + if (nCellTxtLns[nRow][nCell] != 0) + CPPUNIT_ASSERT_EQUAL_MESSAGE(cellXPath.getStr(), nCellTxtLns[nRow][nCell], parseDump(cellXPath + "txt/Text", "nLength").toInt32()); + } +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 71e1acabd799..4ffe803ea3bf 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3679,7 +3679,9 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) bParaMark = false; } } - else if (m_bWasTabCellEnd) + // tdf#106799: We expect TTP marks to be also cell marks, + // but sometimes sprmPFInnerTtp comes without sprmPFInnerTableCell + else if (m_bWasTabCellEnd || m_bWasTabRowEnd) { TabCellEnd(); bParaMark = false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits