[Libreoffice-commits] core.git: sw/qa sw/source

Justin Luth justin_luth at sil.org
Mon Jan 23 04:52:50 UTC 2017


 sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx                        |    5 +++++
 sw/source/filter/ww8/wrtw8nds.cxx                                |    6 ++----
 3 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 0c3f61fb616ce73d1e651013c455410b987d3e12
Author: Justin Luth <justin_luth at sil.org>
Date:   Tue Jan 10 12:04:00 2017 +0300

    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 at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx
new file mode 100755
index 0000000..b5d2a4f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 89bc9d9..d7cbdf7 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 f12d5c7..e4d4a24 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;


More information about the Libreoffice-commits mailing list