Bug 112443 - FILEOPEN,DOCX Document footer shows off-page content (comment 8)
Summary: FILEOPEN,DOCX Document footer shows off-page content (comment 8)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:6.0.0.2
Keywords: filter:docx
Depends on:
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2017-09-17 12:39 UTC by Oliver Sander
Modified: 2018-03-06 15:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The file that triggers the problem (64.54 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-09-17 12:40 UTC, Oliver Sander
Details
The file as rendered by LO 5.4.1.2 (50.87 KB, application/pdf)
2017-09-17 12:41 UTC, Oliver Sander
Details
minimial docx file causing the bug (26.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-09-28 12:01 UTC, Patrick Jaap
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Sander 2017-09-17 12:39:22 UTC
Description:
For the attached docx document, LO renders the footer twice: once at the correct position, and once a little bit on the side.  I'll attach a pdf that shows how my 5.4.1.2 release renders the document, but I see the same behavior with a nightly build from September 16.

Actual Results:  
 

Expected Results:
 


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Comment 1 Oliver Sander 2017-09-17 12:40:54 UTC
Created attachment 136298 [details]
The file that triggers the problem
Comment 2 Oliver Sander 2017-09-17 12:41:25 UTC
Created attachment 136299 [details]
The file as rendered by LO 5.4.1.2
Comment 3 Oliver Sander 2017-09-17 12:56:28 UTC
Giving it a second look, the second footer is not identical to the first one.  Rather, it seems to be an old version or a footer template.
Comment 4 Xisco Faulí 2017-09-17 20:47:09 UTC
Confirmed in 

Version: 6.0.0.0.alpha0+
Build ID: 83288332f7ced698610739419989c464256f1c4d
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 Patrick Jaap 2017-09-28 12:01:19 UTC
Created attachment 136582 [details]
minimial docx file causing the bug

A minimal version of the docx file.

In MSO it rendered completely blank. In current master of LO the "false" footer is still there. It is located in the footer3.xml and looks basically like a normal footer...
Comment 6 Patrick Jaap 2017-09-28 13:46:46 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2017-09-28 13:49:52 UTC Comment hidden (obsolete)
Comment 8 Patrick Jaap 2017-10-10 10:53:46 UTC
hi, me again.

I was completely on the wrong way. Both LO and MSO try to render the same footer (footer3.xml). The misplaced textboxes are anchored in the footer, but they have a relative vertical distance of about one entire page. Thus, their absolute position would be far below the page border.

LO now cuts the distance in sw/objectpositioning to make the boxes fit on the page (therefore they are located a the very bottom). 

MSO seems to ignore the boxes and makes them unreachable for the user.
Comment 9 Justin L 2017-10-13 06:32:12 UTC
(In reply to Patrick Jaap from comment #8)
> The misplaced textboxes are anchored in the footer,
> but they have a relative vertical distance of about one entire page. Thus,
> their absolute position would be far below the page border.
> MSO seems to ignore the boxes and makes them unreachable for the user.

LibreOffice shows the footer content from the minimal test in comment 5 as far back as I can go in bibisect43all - 3.5.

My personal opinion is that it is good for lost "junk" to become visible so that it can be cleaned up and removed. I'm not interested in this particular bug.
Comment 10 Oliver Sander 2017-10-13 08:05:52 UTC Comment hidden (no-value)
Comment 11 Patrick Jaap 2017-10-26 14:02:54 UTC
I have a patch on gerrit
https://gerrit.libreoffice.org/#/c/43313/
which actually resolves this issue. But I need some feedback since it is just an idea. I want to block off-page content if a file is loaded and only allow adjusting the position of text boxes if I am editing the file.
Comment 12 Commit Notification 2017-12-11 14:40:35 UTC
Patrick Jaap committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8d62b79f168180c6992eb483ec864d473050635f

tdf#112443 disable off-page content positioning

It will be available in 6.1.0.

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 13 Oliver Sander 2017-12-13 11:23:35 UTC
I confirm that the issue is fixed.  Many thanks to all!

Can this be backported to the 6.0 branch?
Comment 14 Commit Notification 2018-01-04 09:20:06 UTC
Patrick Jaap committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=529924a29ce6f688337f91de9dcf1aa9869e91ad&h=libreoffice-6-0

tdf#112443 disable off-page content positioning

It will be available in 6.0.0.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 15 Patrick Jaap 2018-01-11 11:55:01 UTC
This is fixed.