diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index 892376ba6f48..873c0428a25e 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -44,7 +44,7 @@ typedef std::deque< SwCellFrame* > SwCellFrames; struct CompareSwSelBoxes { - bool operator()(SwTableBox* const& lhs, SwTableBox* const& rhs) const + bool operator()(const SwTableBox* const& lhs, const SwTableBox* const& rhs) const { return lhs->GetSttIdx() < rhs->GetSttIdx(); } diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index 7483cfb897b6..d826c2083843 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -60,8 +60,7 @@ bool SwAccessibleCell::IsSelected() { const SwCellFrame *pCFrame = static_cast< const SwCellFrame * >( GetFrame() ); - SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrame->GetTabBox() ); + const SwTableBox* pBox = pCFrame->GetTabBox(); SwSelBoxes const& rBoxes(pCSh->GetTableCursor()->GetSelectedBoxes()); bRet = rBoxes.find(pBox) != rBoxes.end(); } diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index cbe190f5e7be..3ea3b3441e84 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -215,8 +215,7 @@ void SwAccessibleTableData_Impl::GetSelection( OSL_ENSURE( pLower->IsCellFrame(), "lower is not a cell frame" ); const SwCellFrame *pCFrame = static_cast < const SwCellFrame * >( pLower ); - SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrame->GetTabBox() ); + const SwTableBox* pBox = pCFrame->GetTabBox(); if( rSelBoxes.find( pBox ) == rSelBoxes.end() ) { const Int32Set_Impl rRowsOrCols = @@ -527,7 +526,7 @@ bool SwAccessibleTable::IsChildSelected( sal_Int64 nChildIndex ) const { const SwTableBox* pBox = GetTableBox( nChildIndex ); OSL_ENSURE( pBox != nullptr, "We need the table box." ); - bRet = pSelBoxes->find( const_cast( pBox ) ) != pSelBoxes->end(); + bRet = pSelBoxes->find(pBox) != pSelBoxes->end(); } return bRet; @@ -962,8 +961,7 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected( if( pSelBoxes ) { const SwCellFrame *pCFrame = static_cast < const SwCellFrame * >( pFrame ); - SwTableBox *pBox = - const_cast< SwTableBox *>( pCFrame->GetTabBox() ); + const SwTableBox* pBox = pCFrame->GetTabBox(); bRet = pSelBoxes->find( pBox ) != pSelBoxes->end(); } }