Kaydet (Commit) 5573fd8c authored tarafından Juan Picca's avatar Juan Picca Kaydeden (comit) Caolán McNamara

fdo#39596: replace cstyle casts

Change-Id: I1a0814ec973b1dc0f4db4ee88a999d9ffc219e7a
Reviewed-on: https://gerrit.libreoffice.org/13701Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst adfc260b
...@@ -1762,7 +1762,7 @@ bool WatchWindow::RemoveSelectedWatch() ...@@ -1762,7 +1762,7 @@ bool WatchWindow::RemoveSelectedWatch()
aTreeListBox.GetModel()->Remove( pEntry ); aTreeListBox.GetModel()->Remove( pEntry );
pEntry = aTreeListBox.GetCurEntry(); pEntry = aTreeListBox.GetCurEntry();
if ( pEntry ) if ( pEntry )
aXEdit.SetText( ((WatchItem*)pEntry->GetUserData())->maName ); aXEdit.SetText( static_cast<WatchItem*>(pEntry->GetUserData())->maName );
else else
aXEdit.SetText( OUString() ); aXEdit.SetText( OUString() );
if ( !aTreeListBox.GetEntryCount() ) if ( !aTreeListBox.GetEntryCount() )
...@@ -2117,7 +2117,7 @@ WatchTreeListBox::~WatchTreeListBox() ...@@ -2117,7 +2117,7 @@ WatchTreeListBox::~WatchTreeListBox()
SvTreeListEntry* pEntry = First(); SvTreeListEntry* pEntry = First();
while ( pEntry ) while ( pEntry )
{ {
delete (WatchItem*)pEntry->GetUserData(); delete static_cast<WatchItem*>(pEntry->GetUserData());
pEntry = Next( pEntry ); pEntry = Next( pEntry );
} }
} }
...@@ -2145,7 +2145,7 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent ) ...@@ -2145,7 +2145,7 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent )
return; return;
SvTreeListEntry* pEntry = pParent; SvTreeListEntry* pEntry = pParent;
WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData());
SbxDimArray* pArray = pItem->mpArray; SbxDimArray* pArray = pItem->mpArray;
SbxDimArray* pRootArray = pItem->GetRootArray(); SbxDimArray* pRootArray = pItem->GetRootArray();
...@@ -2232,11 +2232,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb ...@@ -2232,11 +2232,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb
SbxBase* pSBX = NULL; SbxBase* pSBX = NULL;
rbArrayElement = false; rbArrayElement = false;
WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData());
OUString aVName( pItem->maName ); OUString aVName( pItem->maName );
SvTreeListEntry* pParentEntry = GetParent( pEntry ); SvTreeListEntry* pParentEntry = GetParent( pEntry );
WatchItem* pParentItem = pParentEntry ? (WatchItem*)pParentEntry->GetUserData() : NULL; WatchItem* pParentItem = pParentEntry ? static_cast<WatchItem*>(pParentEntry->GetUserData()) : NULL;
if( pParentItem ) if( pParentItem )
{ {
SbxObject* pObj = pParentItem->mpObject; SbxObject* pObj = pParentItem->mpObject;
...@@ -2269,7 +2269,7 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb ...@@ -2269,7 +2269,7 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb
bool WatchTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& ) bool WatchTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
{ {
WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData());
bool bEdit = false; bool bEdit = false;
if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() ) if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() )
...@@ -2348,7 +2348,7 @@ void implCollapseModifiedObjectEntry( SvTreeListEntry* pParent, WatchTreeListBox ...@@ -2348,7 +2348,7 @@ void implCollapseModifiedObjectEntry( SvTreeListEntry* pParent, WatchTreeListBox
{ {
implCollapseModifiedObjectEntry( pDeleteEntry, pThis ); implCollapseModifiedObjectEntry( pDeleteEntry, pThis );
delete (WatchItem*)pDeleteEntry->GetUserData(); delete static_cast<WatchItem*>(pDeleteEntry->GetUserData());
pModel->Remove( pDeleteEntry ); pModel->Remove( pDeleteEntry );
} }
} }
...@@ -2409,7 +2409,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) ...@@ -2409,7 +2409,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
SvTreeListEntry* pEntry = First(); SvTreeListEntry* pEntry = First();
while ( pEntry ) while ( pEntry )
{ {
WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData());
DBG_ASSERT( !pItem->maName.isEmpty(), "Var? - Must not be empty!" ); DBG_ASSERT( !pItem->maName.isEmpty(), "Var? - Must not be empty!" );
OUString aWatchStr; OUString aWatchStr;
OUString aTypeStr; OUString aTypeStr;
...@@ -2504,10 +2504,9 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) ...@@ -2504,10 +2504,9 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
{ {
if (SbxObject* pObj = dynamic_cast<SbxObject*>(pVar->GetObject())) if (SbxObject* pObj = dynamic_cast<SbxObject*>(pVar->GetObject()))
{ {
// Check if member list has changed
bool bObjChanged = false;
if (pItem->mpObject && !pItem->maMemberList.empty()) if (pItem->mpObject && !pItem->maMemberList.empty())
{ {
bool bObjChanged = false; // Check if member list has changed
SbxArray* pProps = pObj->GetProperties(); SbxArray* pProps = pObj->GetProperties();
sal_uInt16 nPropCount = pProps->Count(); sal_uInt16 nPropCount = pProps->Count();
for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ ) for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment