Bug 45525 - TABLES, Problem on adjust selected Row or Column to equal space
Summary: TABLES, Problem on adjust selected Row or Column to equal space
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium major
Assignee: Justin L
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2012-02-02 00:41 UTC by Djoko Masdjo
Modified: 2021-10-08 15:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Illustration of what I meani (340.34 KB, application/pdf)
2012-02-02 00:41 UTC, Djoko Masdjo
Details
Writer document containing table with differently-sized rows and columns. (9.02 KB, application/vnd.oasis.opendocument.text)
2015-02-12 21:01 UTC, josiasmat
Details
Sample document showing tables adjusted, with current and expected behavior (11.64 KB, application/vnd.oasis.opendocument.text)
2015-03-31 14:24 UTC, josiasmat
Details
optimizeRowHeight.odt: should still fit one page when optimized. (11.70 KB, application/vnd.oasis.opendocument.text)
2021-09-25 05:41 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Djoko Masdjo 2012-02-02 00:41:01 UTC
Created attachment 56500 [details]
Illustration of what I meani

Problem on adjust selected Row or Column  to equal space:

On previous version (3.4 & 3.3) I can adjust selected row or column to equal space without a problem, but on version 3.5 ( I use 3.5 RC.2 ) I have found problems as follow :

On ROW : 
when I choose row, space equally on selected rows, rows turns into the same height, with a height corresponding to the height of the highest rows in the selected row
ie selected rows with a height of 1 cm, 1.3 cm and 1.5 cm, the end result is a rows with a height of 1.5 cm, height is supposed to be 1.27 cm

On COLUMN :
When I choose column, space equally on selected columns,  the entire column in the table turns into the same width, should only the selected columns changed into the same width
Comment 1 Samuel 2012-03-05 07:46:04 UTC
I can confirm this bug.

Select two of three columns and click "Space Equally" change also the unselected columns!

Work fine in LibreOffice 3.4.5 (amd64 Ubuntu 10.04).
Comment 2 bordfeldt 2012-03-20 11:37:49 UTC
I can confirm this bug, too.

LibreOffice 3.5.0 Build-ID: 350m1(Build:13) on Ubuntu 10.04 64bit, installed over ppa.

I want the "Space Equally"-function to be affected only on the selected columns of a table, but all colums of the table are affected. Thats definitively not what I want. 

