Kaydet (Commit) c4a5f8c1 authored tarafından Miklos Vajna's avatar Miklos Vajna

MSWordExportBase: fix export of header/footer in case of multiple columns

Regression from 263938c4 (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
üst a2b44216
......@@ -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: */
......@@ -2733,9 +2733,14 @@ 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment