[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/qa writerfilter/source

Justin Luth justin_luth at sil.org
Wed Dec 14 05:16:44 UTC 2016


 sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx                  |    6 ++++++
 writerfilter/source/dmapper/DomainMapper.cxx               |    3 ++-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit cc2824e3ab600e1863f52899bc2149694bd44972
Author: Justin Luth <justin_luth at sil.org>
Date:   Tue Dec 6 19:20:51 2016 +0300

    tdf#104420 writerfilter: no dummy para in headers
    
    Change-Id: I22bf2d85e01ce5a084babdc07a11ada0790f4933
    Reviewed-on: https://gerrit.libreoffice.org/31710
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit b71c09a31c245f2fc1e1ff3760206bb121869633)
    Reviewed-on: https://gerrit.libreoffice.org/31988

diff --git a/sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx b/sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx
new file mode 100755
index 0000000..b5d9988
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 2206afe..5487a07 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -55,6 +55,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89377, "tdf89377_tableWithBreakBeforeParaStyle.d
     CPPUNIT_ASSERT_EQUAL( 3, getPages() );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf104420, "tdf104420_lostParagraph.docx")
+{
+    // the add/remove dummy paragraph was losing an entire header and paragraph
+    CPPUNIT_ASSERT_EQUAL( 2, getPages() );
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPadding.odt")
 {
     // the page style's borderless padding should force this to 3 pages, not 1
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 439ecf2..929671a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2547,7 +2547,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
          * and remove it again when lcl_endSectionGroup is called
          */
         if(m_pImpl->m_nTableDepth == 0 && m_pImpl->GetIsFirstParagraphInSection()
-                && !m_pImpl->GetIsDummyParaAddedForTableInSection() && !m_pImpl->GetIsTextFrameInserted())
+                && !m_pImpl->GetIsDummyParaAddedForTableInSection() && !m_pImpl->GetIsTextFrameInserted()
+                && !IsInHeaderFooter())
         {
             m_pImpl->AddDummyParaForTableInSection();
         }


More information about the Libreoffice-commits mailing list