Bug 157164 - Frame > Position and Size > Vertical Position preview does not show red line for baseline anymore
Summary: Frame > Position and Size > Vertical Position preview does not show red line ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0 target:7.6.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Frame-Dialog
  Show dependency treegraph
 
Reported: 2023-09-09 03:29 UTC by Jim Avera
Modified: 2023-10-06 13:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
noredline.odt demo document (11.58 KB, application/vnd.oasis.opendocument.text)
2023-09-09 03:30 UTC, Jim Avera
Details
screenshot (73.24 KB, image/png)
2023-09-09 03:30 UTC, Jim Avera
Details
Screenshot showing red box but not baseline (105.72 KB, image/png)
2023-10-04 23:45 UTC, Jim Avera
Details
Screenshot showing red box but no Baseline (70.43 KB, image/png)
2023-10-04 23:48 UTC, Jim Avera
Details
noredline_alt2.odt (a different test case which shows rectangle initially) (11.73 KB, application/vnd.oasis.opendocument.text)
2023-10-05 18:34 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2023-09-09 03:29:26 UTC
Description:
See the last paragraph in docs at https://help.libreoffice.org/latest/en-US/text/swriter/01/05060100.html

The frame properties "Vertical Position" preview should (the doc says) display a red line showing the reference point when anchored "as character".   I'm guesing this line should be at the baseline of the sample text, since the baseline is the reference point when anchored "as character".

However there's no red line, but the green rectangle which applies to other kinds of anchors (other than "as character").

Steps to Reproduce:
1. Open attached "noredline.odt"
2. Select the frame; rightclick-Properties

Actual Results:
The preview shows a green rectangle even though Anchor is "As character"

Expected Results:
Should agree with the documentation (if the code is correct, please update docs)


Reproducible: Always


User Profile Reset: No

Additional Info:
The behavior is 7.5.5.2 is the same as in 24.2alpha (master)
Comment 1 Jim Avera 2023-09-09 03:30:02 UTC
Created attachment 189455 [details]
noredline.odt demo document
Comment 2 Jim Avera 2023-09-09 03:30:24 UTC
Created attachment 189456 [details]
screenshot
Comment 3 Jim Avera 2023-09-09 03:34:23 UTC
That wasn't quite right.  The docs say:
  
  "The green rectangle represents the selected object and the red rectangle represents the alignment reference point. If you anchor the object as a character, the reference rectangle changes to a red line."

Actual behavior: Nothing is shown in red.  There is a grey box floating in the middle which I don't understand, and there is a green rectangle which moves when you adjust the Vertical Position offset.   There is no display of where the reference baseline is.
Comment 4 Stéphane Guillou (stragu) 2023-09-27 21:51:33 UTC
Thank you for the report, Jim!
Seems we lost the red line in version 7.4.

Bibisected with linux-64-7.4 repo to first bad commit 1579738cb8c7d4928f9e887ea6641f21e2921333 which points to core commit:

commit f510ea2d7962a4325055c6380a0032331b4e87cf
author	Noel Grandin Wed Jan 12 11:49:35 2022 +0200
committer	Noel Grandin Wed Jan 12 14:06:28 2022 +0100
don't bother trying to draw stuff which is effectively invisible
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128312

Noel, can you please have a look?

Repro in recent master:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2902ab24ecc5ffbf4907ea83b2028508b9de6364
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 5 Commit Notification 2023-10-02 13:38:53 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b2ae79edde95f485e381741f816d45248798778

tdf#157164 Vertical Position preview does not show red line for baseline

It will be available in 24.2.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2023-10-03 09:53:58 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/375258bd740f6193b7756c086c7fd08985e22e84

tdf#157164 Vertical Position preview does not show red line for baseline

It will be available in 7.6.3.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Stéphane Guillou (stragu) 2023-10-04 16:41:01 UTC
Thanks Noel, verified the fix in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f95c3994f0b6a82a3bc2ddfb68822b74479ae185
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 8 Jim Avera 2023-10-04 23:40:29 UTC
DIS-CONFIRMING!  I downloaded 7.6.3 daily -- the build page says it includes Noel's commit 375258b.

I see only a red *rectangle* around the whole text; no Baseline is shown in any color.  

(Baseline means the vertical position of the bottom of characters which have no descender, as shown at https://en.wikipedia.org/wiki/Baseline_(typography)#/media/File:Typography_Line_Terms.svg)
Comment 9 Jim Avera 2023-10-04 23:45:13 UTC
Created attachment 190022 [details]
Screenshot showing red box but not baseline
Comment 10 Jim Avera 2023-10-04 23:48:20 UTC
Created attachment 190023 [details]
Screenshot showing red box but no Baseline
Comment 11 Stéphane Guillou (stragu) 2023-10-05 05:48:10 UTC
(In reply to Jim Avera from comment #8)
> DIS-CONFIRMING!  I downloaded 7.6.3 daily -- the build page says it includes
> Noel's commit 375258b.

What exact steps are you using?
I can see a case where a box is shown instead of a line, but that predates the regression (I can reproduce in LO 7.3):
1. Open attachment 189455 [details]
2. Open frame's Properties > Type: line is shown
3. Click on "To character"
4. Click back on "As character"

Result: a box is shown instead of a line.
But this should be reported separately, if not already reported.

Can you provide an example that is not reproducible before 7.4 alpha?
As far as I can tell, the regression is fixed in both 24.2 and 7.6.
Comment 12 Jim Avera 2023-10-05 18:34:20 UTC
Created attachment 190051 [details]
noredline_alt2.odt (a different test case which shows rectangle initially)
Comment 13 Jim Avera 2023-10-05 18:38:45 UTC Comment hidden (obsolete)
Comment 14 Jim Avera 2023-10-05 18:43:22 UTC
Ignore that.  The alt2.odt test case had Vertical Position referenced to "Character" not "Baseline", so the rectangle is correct in that case.

So I now also confirm the problem as reported is fixed.  Thank you.


P.S. What does the small grey-filled box in the middle denote?
Comment 15 Stéphane Guillou (stragu) 2023-10-06 13:39:28 UTC
Thanks for checking, Jim.

Not sure what the grey area is... maybe denoting the wrap spacing? Should probably be documented, maybe something for another ticket.