Bug 111922 - Draw/Impress Sidebar with point measurement units set, incorrect Size measurements shown on Position and Size content panel--but shows correctly on properties dialog
Summary: Draw/Impress Sidebar with point measurement units set, incorrect Size measure...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.3.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6.3.5
Keywords: bibisected, bisected, regression
: 129432 129794 (view as bug list)
Depends on:
Blocks: Sidebar-Properties-PositionAndSize Measurement-Units
  Show dependency treegraph
 
Reported: 2017-08-20 01:04 UTC by Michael Epley
Modified: 2020-01-06 07:35 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Draw with measurments set to points, size measurements shown Position and Size content panel differes from dialog (54.54 KB, image/png)
2017-08-20 12:41 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Epley 2017-08-20 01:04:03 UTC
Description:
Almost any drawing object (Shapes, lines, text boxes) will report a small-ish size value (say 5.8 pts) in the properties sidebar, whereas the object properties shown in the context menu's model dialog will report the (presumably) true (and typically larger) value (say 150 pts).

Note that typing a small change in size into the sidebar's object size field will change the displayed object size and correct the displayed value. Using the value spinner associated with the size entry field will have the same effect. The object will often radically change in displayed size within the document with even a single spinner activation.



Steps to Reproduce:
0. I'm able to reproduce on a (relatively) new, clean install of Fedora 26; I have not attempted to reproduce in a pristine VM. This issue does not appear to effect all measurement types, such as millimeters/centimenters, but I did not test all measurement types.
1. Select "points" in the Tools menu >> options... >> LibreOffice Impress/Draw" >> General >> Unit of measurement; save via "OK" button.
2. (in default, new document) Create a large rectangular shape object (ie. select Rectangle from the Drawing Toolbar) in the default document; unselect this object.
3. (re)Select this Rectangle object; view the Position & Size in the sidebar's properties view.
4. Also view the object Position & Size via object's context menu modal dialog box (right-click on object >> Position and Size...)

Actual Results:  
For example, in a fresh document, if I draw a Rectangle object close to filling a page (612 pt by 792 pts, with 28 pt margins on all sides), the sidebar's properties pane will show for the position and size height=12.0 pt and width=11.6 pts (maybe this is inches?), whereas the object's context menu properties model dialog shows a size of 555.3 pt by 735.3 pt. Inspecting the saved document I see the following object:
<draw:custom-shape draw:style-name="gr1" draw:text-style-name="P1" draw:layer="layout" svg:width="19.59cm" svg:height="25.94cm" svg:x="1cm" svg:y="1cm"><text:p/><draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/></draw:custom-shape>


Expected Results:
The properties pane should show the correct result.


Reproducible: Always

User Profile Reset: Yes

Additional Info:
Also appears to effect LibreOffice Impress (same versions, methods to reproduce)

Related/ancillary issue: when using points as the measurement, for small size values, the object size is always inconsistent with the intended/entered value. For example, if an object height of "4.0 pts" is entered, the object height will size to 4.3 pts (not 4.0 pts) and this will be shown in the document and the next time the field is displayed. I believe this is a result of the internal object measurement units of centimeters at a precision of 1/100 units resulting in rounding and consistency issues in the conversion to points. This precision issue however was not present before approx. version 3.3 but has persisted since 4.0. This makes high precision virtually impossible with points as the measurement unit (an extremely common unit for typesetting and similar activities).


User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Comment 1 V Stuart Foote 2017-08-20 12:41:35 UTC
Created attachment 135671 [details]
Draw with measurments set to points, size measurements shown Position and Size content panel differes from dialog

Confirmed on Windows 10 Home 64-bit en-US with
Version: 5.4.1.1 (x64)
Build ID: a5be49f0c45fe24a575c7f41559aa8fc79a781a2
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: en-US (en_US); Calc: group

In Draw's Sidebar, Properties tab -> Position and Size content panel calculates size--Width, Height--incorrectly when measurement values are set to points (from Tools -> Options -> LO Draw -> General) 

The position values--Position X, Position Y--are correct.
Comment 2 V Stuart Foote 2017-08-20 12:54:47 UTC
Remains incorrect in current master.

Version: 6.0.0.0.alpha0+ (x64)
Build ID: ddf0d439d36686008b6de16d59c9a9068622f26c
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-08-19_00:44:50
Locale: en-US (en_US); Calc: CL

Impress...
Content panel in Impress correctly calculates size values in points.
Comment 3 V Stuart Foote 2017-08-20 13:23:57 UTC
(In reply to V Stuart Foote from comment #2)
> Impress...
> Content panel in Impress correctly calculates size values in points.

Oops scratch that, Impress is equally affected which actually makes more sense.
Comment 4 QA Administrators 2018-08-21 02:34:43 UTC Comment hidden (obsolete)
Comment 5 Michael Epley 2018-11-22 18:26:37 UTC
Verified as still present in Version: 6.1.2.1, Build ID: 6.1.2.1-3.fc29
Comment 6 NISZ LibreOffice Team 2019-11-21 23:41:55 UTC
This is the same issue as: 
https://bugs.documentfoundation.org/show_bug.cgi?id=100632#c6
but let's keep this open since that bug is about multiple issues.
Comment 7 Commit Notification 2019-11-27 11:11:05 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a573829438bf4a3dc43e8774bfe4e29989e2e352

tdf#111922 Fix Position&Size sidebar Height/Width order of magnitude

It will be available in 6.5.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 8 Commit Notification 2019-12-12 08:25:47 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/baa365141e8b3c619c7de0b01612ffe0cc3885c7

tdf#111922 Fix Position&Size sidebar Height/Width order of magnitude

It will be available in 6.4.0.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.
Comment 9 Xisco Faulí 2019-12-16 17:40:33 UTC
*** Bug 129432 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2019-12-16 17:47:34 UTC
(In reply to NISZ LibreOffice Team from comment #6)
> This is the same issue as: 
> https://bugs.documentfoundation.org/show_bug.cgi?id=100632#c6
> but let's keep this open since that bug is about multiple issues.

According to that commit, this is a regression...
Comment 11 Commit Notification 2019-12-17 12:59:26 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/261fef18ecef98bbe05de7422b6552f42b77176d

tdf#111922 Fix Position&Size sidebar Height/Width order of magnitude

It will be available in 6.3.5.

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 12 NISZ LibreOffice Team 2020-01-06 07:35:34 UTC
*** Bug 129794 has been marked as a duplicate of this bug. ***