In earlier versions of LO this function worked fine.
Comment 3 bordfeldt 2012-03-22 10:54:57 UTC
(In reply to comment #2)
> I can confirm this bug, too.
> 
> LibreOffice 3.5.0 Build-ID: 350m1(Build:13) on Ubuntu 10.04 64bit, installed
> over ppa.
> 
> I want the "Space Equally"-function to be affected only on the selected columns
> of a table, but all colums of the table are affected. Thats definitively not
> what I want. 
> 
> In earlier versions of LO this function worked fine.

After updating today to LibreOffice 3.5.1 via ppa this problem seems to be solved.
Comment 4 josiasmat 2013-02-23 14:29:03 UTC
I can confirm this bug too.
Running LibreOffice version 4.0.0.3, running on Windows 7 x64.
Very very annoying.
Comment 5 A (Andy) 2015-02-12 20:43:46 UTC
For me not reproducible with LO 4.4.0.3, Win 8.1.

Can anybody confirm that this bug still persists with the latest release of LO?
Comment 6 josiasmat 2015-02-12 21:01:43 UTC
Created attachment 113351 [details]
Writer document containing table with differently-sized rows and columns.

(In reply to A (Andy) from comment #5)
> Can anybody confirm that this bug still persists with the latest release of
> LO?

I tested with LO 4.4.0.3 on Win 8.1, and yes, the bug persists, but only with respect to rows. Columns are adjusted properly. Attaching a sample document containing a table with differently-sized rows and columns. Try to select some rows, right-click on it and click Row -> Space equally.
Comment 7 A (Andy) 2015-02-12 21:39:25 UTC
(In reply to josiasmat from comment #6)
> Created attachment 113351 [details]
> Writer document containing table with differently-sized rows and columns.
> 
> (In reply to A (Andy) from comment #5)
> > Can anybody confirm that this bug still persists with the latest release of
> > LO?
> 
> I tested with LO 4.4.0.3 on Win 8.1, and yes, the bug persists, but only
> with respect to rows. Columns are adjusted properly. Attaching a sample
> document containing a table with differently-sized rows and columns. Try to
> select some rows, right-click on it and click Row -> Space equally.

Thank you very much for your very fast reply.
I tested it with the by you attached file and the columns are now with LO 4.4 spaced equally without interfering the not selected columns.
If I select some cells (e.g. first three rows) and I select to space the rows equally, then all are spaced equally.  All have the same height of the largest row before (e.g. of 1.72 cm).  
Is my understanding correct that you think that it should not be adjusted to the largest row but to the average of the selected rows and that this is from your point of view the still persisting part of the bug?
Comment 8 josiasmat 2015-02-13 00:09:17 UTC
(In reply to A (Andy) from comment #7)  
> Is my understanding correct that you think that it should not be adjusted to
> the largest row but to the average of the selected rows and that this is
> from your point of view the still persisting part of the bug?

Exactly!
Comment 9 josiasmat 2015-03-31 14:24:58 UTC
Created attachment 114498 [details]
Sample document showing tables adjusted, with current and expected behavior
Comment 10 A (Andy) 2015-03-31 18:57:35 UTC
Reproducible with LO 4.4.1.2, Win 8.1
Comment 11 tommy27 2016-04-16 07:26:55 UTC Comment hidden (obsolete)
Comment 12 josiasmat 2016-05-03 14:48:05 UTC
Tested on LibreOffice 5.1.2 Win64. The bug persists.
Comment 13 Telesto 2017-05-08 12:13:11 UTC
Repro with:
Version: 5.4.0.0.alpha1+
Build ID: 274ecb49b70b3f01d47546e3b44317946c106042
CPU threads: 4; OS: Windows 6.2; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-05_22:45:07
Locale: nl-BE (nl_NL); Calc: single
Comment 14 bordfeldt 2018-02-04 15:22:36 UTC
Bug still reproducible in 6.0.0.3 on Windows 10.
Columns are adjusted properly. Rows are adjusted to the height of the largest row, but not to the average height of all selected rows.
Comment 15 QA Administrators 2019-02-05 03:46:53 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2021-02-05 04:11:29 UTC Comment hidden (obsolete)
Comment 17 BogdanB 2021-08-23 06:51:51 UTC
For me everything seems ok. Please retest.

Tested with
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 5b025285b3528910a4360899abb2bbbaadc72c97
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 18 BogdanB 2021-08-23 06:53:25 UTC
Also tested in 7.2 and seems ok.

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 19 BogdanB 2021-08-23 07:00:00 UTC
I tested only the COLUMN problem which seems ok. The table width is staying the same. Only selected columns change.

The ROW problem is still there. The columns take the maximum height of the cells selected. The total height of table is increasing.
Comment 20 Justin L 2021-09-24 10:53:55 UTC
Well, LibreOffice is not a mind-reader, so it cannot know what size you want the row to be. There are now three sizing options. 

"Distribute Rows Evenly" is what you know - using the largest size row and making all the selected rows the same.

"Minimize Row height" does exactly that.

"Optimize row height" was introduced in 6.3 (bug 64242).

Optimize row height: Adjust the height of the selected rows to match the height of the tallest row in the selection (fit to content), without shrinking the table. This option is the same as minimizing row height and then distributing rows evenly except that it adds the benefit of preventing the table from shrinking.

Now I have to admit does optimize doesn't seem to be doing exactly what is described (at least not on the data I was now testing), but I see why.

Proposed fix at http://gerrit.libreoffice.org/c/core/+/122572
Comment 21 Commit Notification 2021-09-25 05:08:55 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/360e6b8453acc26880f4f45e6792c2c0e15f0896

tdf#45525 tdf#64242 sw row optimize: get correct row height

It will be available in 7.3.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 22 Justin L 2021-09-25 05:41:54 UTC
Created attachment 175250 [details]
optimizeRowHeight.odt: should still fit one page when optimized.

(In reply to josiasmat from comment #9)
> Created attachment 114498 [details]
> Sample document showing tables adjusted, with current and expected behaviour

Yes, this expected resizing behaviour (of content-less) rows is appropriate, logical, and was supposed to be handled by "optimal height". I attached an example that emphasizes the bug in the calculation of the row height, which has now been fixed.

Backport requested for 7.2.
Comment 23 Commit Notification 2021-09-26 17:48:05 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/209c037872ea8adc964c94ef47c0cb010b9e0db7

tdf#45525 tdf#64242 sw row optimize: get correct row height

It will be available in 7.2.3.

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 24 Justin L 2021-09-27 06:20:35 UTC
I think this bug is resolved.
The columns were acknowledged to be fixed earlier (already in 6.0, but should be improved in 6.3 with the additional optimize).
The rows (via optimize) should resize nicely based on content / existing size in starting in 7.2.
Comment 25 Commit Notification 2021-10-08 15:41:50 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/263d2f0b3d1143d6caa467204f187648c43b0e89

tdf#45525: sw_uiwriter2: Add unittest

It will be available in 7.3.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.