Bug 115654 - EDITING: Column labels copied to cell range reference wrong cell until file is reloaded
Summary: EDITING: Column labels copied to cell range reference wrong cell until file i...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.1.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 127269 (view as bug list)
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2018-02-12 14:51 UTC by Gilward Kukel
Modified: 2022-02-24 10:58 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gilward Kukel 2018-02-12 14:51:47 UTC
Description:
Copied column/row labels reference wrong cell until file is reloaded.

Steps to Reproduce:
1. Make a new spreadsheet
2. enable Tools -> Options... -> LibreOffice Calc -> Calculate -> Automatically find column and row labels
3. Enter these data into the first sheet:
	A1: a
	A2: 1
	A3: 2
	A4: 3
	B2: ='a'
	B2 now correctly shows 1 because it references A2.
4. select B2:B4 
5. press Ctrl+D for Fill Cells Down.

alternative steps:
4'. go to B2
5'. drag the fill handle to B3 and B4

alternative steps:
4''. go to B2 and press Ctrl+C
5''. select B2:B4 or B3:B4 and press Enter or Ctrl+V



Actual Results:  
B3 and B4 wrongly also show 1 because they also reference A2.

Steps 4'' and 5'' only produce the bug in the first sheet.

Expected Results:
B3 should reference A3 and show 2.
B4 should reference A4 and show 3.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
When you save and reload the file it is correct.

Similar to the fixed bug https://bugs.documentfoundation.org/show_bug.cgi?id=105245


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Comment 1 raal 2018-02-12 17:09:05 UTC
This seems to have begun at the below commit.
 e76b8eaeb5cea3fb2cdff12a78c6c70f080b32c2 is the first bad commit
commit e76b8eaeb5cea3fb2cdff12a78c6c70f080b32c2
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 18:47:00 2015 +0800

    source-hash-571070074671bd0102422dd8a0ac1c3be6358f80
    
    commit 571070074671bd0102422dd8a0ac1c3be6358f80
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Fri Jan 31 15:44:00 2014 -0500
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Fri Jan 31 15:45:56 2014 -0500
    
        Speed up simple fill of formula cells. Vertical direction only.
    
        Other cells could be optimized in a similar fashion, but they aren't
        that slow even with the current code.
    
        Change-Id: I0b71bf271fab68c9fba0b39463dfe3ef46dacfb0

Markus, maybe you're interested, because you fixed bug 105245.
Comment 2 Xisco Faulí 2018-06-05 21:17:13 UTC
Adding Cc: to Kohei Yoshida
Comment 3 QA Administrators 2019-06-06 02:53:18 UTC Comment hidden (obsolete)
Comment 4 Gilward Kukel 2020-04-26 23:40:11 UTC
still present

Version: 6.4.3.2 (x64)
Build-ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU-Threads: 4; BS: Windows 10.0 Build 18362; UI-Render: GL; VCL: win;
Comment 5 Gilward Kukel 2020-04-29 22:51:52 UTC
*** Bug 127269 has been marked as a duplicate of this bug. ***
Comment 6 b. 2020-04-30 04:38:04 UTC
still repro with 6.3.6.2 winx64 unpar and 7.0.0.0.a0+ linx64 unpar homebrew, 

works better when copying to single cells (B2 copy, B3 paste, B4 paste), thus only filling / copying to ranges affected? 

think title should reflect that, 

think to take #127269 as main and this as dup. reg. detailed description there, 

think 'critical' as producing wrong data, 

think reopening #115173, possibly dup, possibly it describes a more general underlying problem and this is only a - reproducible - manifestation of it, 

add. observation: copying to C3 after B3:B4 produces '=#NAME?B$1' as formula and '1' as value in C3, despite B1 being empty,
Comment 7 Gilward Kukel 2021-10-25 00:04:57 UTC
Still present. Wrong results (that the user might not even notice) are unacceptable. So please fix this. Thank you.

Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: de-AT (de_AT); UI: de-DE
Calc: CL
Comment 8 Justin L 2022-02-24 10:58:44 UTC
Fixed in LO 7.3 and 7.2.5 thanks to
commit 2997c5c2604cd5054710ad35e1e0a9fd18f8ae79
author	Eike Rathke on Thu Nov 25 13:34:45 2021 +0100
    Resolves: tdf#128914 Create copies for non-shareable token arrays