Bug 134915 - UI: Checking Relative width for table with 12 cm and unchecking again results in 11,90 cm
Summary: UI: Checking Relative width for table with 12 cm and unchecking again results...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2020-07-17 21:38 UTC by Telesto
Modified: 2022-01-27 21:21 UTC (History)
4 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 Telesto 2020-07-17 21:38:47 UTC
Description:
UI: Checking Relative width for table with 12 cm and unchecking again results in 11,90 cm

Steps to Reproduce:
1. open the attached file
2. Table -> Properties -> Table
3. Check Relative
4. Uncheck relative

Actual Results:
11,90

Expected Results:
12


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
7.1

and in
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 1 Xisco Faulí 2020-08-03 16:21:11 UTC
No attached file
Comment 2 Telesto 2020-08-03 18:12:20 UTC
1. Open attachment 163229 [details]
2. Table -> Properties -> Table
3. Check Relative
4. Uncheck relative
Comment 3 Telesto 2020-08-04 10:20:17 UTC
@Caolan
As are already looking into they table dialog code, you might be interested in this

-> Note: still UNCONFIRMED but not to hard to test
Comment 4 sora34ce 2020-09-01 17:35:36 UTC
One thing I noticed is that this only seems to happen after the first time. If I reset the settings, then checking and unchecking Relative means that the width remains the same.

Version: 7.1.0.0.alpha0+
Build ID: 52820b52b3bca45e2db527d1cc5f4488b2e0b9d0
CPU threads: 8; OS: Mac OS X 10.15.6; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Justin L 2020-12-11 15:46:16 UTC
Umm, who would really care?
Plus, this mostly makes sense. Percentage changes to the table size to the nearest integer percentage. It can't be 71.23988456886534% - it has to be 71 or 72%.  Thus, when you change it back to cm (or whatever high-precision unit you are using), you will get a slightly different table size from the original 12cm.

(Yes, I did notice that it shrunk from 71% to 70% and then stabilized, so there is probably a silly double rounding down happening here, but it is extremely irrelevant in my mind.)

We can make this a simple-hack instead of closing it as NOTABUG. The code is likely in sw/source/ui/table/tabledlg.cxx. Also, bug 134881 might be helpful.

So for the record, this is what I see would need fixing.
1.) notice the table size is 12cm. change to relative.  Now it is 71%.  OK.
2.) go to table properties again. Uncheck relative. Now it is 11.90 cm. OK
3.) go to table properties again. Check relative. Now it is 70%. OK
4.) repeat until you lose the skin on your finger tips. (it always remains on 70%).

So the problem is that it should remain on 71%, and not drop to 70%.
Comment 6 Telesto 2020-12-12 19:52:05 UTC Comment hidden (off-topic)
Comment 7 BogdanB 2022-01-27 21:21:40 UTC
Retested.

the same
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 2f4f4cbeb8e50081d607b86b0475b93971c40ab8
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded