summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/2col-header.docxbin0 -> 17060 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx7
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx7
3 files changed, 13 insertions, 1 deletions
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 000000000000..3e8f2c459d5b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2col-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a1bf053c8d5e..910fe13d2e7a 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 9f2af018de7b..68e2799dc2a9 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