Bug 70232 - footer affected by header left/right sharing in UI and ODF/DOCX formats
Summary: footer affected by header left/right sharing in UI and ODF/DOCX formats
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.6.2 release
Hardware: Other All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:4.3.0 target:4.2.0.2 targe...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-10-07 14:49 UTC by Justin L
Modified: 2015-07-09 14:32 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT describing and exhibiting the problem. LO4.0.4.2 properly sees two different footers, but 4.1.1.2+ sees the odd page footer for both pages. (22.70 KB, application/vnd.oasis.opendocument.text)
2013-10-07 14:49 UTC, Justin L
Details
Sample - this is a fragment from real appraisal report that our company produced. (81.79 KB, application/vnd.oasis.opendocument.text)
2014-05-08 07:56 UTC, Vitaly
Details
Mirrored page example looks OK in 4-0-4, in 4-2-5 formatting goes wrong (50.92 KB, application/vnd.oasis.opendocument.text)
2014-06-23 05:02 UTC, Vitaly
Details
Mirrored page example looks OK in 4-0-4 - pdf export with right formatting (61.02 KB, application/pdf)
2014-06-23 05:03 UTC, Vitaly
Details
Page footer displays incorrect in LO 4.3.0.4 (176.19 KB, image/png)
2014-08-06 14:35 UTC, Vitaly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2013-10-07 14:49:13 UTC
Created attachment 87240 [details]
ODT describing and exhibiting the problem.  LO4.0.4.2 properly sees two different footers, but 4.1.1.2+ sees the odd page footer for both pages.

If you create a footer with different content for left and right pages, upon re-opening the document, the odd page footer is seen on both pages.  I think the problem might be related to the header settings, since changing those will also affect the footer.

Simplest steps to reproduce:  create a two page document with a footer.  Format the footer and turn off "Same content left/right", and create two different footers. Save document as .odt or .docx.  When you open it again, you will see the same (odd page) footer on all pages.

Workarounds: 
1.) also create a header that also turns off "same content left/right"
2.) save as .doc format
3.) in certain instances, setting page properties - Page tab - Page layout: mirrored (instead of the default Right and Left) has helped - but not always.  It doesn't seem to work once the problem has already been seen.


Changing the header settings will affect the footer.   For example, so far the header has been disabled.  If you "enable" the header (but leave "same content left/right" enabled), then you will immediately see that the even footer is replaced by the odd footer.  Turning off the header will similarly "remove" the even footer.


I'm not sure when this bug was introduced, but it does not exist in 4.0.4.2.  It existed in 4.1.1.2 and still exists in 4.1.2.3. A very similar bug is https://bugs.freedesktop.org/show_bug.cgi?id=69635. I mentioned this problem as a comment already in a somewhat similar bug <a href="https://bugs.freedesktop.org/show_bug.cgi?id=68418">68418</a>, but I'm creating this new bug report since the details are different, and that report is targeting the next release instead of being a regression.  I'm marking this as somewhat important since it affects documents created with the default settings (Page format: left and right pages).
Comment 1 Cor Nouws 2013-10-10 19:52:50 UTC
jluth: thanks for the issue.
4.0.5 does it correct, 4.0.6 does it wrong.

@miklos: area in which you are active ;)

regards,
Cor
Comment 2 Michael Stahl (allotropia) 2013-10-12 00:00:37 UTC
don't have time to look at this, hope that Miklos does :)
Comment 3 Justin L 2013-11-12 10:07:16 UTC
confirming that this bug still exists in 4.1.3.2
Comment 4 Michael Stahl (allotropia) 2013-12-18 21:24:15 UTC
both "footer shared after re-load" and "footer shared after enabling header"
are regression from:

