Bug 122744 - Changing units in paragraph style dialog's Font tab sets value to 0
Summary: Changing units in paragraph style dialog's Font tab sets value to 0
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.3.0 target:6.2.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Styles-Dialog
  Show dependency treegraph
 
Reported: 2019-01-15 20:33 UTC by Buovjaga
Modified: 2019-01-25 08:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (7.63 KB, application/vnd.oasis.opendocument.text)
2019-01-15 22:27 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2019-01-15 20:33:29 UTC
In Writer,
1. Open Styles in Sidebar
2. Right-click Heading 1 - Modify
3. In the Font tab, replace the contents of Size with pt
On Linux you have to reopen the dialog to see the change. On Windows you see 0 immediately.

Bibisected with win32-6.2 to https://gerrit.libreoffice.org/plugins/gitiles/core/+/9237a905fa5f2b67db73c15847eff203a258c2b4%5E!/

weld SvxCharNamePage

Adding Cc: to Caolán McNamara

Found while testing bug 122562 (unit conversion is broken since forever).
Comment 1 Telesto 2019-01-15 21:40:21 UTC Comment hidden (obsolete)
Comment 2 Xisco Faulí 2019-01-15 22:12:40 UTC Comment hidden (obsolete)
Comment 3 Buovjaga 2019-01-15 22:27:09 UTC Comment hidden (obsolete)
Comment 4 Dieter 2019-01-16 08:08:47 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2019-01-16 08:44:06 UTC
So just to make it clear, Xisco, Telesto, Dieter: in step 3, you delete the whole contents of Size and input "pt".
None of you mentioned the result you get instead of 0. If you get "13", you see the old behaviour.
Comment 6 Buovjaga 2019-01-16 08:48:57 UTC Comment hidden (obsolete)
Comment 7 Dieter 2019-01-16 08:57:16 UTC
(In reply to Buovjaga from comment #5)
> So just to make it clear, Xisco, Telesto, Dieter: in step 3, you delete the
> whole contents of Size and input "pt".

Thank you for clarification. Now I could reproduce it.
After input only pt I got the following result:
- Size changes to 12 pt.
- Dialog shows size of 0 pt
- Size in toolbar shows 2
Comment 8 Telesto 2019-01-16 09:45:11 UTC
Reproducible indeed :-)
Comment 9 Caolán McNamara 2019-01-16 17:16:04 UTC
"On Linux you have to reopen the dialog to see the change", it should be sufficient to put the focus into another widget, e.g. font name

overwriting with "pt" afaics never *converted* the previous value to point, just flipped the widget into point mode and fairly randomly reused the previously set value reinterpreted as points with a single decimal place.

interpreting "pt" as "0 pt" seems valid to me, but with a bug that the values are supposed to be limited to a min/max which got lost along, i.e. the 0 shouldn't be possible and should end up as 2pt, like how the toolbar one is limited.
Comment 10 Commit Notification 2019-01-17 11:59:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/edf8e2b6630ca9cf7117d9c7a25ef9d7231c5a9b%5E%21

Resolves: tdf#122744 pt/% values not limited to historic limits

It will be available in 6.3.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 11 Caolán McNamara 2019-01-17 12:00:13 UTC
we now should not end up with a 0 value, backport to 6-2 in gerrit
Comment 12 Buovjaga 2019-01-17 13:49:38 UTC
Confirmed the fix, thanks.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 276b46ee53b82f409a451ae8324c1a12e2abb38e
CPU threads: 8; OS: Linux 4.20; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 16 January 2019
Comment 13 Commit Notification 2019-01-25 08:22:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/39bee8a2e148dae05cb65778d1b21c9ea9c97dc4%5E%21

Resolves: tdf#122744 pt/% values not limited to historic limits

It will be available in 6.2.1.

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.