Bug 131065 - EDITING: removing rows: formula with leading "+", e.g. =+G41*F41 become =+G#REF!*F#REF!
Summary: EDITING: removing rows: formula with leading "+", e.g. =+G41*F41 become =+G#R...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula Calculate
  Show dependency treegraph
 
Reported: 2020-03-02 09:33 UTC by opensuse.lietuviu.kalba
Modified: 2024-07-06 04:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
XLSX document for testing: try remove 9-40 lines, H9 cell will be REF (24.66 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-03-02 09:33 UTC, opensuse.lietuviu.kalba
Details
Screenshot; after removing 9-40 lines, H9 formula contains REF, though visible value is still numeric (338.31 KB, image/png)
2020-03-02 09:50 UTC, opensuse.lietuviu.kalba
Details
XLSX after removing 9-40 lines: H9 cell became REF in formula (14.87 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-03-02 09:58 UTC, opensuse.lietuviu.kalba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description opensuse.lietuviu.kalba 2020-03-02 09:33:27 UTC
Created attachment 158302 [details]
XLSX document for testing: try remove 9-40 lines, H9 cell will be REF

After removing few lines in XLSX created in Microsoft Excel, some formula became #REF.

How to reproduce:
1. Open attached document
2. Remove 9-40 lines

Result:
 H9 cell contains formula =+#REF!*#REF!

Expected:
 H9 cell contains formula =+G9*F9

Note, that before removing lines, this cell was H41 and it contained formula =+G41*F41
Thus formula did not referred into removed cell.
Besides, after removing lines, doing Undo and Redo fixed formula.

I have LibreOffice 6.4.0.3 in openSUSE Linux, LibreOffice installed from RPMs from LibreOffice site.

Versija: 6.4.0.3
Darinio identifikatorius: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
Procesoriaus gijos: 4; OS:Linux 4.12; Sąsajos pateikimas: numatytasis; VCL: kf5; 
Lokalė: lt-LT (lt_LT.UTF-8); Sąsajos kalba: lt-LT
Calc: threaded
Comment 1 opensuse.lietuviu.kalba 2020-03-02 09:42:59 UTC
I can reproduce in LibreOffice Calc 6.4.1.2 for Linux

Darinio identifikatorius: 4d224e95b98b138af42a64d84056446d09082932
Procesoriaus gijos: 4; OS:Linux 4.12; Sąsajos pateikimas: numatytasis; VCL: kf5; 
Lokalė: lt-LT (lt_LT.UTF-8); Sąsajos kalba: lt-LT
Calc: threaded
Comment 2 opensuse.lietuviu.kalba 2020-03-02 09:50:53 UTC
Created attachment 158303 [details]
Screenshot; after removing 9-40 lines, H9 formula contains REF, though visible value is still numeric

I can reproduce in
Versija: 6.3.5.2
Darinio identifikatorius: dd0751754f11728f69b42ee2af66670068624673
Procesoriaus gijos: 4; OS:Linux 4.12; Sąsajos pateikimas: numatytasis; VCL: kde5; 
Lokalė: lt-LT (lt_LT.UTF-8); Sąsajos kalba: lt-LT
Calc: threaded
Comment 3 opensuse.lietuviu.kalba 2020-03-02 09:58:58 UTC
Created attachment 158305 [details]
XLSX after removing 9-40 lines: H9 cell became REF in formula

I attach saved resulting document (after removing lines).
Although H9 shows numeric, however formula contains REF. 
After recomputing values cell will show REF too.
Comment 4 Oliver Brinzing 2020-03-02 17:48:40 UTC
reproducible with:

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE

Version: 7.0.0.0.alpha0+ (x64)
Build ID: f2db813374b8d65e1edec1387fa0c534b40885e1
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

but *not* reproducible with:

Version 3.6.7.2 (Build ID: e183d5b)

steps to reproduce:
- open attachment: https://bugs.documentfoundation.org/attachment.cgi?id=158302
- H41 contains formula: =+G41*F41
- delete rows 9:40
- H9 (former H41) formula changed to: =+G#REF!*F#REF!

This will not happen if one removes the leading "+" from H41 formula before.
Comment 5 opensuse.lietuviu.kalba 2020-07-05 10:51:07 UTC
I hope this bug will be fixed before LibreOffice 7.O final version
Comment 6 b. 2020-07-05 12:53:55 UTC
funny behaviour with 6.1.6.3 winx64: 

initial display after delete: '=+G9*F9', after some time and poking around (can't repro what i did) display was changed to the #REF error, 

with master 7.1.0.0.a0+ winx64 from yesterday: instant repro, 

played with: 
the '+' sign - is a required condition, 
'Undo and Redo fixed formula' - is stable, 
deleting other content, copying to other sheet, openCL, threading, iterations, the split between rows 8 and 9 - produced no stable picture, 

thus somewhat 'unstable error', and perhaps not solved after first no-repro, 

@erAck is working on something with 'input parser' messing '--' to '-', https://bugs.documentfoundation.org/show_bug.cgi?id=134490 , perhaps 'related'?
Comment 7 QA Administrators 2022-07-06 03:36:36 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2024-07-06 03:16:25 UTC Comment hidden (obsolete)
Comment 9 ady 2024-07-06 04:54:30 UTC
The problem might be in the file itself (but I am testing on MS Windows).

Indeed there is a problem with the _unary_ operator in cell H41 -> H9:

=+G41*F41

...and perform the same steps as in comment 0   ->  FAILS.

Undo and redo "solves" the false #REF! references; IDK why.


Reload the original file. Change cell H41 to:

=0+G41*F41

...and perform the same steps as in comment 0  -> OK, which points to the unary operator as a problem.


BUT:

1. Open attachment 158302 [details] from comment 0.
2. Save as a _new_ XLSX file name.
3. Reload the _new_ file   -> this step is ESSENTIAL (IDK why).
4. Select rows 9:40
5. [CTRL]+[-] to delete the selected rows.
6. Go to cell H9 (which was previosuly cell H41).

  -> cell H9: =+G9*F9  -> correct!


Tested with LO 6.0.4.2 and LO 24.8.beta1 on MS Windows:

Version: 24.8.0.0.beta1+ (X86_64) / LibreOffice Community
Build ID: 23c9f786ec24cce9c94e82943137572da61dc0f0
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: threaded

Version: 6.0.4.2
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: en-US (es_AR); Calc: CL

Please note that the original report mentions Linux, not Windows. It would be worth testing on Linux too.