diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-08 14:41:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-08 15:35:47 +0200 |
commit | c4a5f8c1afd42acb52d0ae9b4d6f42f3e87364d5 (patch) | |
tree | 28ceaeb263904afb7cde9a4ef0a4b0109ac880ec /sw | |
parent | a2b44216f1b1e8d7f4f293e13b257f49ae13de61 (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/2col-header.docx | bin | 0 -> 17060 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 7 |
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 Binary files differnew file mode 100644 index 000000000000..3e8f2c459d5b --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/2col-header.docx 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 |