Description: If a Frame's Position->Vertical property is set to "Top to Base line" then the *bottom* of the frame is aligned with the bottom of adjacent characters outside the frame; and if it is set to "Bottom of Base line" then the *top* of the frame is aligned with the bottom of adjacent characters [which I assume is the Base line]. So these settings might be reversed in the Properties dialog (or if correct in the dialog then implemented backwards). Please see attached screen shot. The frame with green background has Vertial Position set to "Top to Baseline". The pink frame has it "Bottom to Baseline". As you can see, the bottom of the green frame and top of the pink frame are perfectly aligned, and lined up with the bottom of adjacent characters (their baseline). Steps to Reproduce: (Or just open the attached frame_align_demo.odt file) 1. In Writer, enter some text 2. Select a few characters, then Insert->Frame->Frame... 3. Set Anchor to "as Character" 4. Set Position-Vertical "Top to Base line" (optional) under Area, set a distinctive background color 5. Click OK 6. Repeat to create another frame but set Position-Vertical "Bottom to Base line" Actual Results: The frame with "Top to Baseline" has it's *bottom* aligned with the baseline of adjacent text outside the frame; and the frame with "Bottom to Baseline" has it's *top* aligned that way. Expected Results: Seems refersed Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 78d9d0d8dccb6fd8952435b8a13d525c7606f467 CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Created attachment 189392 [details] screenshot.png
Created attachment 189393 [details] frame_align_demo.odt
Inside the .odt file the style used by the the green frame with setting "Top to baseline" looks correct: style:style { att={'style:family' => 'graphic','style:name' => 'fr4','style:parent-style-name' => 'runon'} style:graphic-properties { att={ 'draw:fill' => 'solid','draw:fill-color' => '#dee7e5', 'draw:wrap-influence-on-position' => 'once-concurrent', 'fo:background-color' => '#dee7e5','loext:allow-overlap' => 'false', 'style:vertical-pos' => 'top','style:vertical-rel' => 'baseline' } } } style:vertial-pos is 'top' which seems correct (the other frame as this property set to 'bottom', again as expected). This makes me wonder if LibreOffice implements the style:vertical-pos property backwards...
I'm attaching a new demo and screenshot which shows all three settings: "Bottom to Baseline" "Center to Baseline" "Top to Baseline" and it is clear that "Top" and "Bottom" are reversed.
Created attachment 189453 [details] newdemo.odt
Created attachment 189454 [details] newdemo.png (screenshot)
I confirm the current behaviour, but for me it is the expected one. Perhaps there is a "linguistic" problem. For me vertical position "Top To Baseline" has the meaning like "Top of the Baseline" (that's also in line with preview in frame dialog. But you Jim perhaps understand it like "With the Top to the Baseline". Is my interpretation correct, Jim? => NEEDINFO
I agree with Dieter, and our understanding matches the documentation: "The selection specifies the position of the object relative to the region or reference line selected in the to dropdown list." https://help.libreoffice.org/24.2/en-US/text/swriter/01/05060100.html The key here is that the field defines the *position of the object relative to the baseline*, not the *part of the object that should align with the baseline*. I'll close as "not a bug" but please let us know if you think the dialog can be somehow improved to clear that confusion. (...maybe "Below" and "Above" are better terms? But they should only be used when Baseline is selected...)
Hi, Could you elaborate on the meaning of "Top(Bottom) to Base Line"? I accept that we have linguistic differences, but I would like help to understand how you interpret these words. For example, I was confused when you explained "Top To Baseline" has the meaning like "Top of the Baseline" because a Baseline is a horizontal line, not a rectangle, so has no distinct Top and Bottom. Is not the Frame the only thing with a distinct Top and Bottom to align with?
...(continuing)... "the field defines the *position of the object relative to the baseline*, not the *part of the object that should align with the baseline*" This also confuses me because how does "Top" or "Bottom" specify a *position* relative to some other position (i.e. the Baseline)? Maybe this would help me: Is "Baseline" the Baseline of the surrounding text, or the Baseline of text contained in a TextBox inside the Frame? Please look again at https://bugs.documentfoundation.org/attachment.cgi?id=189454, where it seems clear that the Baseline of the surrounding text is what is meant by "Baseline", and when set to "Top" means the top of...what?
I have to correct my opinion. Jim, you're right. Steps: 1. Open 189453 2. Select frame "Button to Baseline" -> Context menu -> Align objects 3. Click "Baseline at top" (icon shows expected result) Actual result Baseline is at bottom Expected result Baseline is at top Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: ff9c8b62c1015972e9e89799832fa3690dcd46b4 CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: en-US (de_DE); UI: en-GB Calc: CL threaded and in Version: 7.2.7.2 (x64) / LibreOffice Community Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2 CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: de-DE Calc: CL and in Version: 5.4.7.2 (x64) Build-ID: c838ef25c16710f8838b1faec480ebba495259d0 CPU-Threads: 4; BS: Windows 6.19; UI-Render: GL; Gebietsschema: de-DE (de_DE); Calc: CL
(In reply to Jim Avera from comment #3) > 'style:vertical-pos' => 'top','style:vertical-rel' => 'baseline' > > style:vertial-pos is 'top' which seems correct (the other frame as this > property set to 'bottom', again as expected). > > This makes me wonder if LibreOffice implements the style:vertical-pos > property backwards... Thanks for looking into this, I should have looked closer here. Looking at the ODF specs[1]: "The style:vertical-pos attribute specifies the vertical alignment of a frame relative to a specific area." [...] "top: the top of the frame is aligned with the reference area." and "The style:vertical-rel attribute specifies the area against which the vertical position of a frame is positioned." [...] "baseline: vertical position of frame positioned relative to a baseline." So according to the spec, your example should have "the top of the frame aligned with the reference baseline". I think you are right that this is switched around in LibreOffice and not just a language thing. But Regina, can you please have a look if we are interpreting right? I see you already mentioned an issue with those properties in bug 150804. Same issue in OOo 3.3. [1]: https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1420242_253892949
Compared to the spec "top" and "bottom" are exchanged in LO. In the spec "top" refers to the top edge of the frame. The problem is, that there are no applications to compare, at least I do not know one. Word, TextMaker, Google Docs and OnlyOffice are not able to render different vertical positions.