Bug 157132 - LibreOffice 7.6.0 copying of formulas in writer table – relative distance of cells in formula not preserved after copying to other lines
Summary: LibreOffice 7.6.0 copying of formulas in writer table – relative distance of ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: high major
Assignee: Xisco Faulí
URL:
Whiteboard: target:24.2.0 target:7.6.3
Keywords: bibisected, bisected, regression
: 156905 157509 158104 158674 158716 (view as bug list)
Depends on:
Blocks: Writer-Tables-Formulas
  Show dependency treegraph
 
Reported: 2023-09-07 10:12 UTC by Rastislav Machel
Modified: 2023-12-15 07:48 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo file for LOO 7.6.0 writer component error (tables) (18.05 KB, application/vnd.oasis.opendocument.text)
2023-09-07 10:13 UTC, Rastislav Machel
Details
WriterTableDemoFile_original.odt (20.25 KB, application/vnd.oasis.opendocument.text)
2023-11-23 13:47 UTC, Rastislav Machel
Details
WriterTableDemoFile_test1.odt (21.00 KB, application/vnd.oasis.opendocument.text)
2023-11-23 13:48 UTC, Rastislav Machel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rastislav Machel 2023-09-07 10:12:09 UTC
Description:
LibreOffice 7.6.0 Writer component not preserves relative distance of cells in formula after copying of formula into other cell in next lines ot the writer table.
(LibreOffice 7.5.5 Writer component works OK).


Steps to Reproduce:
1. Formulas in table (see sample file): <C2>=<A1>+<B1>; <C3>=<A2>+<B3>.

2. It is required to copy formulas in <C2> and <C3> cells to other rows of the table (in C column) so that the "relative distance" of the individual cells in the formula is preserved (works in LibreOffice 7.5.5).

3. Command sequence: Select <C2> to <C3> cells and Copy (CTRL+C), then select <C4> to <C10> and Paste (CTRL+V).


Actual Results:
In LibreOffice 7.5.5 result is OK
In LibreOffice 7.6.0 result is wrong - formulas copied to next rows are not adjusted in relation to new "position" of the formula in the writer table.

Expected Results:
Behavior as in LibreOffice 7.5.5 - "relative distance" of the individual cells in the formula is preserved


Reproducible: Always


User Profile Reset: No

Additional Info:
Please see the demo file
Comment 1 Rastislav Machel 2023-09-07 10:13:15 UTC
Created attachment 189410 [details]
Demo file for LOO 7.6.0 writer component error (tables)
Comment 2 Xisco Faulí 2023-09-07 12:55:46 UTC
Regression introduced by:

author	Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>	2023-03-04 02:18:58 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	2023-03-14 10:25:01 +0000
commit 8a3dc12a13a3b9e99dbd5000ca6a1d541cf472f7 (patch)
tree 54604d51a119eef82d8b9e059e1da7dac60f12e1
parent a224948ef44eadfb32aee002d5f0e9f10c9e47de (diff)
remove support for TBL_BOXNAME TBL_RELBOXNAME in ChangeState

Bisected with: bibisect-linux64-7.6

Adding Cc: to Bjoern Michaelsen
Comment 3 Kira Tubo 2023-10-07 20:03:04 UTC
*** Bug 156905 has been marked as a duplicate of this bug. ***
Comment 4 Stéphane Guillou (stragu) 2023-10-13 15:03:13 UTC
*** Bug 157509 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2023-10-25 15:11:41 UTC
I think I know how to fix it
Comment 6 Commit Notification 2023-10-26 06:49:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0c008ab081aa5bbf53f8562e95e547deae5afc2e

tdf#157132: restore behaviour for TBL_RELBOXNAME

It will be available in 24.2.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 7 Commit Notification 2023-10-26 13:50:01 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/0bd6d55a35688d92c411d3ba647c3fcf8de263b5

tdf#157132: restore behaviour for TBL_RELBOXNAME

It will be available in 7.6.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 8 Óvári 2023-10-26 20:11:59 UTC
Should a unit test be added? Thank you
Comment 9 Óvári 2023-10-26 20:18:36 UTC
(In reply to Óvári from comment #8)
> Should a unit test be added? Thank you

Please ignore comment as it looks like a unit test was added. Sorry for the noise.
Comment 10 Stéphane Guillou (stragu) 2023-11-07 18:17:52 UTC
*** Bug 158104 has been marked as a duplicate of this bug. ***
Comment 11 LeroyG 2023-11-15 17:48:30 UTC
The same problem with columns.
Say in <A3>: =<A1>+<A2>
Copy <A3> in <B3>, and the cell references are not updated.
Comment 12 Rastislav Machel 2023-11-23 13:47:33 UTC
Created attachment 190993 [details]
WriterTableDemoFile_original.odt
Comment 13 Rastislav Machel 2023-11-23 13:48:21 UTC
Created attachment 190994 [details]
WriterTableDemoFile_test1.odt

WriterTableDemoFile_test1.odt
Comment 14 Rastislav Machel 2023-11-23 13:48:40 UTC
I tested the behavior of the modified functionality with the following result:
after opening the test document "WriterTableDemoFile_original.odt" and copying the formulas in the first table (DemoTable) in cells C2 and C3 (CTRL+C) to cells C4 to C10 (CTRL+V), the formulas in the second and third tables (DemoTable _LOO755 and DemoTable _LOO760) are also modified without "clicking" into these tables with the result "**Expression is Faulty**".
The result is in the file "WriterTableDemoFile_test1.odt"
Comment 15 Rastislav Machel 2023-11-23 13:51:18 UTC
Tested with LibreOffice 7.6.3.2 (X86_64)
build:
https://git.libreoffice.org/core/+log/29d686fea9f6705b262d369fede658f824154cc0
Comment 16 Xisco Faulí 2023-11-23 14:22:45 UTC
(In reply to Rastislav Machel from comment #14)
> I tested the behavior of the modified functionality with the following
> result:
> after opening the test document "WriterTableDemoFile_original.odt" and
> copying the formulas in the first table (DemoTable) in cells C2 and C3
> (CTRL+C) to cells C4 to C10 (CTRL+V), the formulas in the second and third
> tables (DemoTable _LOO755 and DemoTable _LOO760) are also modified without
> "clicking" into these tables with the result "**Expression is Faulty**".
> The result is in the file "WriterTableDemoFile_test1.odt"

Hi Rastislav,
Thanks for testing it. It seems that's a different issue caused by my commit 0c008ab081aa5bbf53f8562e95e547deae5afc2e. I'll create a follow-up ticket for that while keep this one closed
Comment 17 Xisco Faulí 2023-12-15 07:47:20 UTC
*** Bug 158716 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2023-12-15 07:48:24 UTC
*** Bug 158709 has been marked as a duplicate of this bug. ***
Comment 19 Xisco Faulí 2023-12-15 07:48:56 UTC
*** Bug 158674 has been marked as a duplicate of this bug. ***