tdf#102307 quick find: add hard coded keyboard shortcut to label

The quick find (Ctrl-F) toolbar has a few hard-coded
keyboard shortcuts to find next or find previous.
However, those were undiscoverable to the user.

So, manually add one to the translatable label.

Hmm, this can be done automatically (the 'right' way)
via officecfg/registry/data/org/openoffice/Office/Accelerators.xcu.
However, these are not available to be set via the customize menu.
Nor do they work outside of the Find toolbar.

These are not user-customizable shortcuts.
They are hard-coded keys combinations in
svx/source/tbxctrls/tbunosearchcontrollers.cxx,
and thus are not language dependent.

An alternative would be to display Ctrl+G.
I chose F3 because it is a standard
for both Windows and Linux (KDE and Gnome).
[Gnome ALSO standardizes Ctrl+G, and that is what MacOS uses.
LO assigns Ctrl-G to .uno:RepeatSearch for macosx.]

make UITest_sw_findBar

Change-Id: If4b16d2e0c4abdd7656d58625a51ac7f40bdb242
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207972
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
This commit is contained in:
Justin Luth
2026-07-20 23:48:08 +02:00
parent 1bfad0e536
commit 3552e250f4
2 changed files with 4 additions and 4 deletions
@@ -1802,7 +1802,7 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
</node>
<node oor:name=".uno:DownSearch" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Find Next</value>
<value xml:lang="en-US">Find Next (F3)</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
@@ -1810,7 +1810,7 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
</node>
<node oor:name=".uno:UpSearch" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Find Previous</value>
<value xml:lang="en-US">Find Previous (Shift+F3)</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
+2 -2
View File
@@ -54,14 +54,14 @@ class FindBar(UITestCase):
# Press on Find Next in the Find Bar
xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # 3 is Find Next pos
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "4")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Next")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Next (F3)")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:DownSearch")
self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "Libre")
# Press on Find Previous in the Find Bar
xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "2"})) # 2 is Find Previous pos
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "3")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Previous")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Previous (Shift+F3)")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:UpSearch")
self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "libre")