[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sw/source

Luke Deller luke at deller.id.au
Thu Feb 14 00:41:21 PST 2013


 sw/source/filter/ww8/ww8par6.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit d2c2bd5508f331f82bb77b40587d12040752eabf
Author: Luke Deller <luke at deller.id.au>
Date:   Thu Feb 14 00:04:52 2013 +1100

    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 at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 761a68a..691b8f7 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;


More information about the Libreoffice-commits mailing list