[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - sw/qa sw/source

Justin Luth justin_luth at sil.org
Mon Jul 4 15:55:05 UTC 2016


 sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx |binary
 sw/qa/extras/odfimport/odfimport.cxx                          |    6 ++++++
 sw/source/core/layout/flowfrm.cxx                             |    2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e7cea34113baa840de61208fa56da2cf043e0297
Author: Justin Luth <justin_luth at sil.org>
Date:   Sat Jun 11 21:58:11 2016 +0300

    tdf#76322 writer: allow column breaks in headers/footers
    
    The code blocking this came in the original OpenOffice flowfrm.
    Either IsInSct() or FindFooterOrHeader() works to resolve
    this bug.  I chose FindFooterOrHeader because it seemed
    to match the existing targets (docbody, flyframe) better.
    
    Change-Id: I51fc3bdc51c76e290b47ec7b9044780e5b67136c
    Reviewed-on: https://gerrit.libreoffice.org/26208
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 121109610f9af0b294cf042c6ae5abc6fcc4f326)

diff --git a/sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx b/sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx
new file mode 100755
index 0000000..6c050ae
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index c944d44..79dae52 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -631,6 +631,12 @@ DECLARE_ODFIMPORT_TEST(testBnc800714, "bnc800714.fodt")
     CPPUNIT_ASSERT(getProperty<bool>(getParagraph(2), "ParaKeepTogether"));
 }
 
+DECLARE_ODFIMPORT_TEST(testTdf76322_columnBreakInHeader, "tdf76322_columnBreakInHeader.docx")
+{
+// column breaks were ignored. First line should start in column 2
+    CPPUNIT_ASSERT_EQUAL( OUString("Test1"), parseDump("/root/page[1]/header/section/column[2]/body/txt/text()") );
+}
+
 DECLARE_ODFIMPORT_TEST(testTdf96113, "tdf96113.odt")
 {
     // Background of the formula frame was white (0xffffff), not green.
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 0dba6fd..e148afe 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1164,7 +1164,7 @@ bool SwFlowFrame::IsColBreak( bool bAct ) const
         {
             // Determine predecessor
             const SwFrame *pPrev = m_rThis.FindPrev();
-            while( pPrev && ( ( !pPrev->IsInDocBody() && !m_rThis.IsInFly() ) ||
+            while( pPrev && ( ( !pPrev->IsInDocBody() && !m_rThis.IsInFly() && !m_rThis.FindFooterOrHeader() ) ||
                    ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) )
                     pPrev = pPrev->FindPrev();
 


More information about the Libreoffice-commits mailing list