Bug 152316 - FILTER: "Show/Hide only the current item" when filtering in Calc is broken with the default focus
Summary: FILTER: "Show/Hide only the current item" when filtering in Calc is broken wi...
Status: RESOLVED DUPLICATE of bug 152325
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-30 15:12 UTC by Kamil Páral
Modified: 2022-12-08 12:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bug demonstration video (868.79 KB, video/webm)
2022-11-30 15:13 UTC, Kamil Páral
Details
ODS example file (10.74 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-11-30 15:13 UTC, Kamil Páral
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Páral 2022-11-30 15:12:21 UTC
Description:
When filtering rows in Calc, when you open the filter menu on a specific column, there are "Show only the current item" and "Hide only the current item" buttons present. They don't work properly by default. The first item in the list is highlighted, and so the "Show only" button should only select the first item, and "Hide only" button should select everything but the first item. However, by default, they act as "Select everything" and "Deselect everything" buttons. Only after you manually click on some item in the list (any one, including the first one), they start working as intended.

It seems that there is a focus issue. The first item in the list seems highlighted/focused, but those buttons don't honor it. Only after manually clicking somewhere in the item list, the transferred focus probably makes them behave correctly.

I created a short video demonstrating this issue, I'll attach it. Notice how those buttons select/deselect everything initially, until I manually click somewhere in the item list, then they work correctly.

Steps to Reproduce:
1. Populate some rows in Calc.
2. Create an auto-filter.
3. Display the filter menu on a column.
4. Try "Show only the current item" and "Hide only the current item" buttons. They select/deselect everything, even though they should only select/deselect the first item (which is highlighted by default).
5. Click on any item in the item list.
6. Try "Show only the current item" and "Hide only the current item" buttons now, they star behaving as expected.

Actual Results:
"Show only the current item" and "Hide only the current item" buttons don't work properly until you manually highlight some item in the item list.

Expected Results:
"Show only the current item" and "Hide only the current item" buttons should do what they're supposed to do also initially, with the first highlighted item.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.3.2
Build ID: 40(Build:2)
CPU threads: 12; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Fedora 37
libreoffice-calc-7.4.3.2-1.fc37.x86_64
Comment 1 Kamil Páral 2022-11-30 15:13:13 UTC
Created attachment 183913 [details]
bug demonstration video

Please see this video for a bug demonstration.
Comment 2 Kamil Páral 2022-11-30 15:13:52 UTC
Created attachment 183914 [details]
ODS example file

Here's the example ODS file I used to showcase the issue.
Comment 3 m_a_riosv 2022-11-30 17:07:24 UTC
Because you need to do a first selection, if not the cursor it's in the search box, not in the first item.
Comment 4 Kamil Páral 2022-11-30 17:56:14 UTC
You can see in the video that the first item is automatically selected. It has a blue background. If I understand you correctly, you're saying the first item is not actually selected, it just *appears* to be selected. Then that's exactly the bug. It shouldn't appear selected, it shouldn't have a blue background.
Comment 5 raal 2022-11-30 20:43:23 UTC
It works for me in Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ebe151d919a454f98c36013245bca9eb41d92707
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: x11
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Please test start LO from command line with gen vcl plugin:
SAL_USE_VCLPLUGIN=gen soffice
Comment 6 Kamil Páral 2022-11-30 22:01:38 UTC
OK, I also tested the latest nightly:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 98d8adc5b377039d5dee0d5046ece721010a960c
CPU threads: 12; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Both LO 7.4.3.2 and LO 7.5.0.0.alpha1+ are affected on my Fedora 37. LO 7.4.3.2, as mentioned, toggles all items on/off. LO 7.5.0.0.alpha1+ doesn't do anything, those filter buttons simply have no effect on the checkboxes in the item list. Only after manual selection it starts work properly, same as in LO 7.4.3.2.

However, using SAL_USE_VCLPLUGIN=gen fixes both versions. It looks terrible (Windows 95-style), but those filter buttons work as expected right out of the box.

So, this is likely a gtk3-related issue?
Comment 7 Kamil Páral 2022-12-01 12:51:27 UTC
My gtk3 version is gtk3-3.24.35-1.fc37.x86_64.
Comment 8 Caolán McNamara 2022-12-08 12:05:59 UTC
same underlying problem as bug 152325 though a different expression in 7.4 than 7.5

*** This bug has been marked as a duplicate of bug 152325 ***