Bug 149015 - Impress: Improve search for animations
Summary: Impress: Improve search for animations
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, topicUI
Depends on:
Blocks: Sidebar-Animation
  Show dependency treegraph
 
Reported: 2022-05-10 09:29 UTC by BDF
Modified: 2023-08-16 15:58 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Impress - Search under Linux (42.14 KB, image/png)
2022-05-10 09:33 UTC, BDF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BDF 2022-05-10 09:29:17 UTC
Description:
Currently you can search for animations by typing it's name. On Windows it only processes the first character on Linux it let's you search for the entire name.

Steps to Reproduce:
1. Add an animation, click in the animation selection box and search for any name

Actual Results:
If you search for eg. 'bar'
- the search will jump to the first use of 'b', then the first use of 'a' and then to the first use of 'r'
- on Linux it will search for 'bar'. In the current version Impress crashes when there is no matching the search (fixed in Bug 148985 - Impress crash on animation search)

Expected Results:
The search should just work like on Linux because this is how a search usually works.


Reproducible: Always


User Profile Reset: No



Additional Info:
Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-40-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 4800H with Radeon Graphics
Memory: 30.8 GiB of RAM
Graphics Processor: AMD RENOIR

Version: 7.3.3.2 / LibreOffice Community
Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: de-AT (de_AT.UTF-8); UI: de-DE
Flatpak
Calc: threaded
Comment 1 BDF 2022-05-10 09:33:56 UTC
Created attachment 180034 [details]
Impress - Search under Linux
Comment 2 Heiko Tietze 2023-03-14 13:04:58 UTC
Guess this is a gtk3 tool, it doesn't work with gen or kf5. Typing letters jumps to the first item starting with this character. We could silently search for the entered word, meaning some cache that stores the word and per cursor up/down you find the next/previous, eg. for Fade) or we add an input field to make this function explicite. I'm not a fan of this idea as it clutters the dialog. Or just resolve WONTFIX?

Caolan, what do you think?
Comment 3 Caolán McNamara 2023-03-14 13:53:40 UTC
The gtk case uses a true GtkTreeView and so uses whatever search mechanism gtk uses.

The other cases are using a SvTreeListBox and it does look like it just searches for an entry that starts with the last pressed character, unlike the ComboBox above which will show Exit if you type Ex. So acting like the ComboBox makes sense to me, there is some sort of 500ms timeout on the ComboBox at which point the accumulated search word is cleared and new keypresses start a new word.
Comment 4 Eyal Rozenberg 2023-03-14 20:51:19 UTC
(In reply to Caolán McNamara from comment #3)
> The other cases are using a SvTreeListBox and it does look like it just
> searches for an entry that starts with the last pressed character, unlike
> the ComboBox above

Above what?

> which will show Exit if you type Ex. So acting like the
> ComboBox makes sense to me

Do you mean generally, or just this "tree list box"?

I'd support both, especially the former :-P
Comment 5 Caolán McNamara 2023-03-15 10:10:52 UTC
(In reply to Eyal Rozenberg from comment #4)
> (In reply to Caolán McNamara from comment #3)
> > The other cases are using a SvTreeListBox and it does look like it just
> > searches for an entry that starts with the last pressed character, unlike
> > the ComboBox above
> 
> Above what?

In the screenshot the SvTreeListBox we are talking about is labelled "Effekt" and the ComboBox I refer to as above is the one labelled "Kategorie", in my english UI there are three strings that start with E in it and the third is Exit and if I type Ex in there it selects Exit

> Do you mean generally, or just this "tree list box"?
> 
> I'd support both, especially the former :-P

generally, for all SvTreeListBox, code for it is vcl/source/treelist/treelistbox.cxx HandleKeyInput. Needs to be compared and contrasted with the ComboBox one to get SvTreeListBox to behave like the ComboBox for search.
Comment 6 Heiko Tietze 2023-03-16 09:13:29 UTC Comment hidden (off-topic)
Comment 7 Jim Raykowski 2023-03-16 16:47:35 UTC
Adding to Caolán's hint:

vcl:ISearchableStringList::SelectEntry is used by both SvTreeListBox and Listbox. Directly inherited by SvTreeListBox. For the Listbox class this is done through ImplListBox ImplListBoxWindow.