Bug 75915 - Rounding issues when working with metric units
Summary: Rounding issues when working with metric units
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 143554 (view as bug list)
Depends on:
Blocks: Measurement-Units
  Show dependency treegraph
 
Reported: 2014-03-08 18:17 UTC by Callegar
Modified: 2023-07-27 03:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Callegar 2014-03-08 18:17:05 UTC
There are some rounding issues when working with metric units. These are also present in Openoffice, hence I thing they were imported from there.

To reproduce:
-------------

1) Open Libreoffice impress (or draw)
2) Open the Tools->Options dialog
3) Go to the Libreoffice Impress -> General tab
4) Set the unit of measurement to centimeters
5) Set the tab stops to 1.25 cm
6) Set the unit of measurements to millimiters
7) See how the tab stop now is 12.51 mm instead of 12.50 (!)
8) Set the tab stop to 12.50 mm
9) Set the unit of measurement to centimeters
10) Set the unit of measurement back to millimiters
11) See how the tab stop now is again at 12.51 mm (!)
Comment 1 Jean-Baptiste Faure 2014-03-08 21:48:48 UTC
Indeed I see that since ages. That said not sure if you can distinguish 0.01 mm on your screen.

Best regards. JBF
Comment 2 Joel Madero 2015-05-02 15:42:58 UTC Comment hidden (obsolete)
Comment 3 Jean-Baptiste Faure 2015-05-05 05:00:24 UTC
Still reproducible with LibreOffice 5.0.0.0.alpha1.
Maybe I am wrong, but I guess the root cause of the problem is that the base unit in the code would be the inch. If you set the tab size to 0,5 inch, then change the unit to cm and mm, you will get consistent values. Idem if you change to pica and pt.

Best regards. JBF
Comment 4 QA Administrators 2016-09-20 09:36:55 UTC Comment hidden (obsolete)
Comment 5 Callegar 2016-09-21 08:50:05 UTC
Bug still present as of 5.2.2.1.

@ comment 1.

> not sure if you can distinguish 0.01 mm on your screen

The problem exists with lines that are meant to be perfectly horizontal or perfectly vertical. It is particularly visible with connectors. Even a minimal skew between the y (or x) coordinate of the end points and you will see a "step" in the line at some zooming level. This is not just slightly disturbing during the editing of an image, more important it looks unprofessional if it happens in a presentation (as if you had not dedicated enough care in its preparation).

@ comment 3

> Maybe I am wrong, but I guess the root cause of the problem is that the base unit in the code would be the inch.

Unlikely. I believe that the internal drawing layer should work using 1/100th mm in 32-bit integer. So, the issue /might/ due to the fact that unneeded conversions back and forth imperial and metric units happen at some time.

Note that a related issue had been reported for OO back in 2005 (https://bz.apache.org/ooo/show_bug.cgi?id=45593 and also https://bz.apache.org/ooo/show_bug.cgi?id=126372) remaining open. Comment https://bz.apache.org/ooo/show_bug.cgi?id=45593#c22 seems particularly interesting in showing that the ODF specification provides space to address the matter (i.e., the limitation does not come from there).
Comment 6 Xisco Faulí 2017-09-29 08:51:29 UTC Comment hidden (obsolete)
Comment 7 Jean-Baptiste Faure 2017-10-29 06:53:21 UTC
Still reproducible with current master built at home under Ubuntu 16.04.

Best regards. JBF
Comment 8 QA Administrators 2018-10-30 03:57:00 UTC Comment hidden (obsolete)
Comment 9 Callegar 2018-10-30 11:52:58 UTC
Issue still present as of 6.1.x.
Most likely inherited from OOo, but I cannot be 100% sure.
See also bug 44267
Comment 10 b. 2021-02-04 18:55:18 UTC
still repro in.......... 

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 7eb289c49cc7245ef3001a39be0c15d06bbe875b
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc:
Comment 11 Regina Henschel 2021-07-26 21:41:09 UTC
*** Bug 143554 has been marked as a duplicate of this bug. ***
Comment 12 QA Administrators 2023-07-27 03:15:45 UTC
Dear sergio.callegari,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug