Bug 159532 - Deleting first or last row from a table referenced in a table function makes it invalid
Summary: Deleting first or last row from a table referenced in a table function makes ...
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:
Depends on:
Blocks: Writer-Tables-Formulas
  Show dependency treegraph
 
Reported: 2024-02-02 18:25 UTC by Gabor Kelemen (allotropia)
Modified: 2024-02-19 12:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (13.65 KB, application/vnd.oasis.opendocument.text)
2024-02-02 18:25 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the broken formula (37.70 KB, image/png)
2024-02-02 18:28 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-02-02 18:25:06 UTC
Created attachment 192358 [details]
Example file from Writer

When a table row that is referenced in a table function is deleted, the function is updated in an invalid way.

1. Open attached document
2. From the first table delete the first or second row
-> the SUM formula in the third row becomes invalid, such as SUM<B1:?>
3. From the third table delete the second row
-> the SUM formula in the fourth row is still valid, changes from SUM<B1:B3> to SUM<B1:B3>
Deleting one more row would make this invalid as well.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dfcdef6d94993131b5f150d00d08cc81a987eebb
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

already in LO 3.3.
Comment 1 Gabor Kelemen (allotropia) 2024-02-02 18:28:51 UTC
Created attachment 192359 [details]
Screenshot of the broken formula
Comment 2 m_a_riosv 2024-02-03 02:15:59 UTC
It works the same as it does in Calc.

Deleting the first or last row (cell) of a range broke the range.

But deleting some row (cell) inside the range doesn't, the range is reduced, to adapt the last row (cell) to the new range.

In the second case, the new range is B1:B2 instead B1:B3.

I think there is not a bug.

Tested with
Version: 24.2.1.0.0+ (X86_64) / LibreOffice Community
Build ID: cafcc50570f9edaaebe74d2152bae5df1cc2edfe
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
+
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1647493e5cbb9cf4f06b7d0387d6763a2f30fdae
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES Calc: CL threaded
Comment 3 Stéphane Guillou (stragu) 2024-02-19 12:33:32 UTC
(In reply to m_a_riosv from comment #2)
> It works the same as it does in Calc.
I don't see the same in Calc: first or last row deletion does not make a sum formula invalid, the range is updated as OP expects.

I agree that how Writer behaves currently is not expected nor elegant. The range should be updated and the formula still valid.