summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par6.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/ww8par6.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 621a7060b4e7..227fe8937a0f 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -496,8 +496,17 @@ void wwSectionManager::GetPageULData(const wwSection &rSection,
nWWUp += rSection.maSep.dzaGutter;
}
- rData.bHasHeader = (rSection.maSep.grpfIhdt &
- (WW8_HEADER_EVEN | WW8_HEADER_ODD | WW8_HEADER_FIRST)) != 0;
+ /* Check whether this section has headers / footers */
+ sal_uInt16 nHeaderMask = WW8_HEADER_EVEN | WW8_HEADER_ODD;
+ sal_uInt16 nFooterMask = WW8_HEADER_EVEN | WW8_HEADER_ODD;
+ /* Ignore the presence of a first-page header/footer unless it is enabled */
+ if( rSection.HasTitlePage() )
+ {
+ nHeaderMask |= WW8_HEADER_FIRST;
+ nFooterMask |= WW8_FOOTER_FIRST;
+ }
+ rData.bHasHeader = (rSection.maSep.grpfIhdt & nHeaderMask) != 0;
+ rData.bHasFooter = (rSection.maSep.grpfIhdt & nFooterMask) != 0;
if( rData.bHasHeader )
{
@@ -518,9 +527,6 @@ void wwSectionManager::GetPageULData(const wwSection &rSection,
else // no header -> just use Up as-is
rData.nSwUp = std::abs(nWWUp);
- rData.bHasFooter = (rSection.maSep.grpfIhdt &
- (WW8_FOOTER_EVEN | WW8_FOOTER_ODD | WW8_FOOTER_FIRST)) != 0;
-
if( rData.bHasFooter )
{
rData.nSwLo = nWWFBot; // footer -> convert