diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-12 15:36:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-15 08:38:42 +0100 |
commit | 948c29710a0bb168ec07e3aca510fa6860f2da52 (patch) | |
tree | 6f65e78012a6a127c6efe2eaa9ba4ba57bc8302f /svx/source/table | |
parent | 881d8470eb9ede52690dbd75c02f72c6ee422261 (diff) |
loplugin:referencecasting in svx
Change-Id: I072ba9da976cefd61f4a916e70b0601439e8a123
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110818
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/table')
-rw-r--r-- | svx/source/table/accessibletableshape.cxx | 9 | ||||
-rw-r--r-- | svx/source/table/cell.cxx | 3 | ||||
-rw-r--r-- | svx/source/table/cellrange.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/propertyset.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/svdotable.cxx | 8 | ||||
-rw-r--r-- | svx/source/table/tablecolumns.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablemodel.cxx | 6 |
7 files changed, 15 insertions, 17 deletions
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 3b65874b7a73..248fbcdc534b 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -143,7 +143,7 @@ rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (co if( iter != maChildMap.end() ) { - rtl::Reference< AccessibleCell > xChild( (*iter).second.get() ); + rtl::Reference< AccessibleCell > xChild( (*iter).second ); return xChild; } return rtl::Reference< AccessibleCell >(); @@ -164,7 +164,7 @@ rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sa xAccessibleCell->Init(); maChildMap[xCell] = xAccessibleCell; - xChild = rtl::Reference< AccessibleCell >( xAccessibleCell.get() ); + xChild = xAccessibleCell; } return xChild; } @@ -180,7 +180,7 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild(sal_Int32 if( iter != maChildMap.end() ) { - Reference< XAccessible > xChild( (*iter).second.get() ); + Reference< XAccessible > xChild( (*iter).second ); return xChild; } else @@ -192,8 +192,7 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild(sal_Int32 xAccessibleCell->Init(); maChildMap[xCell] = xAccessibleCell; - Reference< XAccessible > xChild( xAccessibleCell.get() ); - return xChild; + return xAccessibleCell; } } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index cc4e292ce60a..3bc253b48b71 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -389,8 +389,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj ) rtl::Reference< Cell > xCell( new Cell( rTableObj ) ); if( xCell->mxTable.is() ) { - Reference< XEventListener > xListener( xCell.get() ); - xCell->mxTable->addEventListener( xListener ); + xCell->mxTable->addEventListener( xCell ); } return xCell; } diff --git a/svx/source/table/cellrange.cxx b/svx/source/table/cellrange.cxx index c0a7eee72261..f9941fd242da 100644 --- a/svx/source/table/cellrange.cxx +++ b/svx/source/table/cellrange.cxx @@ -72,7 +72,7 @@ sal_Int32 CellRange::getBottom() Reference< XTable > CellRange::getTable() { - return mxTable.get(); + return mxTable; } diff --git a/svx/source/table/propertyset.cxx b/svx/source/table/propertyset.cxx index 300c877bf67e..0dc90358c229 100644 --- a/svx/source/table/propertyset.cxx +++ b/svx/source/table/propertyset.cxx @@ -105,7 +105,7 @@ FastPropertySet::~FastPropertySet() Reference< XPropertySetInfo > SAL_CALL FastPropertySet::getPropertySetInfo( ) { - return Reference< XPropertySetInfo >( mxInfo.get() ); + return mxInfo; } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 2d70a85264d6..f3d4ae4d5728 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -931,7 +931,7 @@ SdrTableObj::~SdrTableObj() Reference< XTable > SdrTableObj::getTable() const { - return Reference< XTable >( mpImpl->mxTable.get() ); + return mpImpl->mxTable; } @@ -1026,7 +1026,7 @@ CellPos SdrTableObj::getPreviousCell( const CellPos& rPos, bool bEdgeTravel ) co if( xCell.is() && xCell->isMerged() ) { sal_Int32 nTemp = 0; - findMergeOrigin( mpImpl->mxTable.get(), aPos.mnCol, aPos.mnRow, aPos.mnCol, nTemp ); + findMergeOrigin( mpImpl->mxTable, aPos.mnCol, aPos.mnRow, aPos.mnCol, nTemp ); } if( aPos.mnCol > 0 ) @@ -1270,7 +1270,7 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_ CellRef xCell( mpImpl->getCell( CellPos( rnX, rnY ) ) ); if( xCell.is() && xCell->isMerged() ) - findMergeOrigin( mpImpl->mxTable.get(), rnX, rnY, rnX, rnY ); + findMergeOrigin( mpImpl->mxTable, rnX, rnY, rnX, rnY ); if( xCell.is() ) { @@ -1611,7 +1611,7 @@ void SdrTableObj::setActiveCell( const CellPos& rPos ) if( mpImpl->mxActiveCell.is() && mpImpl->mxActiveCell->isMerged() ) { CellPos aOrigin; - findMergeOrigin( mpImpl->mxTable.get(), rPos.mnCol, rPos.mnRow, aOrigin.mnCol, aOrigin.mnRow ); + findMergeOrigin( mpImpl->mxTable, rPos.mnCol, rPos.mnRow, aOrigin.mnCol, aOrigin.mnRow ); mpImpl->mxActiveCell.set( dynamic_cast< Cell* >( mpImpl->mxTable->getCellByPosition( aOrigin.mnCol, aOrigin.mnRow ).get() ) ); mpImpl->maEditPos = aOrigin; } diff --git a/svx/source/table/tablecolumns.cxx b/svx/source/table/tablecolumns.cxx index a9a37e5ef426..c202f3a52cea 100644 --- a/svx/source/table/tablecolumns.cxx +++ b/svx/source/table/tablecolumns.cxx @@ -93,7 +93,7 @@ Any SAL_CALL TableColumns::getByIndex( sal_Int32 Index ) if( ( Index < 0 ) || ( Index >= mxTableModel->getColumnCount() ) ) throw IndexOutOfBoundsException(); - return Any( Reference< XCellRange >( mxTableModel->getColumn( Index ).get() ) ); + return Any( Reference< XCellRange >( mxTableModel->getColumn( Index ) ) ); } diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index d7d04191163c..6efcbd1280dc 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -373,7 +373,7 @@ Reference< XTableColumns > SAL_CALL TableModel::getColumns() if( !mxTableColumns.is() ) mxTableColumns.set( new TableColumns( this ) ); - return mxTableColumns.get(); + return mxTableColumns; } @@ -383,7 +383,7 @@ Reference< XTableRows > SAL_CALL TableModel::getRows() if( !mxTableRows.is() ) mxTableRows.set( new TableRows( this ) ); - return mxTableRows.get(); + return mxTableRows; } @@ -396,7 +396,7 @@ Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sa CellRef xCell( getCell( nColumn, nRow ) ); if( xCell.is() ) - return xCell.get(); + return xCell; throw IndexOutOfBoundsException(); } |