diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-05 14:29:18 +0000 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-06 10:10:52 +0100 |
commit | e523b205364e59f11ae3e735c1440d61427f15d7 (patch) | |
tree | 3010a6a7427e4e0b4339afe885020622111e662c /winaccessibility | |
parent | fd787538797a182786ab7b1dfc041562b2e5073a (diff) |
wina11y: Deduplicate 2 common lines in CMAccessible::get_accRole
Change-Id: I3bd4f26861d46f6a43a4b0edda3dbf628e2da2cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128010
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/UAccCOM/MAccessible.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 0e3de1af1b53..c905cc82b875 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -505,18 +505,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accRole(VARIANT varChild, VA if(varChild.lVal == CHILDID_SELF) { - if( m_iRole < IA2_ROLE_CAPTION ) - { - VariantInit(pvarRole); - pvarRole->vt = VT_I4; + VariantInit(pvarRole); + pvarRole->vt = VT_I4; + + if (m_iRole < IA2_ROLE_CAPTION) pvarRole->lVal = m_iRole; - } else - { - VariantInit(pvarRole); - pvarRole->vt = VT_I4; pvarRole->lVal = ROLE_SYSTEM_CLIENT; - } + return S_OK; } |