Bug 138761 - Writer table sum feature doesn't insert formula in empty cell at bottom of selected column range
Summary: Writer table sum feature doesn't insert formula in empty cell at bottom of se...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2020-12-09 03:51 UTC by Alan
Modified: 2022-12-24 14:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
demonstration of bug (883.36 KB, video/x-matroska)
2020-12-09 03:53 UTC, Alan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan 2020-12-09 03:51:01 UTC
Description:
In Calc can sum a column at least two ways:
#1 select cell at bottom of column of numbers and click Sum button at left of Input line. Contiguous range above selected cell is selected. =sum(<range>) in input line. Click green check and formula is entered in selected cell.

#2 select column of numbers and empty cell beneath column. Click sum button. =sum(<range>) appears immediately in empty cell. No need to confirm.

For both methods =sum() formula is inserted in empty cell

In Writer if attempt to sum column similar to #1 above then after inserting cursor in empty cell range to be summed must be selected after clicking sum button. And then must click green check to complete summing operation.

If range to sum is selected and end of selection is empty cell presumed to be destination for sum formula then sum button clicked selected range is emptied and Input line appears with =sum() formula with third-to-last selected cell loaded as range of formula. Clicking check to enter formula causes 0 to be entered in last cell, value in second-to-last cell to again be visible, and value in third-to-last cell and any cells above to be empty.

This is very unexpected behavior. Especially if one is familiar with either method of summing described for Calc. 

Request Writer table cell sum feature be modified to work like descriptions provided for Calc. 

Alternately, request Writer table cell sum feature be modified so that if range is selected prior to clicking sum button then sum is entered in last cell of selected range vs current behavior of emptying range.

Steps to Reproduce:
1. create a multi row table in Writer
2. enter numbers in a column in the table, leave at least one empty row beneath last number
3. select column of numbers and empty cell beneath 
4. click Sum button on table toolbar
5. after clicking Sum button all selected cells are empty
6. click green check mark next to =sum formula in input line
7. all except last two cells that were selected are now empty. Last cell has 0 entered. Next to last cell has number that was there before Sum button was clicked.

Actual Results:
The result cell value is set to 0 (zero). The cell above the result cell returns to its original value. All cells above these last two cells have been emptied.

Expected Results:
Selecting column of numbers then clicking sum button should sum the numbers and enter result in last selected cell.

Summing cells should work way it works in Calc.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
see attachment for bug demo
Comment 1 Alan 2020-12-09 03:53:19 UTC
Created attachment 167993 [details]
demonstration of bug
Comment 2 Laura Garcia 2020-12-17 09:11:50 UTC
Thank you for reporting the bug. I can confirm that the bug is present in
Version: 7.2.0.0.alpha0+
Build ID: d9ccee2231a8d8984302e1b2f578bf73b4d60c35
CPU threads: 4; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Additional comments:
When reproducing bugs the results changed a bit. The “result” cell calculates a sum of the range selected; however, the range which previously had numbers is now empty with the exception to the last cell within the sum range (not the result cell but the one immediately before it). This also happens if you try to sum values horizontally, and with any other formula.
Comment 3 Buovjaga 2020-12-22 14:00:03 UTC
Same behaviour already in 3.3.0
Comment 4 QA Administrators 2022-12-23 03:36:41 UTC Comment hidden (obsolete)
Comment 5 Alan 2022-12-24 14:11:54 UTC
Checked again with current versions of LibreOffice, 7.4.3 and 7.3.7.

Bug still exactly as described. Bug can be reproduced exactly as described.

7.3.7.2 Help About
Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 1; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

7.4.3.2 Help About
Version: 7.4.3.2 / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 1; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded