Bug 130371 - calc: editing: ui: weakness with named ranges, copying of cell to another sheet creates name reference not in dropdown, and not 'undone' with undo of copy,
Summary: calc: editing: ui: weakness with named ranges, copying of cell to another she...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-02 23:06 UTC by b.
Modified: 2020-03-18 20:25 UTC (History)
2 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 b. 2020-02-02 23:06:32 UTC
Description:
@Xisco: sorry, i was asked bei Eike to open a new bug, pls. do not! close as dup of #81330. 

the sheet attached to #81330: 

https://bugs.documentfoundation.org/attachment.cgi?id=102780

shows more weaknesses, no. 2: 

copying of sheet2.A3:B3 creates a name reference 'value' to $sheet4.$B$2, with the 'scope' sheet4, that is – sometimes – not shown in the name reference select box below the font type box, but on 'editing named ranges' by ctrl-F3, 

no. 2a: 

this name reference is not 'undone' with ctrl-Z if you undo the step which produced it. 

additional amendments: 

in the comments at #81330 and in the procedure described in the sheet are some errors? the description given into the attachement suggests copying of B2, imho it was intendedto refer to B1, it's advised to 'copy' B2, imho it was intended to move B1?

if above problems are covered elsewhere feel free to ad a comment pointing there and close this bug,

reg. 

b. 

Steps to Reproduce:
see comments above

Actual Results:
name reference 'value' on sheet4 not shown in 'name-select-dropdown-box', name reference 'value' on sheet4 not reverted by undo, 

Expected Results:
name reference 'value' on sheet4 should be shown in 'name-select-dropdown-box', name reference 'value' on sheet4 should be deleted on undo of the step which produced it, 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.0.3 (x64)
Build ID: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc:
Comment 1 Xisco Faulí 2020-02-17 14:31:53 UTC
Hello b,
Thank you for reporting the bug.
Unfortunately without clear steps to reproduce it, we cannot track down the origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 2 b. 2020-02-17 19:54:54 UTC
@xisco: 

steps to reproduce: 

1. load 
https://bugs.documentfoundation.org/attachment.cgi?id=102780, 

2. use ctrl-F3 to check for named references, there are two named 'value', one with scope to sheet2, one with scope to sheet3, 

3. select sheet2.A2:B3 and copy (ctrl-c), 

4. select sheet4.A2 and paste (ctrl-v), 

5. undo (ctrl-z, ctrl-z), 

6. use ctrl-F3 to check for named references, you see one named 'value' with scope 'sheet4' that wasn't undone by undo, 

7. conclude: bug: 'incomplete undo', 

feel free to ask if anything missing or difficult to understand, 

actually tested with version: 

Version: 6.2.8.2 (x64)
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 8; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc:
Comment 3 Xisco Faulí 2020-02-18 11:55:40 UTC
Hello b,
thanks for the clear steps. I can reproduce it in

Version: 7.0.0.0.alpha0+
Build ID: 28d844a589e52abfe62dc66b888e78665221ba28
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 4 Xisco Faulí 2020-02-18 11:57:19 UTC
Also reproduced in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 Xisco Faulí 2020-02-18 11:58:28 UTC
@Eike, I thought you might be interested in this issue...
Comment 6 Commit Notification 2020-03-01 15:53:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a209ec58ff5893823ed0b7a11e8463c38df86739

Related: tdf#130371 Broadcast ScAreasChanged for created names

It will be available in 7.0.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 Xisco Faulí 2020-03-11 14:22:05 UTC
Hi Eike,
The issue is still reproducible in

Version: 7.0.0.0.alpha0+
Build ID: dde0cf9eafed91c88d9999a294ea32fe0e8aa4bc
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

after your commit. After step 5 from comment 2 there are 3 name references
Comment 8 Eike Rathke 2020-03-14 16:40:16 UTC
It wasn't meant to be fixed, that's why my commit summary started with "Related:" instead of "Resolves:" and the bug is not set fixed ;-)  The commit repopulates the Name Box list with new names created during copying as was mentioned in the original description.
Comment 9 Commit Notification 2020-03-15 10:09:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5ce2125471ed3dafffbfd04e40ea5274cc548896

Resolves: tdf#130371 Undo of sheet-local named expressions

It will be available in 7.0.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 10 Commit Notification 2020-03-16 17:15:06 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a7fb5f2c4eea895e545437081ad50582bf7cacf

tdf#130371: Add UItest

It will be available in 7.0.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 11 Xisco Faulí 2020-03-17 09:43:05 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: 4ee7ee1c4a515479bc174543af4dbc400035c0ba
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Eike, thanks for fixing this issue!!
Comment 12 b. 2020-03-18 20:25:56 UTC
yes, looks better now, :-)

it would be great if someone sometime can combine the 'UI performance' of ver 6.2.8.2 with the bug fixes since then, otherwise users are faced with the choice of speed vs. correctness