summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2013-02-14 00:04:52 +1100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-14 08:41:02 +0000
commitd2c2bd5508f331f82bb77b40587d12040752eabf (patch)
tree5979577ab849d7c440029f91f62d841dede46f55
parent3a2d996b374be25af3cf8d33ed553c33b39cb96f (diff)
minimal change to fix fdo#57908 for backport
wwSectionManager::GetPageULData adjusts margins and header/footer heights according to whether there is a header/footer or not. It could be confused into thinking there was no header/footer when indeed there was, in the case where a first page header/footer was inherited from a previous section which contained but did not actually show that header. Change-Id: I7258bdc7bd004ab2b7fb0ac9090256b4028030c4 Reviewed-on: https://gerrit.libreoffice.org/2137 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 761a68a16a6f..691b8f752e9b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1115,10 +1115,14 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.grpfIhdt = ReadBSprm(pSep, eVer <= ww::eWW2 ? 128 : 153, 0);
else if (mrReader.pHdFt)
{
- aNewSection.maSep.grpfIhdt = WW8_HEADER_ODD | WW8_FOOTER_ODD;
-
- if (aNewSection.HasTitlePage())
- aNewSection.maSep.grpfIhdt |= WW8_HEADER_FIRST | WW8_FOOTER_FIRST;
+ aNewSection.maSep.grpfIhdt = WW8_HEADER_ODD | WW8_FOOTER_ODD
+ | WW8_HEADER_FIRST | WW8_FOOTER_FIRST;
+
+ // It is possible for a first page header to be provided
+ // for this section, but not actually shown in this section. In this
+ // case (aNewSection.maSep.grpfIhdt & WW8_HEADER_FIRST) will be nonzero
+ // but aNewSection.HasTitlePage() will be false.
+ // Likewise for first page footer.
if (mrReader.pWDop->fFacingPages)
aNewSection.maSep.grpfIhdt |= WW8_HEADER_EVEN | WW8_FOOTER_EVEN;