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

Miklos Vajna vmiklos at collabora.co.uk
Tue Jul 8 06:36:20 PDT 2014


 sw/qa/extras/ooxmlexport/data/2col-header.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx       |    7 +++++++
 sw/source/filter/ww8/wrtw8nds.cxx              |    7 ++++++-
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit c4a5f8c1afd42acb52d0ae9b4d6f42f3e87364d5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jul 8 14:41:10 2014 +0200

    MSWordExportBase: fix export of header/footer in case of multiple columns
    
    Regression from 263938c4a8789d881f8e736d317b6bcc09c3bce5 (fdo#73596
    [DOCX] Multiple Columns in Index, 2014-02-13), header / footer was lost
    in multi-column section. This fixes both DOC and DOCX export.
    
    Change-Id: Icb30ec882b38853e25289299d8f829a5cf56e6d8

diff --git a/sw/qa/extras/ooxmlexport/data/2col-header.docx b/sw/qa/extras/ooxmlexport/data/2col-header.docx
new file mode 100644
index 0000000..3e8f2c4
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/2col-header.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a1bf053..910fe13 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3745,6 +3745,13 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80898, "fdo80898.docx")
                 "/word/embeddings/oleObject1.doc");
 }
 
+DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
+{
+    // Header was lost on export when the document had multiple columns.
+    uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9f2af01..68e2799 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2733,10 +2733,15 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet )
     const SfxPoolItem* pI;
     if( pSet)
     {
-        bool bNoPageBreak = true;
+        bool bNoPageBreak = false;
         if ( SFX_ITEM_ON != pSet->GetItemState(RES_PAGEDESC, true, &pI)
             || 0 == ((SwFmtPageDesc*)pI)->GetPageDesc() )
         {
+            bNoPageBreak = true;
+        }
+
+        if (bNoPageBreak)
+        {
             if (SFX_ITEM_ON != pSet->GetItemState(RES_BREAK, true, &pI))
                 bNoPageBreak = true;
             else


More information about the Libreoffice-commits mailing list