Description: The attached docx file causes the following problem: There is a text box anchored in the header but positioned in the body of the document. Then, there is a date line, placed a few cm relative below the top. In LO master the position of the date is independent from the text box In MSO the position is measured relative to the text box. you can see the difference in the attached PDFs. Steps to Reproduce: 1. Open the minimal.docx in Writer Actual Results: Date is directly below the text box Expected Results: Date has a few cm distance to the text box Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Created attachment 140701 [details] minimal file causing the bug
Created attachment 140702 [details] render of current LO master
Created attachment 140703 [details] file opened in MSO 2013
This is independent of the floating box anchoring (i.e., to header, or to body content). Paragraph's top/bottom spacings don't take floating objects into account. Tested with Version: 6.0.2.1 (x64) Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89 CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: ru-RU (ru_RU); Calc: CL
(In reply to Mike Kaganski from comment #4) > This is independent of the floating box anchoring (i.e., to header, or to > body content). Paragraph's top/bottom spacings don't take floating objects > into account. That doesn't sound good. Do you have any code pointers where the (final) position of the paragraph is calculated?
This change: https://gerrit.libreoffice.org/28692 - did something related IMO.
(In reply to Mike Kaganski from comment #6) > This change: https://gerrit.libreoffice.org/28692 - did something related > IMO. Thanks for the link. For what I understood, in this code area, relations of paragraphs and their common distance is adjusted. In order to involve the consideration of fly objects, the "final" position of the fly objects has to be known. Also, I checked that the bug also occurs when the fly frame is anchored in the body and you are right. Do you have any idea where the updated calculation of the paragraph position should be placed? Thanks!
Also reproduced in Version: 4.3.0.0.alpha1+ Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
(In reply to Patrick Jaap from comment #7) > Do you have any idea where the updated calculation of the paragraph position > should be placed? Well - actually I cannot give you any more specific code pointer here - the layout code is very complex (one of most complex things in Writer); and it needs deep investigation on my side (which I cannot afford atm, sorry).
Created attachment 141188 [details] Better (simpler) test file As mentioned, the issue is independent of the header. Now, there is just a fly object and a paragraph. The paragraph should be located a few cm below the flying box.
Created attachment 141189 [details] situation in LO Writer
Created attachment 141190 [details] situation in MSO
Patrick Jaap committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d07fc485d46f431405a3f6a002f951a08c559677 tdf#116486 Consider upper margin in paragraph positioning with flys 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.
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=ae910b993f69205866f94ac8928f13f57e94560b&h=libreoffice-6-0 tdf#116486 Consider upper margin in paragraph positioning with flys It will be available in 6.0.4. 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.
A polite ping to Patrick Jaap: Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing? Thanks
I'm sorry... this bug is fixed :)