summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
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 );