Kaydet (Commit) 0c3f61fb authored tarafından Justin Luth's avatar Justin Luth

tdf#104061 MSWordExportBase: tables shouldn't prevent sectionbreak

This also reverts temporary commit ba2c31da
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/32936Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 1c27286b
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment