diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-03 09:07:25 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-03 20:24:28 -0500 |
commit | d92814f462432b52b1ef4d0dc335d22af881397b (patch) | |
tree | b5d9c03dae16bc2b19ad36f2f3894f723b1b8231 /basctl | |
parent | 4316e643ef345b0f673b4a03a80a4b7cb3185588 (diff) |
basic: preliminary cosmetic clean-up
parsing 1000s of line of code is hard enough without having to fight
with weird indentation and irregular formatting.
So as the review progress, in order to follow the code, cosmetic changes
were made...
In order to minimize the task of the reviewers and allow them to
concentrate on what matter, an effort is made to collect these
cosmetic changes into this separate commit.
Change-Id: I3c9b04a0150d0d0a048c2e976fe24de4f2b6b98a
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 29 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 8 |
2 files changed, 34 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 2986b82e530b..8fdf123d3c60 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1568,21 +1568,29 @@ void StackWindow::UpdateCalls() SbxVariable* pVar = pParams->Get( nParam ); DBG_ASSERT( pVar, "Parameter?!" ); if ( pVar->GetName().Len() ) + { aEntry += pVar->GetName(); + } else if ( pInfo ) { const SbxParamInfo* pParam = pInfo->GetParam( nParam ); if ( pParam ) + { aEntry += pParam->aName; + } } aEntry += '='; SbxDataType eType = pVar->GetType(); if( eType & SbxARRAY ) + { aEntry += OUString( "..." ); + } else if( eType != SbxOBJECT ) aEntry += pVar->GetString(); if ( nParam < ( pParams->Count() - 1 ) ) + { aEntry += OUString( ", " ); + } } aEntry += ')'; } @@ -2086,11 +2094,13 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) } } else if( pNewArray == NULL || pOldArray == NULL ) + { bArrayChanged = true; - + } if( pNewArray ) + { implEnableChildren( pEntry, true ); - + } // #i37227 Clear always and replace array if( pNewArray != pOldArray ) { @@ -2106,12 +2116,15 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) } } if( bArrayChanged && pOldArray != NULL ) + { bCollapse = true; - + } aTypeStr = implCreateTypeStringForDimArray( pItem, eType ); } else + { aWatchStr += OUString( "<?>" ); + } } else if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT ) { @@ -2134,7 +2147,9 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) } } if( bObjChanged ) + { bCollapse = true; + } } pItem->mpObject = pObj; @@ -2169,20 +2184,28 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) aWatchStr += aStrStr; aWatchStr += pVar->GetString(); if( bString ) + { aWatchStr += aStrStr; + } } if( !aTypeStr.Len() ) { if( !pVar->IsFixed() ) + { aTypeStr = OUString( "Variant/" ); + } aTypeStr += getBasicTypeName( pVar->GetType() ); } } else if( !bArrayElement ) + { aWatchStr += OUString( "<Out of Scope>" ); + } if( bCollapse ) + { implCollapseModifiedObjectEntry( pEntry, this ); + } } else if( bBasicStopped ) diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 4639b4eaf734..58d71de8b30b 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -790,7 +790,9 @@ void Shell::UpdateWindows() if ( bChangeCurWindow ) { if ( !pNextActiveWindow ) + { pNextActiveWindow = FindApplicationWindow(); + } SetCurWindow( pNextActiveWindow, true ); } } @@ -804,9 +806,13 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange if ( pWindow_ == pCurWin ) { if ( bAllowChangeCurWindow ) + { SetCurWindow( FindApplicationWindow(), true ); + } else + { SetCurWindow( NULL, false ); + } } if ( bDestroy ) { @@ -826,7 +832,9 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange { SbModule* pMod = StarBASIC::GetActiveModule(); if ( !pMod || ( pMod && ( !pMod->GetName().Equals(pWindow_->GetName()) ) ) ) + { bStop = false; + } } if ( bStop ) { |