summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-04-18 17:05:04 +0200
committerLuboš Luňák <l.lunak@suse.cz>2011-04-19 14:19:34 +0200
commit778230d04455625b6e151c1e5e5fbd9a20abd1c5 (patch)
tree43375bd02d1e3856a8f72e0eb71684a7cf0d319d
parentimplement w:evenAndOddHeaders (and settings.xml too) (diff)
downloadcore-778230d04455625b6e151c1e5e5fbd9a20abd1c5.tar.gz
core-778230d04455625b6e151c1e5e5fbd9a20abd1c5.zip
a more reliable way to detect w:titlePg (bnc#654230)
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 83cece4881dc..7549cd367986 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1594,6 +1594,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
}
}
+ bool titlePage = false;
if ( bOutPgDscSet )
{
// es ist ein Follow gesetzt und dieser zeigt nicht auf sich
@@ -1620,10 +1621,19 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
pPdFmt = &rFollowFmt;
// has different headers/footers for the title page
- AttrOutput().SectionTitlePage();
+ titlePage = true;
}
}
+ // The code above tries to detect if this is first page headers/footers,
+ // but it doesn't work even for quite trivial testcases. As I don't actually
+ // understand that code, I'll keep it. The simple and (at least for me) reliable way
+ // to detect for first page seems to be just RES_POOLPAGE_FIRST.
+ if( pPd->GetPoolFmtId() == RES_POOLPAGE_FIRST )
+ titlePage = true;
+ if( titlePage )
+ AttrOutput().SectionTitlePage();
+
const SfxItemSet* pOldI = pISet;
AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt );
@@ -1707,7 +1717,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
if ( !pPd->IsFooterShared() || bLeftRightPgChain )
MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdLeftFmt, WW8_FOOTER_EVEN );
- if ( pPdFmt != pPdFirstPgFmt )
+ if ( titlePage )
{
// es gibt eine ErsteSeite:
MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_HEADER_FIRST );