summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-11 12:50:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-11 12:50:57 +0200
commit47df2b2a2e13e44e45861d1e03c80632ae6777a5 (patch)
tree66ace75523722b42c1daedd2964bb0fbc15bd5da /svtools
parent15376a55f12edbe7e8517e85e16148bb395a2799 (diff)
loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I3abfd98f165e2f3951cacc83fa578d442779107e
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx6
-rw-r--r--svtools/source/contnr/svimpbox.cxx16
-rw-r--r--svtools/source/contnr/svtabbx.cxx2
-rw-r--r--svtools/source/contnr/treelist.cxx4
-rw-r--r--svtools/source/contnr/treelistbox.cxx46
-rw-r--r--svtools/source/graphic/grfcache.cxx4
-rw-r--r--svtools/source/graphic/grfmgr2.cxx4
8 files changed, 42 insertions, 42 deletions
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index e3396d14b7ed..6dd64ed0389a 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -328,7 +328,7 @@ void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
return;
}
bInPaint = true;
- ((BrowseBox*) GetParent())->PaintData(*this, rRenderContext, rRect);
+ GetParent()->PaintData(*this, rRenderContext, rRect);
bInPaint = false;
DoOutstandingInvalidations();
}
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index f250efebfde9..31424b38570b 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -651,7 +651,7 @@ namespace svt
case KEY_RETURN:
// save the cell content (if necessary)
- if (IsEditing() && aController->IsModified() && !((EditBrowseBox *) this)->SaveModified())
+ if (IsEditing() && aController->IsModified() && !SaveModified())
{
// maybe we're not visible ...
EnableAndShow();
@@ -712,7 +712,7 @@ namespace svt
if (nId == BROWSER_SELECT || BROWSER_SELECTCOLUMN == nId )
{
// save the cell content (if necessary)
- if (IsEditing() && aController->IsModified() && !((EditBrowseBox *) this)->SaveModified())
+ if (IsEditing() && aController->IsModified() && !SaveModified())
{
// maybe we're not visible ...
EnableAndShow();
@@ -977,7 +977,7 @@ namespace svt
bool EditBrowseBox::CursorMoving(long, sal_uInt16)
{
- ((EditBrowseBox *) this)->DeactivateCell(false);
+ DeactivateCell(false);
return true;
}
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index b412b7189d62..78ec65c1734b 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1018,7 +1018,7 @@ void SvImpLBox::ScrollToAbsPos( long nPos )
else if( nPos > nLastEntryPos )
nPos = nLastEntryPos;
- SvTreeListEntry* pEntry = (SvTreeListEntry*)pView->GetEntryAtAbsPos( nPos );
+ SvTreeListEntry* pEntry = pView->GetEntryAtAbsPos( nPos );
if( !pEntry || pEntry == pStartEntry )
return;
@@ -1708,7 +1708,7 @@ void SvImpLBox::RemovingEntry( SvTreeListEntry* pEntry )
{
// if it is the last one, we have to invalidate it, so the lines are
// drawn correctly (in this case they're deleted)
- if( pStartEntry && (pStartEntry != pOldStartEntry || pEntry == (SvTreeListEntry*)pView->GetModel()->Last()) )
+ if( pStartEntry && (pStartEntry != pOldStartEntry || pEntry == pView->GetModel()->Last()) )
{
aVerSBar->SetThumbPos( pView->GetVisiblePos( pStartEntry ));
pView->Invalidate( GetVisibleArea() );
@@ -1749,9 +1749,9 @@ void SvImpLBox::EntryRemoved()
if( pView->GetSelectionCount() )
{
// is a neighboring entry selected?
- SvTreeListEntry* pNextCursor = (SvTreeListEntry*)pView->PrevVisible( pCursor );
+ SvTreeListEntry* pNextCursor = pView->PrevVisible( pCursor );
if( !pNextCursor || !pView->IsSelected( pNextCursor ))
- pNextCursor = (SvTreeListEntry*)pView->NextVisible( pCursor );
+ pNextCursor = pView->NextVisible( pCursor );
if( !pNextCursor || !pView->IsSelected( pNextCursor ))
// no neighbor selected: use first selected
pNextCursor = pView->FirstSelected();
@@ -1837,7 +1837,7 @@ void SvImpLBox::EntryInserted( SvTreeListEntry* pEntry )
{
if( GetUpdateMode() )
{
- SvTreeListEntry* pParent = (SvTreeListEntry*)pTree->GetParent(pEntry);
+ SvTreeListEntry* pParent = pTree->GetParent(pEntry);
if (pParent && pTree->GetChildList(pParent).size() == 1)
// draw plus sign
pTree->InvalidateEntry( pParent );
@@ -2474,7 +2474,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( bMod1 )
{
// collapse all parents until we get to the root
- SvTreeListEntry* pParentToCollapse = (SvTreeListEntry*)pTree->GetRootLevelParent(pCursor);
+ SvTreeListEntry* pParentToCollapse = pTree->GetRootLevelParent(pCursor);
if( pParentToCollapse )
{
sal_uInt16 nRefDepth;
@@ -3296,12 +3296,12 @@ void SvImpLBox::FindMostRight( SvTreeListEntry* pEntryToIgnore )
if( !pView->GetModel() )
return;
- SvTreeListEntry* pEntry = (SvTreeListEntry*)pView->FirstVisible();
+ SvTreeListEntry* pEntry = pView->FirstVisible();
while( pEntry )
{
if( pEntry != pEntryToIgnore )
SetMostRight( pEntry );
- pEntry = (SvTreeListEntry*)pView->NextVisible( pEntry );
+ pEntry = pView->NextVisible( pEntry );
}
}
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 09430f193378..931ca8a5f422 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -491,7 +491,7 @@ void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
if( SvTreeListBox::nTreeFlags & SvTreeFlags::RECALCTABS )
- ((SvTabListBox*)this)->SetTabs();
+ SetTabs();
DBG_ASSERT(nTab<nTabCount,"GetTabPos:Invalid Tab");
return aTabs[ nTab ]->GetPos();
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index dcc622edaadb..03b91523cda8 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -617,8 +617,8 @@ sal_uLong SvTreeList::GetVisibleCount( SvListView* pView ) const
OSL_FAIL("nVisibleCount bad");
}
#endif
- ((SvListView*)pView)->nVisibleCount = nPos;
- ((SvListView*)pView)->bVisPositionsValid = true;
+ pView->nVisibleCount = nPos;
+ pView->bVisPositionsValid = true;
return nPos;
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 55b9c9715bd0..9c2e99231537 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -464,7 +464,7 @@ bool SvTreeListBox::IsEntryMnemonicsEnabled() const
IMPL_LINK( SvTreeListBox, CloneHdl_Impl, SvTreeListEntry*, pEntry )
{
- return reinterpret_cast<sal_IntPtr>(CloneEntry((SvTreeListEntry*)pEntry));
+ return reinterpret_cast<sal_IntPtr>(CloneEntry(pEntry));
}
sal_uLong SvTreeListBox::Insert( SvTreeListEntry* pEntry, SvTreeListEntry* pParent, sal_uLong nPos )
@@ -931,7 +931,7 @@ SvViewDataItem* SvTreeListBox::GetViewDataItem(SvTreeListEntry* pEntry, SvLBoxIt
const SvViewDataItem* SvTreeListBox::GetViewDataItem(const SvTreeListEntry* pEntry, const SvLBoxItem* pItem) const
{
- const SvViewDataEntry* pEntryData = (const SvViewDataEntry*)SvListView::GetViewData(pEntry);
+ const SvViewDataEntry* pEntryData = SvListView::GetViewData(pEntry);
DBG_ASSERT(pEntryData,"Entry not in View");
sal_uInt16 nItemPos = pEntry->GetPos(pItem);
return pEntryData->GetItem(nItemPos);
@@ -940,13 +940,13 @@ const SvViewDataItem* SvTreeListBox::GetViewDataItem(const SvTreeListEntry* pEnt
SvViewDataEntry* SvTreeListBox::CreateViewData( SvTreeListEntry* )
{
SvViewDataEntry* pEntryData = new SvViewDataEntry;
- return (SvViewDataEntry*)pEntryData;
+ return pEntryData;
}
void SvTreeListBox::InitViewData( SvViewDataEntry* pData, SvTreeListEntry* pEntry )
{
- SvTreeListEntry* pInhEntry = (SvTreeListEntry*)pEntry;
- SvViewDataEntry* pEntryData = (SvViewDataEntry*)pData;
+ SvTreeListEntry* pInhEntry = pEntry;
+ SvViewDataEntry* pEntryData = pData;
pEntryData->Init(pInhEntry->ItemCount());
sal_uInt16 nCount = pInhEntry->ItemCount();
@@ -1934,7 +1934,7 @@ void SvTreeListBox::SetCollapsedEntryBmp(SvTreeListEntry* pEntry,const Image& aB
void SvTreeListBox::ImpEntryInserted( SvTreeListEntry* pEntry )
{
- SvTreeListEntry* pParent = (SvTreeListEntry*)pModel->GetParent( pEntry );
+ SvTreeListEntry* pParent = pModel->GetParent( pEntry );
if( pParent )
{
SvTLEntryFlags nFlags = pParent->GetFlags();
@@ -1959,7 +1959,7 @@ void SvTreeListBox::ImpEntryInserted( SvTreeListEntry* pEntry )
nTreeFlags |= SvTreeFlags::RECALCTABS;
}
}
- SetEntryHeight( (SvTreeListEntry*)pEntry );
+ SetEntryHeight( pEntry );
if( nTreeFlags & SvTreeFlags::CHKBTN )
{
@@ -2485,32 +2485,32 @@ void SvTreeListBox::SelectAll( bool bSelect, bool )
void SvTreeListBox::ModelHasInsertedTree( SvTreeListEntry* pEntry )
{
- sal_uInt16 nRefDepth = pModel->GetDepth( (SvTreeListEntry*)pEntry );
- SvTreeListEntry* pTmp = (SvTreeListEntry*)pEntry;
+ sal_uInt16 nRefDepth = pModel->GetDepth( pEntry );
+ SvTreeListEntry* pTmp = pEntry;
do
{
ImpEntryInserted( pTmp );
pTmp = Next( pTmp );
} while( pTmp && nRefDepth < pModel->GetDepth( pTmp ) );
- pImp->TreeInserted( (SvTreeListEntry*)pEntry );
+ pImp->TreeInserted( pEntry );
}
void SvTreeListBox::ModelHasInserted( SvTreeListEntry* pEntry )
{
- ImpEntryInserted( (SvTreeListEntry*)pEntry );
- pImp->EntryInserted( (SvTreeListEntry*)pEntry );
+ ImpEntryInserted( pEntry );
+ pImp->EntryInserted( pEntry );
}
void SvTreeListBox::ModelIsMoving(SvTreeListEntry* pSource,
SvTreeListEntry* /* pTargetParent */,
sal_uLong /* nChildPos */ )
{
- pImp->MovingEntry( (SvTreeListEntry*)pSource );
+ pImp->MovingEntry( pSource );
}
void SvTreeListBox::ModelHasMoved( SvTreeListEntry* pSource )
{
- pImp->EntryMoved( (SvTreeListEntry*)pSource );
+ pImp->EntryMoved( pSource );
}
void SvTreeListBox::ModelIsRemoving( SvTreeListEntry* pEntry )
@@ -2518,7 +2518,7 @@ void SvTreeListBox::ModelIsRemoving( SvTreeListEntry* pEntry )
if(pEdEntry == pEntry)
pEdEntry = NULL;
- pImp->RemovingEntry( (SvTreeListEntry*)pEntry );
+ pImp->RemovingEntry( pEntry );
}
void SvTreeListBox::ModelHasRemoved( SvTreeListEntry* pEntry )
@@ -2662,15 +2662,15 @@ void SvTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* pEntry )
{
// reinitialize the separate items of the entries
- sal_uInt16 nCount = ((SvTreeListEntry*)pEntry)->ItemCount();
+ sal_uInt16 nCount = pEntry->ItemCount();
for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
{
- SvLBoxItem* pItem = ((SvTreeListEntry*)pEntry)->GetItem( nIdx );
- pItem->InitViewData( this, (SvTreeListEntry*)pEntry, 0 );
+ SvLBoxItem* pItem = pEntry->GetItem( nIdx );
+ pItem->InitViewData( this, pEntry, 0 );
}
// repaint
- pImp->InvalidateEntry( (SvTreeListEntry*)pEntry );
+ pImp->InvalidateEntry( pEntry );
}
void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, SvLBoxString* pItem, const Selection& rSelection)
@@ -2814,7 +2814,7 @@ SvTreeListEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
SvTreeListEntry* pTarget = pImp->GetEntry( rPos );
// when dropping in a vacant space, use the last entry
if( !pTarget )
- return (SvTreeListEntry*)LastVisible();
+ return LastVisible();
else if( (GetDragDropMode() & DragDropMode::ENABLE_TOP) &&
pTarget == First() && rPos.Y() < 6 )
return 0;
@@ -3681,7 +3681,7 @@ void SvTreeListBox::ModelNotification( SvListAction nActionId, SvTreeListEntry*
case SvListAction::RESORTED:
// after a selection: show first entry and also keep the selection
- MakeVisible( (SvTreeListEntry*)pModel->First(), true );
+ MakeVisible( pModel->First(), true );
SetUpdateMode( true );
break;
@@ -3722,7 +3722,7 @@ SvTreeListEntry* SvTreeListBox::GetFirstEntryInView() const
SvTreeListEntry* SvTreeListBox::GetNextEntryInView(SvTreeListEntry* pEntry ) const
{
- SvTreeListEntry* pNext = (SvTreeListEntry*)NextVisible( pEntry );
+ SvTreeListEntry* pNext = NextVisible( pEntry );
if( pNext )
{
Point aPos( GetEntryPosition(pNext) );
@@ -3739,7 +3739,7 @@ SvTreeListEntry* SvTreeListBox::GetLastEntryInView() const
SvTreeListEntry* pNext = 0;
while( pEntry )
{
- pNext = (SvTreeListEntry*)NextVisible( pEntry );
+ pNext = NextVisible( pEntry );
if( pNext )
{
Point aPos( GetEntryPosition(pNext) );
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 80a39809f039..e37d3b7cf345 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -505,8 +505,8 @@ bool GraphicDisplayCacheEntry::IsCacheableAsBitmap( const GDIMetaFile& rMtf,
sal_uInt32 nCurPos;
MetaAction* pAct;
- for( nCurPos = 0, pAct = (MetaAction*)rOutMtf.FirstAction(); pAct;
- pAct = (MetaAction*)rOutMtf.NextAction(), nCurPos++ )
+ for( nCurPos = 0, pAct = rOutMtf.FirstAction(); pAct;
+ pAct = rOutMtf.NextAction(), nCurPos++ )
{
switch( pAct->GetType() )
{
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 9022bdcd9445..972c63498d5e 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1123,8 +1123,8 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// VDevs get bigger than the actual screen.
sal_uInt32 nCurPos;
MetaAction* pAct;
- for( nCurPos = 0, pAct = (MetaAction*)rOutMtf.FirstAction(); pAct;
- pAct = (MetaAction*)rOutMtf.NextAction(), nCurPos++ )
+ for( nCurPos = 0, pAct = rOutMtf.FirstAction(); pAct;
+ pAct = rOutMtf.NextAction(), nCurPos++ )
{
MetaAction* pModAct = NULL;
switch( pAct->GetType() )