Bug 143554 - LibreOffice Writer Table Measurement Width problem Error of 1mm cannot remove completely
Summary: LibreOffice Writer Table Measurement Width problem Error of 1mm cannot remove...
Status: RESOLVED DUPLICATE of bug 75915
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-26 18:47 UTC by Th3go
Modified: 2021-07-26 21:41 UTC (History)
1 user (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 Th3go 2021-07-26 18:47:05 UTC
Description:
Using LO 7.1.4.2 X64. Creating tables in Writer [Web View format] with columns of exact widths and I am getting a continuing error of .01cm which no matter how long I try to get rid of, it keeps coming back, corrupting the exact width of the table and of some columns. If I try to correct I have to edit each column, then the table width until I finally get the precise measurement and I save. However on opening the document its out again.
I had measurement set to cms but recently changed to mm to try to get  the widths more precisely. This is when I noticed that the table width can be set to say 550mm with a From the left of 5mm. Except the width keeps reverting to 555.01 and the from the left setting changes to 4.99mm
I cannot get the 4.99mm setting to change to 5mm even if I readjust the table width.
Thee is also an error when setting the page style with margins of 5 mm... the settings change to 4.99mm and will not remain saved when changed to 5mm.
This has been happening for a few years but today I decided I need to bug report it.

Steps to Reproduce:
1.Create a table - I used 300.00 mm and use Web View
2.set alignment from the left 5.00 mm
3.save the settings
4. Open Table Property settings and I get width of table  300.00 and from the left spacing is now 4.99mm.
5. Then try using the Manual alignment.
6. table width is 300 mm left spacing field  is 4.99mm, right spacing field now shows 330.01  [I have page style format width set to 600mm with 10.0 mm margin left and right, Manual]
7. Now try and adjust the spacing fields to get a left field of 5.00 mm
8. at some point you an get 5.50mm in the left field but use the arrow key to reduce it down to  5.00mm and it becomes 4.99 again and the Right field changes to xxx.x1mm
9.Still using Manual Alignment, change the Table width to 250 mm and a left spacing to 10.mm and try to 

1. Open a Writer document:  page style Format A4 width 297mm height 210mm. I set to landscape with 20mm margins left/right. I changed the default text to Calibri as I prefer it.
On the page screenshot this looks accurate. [Note: Why the A4 page  is 297mm and not 295mm or better yet 300.00mm,  which would be mathmatically much easier is illogical.]
2. Look at the organizer tab and you will see error no 1 – in the contains section. The first number is 210.01mm and this is where the error begins to appear. The fiootnote tab aslo shows a Space t text field of 1.01mm and a spacing to footnote contents field with 1.01mm.
Change these fields to 1.00mm and applying the change does not save but reverts back to 1.01mm when you look at the organiser again.
3. Using the Table Insert table function to insert a table 2 columns and 2 rows. Table width on my document is 257mm
4. Using table properties, change the table width to 200mm as it is easier to evenly split columns into even spaces [I require accurate measurements for instance in .05mm increments ie some columns are 30mm, and those may be split into 15 mm then further split those to 7.mm etc]
5. So start with manual radial selected and table width 200mm. Now you want to get a 10mm left spacing. Then use the up and down arrow to change the spacing fields. Now the problems begin. Table width will change for instance to 200.01 so using the arrow you change the left field to 10.mm and the spacing right field changes to 46.99, great, so you go click ok to save. Then open up table properties and it’s reverted back to 200.01, but you have your correct left field of 10mm. So you try and change the table width again with the down arrow and save but it doesnt work. So next time adjust the Spacing right arrow field to 47.00mm which should change the table width to 200.00mm right. Just dont click on any field before saving though because that changes everything. So you ok the changes and then open the Table Properties box again. This time the table width could be 199.99 mm and a left spacing field of 10.00 mm but you have a right field of 47.01mm which is not right. So you adjust again, this time you change the table width to 200.00mm and put the cursor in the field to set it before changing the right field down with the arrows to 47.00 mm because that .01mm causes problems when creating more columns. But you cant change the field to 47.00 and the table width has altered again to 199.99mm.
Go back to increasing the table width to 200 with the up arrow, which you can do. Go back to the 47.01 but this time increase it to 47.50 and take a hit on the width. Ok the change. Yes changes saved. But you really just want the 200 width table because it’s too hard to work with 199.50mm width. 

No matter what you do you cannot get a width of 200.00 mm, a left margin of 10.00 mm and 47mm on the right, even if you inset the numbers in without using the arrows as that makes it worse.
Not to say that using arrows and adjusting the left field up/down and the table width up/down and the right field down/up is very very antiquated and introduces the .01mm error back into the equation.
Using the columns tab of the table properties and the arrows to adjust the columns widths results in equally uneven distribution if you have a .01mm anywhere.
Keep clicking the ok button and reopening and the problem continues.


Actual Results:
Cant get rid of the .01mm and it causes problems if you save the document and open it up again later. I feel like screaming.

Expected Results:
If i have a table width 0f 200mm 0r whatever, and I select a from the left or a left margin of 10mm or 2.5mm or any other numbers I shouldnt have to keep respacing my columns/table/margins to remove a 0.01mm error that invariably keeps on appearing after I open a saved document


Reproducible: Sometimes


User Profile Reset: Yes



Additional Info:
I have uninstalled and reinstalled the software. I have installed a new motherboard/ram/hard drive and reinstalled windows operating system. Still the same old error Just this time i have decided to bug report it.

Cant find OpenGl as per the instructions listed under Is openGl enabled. But in Options Libre Office View Graphics output is ticked with use hardware acceleration
Comment 1 Th3go 2021-07-26 19:52:43 UTC
The More Columns added the more the columns are out ie, column 1 is 40.01mm, 2 is 30 mm 3 is 30 mm 4 is 14.99 mm 4 is 14.99 mm 6 is 40.01 mm .. to the last few are 39.97, 60.01 and no amount of finagling can get a result of 40.000 30.000 30.000 5.000 15.000 15.000 40.000 ... 40.000 & 60.000, for a total of xxx.000. 
Also if there are multiple rows and you adjust the column width the entire column does not adjust correctly and you have to adjust each row cell by cell trying to eliminate the .01mm error.
This discrepancy becomes obvious the more you zoom in . There is probably are an error that compounds from a .000001 somewhere.
Comment 2 Regina Henschel 2021-07-26 21:41:09 UTC
There is currently no way to avoid it. LibreOffice uses internally integral unit twip in Writer and Calc and use integral 1/100 mm in Draw/Impress, file save and API (macros).
1 twip = 127/72 * 1/100 mm and 1/100 mm = 72/127 twip.

So 5mm = 500 * 1/100 mm = 500 * 72/127 twip = 283.4645 twip, rounds down to 283 twip.
283 twip = 283 * 127/72 * 1/100mm = 499.1805 * 1/100mm, rounds down to 499 * 1/100mm = 4.99mm

4.99mm = 499 * 1/100 mm = 499 * 72/127 twip = 282.8976 twip, rounds up to 283 twip.

So with internal integral unit twip it is not possible to distinguish 4.99 mm from 5.00 mm.

There had been discussions to change from integral 1/100 mm to a floating point 1/100 mm for to get better precision in internal unit conversions. That would be such a huge change with danger of lot of regressions, that it cannot be done on the side, but needs a paid developer over some time. So it is unlikely, that an improvement will happen in the near term.

The problem is not restricted to column or table width.

*** This bug has been marked as a duplicate of bug 75915 ***