summaryrefslogtreecommitdiff
path: root/winaccessibility/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-08-20 14:23:42 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-08-21 07:47:44 +0200
commita7568b0555b2c616e7cab857400ff6d7911f290d (patch)
treebb97e43e486f3dabef26372a8d9ec78c8bc61261 /winaccessibility/source
parentead6cb42592880012ab12aada57cf1165ef084e4 (diff)
wina11y: Use UNKNOWN as fallback for a11y role
Let `AccEventListener::GetRole` return `AccessibleRole::UNKNOWN` in case there's no accessible object instead of -1. The latter doesn't map to any a11y role. This doesn't make any difference in practice right now, as none of the callers explicitly handles the UNKNOWN role either, but could e.g. simplify switching `AccessibleRole` from an integer type to an enum in the future. Change-Id: I8b0d78642621ce997d55d12905e31e7978962ec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172124 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source')
-rw-r--r--winaccessibility/source/service/AccEventListener.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
index cb59ad90a878..4ba5ebfca0c0 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -233,7 +233,7 @@ short AccEventListener::GetRole()
{
return xContext->getAccessibleRole();
}
- return -1;
+ return AccessibleRole::UNKNOWN;
}
/**