diff options
author | Justin Luth <justin_luth@sil.org> | 2017-01-10 12:04:00 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2017-01-23 04:52:22 +0000 |
commit | 0c3f61fb616ce73d1e651013c455410b987d3e12 (patch) | |
tree | 96d68839f6874ff56d97b6fe4fa493aefa784184 /sw | |
parent | 1c27286b9d5331634c073cd3e327bd941e61bbb6 (diff) |
tdf#104061 MSWordExportBase: tables shouldn't prevent sectionbreak
This also reverts temporary commit ba2c31da9723182d2087e27a1ea0f95d9617f343
which was done to look for more pro or con proof documents. None found.
This section of code has been essentially unmodified since the initial
import in 2000, so apparently the necessity for preventing the processing
of a section if the table item contains pageBreak info is no longer valid.
My guess is that tables were excluded to fudge round-tripping better. Recent
use of dummy paragraphs during import fixes many import problems, and thus
export of the section node no longer should be avoided.
Change-Id: I28bcf618f596a1676e2e7820de192ca63bffe68f
Reviewed-on: https://gerrit.libreoffice.org/32936
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx | bin | 0 -> 103497 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 6 |
3 files changed, 7 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx Binary files differnew file mode 100755 index 000000000000..b5d2a4fee9ed --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 89bc9d9429fb..d7cbdf77030a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -67,6 +67,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPad CPPUNIT_ASSERT_EQUAL( 3, getPages() ); } +DECLARE_OOXMLEXPORT_TEST(testTdf104061_tableSectionColumns,"tdf104061_tableSectionColumns.docx") +{ + CPPUNIT_ASSERT_MESSAGE("There should be two or three pages", getPages() <= 3 ); +} + DECLARE_OOXMLEXPORT_TEST(testTdf46940_dontEquallyDistributeColumns, "tdf46940_dontEquallyDistributeColumns.docx") { uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index f12d5c7a3dfc..e4d4a247e4c9 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2885,9 +2885,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode ) // here the section break sal_uLong nRstLnNum = 0; const SfxItemSet* pSet; - if ( rNd.IsTableNode() ) - pSet = &rNd.GetTableNode()->GetTable().GetFrameFormat()->GetAttrSet(); - else if ( rNd.IsContentNode() ) + if ( rNd.IsContentNode() ) { pSet = &rNd.GetContentNode()->GetSwAttrSet(); nRstLnNum = static_cast<const SwFormatLineNumber&>(pSet->Get( @@ -2899,7 +2897,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode ) if ( pSet && NoPageBreakSection( pSet ) ) pSet = nullptr; - if ( !pSet || rNd.IsTableNode() ) + if ( !pSet ) { // new Section with no own PageDesc/-Break // -> write follow section break; |