summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-03 16:21:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-03 20:27:29 +0100
commitb66c5f77d150056b2de262dae66301fcd7dc38c1 (patch)
treebe6cb75524abff6f1fbfda2c62fd2ce5cb132e2f /winaccessibility
parent86af52b119eaf57b7c1f8943cc1c6631f2044482 (diff)
loplugin:unsignedcompare (clang-cl)
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'winaccessibility')
-rw-r--r--winaccessibility/source/service/AccObject.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index bf71d8617596..f6460522838d 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include <o3tl/char16_t2wchar_t.hxx>
+#include <o3tl/safeint.hxx>
#include <stdlib.h>
#include <memory.h>
@@ -797,7 +798,7 @@ void AccObject::UpdateRole()
XAccessibleContext* pContext = m_xAccContextRef.get();
m_pIMAcc->Put_XAccRole( ROLE_SYSTEM_WINDOW );
sal_Int16 iRoleIndex = pContext->getAccessibleRole();
- if ((0 <= iRoleIndex) && (sal_uInt16(iRoleIndex) < SAL_N_ELEMENTS(ROLE_TABLE)))
+ if ((0 <= iRoleIndex) && (o3tl::make_unsigned(iRoleIndex) < SAL_N_ELEMENTS(ROLE_TABLE)))
{
short iIA2Role = ROLE_TABLE[iRoleIndex][1] ;
m_pIMAcc->Put_XAccRole( iIA2Role );