diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-09-01 15:52:11 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-09-01 20:17:35 +0200 |
commit | 9b140c16196585eeabbd15bb6562eb371e399373 (patch) | |
tree | 88bb478c153d7774da28b3ae3aafee768ec173e9 | |
parent | bb7747f627fe7e909fca7264fd42fe6cb7aef0b5 (diff) |
wina11y: Drop CEnumVariant::m_lLBound that's always 0
... and doesn't increase readability.
Change-Id: I62f3b37e8b8b948600e4d5e721c67a575628f1d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139217
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | winaccessibility/source/UAccCOM/EnumVariant.cxx | 10 | ||||
-rw-r--r-- | winaccessibility/source/UAccCOM/EnumVariant.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/winaccessibility/source/UAccCOM/EnumVariant.cxx b/winaccessibility/source/UAccCOM/EnumVariant.cxx index 26cd75b254f9..92d4540796be 100644 --- a/winaccessibility/source/UAccCOM/EnumVariant.cxx +++ b/winaccessibility/source/UAccCOM/EnumVariant.cxx @@ -105,9 +105,9 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Skip(ULONG cElements) SolarMutexGuard g; m_lCurrent += cElements; - if (m_lCurrent > static_cast<long>(m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount())) + if (m_lCurrent > m_pXAccessibleSelection->getSelectedAccessibleChildCount()) { - m_lCurrent = m_lLBound+m_pXAccessibleSelection->getSelectedAccessibleChildCount(); + m_lCurrent = m_pXAccessibleSelection->getSelectedAccessibleChildCount(); return E_FAIL; } else @@ -124,7 +124,7 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Reset() { SolarMutexGuard g; - m_lCurrent = m_lLBound; + m_lCurrent = 0; return NOERROR; } @@ -193,7 +193,7 @@ long CEnumVariant::GetCountOfElements() } /** - * Set member m_pXAccessibleSelection to NULL and m_lCurrent to m_lLBound. + * Set member m_pXAccessibleSelection to NULL and m_lCurrent to 0. * @param. * @return Result */ @@ -203,7 +203,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CEnumVariant::ClearEnumeration() pUNOInterface = nullptr; m_pXAccessibleSelection = nullptr; - m_lCurrent = m_lLBound; + m_lCurrent = 0; return S_OK; } diff --git a/winaccessibility/source/UAccCOM/EnumVariant.h b/winaccessibility/source/UAccCOM/EnumVariant.h index d82bd771fb19..6d5bd286dbaf 100644 --- a/winaccessibility/source/UAccCOM/EnumVariant.h +++ b/winaccessibility/source/UAccCOM/EnumVariant.h @@ -43,10 +43,9 @@ class ATL_NO_VTABLE CEnumVariant : { public: CEnumVariant() - :m_lLBound(0), + :m_lCurrent(0), pUNOInterface(nullptr) { - m_lCurrent = m_lLBound; } virtual ~CEnumVariant() {}; @@ -100,7 +99,6 @@ public: private: long m_lCurrent; - long m_lLBound; css::accessibility::XAccessible* pUNOInterface; css::uno::Reference<css::accessibility::XAccessibleSelection> m_pXAccessibleSelection; |