Bug 99711 - Sidebar Position and Size displays incorrect width and height when units in mm
Summary: Sidebar Position and Size displays incorrect width and height when units in mm
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 107118 107878 115322 118837 124447 (view as bug list)
Depends on:
Blocks: Sidebar-Properties-PositionAndSize
  Show dependency treegraph
 
Reported: 2016-05-06 14:12 UTC by menturi
Modified: 2019-04-08 15:53 UTC (History)
15 users (show)

See Also:
Crash report or crash signature:


Attachments
Step 2 (92.13 KB, image/png)
2016-05-06 14:12 UTC, menturi
Details
Step 3 (92.56 KB, image/png)
2016-05-06 14:13 UTC, menturi
Details
output from bibisect in 43max repository (5.12 KB, text/plain)
2017-01-09 19:30 UTC, Terrence Enger
Details
The evidence in LO 5.1.6.2 (298.62 KB, image/png)
2017-05-28 02:02 UTC, Emersson Augusto Suarez Ortiz
Details
Problem on 5.3.4 (53.57 KB, image/png)
2017-07-09 10:59 UTC, RGB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description menturi 2016-05-06 14:12:33 UTC
Created attachment 124883 [details]
Step 2

Problem description:
The sidebar displays incorrect width and height when units are in millimeters

Steps to reproduce:
1. Open LibreOffice Draw and set the options to display mm (Tools > Options > LibreOffice Draw > General > Unit of measurement: Millimeter)
2. Create a rectangle and change the width and height to 10.00 mm. Note that the Position and Size window* agrees with the sidebar for these dimensions. *right click on the rectangle > Position and Size
3. Deselect and reselect the rectangle. The sidebar now claims the width and height are 9.91 mm, however the Position and Size window correctly shows 10.00 mm.

Note that if a 10.00 mm grid is shown, the 10.00 mm rectangle aligns to the grid, whereas a 9.91 mm rectangle does not. This suggests the dimensions are actually 10.00 mm, even though the sidebar displays them as 9.91 mm.

Current behavior:
In the Sidebar, under Position and Size, the Width and Height display incorrect width and height.

Expected behavior:
In the Sidebar, under Position and Size, the Width and Height should display the correct width and height.

Additional comments:
-Tested on a Windows 7 (x64) machine using LibreOffice 5.0.5.2
-Able to be produced this issue in both LibreOffice Draw and Impress
-Though untested, I expect similar behavior when other units are used. This may be a rounding issue before unit conversions?
Comment 1 menturi 2016-05-06 14:13:02 UTC
Created attachment 124884 [details]
Step 3
Comment 2 Buovjaga 2016-05-07 13:21:49 UTC
Repro.

menturi: would you like to join the QA team to do this: https://wiki.documentfoundation.org/QA/Triage_For_Beginners

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha1+
Build ID: 540fee2dc7553152914f7f1d8a41921e765087ef
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on April 30th 2016
Comment 3 Nico Stuurman 2017-01-04 01:10:14 UTC
This bug is not present in Libreoffice 4.1.0.4 (the first version with a sidebar), thus it's a regression

Adding "regression" to the keywords
Comment 4 Buovjaga 2017-01-04 08:29:32 UTC
Thanks for the test, Nico. Adding bibisectRequest.
Comment 5 raal 2017-01-06 05:21:54 UTC
repro Version: 4.4.0.0.alpha0+
Comment 6 Terrence Enger 2017-01-09 19:30:12 UTC
Created attachment 130286 [details]
output from bibisect in 43max repository

Working on debian-stretch in the bibisect-43max repository, I see that
the bug entered LibreOffice in commit 36be3d94 ...

    Author:     Armin Le Grand <alg@apache.org>
    AuthorDate: Thu Mar 20 14:36:21 2014 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Thu Mar 20 16:49:46 2014 +0000

        Resolves: #i124409# use slot SID_ATTR_METRIC...
    
        to retrive the UI unit, not GetModuleFieldUnit
    
        (cherry picked from commit 34279ea85c33e3efd21971ab692a3de4bdd91817)
    
        Conflicts:
                svx/source/sidebar/possize/PosSizePropertyPanel.cxx
    
        Change-Id: Id81847bf7e989a3e49fbe8adaad23048956067df

Looking at a couple of numbers, it seems that the redisplayed
dimension is converted to nearest 0.01 inch and that result is
converted to the nearest 0.01 millimetre.

I am removing keyword bibisectRequest and adding bibisected and bisected.
Comment 7 Xisco Faulí 2017-01-09 21:25:40 UTC
Commit hash: 36be3d94c2e142d01c026a93fa88454cb5316bff
Adding Cc: to Armin Le Grand
Comment 8 file-a-bug 2017-04-12 14:34:16 UTC
*** Bug 107118 has been marked as a duplicate of this bug. ***
Comment 9 Buovjaga 2017-05-19 17:11:46 UTC
*** Bug 107878 has been marked as a duplicate of this bug. ***
Comment 10 Emersson Augusto Suarez Ortiz 2017-05-28 02:01:03 UTC
The size is displayed incorrect and no matter which unit do you use. I have LO 5.1.6.2 in Linux Mint and I confirmed this bug.
Comment 11 Emersson Augusto Suarez Ortiz 2017-05-28 02:02:14 UTC
Created attachment 133658 [details]
The evidence in LO 5.1.6.2
Comment 12 RGB 2017-07-09 10:59:08 UTC
Created attachment 134557 [details]
Problem on 5.3.4

As you can see on the screenshot the problem is also present when you select cm as unit, not only with mm. 

If you take the quotient between the value displayed on the menu and the one on the sidebar you get ~2.5. It seems the value displayed on the sidebar is on inches, even if it says cm.
Comment 13 QA Administrators 2018-07-10 02:36:55 UTC Comment hidden (obsolete)
Comment 14 RGB 2018-07-10 16:25:02 UTC
Problem still present in  6.0.5.2
Comment 15 Papamatti 2018-07-25 11:44:28 UTC
I can still confirm this bug in linux and lo 6.0.5.2. This is very anoying, because it changes the sizes of objects in the document. And objects I didn't touch change their sizes and dimension lines too. For example 60cm becomes 62,59 and I didn't touch this drawing object. This happens while I changed another objects on this page.
Comment 16 Papamatti 2018-07-25 12:04:49 UTC
It'seems to work, if you DON'T TOUCH THE SIDEBAR.
Comment 17 RGB 2018-08-31 18:33:02 UTC Comment hidden (obsolete)
Comment 18 RGB 2018-08-31 18:54:08 UTC
OK, it doesn't work: for some reason, it started to work when using some drawing objects, then I selected a PNG picture and it failed, now even the drawing objects show different values in the sidebar and in the "Position and size" menu. (I tested on 6.1.1.1)
Comment 19 Buovjaga 2018-09-19 19:14:45 UTC
*** Bug 118837 has been marked as a duplicate of this bug. ***
Comment 20 Buovjaga 2018-09-19 19:15:48 UTC
*** Bug 115322 has been marked as a duplicate of this bug. ***
Comment 21 V Stuart Foote 2019-03-30 17:19:30 UTC
*** Bug 124447 has been marked as a duplicate of this bug. ***
Comment 22 kyumin.lee 2019-04-08 15:53:59 UTC
I confirm that the bug is present in the version 6.2.2.2 as well. Very annoying.