diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-16 08:54:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-16 11:48:31 +0100 |
commit | fb6519ed62cf1fb7071ca2d9d22bfc37c093a751 (patch) | |
tree | 588f790798a993483462d4b5b733b957ec480bc3 /accessibility/source/extended | |
parent | 64701c68b5878209574663fd1b0ed333cd181511 (diff) |
loplugin:referencecasting in accessibility
Change-Id: If66b3c1829b02298b7c9c31172d2a66ad11dce30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/source/extended')
4 files changed, 12 insertions, 12 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index 390c04a87f18..28698162ed48 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -194,7 +194,7 @@ css::uno::Reference< css::accessibility::XAccessible > AccessibleBrowseBox::impl mxTable = createAccessibleTable(); } - return mxTable.get(); + return mxTable; } css::uno::Reference< css::accessibility::XAccessible > @@ -303,7 +303,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL Accessibl if ( !m_xContext.is() ) m_xContext = new AccessibleBrowseBox( m_xParent, this, m_rBrowseBox ); - return m_xContext.get(); + return m_xContext; } diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 2c41881fb4f3..db7a1461a859 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -211,7 +211,7 @@ css::uno::Reference< css::accessibility::XAccessible > AccessibleGridControl::im { m_xTable = createAccessibleTable(); } - return m_xTable.get(); + return m_xTable; } @@ -275,7 +275,7 @@ void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNew for(sal_Int32 i=0;i<nChildCount;i++) { css::uno::Reference< css::accessibility::XAccessible > xAccessible = getAccessibleChild(i); - if(css::uno::Reference< css::accessibility::XAccessible >(m_xTable.get()) == xAccessible) + if(css::uno::Reference< css::accessibility::XAccessible >(m_xTable) == xAccessible) { std::vector< AccessibleGridControlTableCell* >& rCells = m_xTable->getCellVector(); @@ -391,7 +391,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL Accessibl if (!m_xContext.is() && m_pTable) m_xContext = new AccessibleGridControl(m_xParent, this, *m_pTable); - return m_xContext.get(); + return m_xContext; } diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 94050529fce4..345a4aa4e8d2 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -132,7 +132,7 @@ namespace accessibility uno::Any aOldValue; aOldValue <<= m_xFocusedChild; - m_xFocusedChild.set(implGetAccessible(*pEntry).get()); + m_xFocusedChild.set(implGetAccessible(*pEntry)); aNewValue <<= m_xFocusedChild; NotifyAccessibleEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldValue, aNewValue ); @@ -159,7 +159,7 @@ namespace accessibility { uno::Any aNewValue; uno::Any aOldValue; - aOldValue <<= uno::Reference<XAccessible>(entry.second.get()); + aOldValue <<= uno::Reference<XAccessible>(entry.second); NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue ); } for (auto const& entry : m_mapEntry) @@ -178,7 +178,7 @@ namespace accessibility SvTreeListEntry* pEntry = static_cast< SvTreeListEntry* >( rVclWindowEvent.GetData() ); if ( pEntry ) { - Reference<XAccessible> const xChild(implGetAccessible(*pEntry).get()); + Reference<XAccessible> const xChild(implGetAccessible(*pEntry)); const short nAccEvent = ( rVclWindowEvent.GetId() == VclEventId::ItemExpanded ) ? AccessibleEventId::LISTBOX_ENTRY_EXPANDED @@ -227,7 +227,7 @@ namespace accessibility { uno::Any aNewValue; uno::Any aOldValue; - aOldValue <<= uno::Reference<XAccessible>(mi->second.get()); + aOldValue <<= uno::Reference<XAccessible>(mi->second); NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue ); m_mapEntry.erase(mi); @@ -324,7 +324,7 @@ namespace accessibility // Solution: Set the parameter of the parent to null to let entry determine the parent by itself //return new AccessibleListBoxEntry( *getListBox(), pEntry, this ); //return new AccessibleListBoxEntry( *getListBox(), pEntry, nullptr ); - return implGetAccessible(*pEntry).get(); + return implGetAccessible(*pEntry); } Reference< XAccessible > SAL_CALL AccessibleListBox::getAccessibleParent( ) diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 77f9cfc34341..854c0495a565 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -315,7 +315,7 @@ namespace accessibility uno::Reference<XAccessible> xListBox(m_wListBox); assert(xListBox.is()); - return m_rListBox.implGetAccessible(*pEntry).get(); + return m_rListBox.implGetAccessible(*pEntry); } Reference< XAccessible > AccessibleListBoxEntry::implGetParentAccessible( ) const @@ -347,7 +347,7 @@ namespace accessibility { uno::Reference<XAccessible> xListBox(m_wListBox); assert(xListBox.is()); - return m_rListBox.implGetAccessible(*pParentEntry).get(); + return m_rListBox.implGetAccessible(*pParentEntry); // the AccessibleListBoxEntry class will create its parent // when needed } |