Created attachment 164266 [details]
Example file from Word with shapes aligned relative to bottom margin, anchored to header
This is followup to bug #133071
If shapes are in Word vertically aligned relative to the bottom margin now they appear correctly positioned in Writer: vertically at the top/center/bottom of the footer.
However of they are anchored not inside the document body but in its header/footer, they appear on top of each other at the bottom of the footer.
Word does not seem to make any difference based on the anchoring point, the shapes show up vertically at the top/center/bottom of the footer in all three cases.
Steps to reproduce:
1. Open attached documents
The three triangles appear at the bottom of the footer, on top of each other.
The triangles appear vertically at the top/center/bottom of the footer.
Version: 220.127.116.11.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
(nightly from 08-13)
Created attachment 164268 [details]
Example file from Word with shapes aligned relative to bottom margin, anchored to footer
Created attachment 164269 [details]
Example file from Word with shapes aligned relative to bottom margin, anchored to document body
Created attachment 164270 [details]
Documents with shapes anchored to document body or header side by side in Word
Created attachment 164271 [details]
Documents with shapes anchored to document body or header side by side in Writer
Created attachment 164272 [details]
Documents with shapes anchored to document body or footer side by side in Word
Created attachment 164273 [details]
Documents with shapes anchored to document body or footer side by side in Writer
I'm confused. I have got the request for a positioning "from" relative to "bottom margin". That is now resolved in https://issues.oasis-open.org/browse/OFFICE-4073.
That corresponds in MS Word to "Absolute position" below "Bottom Margin". That is a positioning relative to a "line" as reference.
Now you are doing something different. You do a positioning relative to an "area". I'm not against it, but you should not introduce this without taking care how this can be added to ODF.
Also the UI has to be reconsidered. "Page text area bottom" is the bottom edge of the page text area. That is the line between the areas "Page text area" and "Bottom page margin". And "Top", "Center" and "Bottom" would be relative to this line; which means "Center" to "Page text area bottom" has to put the shape so, that the bottom edge of the page text area goes through the center of the shape.
So please before going on, describe how do you want that this is defined in ODF and how the UI for it should be.
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":
tdf#135720 sw: fix PAGE_PRINT_AREA_BOTTOM alignment with footer
It will be available in 7.1.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
(In reply to Regina Henschel from comment #7)
> So please before going on, describe how do you want that this is defined in
> ODF and how the UI for it should be.
This is only a clean-up for commit d54264e34c1ccc0eaf4178ab165a843028500223
(tdf#133071 DOCX import: fix vertical alignment to bottom page margin),
which has the same problem related to standardization. Miklós' implementation
uses only "from top" alignment of bottom margin, but Word supports "top" and
"center" alignments of the area below page text are bottom.
All possible settings of Positions and size are area, not an edge. For example, "margin" means the area of the paragraph text area extended with the top margin of the paragraph (interestingly without the bottom margin of the paragraph).
Now "page text area bottom" means the area between page text area bottom and page bottom. Likely if we want full DOCX interoperability, we will need page text area top, too. You are right, we can find better names for these area, for example, "top page margin" or "bottom page margin". Thank you for your review and standardization work! If the recent ODF standard doesn't cover the recent solution, we would like to ask your help again!
Created attachment 164653 [details]
Example with image in top, center, bottom, inside, outside
There is something wrong:
A) The images are not rendered. They are visible in pdf and thumbnail, but neither in edit mode nor print preview.
B) The position "outside" touches the bottom page edge in Word, but is "top" in LO.
Tested with Version: 18.104.22.168.alpha0+ (x64)
Build ID: 5e8875780d665b7ae0fee1a053b5ce78ec513f69
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
The images are anchored to header.
It would be nice to get a better proposal next time.
The wording is a problem, because ODF uses the CSS box-model and there you have from outer to inner:
page margin: from page edge to outer border edge
border: from outer border edge to inner border edge
padding: from inner border edge to content edge
If you have a nice idea, which does not use "margin", please let me know.
Position of "outside" is wrong, see my previous comment.
The missing images I mentioned in comment#10, is a separate problem, see bug 136324.
It's ok now
Build ID: 3a22f5a589e822e7ca8bbb00e38a3aff93ed7ba5
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Created attachment 165403 [details]
the triangle looks fine now