diff options
author | Juan Picca <jumapico@gmail.com> | 2014-12-30 11:58:14 -0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-05 10:06:36 +0000 |
commit | 5573fd8cf991b62c405ec9a4b624ebaf28cb8894 (patch) | |
tree | fa578995c8ad21628646b1231bd510be512b93b0 /basctl | |
parent | adfc260b4bdce558855a12cb3985c2da026d3a8d (diff) |
fdo#39596: replace cstyle casts
Change-Id: I1a0814ec973b1dc0f4db4ee88a999d9ffc219e7a
Reviewed-on: https://gerrit.libreoffice.org/13701
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 452bf878e747..1bd399e4a807 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1762,7 +1762,7 @@ bool WatchWindow::RemoveSelectedWatch() aTreeListBox.GetModel()->Remove( pEntry ); pEntry = aTreeListBox.GetCurEntry(); if ( pEntry ) - aXEdit.SetText( ((WatchItem*)pEntry->GetUserData())->maName ); + aXEdit.SetText( static_cast<WatchItem*>(pEntry->GetUserData())->maName ); else aXEdit.SetText( OUString() ); if ( !aTreeListBox.GetEntryCount() ) @@ -2117,7 +2117,7 @@ WatchTreeListBox::~WatchTreeListBox() SvTreeListEntry* pEntry = First(); while ( pEntry ) { - delete (WatchItem*)pEntry->GetUserData(); + delete static_cast<WatchItem*>(pEntry->GetUserData()); pEntry = Next( pEntry ); } } @@ -2145,7 +2145,7 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent ) return; SvTreeListEntry* pEntry = pParent; - WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); + WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData()); SbxDimArray* pArray = pItem->mpArray; SbxDimArray* pRootArray = pItem->GetRootArray(); @@ -2232,11 +2232,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb SbxBase* pSBX = NULL; rbArrayElement = false; - WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); + WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData()); OUString aVName( pItem->maName ); SvTreeListEntry* pParentEntry = GetParent( pEntry ); - WatchItem* pParentItem = pParentEntry ? (WatchItem*)pParentEntry->GetUserData() : NULL; + WatchItem* pParentItem = pParentEntry ? static_cast<WatchItem*>(pParentEntry->GetUserData()) : NULL; if( pParentItem ) { SbxObject* pObj = pParentItem->mpObject; @@ -2269,7 +2269,7 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb bool WatchTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& ) { - WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); + WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData()); bool bEdit = false; if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() ) @@ -2348,7 +2348,7 @@ void implCollapseModifiedObjectEntry( SvTreeListEntry* pParent, WatchTreeListBox { implCollapseModifiedObjectEntry( pDeleteEntry, pThis ); - delete (WatchItem*)pDeleteEntry->GetUserData(); + delete static_cast<WatchItem*>(pDeleteEntry->GetUserData()); pModel->Remove( pDeleteEntry ); } } @@ -2409,7 +2409,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) SvTreeListEntry* pEntry = First(); while ( pEntry ) { - WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); + WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData()); DBG_ASSERT( !pItem->maName.isEmpty(), "Var? - Must not be empty!" ); OUString aWatchStr; OUString aTypeStr; @@ -2504,10 +2504,9 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) { if (SbxObject* pObj = dynamic_cast<SbxObject*>(pVar->GetObject())) { - // Check if member list has changed - bool bObjChanged = false; if (pItem->mpObject && !pItem->maMemberList.empty()) { + bool bObjChanged = false; // Check if member list has changed SbxArray* pProps = pObj->GetProperties(); sal_uInt16 nPropCount = pProps->Count(); for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ ) |