summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-02-27 12:58:52 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-02-27 19:34:47 +0100
commit8e456d51a48b4d2461634a41a40a5a3b58bfdef3 (patch)
treed97182136bb325dc94cae8ae1b9048d1f89741cc /include
parenta403fcd3a0f9e6e57f57b9961f7732d9fd95ab17 (diff)
tdf#159910 vcl a11y: Allow explicitly setting toolbar item a11y name
Add `ToolBox::SetAccessibleName` (and corresponding getter) to allow explicitly setting an accessible name for a toolbox/toolbar item with the VCL toolbar implementation. In the a11y class for a toolbar item, use any explicitly set name if it's non-empty, otherwise fall back to the previous logic. This will be used in an upcoming commit to take into account the accessible name set in .ui files and align the VCL ToolBox more with the gtk implementation using native GtkToolbar and native widgets for the toolbar items. Change-Id: Ib0255e2741a7ab2489a857ac120fb87f680fa775 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164033 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/toolbox.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 6cf448a30b1d..ead78c715dc9 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -412,6 +412,10 @@ public:
void SetHelpId( ToolBoxItemId nItemId, const OUString& rHelpId );
+ using DockingWindow::SetAccessibleName;
+ void SetAccessibleName(ToolBoxItemId nItemId, const OUString& rName );
+ OUString GetAccessibleName(ToolBoxItemId nItemId) const;
+
// window size according to current alignment, floating state and number of lines
Size CalcWindowSizePixel();
// window size according to current alignment, floating state and a given number of lines