winaccessibility/inc/AccObjectWinManager.hxx | 3 winaccessibility/source/UAccCOM/AccActionBase.cxx | 4 winaccessibility/source/UAccCOM/AccComponentBase.cxx | 10 - winaccessibility/source/UAccCOM/AccEditableText.cxx | 3 winaccessibility/source/UAccCOM/AccHyperLink.cxx | 13 -- winaccessibility/source/UAccCOM/AccHypertext.cxx | 9 - winaccessibility/source/UAccCOM/AccImage.cxx | 1 winaccessibility/source/UAccCOM/AccRelation.cxx | 9 - winaccessibility/source/UAccCOM/AccTable.cxx | 65 +--------- winaccessibility/source/UAccCOM/AccTableCell.cxx | 23 +-- winaccessibility/source/UAccCOM/AccTextBase.cxx | 32 ++--- winaccessibility/source/UAccCOM/EnumVariant.cxx | 11 - winaccessibility/source/UAccCOM/MAccessible.cxx | 95 ++++++---------- winaccessibility/source/UAccCOM/MAccessible.h | 3 winaccessibility/source/service/AccObjectWinManager.cxx | 19 --- 15 files changed, 97 insertions(+), 203 deletions(-)
New commits: commit 1ba5f6682c2eaf46cbe6447125aaed5f87edeb34 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Aug 9 10:35:23 2023 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Aug 9 15:45:49 2023 +0200 wina11y: Drop "#CHECK#" comments ... and "#CHECK XInterface#" comments; it's obvious that this is what the next lines do. Change-Id: I09234d1a2f5c58cfab1580f188229d28d27fc402 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155506 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx b/winaccessibility/source/UAccCOM/AccActionBase.cxx index 3062e96a855c..70940aa31b1e 100644 --- a/winaccessibility/source/UAccCOM/AccActionBase.cxx +++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx @@ -60,7 +60,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long* try { - // #CHECK# if( pRXAct.is() && nActions != nullptr ) { *nActions = GetXInterface()->getAccessibleActionCount(); @@ -105,16 +104,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::get_description(long actionInd try { - // #CHECK# if(description == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXAct.is()) return E_FAIL; OUString ouStr = GetXInterface()->getAccessibleActionDescription(actionIndex); - // #CHECK# SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cxx b/winaccessibility/source/UAccCOM/AccComponentBase.cxx index ed44c2c93d17..1cd6cdc1c8ac 100644 --- a/winaccessibility/source/UAccCOM/AccComponentBase.cxx +++ b/winaccessibility/source/UAccCOM/AccComponentBase.cxx @@ -47,7 +47,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::get_locationInParent(long* { if (x == nullptr || y == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if (!pRXComp.is()) return E_FAIL; @@ -77,7 +77,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::get_locationOnScreen(long* { if (x == nullptr || y == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if (!pRXComp.is()) return E_FAIL; @@ -105,7 +105,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::grabFocus(boolean* success) { if (success == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if (!pRXComp.is()) { return E_FAIL; @@ -134,7 +134,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::get_foreground(IA2Color* fo { if (foreground == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if (!pRXComp.is()) { return E_FAIL; @@ -162,7 +162,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::get_background(IA2Color* ba { if (background == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if (!pRXComp.is()) { return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index 3dd1883b9fb3..212546e12ee0 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -54,7 +54,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccEditableText::copyText(long startOffset, l try { - // #CHECK XInterface# if(!pRXEdtTxt.is()) { return E_FAIL; @@ -182,7 +181,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccEditableText::replaceText(long startOffset try { - // #CHECK# if (text == nullptr) return E_INVALIDARG; if( !pRXEdtTxt.is() ) @@ -211,7 +209,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccEditableText::setAttributes(long startOffs try { - // #CHECK# if (attributes == nullptr) return E_INVALIDARG; if( !pRXEdtTxt.is() ) diff --git a/winaccessibility/source/UAccCOM/AccHyperLink.cxx b/winaccessibility/source/UAccCOM/AccHyperLink.cxx index 5546c93e5804..40a5280c2c02 100644 --- a/winaccessibility/source/UAccCOM/AccHyperLink.cxx +++ b/winaccessibility/source/UAccCOM/AccHyperLink.cxx @@ -109,12 +109,11 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHyperLink::get_anchor(/* [in] */ long inde try { - // #CHECK# if(anchor == nullptr) { return E_INVALIDARG; } - // #CHECK XInterface# + if(!pRXLink.is()) { return E_FAIL; @@ -141,12 +140,11 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHyperLink::get_anchorTarget(/* [in] */ lon try { - // #CHECK# if(anchorTarget == nullptr) { return E_INVALIDARG; } - // #CHECK XInterface# + if(!pRXLink.is()) { return E_FAIL; @@ -173,7 +171,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHyperLink::get_startIndex(/* [retval][out] try { - // #CHECK# if(index == nullptr) { return E_INVALIDARG; @@ -196,12 +193,11 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHyperLink::get_endIndex(/* [retval][out] * try { - // #CHECK# if(index == nullptr) { return E_INVALIDARG; } - // #CHECK XInterface# + if(!pRXLink.is()) { return E_FAIL; @@ -224,12 +220,11 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHyperLink::get_valid(/* [retval][out] */ b try { - // #CHECK# if(valid == nullptr) { return E_INVALIDARG; } - // #CHECK XInterface# + if(!pRXLink.is()) { return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/AccHypertext.cxx b/winaccessibility/source/UAccCOM/AccHypertext.cxx index 75d816112e85..c1f81c88849c 100644 --- a/winaccessibility/source/UAccCOM/AccHypertext.cxx +++ b/winaccessibility/source/UAccCOM/AccHypertext.cxx @@ -270,10 +270,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_nHyperlinks(long *hyperlink try { - // #CHECK# if(hyperlinkCount == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pHyperText.is()) { return E_FAIL; @@ -297,10 +296,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_hyperlink(long index,IAcces try { - // #CHECK# if(hyperlink == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pHyperText.is()) { return E_FAIL; @@ -345,10 +343,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccHypertext::get_hyperlinkIndex(long charInd try { - // #CHECK# if(hyperlinkIndex == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pHyperText.is()) { return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/AccImage.cxx b/winaccessibility/source/UAccCOM/AccImage.cxx index a8d27a81cc78..7dbfcc339cc3 100644 --- a/winaccessibility/source/UAccCOM/AccImage.cxx +++ b/winaccessibility/source/UAccCOM/AccImage.cxx @@ -41,7 +41,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccImage::get_description(BSTR* description) try { - // #CHECK# if (description == nullptr) return E_INVALIDARG; if (!pRXImg.is()) diff --git a/winaccessibility/source/UAccCOM/AccRelation.cxx b/winaccessibility/source/UAccCOM/AccRelation.cxx index 2c815c674f24..b866d3f0ba36 100644 --- a/winaccessibility/source/UAccCOM/AccRelation.cxx +++ b/winaccessibility/source/UAccCOM/AccRelation.cxx @@ -134,7 +134,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccRelation::get_targets(long, IUnknown * * t try { - // #CHECK# if(target == nullptr) return E_INVALIDARG; if (nTargets == nullptr) diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx b/winaccessibility/source/UAccCOM/AccTable.cxx index 9fd32c532bc5..a158cf70667f 100644 --- a/winaccessibility/source/UAccCOM/AccTable.cxx +++ b/winaccessibility/source/UAccCOM/AccTable.cxx @@ -49,10 +49,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_accessibleAt(long row, long col try { - // #CHECK# if(accessible == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXTable.is()) return E_FAIL; @@ -117,16 +116,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_columnDescription(long column, try { - // #CHECK# if(description == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; const OUString& ouStr = pRXTable->getAccessibleColumnDescription(column); - // #CHECK# SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); @@ -175,11 +171,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_columnHeader(IAccessibleTable _ try { - // #CHECK# if(accessibleTable == nullptr || startingRowIndex == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -225,11 +219,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_nColumns(long * columnCount) try { - // #CHECK# if(columnCount == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -250,11 +242,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_nRows(long * rowCount) try { - // #CHECK# if(rowCount == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -275,11 +265,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_nSelectedColumns(long * columnC try { - // #CHECK# if(columnCount == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -301,11 +289,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_nSelectedRows(long * rowCount) try { - // #CHECK# if(rowCount == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -328,16 +314,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_rowDescription(long row, BSTR * try { - // #CHECK# if(description == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; const OUString& ouStr = pRXTable->getAccessibleRowDescription(row); - // #CHECK# SysFreeString(*description); *description = SysAllocString(o3tl::toW(ouStr.getStr())); @@ -387,11 +370,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_rowHeader(IAccessibleTable __RP try { - // #CHECK# if(accessibleTable == nullptr || startingColumnIndex == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -438,11 +419,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_selectedRows(long** rows, long* try { - // #CHECK# if(rows == nullptr || nRows == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -488,11 +467,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_selectedColumns(long ** columns try { - // #CHECK# if(columns == nullptr || numColumns == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -537,11 +514,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible try { - // #CHECK# if(accessible == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -573,11 +548,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_isColumnSelected(long column, b try { - // #CHECK# if(isSelected == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -599,11 +572,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_isRowSelected(long row, boolean try { - // #CHECK# if(isSelected == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -626,11 +597,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_isSelected(long row, long colum try { - // #CHECK# if(isSelected == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -864,11 +833,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_columnIndex(long childIndex, lo try { - // #CHECK# if(columnIndex == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -888,11 +855,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_rowIndex(long childIndex, long try { - // #CHECK# if(rowIndex == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -913,11 +878,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_childIndex(long RowIndex , long try { - // #CHECK# if(childIndex == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -961,11 +924,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_nSelectedChildren(long *childCo try { - // #CHECK# if(childCount == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; @@ -1006,11 +967,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_selectedChildren(long, long **c try { - // #CHECK# if(children == nullptr || nChildren == nullptr) return E_INVALIDARG; - // #CHECK XInterface# if(!pRXTable.is()) return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx b/winaccessibility/source/UAccCOM/AccTextBase.cxx index b70b13c0a980..27c8f74c341c 100644 --- a/winaccessibility/source/UAccCOM/AccTextBase.cxx +++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx @@ -94,7 +94,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_addSelection(long startOffse try { - // #CHECK XInterface# if(pUNOInterface == nullptr) return E_FAIL; @@ -132,7 +131,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_attributes(long offset, long if (startOffset == nullptr || endOffset == nullptr || textAttributes == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) { return E_FAIL; @@ -216,7 +215,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_attributes(long offset, long } } strAttrs.append(';'); - // #CHECK# + if(*textAttributes) SysFreeString(*textAttributes); *textAttributes = SysAllocString(o3tl::toW(strAttrs.makeStringAndClear().getStr())); @@ -251,7 +250,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_caretOffset(long * offset) if (offset == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) { *offset = 0; @@ -277,7 +276,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_characterCount(long * nChara if (nCharacters == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) { *nCharacters = 0; @@ -307,7 +306,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_characterExtents(long offset if (x == nullptr || height == nullptr || y == nullptr || width == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) return E_FAIL; @@ -379,7 +378,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_nSelections(long * nSelectio if (nSelections == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(pUNOInterface == nullptr) { *nSelections = 0; @@ -425,7 +424,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_offsetAtPoint(long x, long y if (offset == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) return E_FAIL; @@ -468,7 +467,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_selection(long selectionInde if (startOffset == nullptr || endOffset == nullptr ) return E_INVALIDARG; - // #CHECK XInterface# + if(pUNOInterface == nullptr ) return E_FAIL; @@ -517,7 +516,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_text(long startOffset, long if (text == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) return E_FAIL; @@ -562,10 +561,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_textBeforeOffset(long offset try { - // #CHECK# if (startOffset == nullptr || endOffset == nullptr || text == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) return E_FAIL; @@ -611,7 +609,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_textAfterOffset(long offset, if (startOffset == nullptr || endOffset == nullptr || text == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) return E_FAIL; @@ -657,7 +655,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_textAtOffset(long offset, IA if (startOffset == nullptr || text == nullptr ||endOffset == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) return E_FAIL; @@ -698,7 +696,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::removeSelection(long selectionIn try { - // #CHECK XInterface# if(pUNOInterface == nullptr) { return E_FAIL; @@ -734,7 +731,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::setCaretOffset(long offset) try { - // #CHECK XInterface# if(!pRXText.is()) return E_FAIL; @@ -759,7 +755,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::setSelection(long, long startOff try { - // #CHECK XInterface# if(!pRXText.is()) { return E_FAIL; @@ -785,7 +780,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::get_nCharacters(long * nCharacte if (nCharacters == nullptr) return E_INVALIDARG; - // #CHECK XInterface# + if(!pRXText.is()) { *nCharacters = 0; @@ -827,7 +822,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTextBase::scrollSubstringTo(long startInde try { - // #CHECK XInterface# if(!pRXText.is()) return E_FAIL; diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 2b7771507ece..eff02d6ade31 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -237,7 +237,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accParent(IDispatch **ppdisp try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(ppdispParent == nullptr) { return E_INVALIDARG; @@ -274,7 +274,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accChildCount(long *pcountCh try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pcountChildren == nullptr) { return E_INVALIDARG; @@ -316,7 +316,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, I try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(ppdispChild == nullptr) { return E_INVALIDARG; @@ -354,7 +354,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accName(VARIANT varChild, BS try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pszName == nullptr) { return E_INVALIDARG; @@ -393,7 +393,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accValue(VARIANT varChild, B try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if( pszValue == nullptr ) { return E_INVALIDARG; @@ -438,7 +438,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accDescription(VARIANT varCh try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pszDescription == nullptr) { return E_INVALIDARG; @@ -485,7 +485,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accRole(VARIANT varChild, VA try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarRole == nullptr) { return E_INVALIDARG; @@ -532,7 +532,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accState(VARIANT varChild, V try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarState == nullptr) { return E_INVALIDARG; @@ -634,7 +634,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pszKeyboardShortcut == nullptr) { return E_INVALIDARG; @@ -786,7 +786,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accFocus(VARIANT *pvarChild) try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarChild == nullptr) { return E_INVALIDARG; @@ -828,7 +828,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accSelection(VARIANT *pvarCh try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarChildren == nullptr) { return E_INVALIDARG; @@ -880,7 +880,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accLocation(long *pxLeft, long * try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pxLeft == nullptr || pyTop == nullptr || pcxWidth == nullptr || pcyHeight == nullptr) { return E_INVALIDARG; @@ -928,7 +928,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accNavigate(long navDir, VARIANT try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarEndUpAt == nullptr) { return E_INVALIDARG; @@ -1075,7 +1075,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccName(const OLECHAR __RPC try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pszName == nullptr) { return E_INVALIDARG; @@ -1153,7 +1153,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_XAccValue(const OLECHAR __RP try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pszAccValue == nullptr) { return E_INVALIDARG; @@ -1423,7 +1423,7 @@ HRESULT CMAccessible::GetFirstChild(VARIANT varStart,VARIANT* pvarEndUpAt) try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarEndUpAt == nullptr) { return E_INVALIDARG; @@ -1460,7 +1460,7 @@ HRESULT CMAccessible::GetLastChild(VARIANT varStart,VARIANT* pvarEndUpAt) try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarEndUpAt == nullptr) { return E_INVALIDARG; @@ -1531,7 +1531,7 @@ HRESULT CMAccessible::GetPreSibling(VARIANT varStart,VARIANT* pvarEndUpAt) try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pvarEndUpAt == nullptr) { return E_INVALIDARG; @@ -1570,7 +1570,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR * try { if (m_isDestroy) return S_FALSE; - // #CHECK# if(nRelations == nullptr) { return E_INVALIDARG; @@ -1600,7 +1599,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_relation( long relationIndex try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(relation == nullptr) { return E_INVALIDARG; @@ -1663,12 +1662,10 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_relations( long, IAccessible try { if (m_isDestroy) return S_FALSE; - // #CHECK# if(relation == nullptr || nRelations == nullptr) { return E_INVALIDARG; } - // #CHECK XInterface# if (!m_xContext.is()) return E_FAIL; @@ -1738,7 +1735,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_nActions(long __RPC_FAR *nAc try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(nActions == nullptr) { return E_INVALIDARG; @@ -1774,7 +1771,6 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::scrollTo(enum IA2ScrollType) static XAccessible* getTheParentOfMember(XAccessible* pXAcc) { - // #CHECK# if(pXAcc == nullptr) { return nullptr; @@ -1800,7 +1796,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_groupPosition(long __RPC_FAR try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(groupLevel == nullptr || similarItemsInGroup == nullptr || positionInGroup == nullptr) { return E_INVALIDARG; @@ -1988,7 +1984,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_uniqueID(long __RPC_FAR *uni try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(uniqueID == nullptr) { return E_INVALIDARG; @@ -2005,7 +2001,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_windowHandle(HWND __RPC_FAR try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(windowHandle == nullptr) { return E_INVALIDARG; @@ -2209,7 +2205,7 @@ COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CMAccessible::get_accDefaultActio try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(pszDefaultAction == nullptr) { return E_INVALIDARG; @@ -2283,7 +2279,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::Put_ActionDescription( const OLE try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(szAction == nullptr) { return E_INVALIDARG; @@ -2821,7 +2817,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_indexInParent(long __RPC_FAR { try { if (m_isDestroy) return S_FALSE; - // #CHECK# + if(accParentIndex == nullptr) return E_INVALIDARG; commit 63a004f51f063cad68c007d79d5cd4f56adde96b Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Aug 9 10:08:14 2023 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Aug 9 15:45:35 2023 +0200 wina11y: Use return value instead of out param ... to return the `IAccessible*` in `AccObjectWinManager::GetIAccessibleFromXAccessible` and `CMAccessible::get_IAccessibleFromXAccessible` and adapt the call sites accordingly. This is more straight-forward and the extra bool return value didn't add anything, since it was also just saying whether the pointer was a nullptr, so rather check that directly. Also drop `AccObjectWinManager::GetIMAccByXAcc` that does the same thing and switch the only call site to use `AccObjectWinManager::GetIAccessibleFromXAccessible` instead. Change-Id: I72933df62aa9ac1ff3f2a84c5045dfae354c18e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155505 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx index 11b65d0325b4..024a58fc8655 100644 --- a/winaccessibility/inc/AccObjectWinManager.hxx +++ b/winaccessibility/inc/AccObjectWinManager.hxx @@ -121,8 +121,7 @@ public: static bool IsContainer( css::accessibility::XAccessible* pAccessible ); - virtual IMAccessible* GetIMAccByXAcc(css::accessibility::XAccessible* pXAcc); - virtual bool GetIAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc, IAccessible** ppIA); + virtual IMAccessible* GetIAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc); virtual IMAccessible* GetIAccessibleFromResID(long resID); void NotifyDestroy( css::accessibility::XAccessible* pXAcc ); diff --git a/winaccessibility/source/UAccCOM/AccRelation.cxx b/winaccessibility/source/UAccCOM/AccRelation.cxx index ef3265000bab..2c815c674f24 100644 --- a/winaccessibility/source/UAccCOM/AccRelation.cxx +++ b/winaccessibility/source/UAccCOM/AccRelation.cxx @@ -108,12 +108,10 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccRelation::get_target(long targetIndex, IUn return E_FAIL; Reference<XAccessible> xRAcc(xTargets[targetIndex], UNO_QUERY); - IAccessible* pRet = nullptr; - - bool isGet = CMAccessible::get_IAccessibleFromXAccessible(xRAcc.get(), &pRet); - if(isGet) + IAccessible* pRet = CMAccessible::get_IAccessibleFromXAccessible(xRAcc.get()); + if (pRet) { - *target = /*(IAccessible2 *)*/pRet; + *target = pRet; pRet->AddRef(); return S_OK; } diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx b/winaccessibility/source/UAccCOM/AccTable.cxx index 6cb0dd1d26b2..9fd32c532bc5 100644 --- a/winaccessibility/source/UAccCOM/AccTable.cxx +++ b/winaccessibility/source/UAccCOM/AccTable.cxx @@ -64,10 +64,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_accessibleAt(long row, long col return E_FAIL; } - IAccessible* pRet = nullptr; - - bool isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet); - if(isTRUE) + IAccessible* pRet = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get()); + if (pRet) { *accessible = pRet; pRet->AddRef(); @@ -78,9 +76,9 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_accessibleAt(long row, long col Reference<XAccessible> pxTable(pRXTable, UNO_QUERY); CMAccessible::g_pAccObjectManager->InsertAccObj(pRAcc.get(),pxTable.get()); - isTRUE = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet); + pRet = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get()); - if(isTRUE) + if (pRet) { *accessible = pRet; pRet->AddRef(); @@ -549,8 +547,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_summary(IUnknown * * accessible Reference<XAccessible> pRAcc = pRXTable->getAccessibleSummary(); - IAccessible* pRet = nullptr; - CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get(), &pRet); + IAccessible* pRet = CMAccessible::get_IAccessibleFromXAccessible(pRAcc.get()); if(pRet) { @@ -1099,17 +1096,16 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTable::get_selectedCells(IUnknown * * * ce Reference<XAccessible> xAcc = xSelection->getSelectedAccessibleChild(i); assert(xAcc.is()); - IAccessible* pIAccessible; - bool bOK = CMAccessible::get_IAccessibleFromXAccessible(xAcc.get(), &pIAccessible); + IAccessible* pIAccessible = CMAccessible::get_IAccessibleFromXAccessible(xAcc.get()); - if (!bOK) + if (!pIAccessible) { Reference<XAccessible> xTable(pRXTable, UNO_QUERY); CMAccessible::g_pAccObjectManager->InsertAccObj(xAcc.get(), xTable.get()); - bOK = CMAccessible::get_IAccessibleFromXAccessible(xAcc.get(), &pIAccessible); + pIAccessible = CMAccessible::get_IAccessibleFromXAccessible(xAcc.get()); } - assert(bOK && "Couldn't retrieve IAccessible object"); + assert(pIAccessible && "Couldn't retrieve IAccessible object"); pIAccessible->AddRef(); (*cells)[i] = pIAccessible; diff --git a/winaccessibility/source/UAccCOM/AccTableCell.cxx b/winaccessibility/source/UAccCOM/AccTableCell.cxx index 9b8bf21529d5..95725c2a4042 100644 --- a/winaccessibility/source/UAccCOM/AccTableCell.cxx +++ b/winaccessibility/source/UAccCOM/AccTableCell.cxx @@ -116,15 +116,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTableCell::get_columnHeaderCells(IUnknown* Reference<XAccessible> xCell = xHeaders->getAccessibleCellAt(nRow, nCol); assert(xCell.is()); - IAccessible* pIAccessible; - bool bOK = CMAccessible::get_IAccessibleFromXAccessible(xCell.get(), &pIAccessible); - if (!bOK) + IAccessible* pIAccessible = CMAccessible::get_IAccessibleFromXAccessible(xCell.get()); + if (!pIAccessible) { Reference<XAccessible> xTableAcc(m_xTable, UNO_QUERY); CMAccessible::g_pAccObjectManager->InsertAccObj(xCell.get(), xTableAcc.get()); - bOK = CMAccessible::get_IAccessibleFromXAccessible(xCell.get(), &pIAccessible); + pIAccessible = CMAccessible::get_IAccessibleFromXAccessible(xCell.get()); } - assert(bOK && "Couldn't retrieve IAccessible object for cell."); + assert(pIAccessible && "Couldn't retrieve IAccessible object for cell."); pIAccessible->AddRef(); (*cellAccessibles)[nRow] = pIAccessible; @@ -204,15 +203,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTableCell::get_rowHeaderCells(IUnknown*** Reference<XAccessible> xCell = xHeaders->getAccessibleCellAt(nRow, nCol); assert(xCell.is()); - IAccessible* pIAccessible; - bool bOK = CMAccessible::get_IAccessibleFromXAccessible(xCell.get(), &pIAccessible); - if (!bOK) + IAccessible* pIAccessible = CMAccessible::get_IAccessibleFromXAccessible(xCell.get()); + if (!pIAccessible) { Reference<XAccessible> xTableAcc(m_xTable, UNO_QUERY); CMAccessible::g_pAccObjectManager->InsertAccObj(xCell.get(), xTableAcc.get()); - bOK = CMAccessible::get_IAccessibleFromXAccessible(xCell.get(), &pIAccessible); + pIAccessible = CMAccessible::get_IAccessibleFromXAccessible(xCell.get()); } - assert(bOK && "Couldn't retrieve IAccessible object for cell."); + assert(pIAccessible && "Couldn't retrieve IAccessible object for cell."); pIAccessible->AddRef(); (*cellAccessibles)[nCol] = pIAccessible; @@ -301,9 +299,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTableCell::get_table(IUnknown** ppTable) if (!xAcc.is()) return E_FAIL; - IAccessible* pRet = nullptr; - bool bOK = CMAccessible::get_IAccessibleFromXAccessible(xAcc.get(), &pRet); - if (!bOK) + IAccessible* pRet = CMAccessible::get_IAccessibleFromXAccessible(xAcc.get()); + if (!pRet) return E_FAIL; *ppTable = pRet; diff --git a/winaccessibility/source/UAccCOM/EnumVariant.cxx b/winaccessibility/source/UAccCOM/EnumVariant.cxx index 5f26159cef7f..cdac95f6b34b 100644 --- a/winaccessibility/source/UAccCOM/EnumVariant.cxx +++ b/winaccessibility/source/UAccCOM/EnumVariant.cxx @@ -64,10 +64,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR * for (l1 = m_nCurrent, l2 = 0; l1 < nChildCount && l2 < cElements; l1++, l2++) { Reference< XAccessible > pRXAcc = m_pXAccessibleSelection->getSelectedAccessibleChild(l1); - IAccessible* pChild = nullptr; - bool isGet = CMAccessible::get_IAccessibleFromXAccessible(pRXAcc.get(), - &pChild); - if(isGet) + IAccessible* pChild = CMAccessible::get_IAccessibleFromXAccessible(pRXAcc.get()); + if(pChild) { pvar[l2].vt = VT_DISPATCH; pvar[l2].pdispVal = pChild; @@ -77,9 +75,8 @@ HRESULT STDMETHODCALLTYPE CEnumVariant::Next(ULONG cElements,VARIANT __RPC_FAR * { if (CMAccessible::g_pAccObjectManager) CMAccessible::g_pAccObjectManager->InsertAccObj(pRXAcc.get(),pUNOInterface); - isGet = CMAccessible::get_IAccessibleFromXAccessible( - pRXAcc.get(), &pChild); - if(isGet) + pChild = CMAccessible::get_IAccessibleFromXAccessible(pRXAcc.get()); + if(pChild) { pvar[l2].vt = VT_DISPATCH; pvar[l2].pdispVal = pChild; diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 1a5ec8c4efc1..2b7771507ece 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -991,14 +991,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::accHitTest(long xLeft, long yTop if (!xAccAtPoint.is()) return S_FALSE; - IAccessible* pRet = nullptr; - bool bHaveIAccessible = get_IAccessibleFromXAccessible(xAccAtPoint.get(), &pRet); - if (!bHaveIAccessible) + IAccessible* pRet = get_IAccessibleFromXAccessible(xAccAtPoint.get()); + if (!pRet) { g_pAccObjectManager->InsertAccObj(xAccAtPoint.get(), m_xAccessible.get(), m_hwnd); - bHaveIAccessible = get_IAccessibleFromXAccessible(xAccAtPoint.get(), &pRet); + pRet = get_IAccessibleFromXAccessible(xAccAtPoint.get()); } - if (!bHaveIAccessible) + if (!pRet) return S_FALSE; pvarChild->vt = VT_DISPATCH; @@ -1312,17 +1311,16 @@ IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test if(dChildID<1 || dChildID>pRContext->getAccessibleChildCount()) return nullptr; - IAccessible* pChild = nullptr; Reference< XAccessible > pXChild = pRContext->getAccessibleChild(dChildID-1); - bool isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild); + IAccessible* pChild = get_IAccessibleFromXAccessible(pXChild.get()); - if(!isGet) + if(!pChild) { g_pAccObjectManager->InsertAccObj(pXChild.get(), m_xAccessible.get(), m_hwnd); - isGet = get_IAccessibleFromXAccessible(pXChild.get(), &pChild); + pChild = get_IAccessibleFromXAccessible(pXChild.get()); } - if(isGet) + if (pChild) { IMAccessible* pIMAcc = static_cast<IMAccessible*>(pChild); return pIMAcc; @@ -1406,7 +1404,7 @@ IMAccessible* CMAccessible::GetNavigateChildForDM(VARIANT varCur, short flags) } pChildXAcc = pRChildXAcc.get(); g_pAccObjectManager->InsertAccObj(pChildXAcc, m_xAccessible.get()); - return g_pAccObjectManager->GetIMAccByXAcc(pChildXAcc); + return g_pAccObjectManager->GetIAccessibleFromXAccessible(pChildXAcc); } /** @@ -2432,25 +2430,17 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, REFIID iid, void** ppvObject) } catch(...) { return E_FAIL; } } -bool CMAccessible::get_IAccessibleFromXAccessible(XAccessible* pXAcc, IAccessible** ppIA) +IAccessible* CMAccessible::get_IAccessibleFromXAccessible(XAccessible* pXAcc) { try { - // #CHECK# - if(ppIA == nullptr) - { - return false; - } - bool isGet = false; if (g_pAccObjectManager) - isGet = g_pAccObjectManager->GetIAccessibleFromXAccessible(pXAcc, ppIA); - - return isGet; + return g_pAccObjectManager->GetIAccessibleFromXAccessible(pXAcc); } catch(...) { - return false; } + return nullptr; } OUString CMAccessible::get_StringFromAny(Any const & pAny) @@ -2733,13 +2723,12 @@ void CMAccessible::ConvertAnyToVariant(const css::uno::Any &rAnyVal, VARIANT *pv { if(pXAcc.is()) { - IAccessible* pIAcc = nullptr; - get_IAccessibleFromXAccessible(pXAcc.get(), &pIAcc); + IAccessible* pIAcc = get_IAccessibleFromXAccessible(pXAcc.get()); if(pIAcc == nullptr) { Reference< XAccessibleContext > pXAccContext = pXAcc->getAccessibleContext(); g_pAccObjectManager->InsertAccObj(pXAcc.get(),pXAccContext->getAccessibleParent().get()); - get_IAccessibleFromXAccessible(pXAcc.get(), &pIAcc); + pIAcc = get_IAccessibleFromXAccessible(pXAcc.get()); } if(pIAcc) { diff --git a/winaccessibility/source/UAccCOM/MAccessible.h b/winaccessibility/source/UAccCOM/MAccessible.h index 5b42358f505e..d807258e4060 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.h +++ b/winaccessibility/source/UAccCOM/MAccessible.h @@ -206,8 +206,7 @@ public: // implement some specific MSAA methods,such as accSelection,accNavigate static AccObjectWinManager* g_pAccObjectManager; - static bool get_IAccessibleFromXAccessible( - css::accessibility::XAccessible * pXAcc, IAccessible** ppIA); + static IAccessible* get_IAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc); XGUIDToComObjHash m_containedObjects; static HRESULT WINAPI SmartQI_(void* pv, diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 963573628372..04f81875cd88 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -998,26 +998,13 @@ bool AccObjectWinManager::IsStateManageDescendant(XAccessible* pAccessible) * @param pXAcc XAccessible interface. * @return Com accobject interface. */ -IMAccessible* AccObjectWinManager::GetIMAccByXAcc(XAccessible* pXAcc) +IMAccessible* AccObjectWinManager::GetIAccessibleFromXAccessible(XAccessible* pXAcc) { AccObject* pAccObj = GetAccObjByXAcc(pXAcc); - if(pAccObj) - { + if (pAccObj) return pAccObj->GetIMAccessible(); - } - else - { - return nullptr; - } -} -bool AccObjectWinManager::GetIAccessibleFromXAccessible(css::accessibility::XAccessible* pXAcc, - IAccessible** ppIA) -{ - *ppIA = GetIMAccByXAcc(pXAcc); - if (*ppIA) - return true; - return false; + return nullptr; } /**