Bug 122562 - Allow to convert between measurement units in input fields (percentage to point etc.)
Summary: Allow to convert between measurement units in input fields (percentage to poi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Measurement-Units
  Show dependency treegraph
 
Reported: 2019-01-08 14:14 UTC by ricky.tigg
Modified: 2019-12-02 08:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Documents' samples (20.00 KB, application/x-tar)
2019-01-08 14:15 UTC, ricky.tigg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ricky.tigg 2019-01-08 14:14:35 UTC
Description:
Styles' font size values converted from point into percent or from percent into point do do match each others.

Steps to Reproduce:
1. Open both ODT documents with no content Untitled 1_point, Untitled 1_percent. Only style applied is Heading 1;
2. In in both show Sidebar (Ctrl F5) => Styles => Applied Styles; Right-click Heading 1 an select Modify; Open Font tab;
3. In Untitled 1_percent, under Font tab, Size:'s field, current value is '130%' which is matched by '18.2' points in the Writer tool bar. Replace '130%' by 'pt', click Apply.
4. In Untitled 1_point, under Font tab, Size:'s field, current value is '24 pt' which is matched by '24' points in the Writer tool bar. Replace '24 pt' by '%', click Apply, then OK.


Actual Results:
3. – value '130%' is converted into '13 pt'.
4. – value '24 pt' is converted into '240%', which is itself matched by '33.5' pt in the Writer tool bar.

Expected Results:
3. – value '130%' converted into value '18.2 pt'.
4. – value '24 pt' converted into value '172%' – (240 %/33.5 pt)*24 pt = 171.9408 %, rounded to 172 % – matching the current value in point.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.1.2.1; Build ID: 6.1.2.1-4.fc29; CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-GB (en_GB.UTF-8); Calc: group threaded
Comment 1 ricky.tigg 2019-01-08 14:15:52 UTC
Created attachment 148129 [details]
Documents' samples
Comment 2 Durgapriyanka 2019-01-08 18:53:53 UTC
Thank you for reporting the bug. I can reproduce this in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 3 Buovjaga 2019-01-15 20:03:02 UTC
Repro already in 3.3.0. There is a new bug since 6.2, though: the value changes to 0. I will report it.
Comment 4 Caolán McNamara 2019-01-16 15:13:47 UTC
there no real conversion going on currently, its just happens to reuse the numerical value it previously help and reformats it with the new unit, i.e. as % its 130 with no decimal pages, typing "pt" make it think its 130 with one decimal point, i.e. 13 pt.
Comment 5 Buovjaga 2019-01-19 21:07:24 UTC
Changing to enhancement and adjusting summary.