summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-13 15:54:06 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-14 08:09:25 +0100
commit4ae31181cdd857b896c9fb6ab1fa57a41d76025f (patch)
tree78bfa7d0129eb9cf78c356f8d0c0dd53b61b524c /winaccessibility
parentd6c6472bbe1c90b733a4d69c4c8528f4de3750d3 (diff)
wina11y: Drop "using namespace css:accessibility::AccessibleRole"
And while at it, also replace the local variable that holds the role with 2 `sal_Int16` ones adhering to our naming scheme instead of calling it "Role". Change-Id: Ia49cfd23f919098eaea929601c4c432be3fcfe63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159383 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 7497a2f09f7e..6c1367185cac 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -188,9 +188,6 @@ void lcl_addIA2State(AccessibleStates& rStates, sal_Int64 nUnoState, sal_Int16 n
}
-using namespace com::sun::star::accessibility::AccessibleRole;
-
-
AccObjectWinManager* CMAccessible::g_pAccObjectManager = nullptr;
CMAccessible::CMAccessible():
@@ -1822,14 +1819,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR
m_xAccessible->getAccessibleContext();
if(!pRContext.is())
return E_FAIL;
- long Role = pRContext->getAccessibleRole();
+ const sal_Int16 nRole = pRContext->getAccessibleRole();
*groupLevel = 0;
*similarItemsInGroup = 0;
*positionInGroup = 0;
- if (Role != AccessibleRole::DOCUMENT && Role != AccessibleRole::DOCUMENT_PRESENTATION &&
- Role != AccessibleRole::DOCUMENT_SPREADSHEET && Role != AccessibleRole::DOCUMENT_TEXT)
+ if (nRole != AccessibleRole::DOCUMENT && nRole != AccessibleRole::DOCUMENT_PRESENTATION &&
+ nRole != AccessibleRole::DOCUMENT_SPREADSHEET && nRole != AccessibleRole::DOCUMENT_TEXT)
{
Reference< XAccessibleGroupPosition > xGroupPosition( pRContext, UNO_QUERY );
if ( xGroupPosition.is() )
@@ -1854,7 +1851,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR
Reference<XAccessibleContext> pRParentContext = pParentAcc->getAccessibleContext();
- if( Role == RADIO_BUTTON )
+ if (nRole == AccessibleRole::RADIO_BUTTON)
{
int index = 0;
int number = 0;
@@ -1874,7 +1871,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR
{
if( getTheParentOfMember(pRParentContext->getAccessibleChild(j).get())
== static_cast<XAccessible*>(pRAcc.get()) &&
- pRParentContext->getAccessibleChild(j)->getAccessibleContext()->getAccessibleRole() == RADIO_BUTTON)
+ pRParentContext->getAccessibleChild(j)->getAccessibleContext()->getAccessibleRole() == AccessibleRole::RADIO_BUTTON)
number++;
if (pRParentContext->getAccessibleChild(j).get() == m_xAccessible.get())
index = number;
@@ -1887,7 +1884,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR
return S_OK;
}
- else if ( COMBO_BOX == Role )
+ else if (nRole == AccessibleRole::COMBO_BOX)
{
*groupLevel = 1;
*similarItemsInGroup = 0;
@@ -1935,7 +1932,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR
}
return S_OK;
}
- else if ( PAGE_TAB == Role )
+ else if (nRole == AccessibleRole::PAGE_TAB)
{
*groupLevel = 1;
sal_Int64 nChildCount = pRParentContext->getAccessibleChildCount();
@@ -1958,8 +1955,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR
{
level++;
pRParentContext = pParentAcc->getAccessibleContext();
- Role = pRParentContext->getAccessibleRole();
- if( (Role == TREE) || (Role == LIST) )
+ const sal_Int16 nParentRole = pRParentContext->getAccessibleRole();
+ if ((nParentRole == AccessibleRole::TREE) || (nParentRole == AccessibleRole::LIST))
isFound = true;
pParentAcc = pRParentContext->getAccessibleParent();
}