diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-22 16:01:49 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-22 22:27:22 +0200 |
commit | 18d45783a6c9f0d13fa0fae7b623be0805d8d825 (patch) | |
tree | 24eb924b0326843b29998d731efa2cac9aa0041e /winaccessibility | |
parent | cd00bc50a7425e2f58d54de80b714cb6b0362dce (diff) |
wina11y: Drop CAccActionBase::GetXInterface
Just use the `pRXAct` member directly.
In particular the fact that all of the `CAccActionBase`
methods mixed both ways of accessing the member (first checking
`pRXAct` directly, but then retrieving it via
`CAccActionBase::GetXInterface` to call a method
on it) didn't really increase readability of the code.
Change-Id: Ic6f5ce9a9b229b949ac656668e3bbf01cb65af2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155956
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/UAccCOM/AccActionBase.cxx | 8 | ||||
-rw-r--r-- | winaccessibility/source/UAccCOM/AccActionBase.h | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx b/winaccessibility/source/UAccCOM/AccActionBase.cxx index 70940aa31b1e..0fb2d7bbcee6 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.cxx +++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx @@ -62,7 +62,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long* if( pRXAct.is() && nActions != nullptr ) { - *nActions = GetXInterface()->getAccessibleActionCount(); + *nActions = pRXAct->getAccessibleActionCount(); return S_OK; } *nActions = 0; @@ -85,7 +85,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::doAction(/* [in] */ long actio if( pRXAct.is() ) { - return GetXInterface()->doAccessibleAction( actionIndex )?S_OK:E_FAIL; + return pRXAct->doAccessibleAction(actionIndex) ? S_OK : E_FAIL; } return E_FAIL; @@ -110,7 +110,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::get_description(long actionInd if(!pRXAct.is()) return E_FAIL; - OUString ouStr = GetXInterface()->getAccessibleActionDescription(actionIndex); + OUString ouStr = pRXAct->getAccessibleActionDescription(actionIndex); SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); @@ -156,7 +156,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::get_keyBinding( if( !pRXAct.is() ) return E_FAIL; - Reference< XAccessibleKeyBinding > binding = GetXInterface()->getAccessibleActionKeyBinding(actionIndex); + Reference< XAccessibleKeyBinding > binding = pRXAct->getAccessibleActionKeyBinding(actionIndex); if( !binding.is() ) return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/AccActionBase.h b/winaccessibility/source/UAccCOM/AccActionBase.h index 26d3e7d054aa..9bf2c70b4bb2 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.h +++ b/winaccessibility/source/UAccCOM/AccActionBase.h @@ -66,9 +66,6 @@ public: protected: css::uno::Reference<css::accessibility::XAccessibleAction> pRXAct; - -private: - css::accessibility::XAccessibleAction* GetXInterface() { return pRXAct.get(); } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |