winaccessibility/source/UAccCOM/AccHyperLink.cxx | 16 +++++++++------- winaccessibility/source/UAccCOM/AccHyperLink.h | 2 -- winaccessibility/source/UAccCOM/AccImage.cxx | 6 +++--- winaccessibility/source/UAccCOM/AccImage.h | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-)
New commits: commit 5ccd777b33d070ca056ac18cec59ba741b73d48e Author: Michael Weghorn <[email protected]> AuthorDate: Tue Sep 17 08:51:20 2024 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Sep 17 21:41:46 2024 +0200 wina11y: Rename CAccImage::{pRXImg -> m_xImage} Adhere to naming conventions to make clearer this is a class member, and a uno::Reference. Change-Id: I804bb66d88675d1f5e7e0ee31f9244db5abf0125 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173534 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/winaccessibility/source/UAccCOM/AccImage.cxx b/winaccessibility/source/UAccCOM/AccImage.cxx index bf53f440d98a..fbdcf6fa3ab2 100644 --- a/winaccessibility/source/UAccCOM/AccImage.cxx +++ b/winaccessibility/source/UAccCOM/AccImage.cxx @@ -44,7 +44,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccImage::get_description(BSTR* description) { if (description == nullptr) return E_INVALIDARG; - if (!pRXImg.is()) + if (!m_xImage.is()) return E_FAIL; OUString ouStr = GetXInterface()->getAccessibleImageDescription(); @@ -97,9 +97,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccImage::put_XInterface(hyper pXInterface) } Reference<XAccessibleImage> pRXI(pRContext, UNO_QUERY); if (!pRXI.is()) - pRXImg = nullptr; + m_xImage = nullptr; else - pRXImg = pRXI.get(); + m_xImage = pRXI.get(); return S_OK; } catch (...) diff --git a/winaccessibility/source/UAccCOM/AccImage.h b/winaccessibility/source/UAccCOM/AccImage.h index 4e0708a18066..9e0e88d6e07a 100644 --- a/winaccessibility/source/UAccCOM/AccImage.h +++ b/winaccessibility/source/UAccCOM/AccImage.h @@ -88,11 +88,11 @@ public: private: - css::uno::Reference<css::accessibility::XAccessibleImage> pRXImg; + css::uno::Reference<css::accessibility::XAccessibleImage> m_xImage; css::accessibility::XAccessibleImage* GetXInterface() { - return pRXImg.get(); + return m_xImage.get(); } }; commit ec2d705c16db5854ac51dd54fd67f32f0f15a5cc Author: Michael Weghorn <[email protected]> AuthorDate: Tue Sep 17 08:47:43 2024 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Sep 17 21:41:40 2024 +0200 wina11y: Check reference in CAccHyperLink::get_startIndex Check the reference is valid in this method as well, just like in all of the other API methods. Change-Id: Ibb1a6a8b290ffefc502966ed0372c4e421fe68fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173533 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.cxx b/winaccessibility/source/UAccCOM/AccHyperLink.cxx index d746ab9efc63..533b1840413c 100644 --- a/winaccessibility/source/UAccCOM/AccHyperLink.cxx +++ b/winaccessibility/source/UAccCOM/AccHyperLink.cxx @@ -177,6 +177,10 @@ CAccHyperLink::get_startIndex(/* [retval][out] */ long __RPC_FAR* index) { return E_INVALIDARG; } + + if (!m_xHyperlink.is()) + return E_FAIL; + *index = m_xHyperlink->getStartIndex(); return S_OK; commit 1941c32c90674c5b2870002c0791fb32ff4ff137 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Sep 17 08:45:25 2024 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Sep 17 21:41:32 2024 +0200 wina11y: Drop CAccHyperLink::GetXInterface Just consistently use the `m_xHyperlink` member directly. Change-Id: If2ac4150b5b733005b916d0c5f11e8c711d95c7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173532 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.cxx b/winaccessibility/source/UAccCOM/AccHyperLink.cxx index 49762671fcc4..d746ab9efc63 100644 --- a/winaccessibility/source/UAccCOM/AccHyperLink.cxx +++ b/winaccessibility/source/UAccCOM/AccHyperLink.cxx @@ -115,8 +115,7 @@ CAccHyperLink::get_anchor(/* [in] */ long index, { return E_FAIL; } - // Get Any type value via pRXLink. - css::uno::Any anyVal = GetXInterface()->getAccessibleActionAnchor(index); + css::uno::Any anyVal = m_xHyperlink->getAccessibleActionAnchor(index); // Convert Any to VARIANT. CMAccessible::ConvertAnyToVariant(anyVal, anchor); @@ -150,8 +149,7 @@ CAccHyperLink::get_anchorTarget(/* [in] */ long index, { return E_FAIL; } - // Get Any type value via pRXLink. - css::uno::Any anyVal = GetXInterface()->getAccessibleActionObject(index); + css::uno::Any anyVal = m_xHyperlink->getAccessibleActionObject(index); // Convert Any to VARIANT. CMAccessible::ConvertAnyToVariant(anyVal, anchorTarget); @@ -179,7 +177,7 @@ CAccHyperLink::get_startIndex(/* [retval][out] */ long __RPC_FAR* index) { return E_INVALIDARG; } - *index = GetXInterface()->getStartIndex(); + *index = m_xHyperlink->getStartIndex(); return S_OK; } @@ -210,7 +208,7 @@ CAccHyperLink::get_endIndex(/* [retval][out] */ long __RPC_FAR* index) { return E_FAIL; } - *index = GetXInterface()->getEndIndex(); + *index = m_xHyperlink->getEndIndex(); return S_OK; } @@ -241,7 +239,7 @@ CAccHyperLink::get_valid(/* [retval][out] */ boolean __RPC_FAR* valid) { return E_FAIL; } - *valid = GetXInterface()->isValid(); + *valid = m_xHyperlink->isValid(); return S_OK; } diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.h b/winaccessibility/source/UAccCOM/AccHyperLink.h index fd343c863fb3..cc0aae32cd52 100644 --- a/winaccessibility/source/UAccCOM/AccHyperLink.h +++ b/winaccessibility/source/UAccCOM/AccHyperLink.h @@ -123,8 +123,6 @@ public: private: css::uno::Reference<css::accessibility::XAccessibleHyperlink> m_xHyperlink; - - css::accessibility::XAccessibleHyperlink* GetXInterface() { return m_xHyperlink.get(); } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
