summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-09 14:07:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-09 14:50:21 +0100
commita1dd01fd8c2ec5ec320f093da18f99186fb3031f (patch)
tree862ceb55360c98fb345e8b7e7d46c37cc1335a22 /vcl
parent20168b1f09b4d2aa8643dc7d4a16d8a1dd1008a6 (diff)
simplify init in action_wrapper_get_name
Change-Id: Ie73f5fc096b918a7cb8a9342b33fab60806c77b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/a11y/atkaction.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/vcl/unx/gtk3/a11y/atkaction.cxx b/vcl/unx/gtk3/a11y/atkaction.cxx
index 84770c09cfe9..0a39d3bdf98e 100644
--- a/vcl/unx/gtk3/a11y/atkaction.cxx
+++ b/vcl/unx/gtk3/a11y/atkaction.cxx
@@ -113,21 +113,15 @@ action_wrapper_get_localized_name (AtkAction *, gint)
return "";
}
-#define ACTION_NAME_PAIR( OOoName, AtkName ) \
- std::pair< const OUString, const gchar * > ( OUString( OOoName ), AtkName )
-
static const gchar *
action_wrapper_get_name (AtkAction *action,
gint i)
{
- static std::map< OUString, const gchar * > aNameMap;
-
- if( aNameMap.empty() )
- {
- aNameMap.insert( ACTION_NAME_PAIR( "click", "click" ) );
- aNameMap.insert( ACTION_NAME_PAIR( "select", "click" ) );
- aNameMap.insert( ACTION_NAME_PAIR( "togglePopup", "push" ) );
- }
+ static std::map< OUString, const gchar * > aNameMap {
+ { "click", "click" },
+ { "select", "click" } ,
+ { "togglePopup", "push" }
+ };
try {
css::uno::Reference<css::accessibility::XAccessibleAction> pAction