summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/tblsel.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:31:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:38 +0100
commit6f3c52bb37f52f57fea6479f1da6c1828fbd85fe (patch)
treed8e6db66db4c28335a62fbec4a282541ae083a85 /sw/source/core/frmedt/tblsel.cxx
parent5429049e3b8fd12e84aca83be7ca19e52920f672 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
Diffstat (limited to 'sw/source/core/frmedt/tblsel.cxx')
-rw-r--r--sw/source/core/frmedt/tblsel.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 86d36f70cbce..4a1f369b8cb7 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -131,7 +131,7 @@ void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
if (rTblCrsr.IsChgd() || !rTblCrsr.GetSelectedBoxesCount())
{
- SwTableCursor* pTCrsr = (SwTableCursor*)&rTblCrsr;
+ SwTableCursor* pTCrsr = const_cast<SwTableCursor*>(&rTblCrsr);
pTCrsr->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTblCrsrs( *pTCrsr );
}
@@ -308,8 +308,8 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
{
- SwTableBox* pBox = (SwTableBox*)
- static_cast<const SwCellFrm*>(pCell)->GetTabBox();
+ SwTableBox* pBox = const_cast<SwTableBox*>(
+ static_cast<const SwCellFrm*>(pCell)->GetTabBox());
// check for cell protection??
if( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
@@ -924,9 +924,9 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
return;
const SwTable *pTable = aUnions.front().GetTable()->GetTable();
- SwDoc* pDoc = (SwDoc*)pStart->GetFmt()->GetDoc();
- SwTableNode* pTblNd = (SwTableNode*)pTable->GetTabSortBoxes()[ 0 ]->
- GetSttNd()->FindTableNode();
+ SwDoc* pDoc = const_cast<SwDoc*>(pStart->GetFmt()->GetDoc());
+ SwTableNode* pTblNd = const_cast<SwTableNode*>(pTable->GetTabSortBoxes()[ 0 ]->
+ GetSttNd()->FindTableNode());
_MergePos aPosArr; // Sort-Array with the frame positions
long nWidth;
@@ -1922,7 +1922,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
if( (aUnion.*fnRect->fnGetWidth)() )
{
- SwSelUnion *pTmp = new SwSelUnion( aUnion, (SwTabFrm*)pTable );
+ SwSelUnion *pTmp = new SwSelUnion( aUnion, const_cast<SwTabFrm*>(pTable) );
rUnions.push_back( pTmp );
}