sw/qa/extras/ww8export/data/tdf91083.odt |binary sw/qa/extras/ww8export/ww8export.cxx | 6 ++++++ sw/source/filter/ww8/wrtw8nds.cxx | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit 4ec0cc0781312d908a46dca382fae8e416753756 Author: Justin Luth <justin_l...@sil.org> Date: Fri Nov 27 06:50:18 2015 +0300 tdf#91083 - .doc: emulate table kept-with-next not splitting An .odt table can âkeep with next paragraphâ. This means that the entire table may shift to the next page and all the rows will keep together as the table attempts to stay on the same page as the following paragraph. There is no âkeep with nextâ property for .doc tables, but each row CAN be kept with the following one. When exporting an .odt file to .doc, setting each row like this will keep the text flow similar to the original .odt's layout. This commit only hinders the table from splitting - it does not actually affect keeping with the following paragraph. This functionality already exists in the code, but was broken by a variable that âchanged meaningâ almost as soon as the functionality was introduced. A followup commit will deal with "full page" situations when the kept sections are too large to fit on a single page and so the table should split instead of start a new page. The only situation that can't be handled nicely is a single table kept-with-next that spans more than one page. Such tables ought not be marked as keep-with-next anyway. Change-Id: I401772b3fa2e329b7b0890e67639cbca8c845206 Reviewed-on: https://gerrit.libreoffice.org/20217 Reviewed-by: Justin Luth <justin_l...@sil.org> Tested-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/qa/extras/ww8export/data/tdf91083.odt b/sw/qa/extras/ww8export/data/tdf91083.odt new file mode 100644 index 0000000..e4f55e5 Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf91083.odt differ diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 53a1513..1bb1236 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -591,6 +591,12 @@ DECLARE_WW8EXPORT_TEST(testCommentExport, "comment-export.odt") } } +DECLARE_WW8EXPORT_TEST(testTableKeep, "tdf91083.odt") +{ + //emulate table "keep with next" -do not split table + CPPUNIT_ASSERT_EQUAL( OUString("Row 1"), parseDump("/root/page[5]/body/tab[1]/row[2]/cell[1]/txt[1]") ); +} + DECLARE_WW8EXPORT_TEST(testMoveRange, "fdo66304-1.odt") { //the save must survive without asserting diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 05c44e3..e0958e3 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2683,7 +2683,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) } // #i76520# Emulate non-splitting tables - if ( m_bOutTable ) + if ( IsInTable() ) { const SwTableNode* pTableNode = rNode.FindTableNode();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits