sw/qa/extras/ww8export/data/tdf49102_mergedCellNumbering.doc |binary sw/qa/extras/ww8export/ww8export2.cxx | 4 ++ sw/source/filter/ww8/ww8par2.cxx | 15 +++++++++++ 3 files changed, 19 insertions(+)
New commits: commit 4b12246a6c2285a9d4fe20e665028b6f8a68b018 Author: Justin Luth <justin_l...@sil.org> Date: Fri Dec 30 17:30:56 2016 +0300 tdf#49102 - remove list numbering from merged cells The hidden cells in a vertical merge retained their numbered list properties. It is possible in LO's UI to create a table similar to this by numbering the cells first, and then merging them. So this behaviour also needs to be prevented in a future patch. Change-Id: I0c3ae50aada3fa03e624b1d4212b2776b7559036 Reviewed-on: https://gerrit.libreoffice.org/32512 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Justin Luth <justin_l...@sil.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/qa/extras/ww8export/data/tdf49102_mergedCellNumbering.doc b/sw/qa/extras/ww8export/data/tdf49102_mergedCellNumbering.doc new file mode 100755 index 0000000..747136d Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf49102_mergedCellNumbering.doc differ diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index f2f5aa7..6f72cd8 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -33,6 +33,10 @@ DECLARE_WW8EXPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPaddi CPPUNIT_ASSERT_EQUAL( 3, getPages() ); } +DECLARE_WW8EXPORT_TEST(testTdf49102_mergedCellNumbering, "tdf49102_mergedCellNumbering.doc") +{ + CPPUNIT_ASSERT_EQUAL( OUString("2."), parseDump("/root/page/body/tab/row[4]/cell/txt/Special[@nType='POR_NUMBER']", "rText") ); +} DECLARE_WW8EXPORT_TEST(testTdf89377, "tdf89377_tableWithBreakBeforeParaStyle.doc") { diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 32290d9..bc1c24e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2592,6 +2592,21 @@ void WW8TabDesc::MergeCells() } } + // remove numbering from cells that will be disabled in the merge + if( rCell.bVertMerge && !rCell.bVertRestart ) + { + SwPaM aPam( *m_pTabBox->GetSttNd(), 0 ); + aPam.GetPoint()->nNode++; + SwTextNode* pNd = aPam.GetNode().GetTextNode(); + while( pNd ) + { + pNd->SetCountedInList( false ); + + aPam.GetPoint()->nNode++; + pNd = aPam.GetNode().GetTextNode(); + } + } + if (bMerge) { short nX1 = m_pActBand->nCenter[ i ]; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits