Bug 126926 - Extra filter icon appears on deleting sheet columns
Summary: Extra filter icon appears on deleting sheet columns
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.6.2 release
Hardware: All All
: medium minor
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.3.0 target:7.2.1 target:7.2.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: XLSX-DataRange
  Show dependency treegraph
 
Reported: 2019-08-14 15:25 UTC by Emil Tanev
Modified: 2023-11-15 17:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
file (205.20 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-08-14 15:25 UTC, Emil Tanev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2019-08-14 15:25:35 UTC
Created attachment 153390 [details]
file

Open the attached file in Calc
Select sheet columns B and C
Right-click - Delete

Issue: an extra filter icon appears in cell B1. This icon remains even after undoing, via Ctrl + Z


http://somup.com/cqj2orerSC
Comment 1 Emil Tanev 2019-08-14 15:30:21 UTC
Version: 6.3.1.0.0+ (x64)
Build ID: 60b6288bc1aec17d04b45f62ba6f117fc43f8ab4
CPU threads: 1; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-3, Time: 2019-08-04_12:12:28
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 2 Oliver Brinzing 2019-08-14 15:51:05 UTC
reproducible with:

Version: 6.2.6.2 (x64)
Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: 

Attached spreadsheet contains a Database Range: Assets = $Assets.$B$1:$C$7.
After deleting columns B and C, the range points to $Assets.$B$1:$B$7.
Comment 3 Oliver Brinzing 2019-08-15 09:05:27 UTC
> After deleting columns B and C, the range points to $Assets.$B$1:$B$7

this already happens with AOO 4.1.5.
seems it is not possible to delete/invalidate a Database Range via deleting corresponding columns (a named range would be invalidated).

> an extra filter icon appears in cell B1

seems to have started with:

https://gerrit.libreoffice.org/plugins/gitiles/core/+/167c3f9d94e503d99fbdcbf59bae47766cd239f3

commit 167c3f9d94e503d99fbdcbf59bae47766cd239f3 [log]
author	Eike Rathke <erack@redhat.com>	Wed Jul 25 14:04:35 2018 +0200
committer	Eike Rathke <erack@redhat.com>	Wed Jul 25 23:10:02 2018 +0200
tree 52fcd200de840c0df9bb454beb201b0888d8a72a
parent 81f06a142d3228a97341d0728d2aff761b5fd5a2 [diff]

Related: tdf#118867 refresh AutoFilter buttons when deleting cols/rows/cells

Also in ScUndoDeleteCells::Undo()/Redo()

/cygdrive/d/sources/bibisect/bibisect-win32-6.2
$ git bisect bad 3adc79885919020ebdf8c62d9608efafc01cd9d3 is the first bad commit
commit 3adc79885919020ebdf8c62d9608efafc01cd9d3
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Jul 25 15:52:01 2018 -0700
    source 167c3f9d94e503d99fbdcbf59bae47766cd239f3
    source 167c3f9d94e503d99fbdcbf59bae47766cd239f3

:040000 040000 56e98abbd5478799e40f6f65980d6fa70f943541 f966ac5b9c179d2dfc0ace9710a8043aa8d37c07 M      instdir

/cygdrive/d/sources/bibisect/bibisect-win32-6.2
$ git bisect log
# bad: [35a87a66cfc6dfb661f6fed49fb32c081dd26bc7] source d250c94d78ac7e79753aa30f869db919b01fc450
# good: [b0a56ec98b1368cb5e3e531e0b3f69565af91609] source 3a801799536e6870f2fb111b1cc00b9575a35a39
git bisect start 'master' 'oldest'
# bad: [7f7b05d44d7d7f13cc9c865963a72e555b516b3d] source 1b88de0a07180661c4d5d6706247d546d06bc983
git bisect bad 7f7b05d44d7d7f13cc9c865963a72e555b516b3d
# good: [893206f564fd73cf737962011484821c90765fd7] source a97411b061a382dc09423d04c633dc9b7d24a737
git bisect good 893206f564fd73cf737962011484821c90765fd7
# bad: [5965f05474f5107b79b2ebf7d8c53fb8c7e4d1ac] source 40ab9800d3d19eee59571092a9872c8fe9af4e38
git bisect bad 5965f05474f5107b79b2ebf7d8c53fb8c7e4d1ac
# bad: [b40d02ecbc97fc0d2280fe2f267cca6dad423f88] source 6645a78104da18e23e476218343161c62dbc6a40
git bisect bad b40d02ecbc97fc0d2280fe2f267cca6dad423f88
# good: [7f1973044bf87e5cfdb839129b89d13aee69d163] source be1cc9d0d2e7cdbf449521a9e602ac5a288255ab
git bisect good 7f1973044bf87e5cfdb839129b89d13aee69d163
# bad: [f4323b97e75cbb714dfbede6e96a9bc1fd2095f3] source 7f0bdd5e88ed49eebe3c0c8edabecffdddeaff4f
git bisect bad f4323b97e75cbb714dfbede6e96a9bc1fd2095f3
# bad: [298233f33a2ab99cd461f7f2e697e0f2a8960f23] source e953ce16d24cff34b97940a6063704cd487fec42
git bisect bad 298233f33a2ab99cd461f7f2e697e0f2a8960f23
# good: [4a1e6feee8a13e39b3efde9a02788c4e2358c762] source d77e1cf718e004fd24976c3c30c8f03ba3eeddfb
git bisect good 4a1e6feee8a13e39b3efde9a02788c4e2358c762
# bad: [5318eae21a2c069c9d2f559eaadd58132d9fc83e] source ba42d00ed5a04850f88abdf184a4855db7cf2700
git bisect bad 5318eae21a2c069c9d2f559eaadd58132d9fc83e
# bad: [6d8ecb9eb268d0aeba2afca5b3a2a9aae2c708f3] source ba7b609b190e69dc89c3cb26cbab4b340fcbfc4b
git bisect bad 6d8ecb9eb268d0aeba2afca5b3a2a9aae2c708f3
# good: [6967bf50653a35146fbf8bb7f1d65187f017d4d2] source 81f06a142d3228a97341d0728d2aff761b5fd5a2
git bisect good 6967bf50653a35146fbf8bb7f1d65187f017d4d2
# bad: [4d9e103b9a667efd561bdc82e8fc90b59038dca7] source 75a5b5a850511bf1a0a32c113237085cbc069cc4
git bisect bad 4d9e103b9a667efd561bdc82e8fc90b59038dca7
# bad: [3adc79885919020ebdf8c62d9608efafc01cd9d3] source 167c3f9d94e503d99fbdcbf59bae47766cd239f3
git bisect bad 3adc79885919020ebdf8c62d9608efafc01cd9d3
# first bad commit: [3adc79885919020ebdf8c62d9608efafc01cd9d3] source 167c3f9d94e503d99fbdcbf59bae47766cd239f3
Comment 4 Xisco Faulí 2019-08-15 18:55:23 UTC
Also reproduced in

Version: 6.4.0.0.alpha0+
Build ID: fe00a724a918606e5c8c2c32b155bc50b33d56bd
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 NISZ LibreOffice Team 2021-05-07 10:25:48 UTC
This file has a data range defined with the problematic autofilter, see Data - Select Range.
Comment 6 Eike Rathke 2021-07-22 09:48:17 UTC
(In reply to Oliver Brinzing from comment #3)
> > After deleting columns B and C, the range points to $Assets.$B$1:$B$7
> 
> this already happens with AOO 4.1.5.
> seems it is not possible to delete/invalidate a Database Range via deleting
> corresponding columns (a named range would be invalidated).
Right, the references of a named range are invalidated in such case. The database range does not have that reference mechanism but shrinks to at least one remaining cell.


> > an extra filter icon appears in cell B1
> 
> seems to have started with:
> 
> https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> 167c3f9d94e503d99fbdcbf59bae47766cd239f3
Naturally, because previously AutoFilter buttons were not refreshed at all thus appeared deleted.

So now for the remaining database range shrunk to one column a button is displayed.

To fix this, the database range would have to be deleted as well (and added to Undo/Redo).
Comment 7 Commit Notification 2021-07-30 15:57:48 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#126926 sc DBData: delete the database range

It will be available in 7.3.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 8 NISZ LibreOffice Team 2021-08-09 13:23:17 UTC
Verified in:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d1f1f546b212ecd651146addeb328806bb270d5f
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded
Comment 9 Commit Notification 2021-08-17 14:03:31 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/957d1e977d25385151c99e401124ad58217e53dd

tdf#126926 sc DBData: delete the database range

It will be available in 7.2.1.

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 Xisco Faulí 2021-10-04 14:05:19 UTC
I believe the fix for this issue introduced https://crashreport.libreoffice.org/stats/signature/ScDBData::UpdateReference(ScDocument%20const%20*,UpdateRefMode,short,long,short,short,long,short,short,long,short) since it started to happen in 7.2.1.2 but I don't know how to reproduce the crash
Comment 11 Eike Rathke 2021-10-07 15:33:27 UTC
I think I have a blind fix for that (until we have a reproducer, that would need at least two maybe more defined database ranges, of which when deleting columns at least one or maybe more would get deleted).
Comment 12 Eike Rathke 2021-10-07 15:55:06 UTC
Seems you need several anonymous database ranges for a reproducer, like created by just setting AutoFilters on several ranges on several sheets and deleting all columns of the first AutoFilter range or so.
Comment 13 Commit Notification 2021-10-07 18:14:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Blind fix crash in ScDBData::UpdateReference(), tdf#126926 follow-up

It will be available in 7.3.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 14 Eike Rathke 2021-10-07 18:15:23 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/123160 for 7-2
Comment 15 Commit Notification 2021-10-11 09:29:02 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/333b77e92b502d3c3f886f1b38b2e528a2f0937c

Blind fix crash in ScDBData::UpdateReference(), tdf#126926 follow-up

It will be available in 7.2.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.