commit e1a9a348a519a69f898c9c1e6d87a5837b8267f9
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Tue Aug 20 11:50:34 2013 +0200

    fdo#66145: fix copying of header/footer when un-sharing
    
    SwDoc::CopyMasterHeader/Footer(): this could result in sharing the
    first-page header/footer with the left-page (!) when un-sharing
    via the dialog; the reason is that what actually happens here is that
    the left-page header/footer was never changed but the master one
    was copied in SwDocStyleSheet::SetItemSet(), so it sort of worked
    by accident before the first-page header/footer was added...

... although odd things are going on, what is stored in all LO 4.0.x versions
is: 

   <style:footer-left style:display="false">
    <text:p text:style-name="MP1"><text:span text:style-name="MT1">Left footer</text:span></text:p>
   </style:footer-left>

... why does it have style:display="false" in the first place?

hmm... but indeed LO 3.6.7 doesn't appear to care about that style:display="false" and will display both odd and even footer.
Comment 5 Michael Stahl (allotropia) 2013-12-18 22:31:00 UTC
the style:display="false" is now bug 72850
Comment 6 Commit Notification 2013-12-20 23:06:57 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=94c772adc2e8d8af468f3996527c84bf7704103f

fdo#70232: sw: brown paper-bag fix for header sharing mangling footers



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2013-12-20 23:38:37 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=81253d316851faa33565b212b1257505f6ce2e4b&h=libreoffice-4-2

fdo#70232: sw: brown paper-bag fix for header sharing mangling footers


It will be available in LibreOffice 4.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Stahl (allotropia) 2013-12-20 23:46:57 UTC
fixed on master
Comment 9 Commit Notification 2013-12-21 16:08:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e839c779a1a6b5a80d5e7368c457ba9620ecd6bb&h=libreoffice-4-1

fdo#70232: sw: brown paper-bag fix for header sharing mangling footers


It will be available in LibreOffice 4.1.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 sophie 2014-01-10 07:50:15 UTC
Verified with Version: 4.2.0.2
Build ID: 601a398b803303d1a40a3299729531824fe0db56 - set to Closed - Sophie
Comment 11 Vitaly 2014-05-08 07:56:49 UTC
Created attachment 98665 [details]
Sample - this is a fragment from real  appraisal report that our company produced.

Sample - this is a fragment from real 
appraisal report that our company produced.
– see page footers below

try open this file in LO 4.0.4 or AOO 4.1 and in LO 4.2.3 and pay attention to the difference.

We have to use lo 4.0.4 and not to upgrade to newer versions.
Comment 12 Vitaly 2014-05-08 07:59:24 UTC
This bug is still not fixed, it should be reopened. Functionality broken in 4.0.6 an still not working correctly in 4.2.3.

Kind regards.
Comment 13 Vitaly 2014-06-21 18:11:22 UTC
The Document Foundation announces LibreOffice 4.2.5 as ready for enterprise deployments. This bug is still present in 4.2.5 (tested on ubuntu 14.04 vanilla deb from libreoffice.org). This must be in a list of most annoying bugs and marked as high blocker. 

4.2.5 is not ready for enterprise deployments because of this bug.
Comment 14 Cor Nouws 2014-06-22 21:12:10 UTC
(In reply to comment #13)

> deployments. This bug is still present in 4.2.5 (tested on ubuntu 14.04
> vanilla deb from libreoffice.org). 


I see no difference when looking at the footers in 4.2.5.2 and 4.0.6.2 and 4.3.0.1 ...
Can you pls check those, or say me what the difference it that I miss?
thanks,
Cor
Comment 15 Vitaly 2014-06-23 05:02:59 UTC
Created attachment 101549 [details]
Mirrored page example looks OK in 4-0-4, in 4-2-5 formatting goes wrong

Also compare with pdf export from 4-0-4 (next attach)
Comment 16 Vitaly 2014-06-23 05:03:41 UTC
Created attachment 101550 [details]
Mirrored page example looks OK in 4-0-4 - pdf export with right formatting
Comment 17 Vitaly 2014-06-23 05:10:00 UTC
Cor, sorry. I don't understand, but for me also. I think something went wrong when I saved this file in newer versions of LO (than 4.0.4). 

Please, check new attachment (Mirrored page example looks OK in 4-0-4.odt), that I specially prepared from actual valuation report right now for you (with pdf export to compare with if needed). I uninstalled LO 4.0.6 and now we work only in LO 4.0.4.2 as the most stable version, so example prepared in 4.0.4.2.

Thank you.
Comment 18 Vitaly 2014-07-31 17:19:01 UTC
Please add this BUG to list of Most Annoying Bugs, because it is. It is still not fixed in LO 4.3.0.4 (Win7). Fully reproducible with "Mirrored page example looks OK in 4-0-4, in 4-2-5 formatting goes wrong" example attached.
Comment 19 Joel Madero 2014-08-05 23:32:07 UTC
This is in no way a BLOCKER - marking appropriately (please don't change it unless you are part of the QA team and know our procedures)

Normal - can prevent high quality/professional quality work
Medium
Comment 20 Cor Nouws 2014-08-06 14:26:30 UTC
Vitaly, your attachment in comment 15 opens the same for me in
  4.4.0.2, 4.0.6.2, 4.2.5.2, 4.3.0.4
And this is the same as your PDF.

So I really can see this different then as a WORKSFORME ...
Comment 21 Cor Nouws 2014-08-06 14:27:38 UTC
(In reply to comment #20)

> So I really can see this different then as a WORKSFORME ...

Ah, sorry, had been marked as fixed before. Doing so again.
Comment 22 Cor Nouws 2014-08-06 14:28:45 UTC
If you find anything Vitaly, it may probably be a different issue so pls file a new bug for that. Thanks.
Cor
Comment 23 Vitaly 2014-08-06 14:35:50 UTC
Created attachment 104155 [details]
Page footer displays incorrect in LO 4.3.0.4
Comment 24 Vitaly 2014-08-06 14:40:24 UTC
Cor, please, just to be sure, could you provide screenshot of page 6 of "Mirrored page example looks OK in 4-0-4, in 4-2-5 formatting goes wrong.odt" in the same way as I did in "Page footer displays incorrect in LO 4.3.0.4". Just not to miss this very important issue I've marked it as reopened again.
Comment 25 Cor Nouws 2014-08-06 15:02:27 UTC
@vitaly.

Hmm, I do see a difference now.
Why is it so difficult to write _here_: "on page 4 and page 6, page numbers are shown left AND right in the footer"
Makes comparing a lot easier ;)

However, this still is a different bug then the one originally filed here and fixed.
So pls file a new bug, stating:

" 
Open attached file in 4.4.0 and in a later version.
Note that in the later version on page 4 and page 6, page numbers are shown left AND right in the footer. They should only be show on the left.
"

IMO that is enough and clear.
thanks and sorry for the confusion,
Cor
Comment 26 Justin L 2014-08-06 17:04:19 UTC
Vitaly, I have looked at your .odt file.  I would suggest that you NOT put your page number inside of a frame, but just insert the page number directly into the footer.  Things will be much cleaner that way.

It looks like you have a DIFFERENT bug than the one described in this bug report.  In your "even page" footer (pages 4,6), you have TWO frames showing up in LibreOffice 4.2 (one on the left, and one on the right).  In View->Navigator Text frames, you will see a frame called Frame1.  For some reason, that Frame started to be automatically created in LO 4.2 - it isn't present in LO 4.0.  (I renamed Frame1 to something else, saved, closed, and restarted, and a third frame [Frame4] now showed up).  It looks like the frame from the odd page footer (page 5,7) is the one causing the extra frame to be created.

I was able to re-create this on a new document.  I created Bug 82256 for this.
Comment 27 Vitaly 2014-08-18 05:49:09 UTC
jluth, thank you for your help!
Everything is now working fine, thank you!
libo-43~2014-08-16_09.56.42_LibreOfficeDev_4.3.2.0.0_Win_x86.msi