summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/baside2b.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:10:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:16 +0100
commit4b0a3da4c5303fc97658050cf790f956f298599a (patch)
tree43764a1843059b3cdcf2e008c6c06d6a2d8cb87b /basctl/source/basicide/baside2b.cxx
parent8697284d248f47dd4798f7ef49791fc7686f646d (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I27f1d5ee55338372b1c24187b63d23ae39e0a8b3
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r--basctl/source/basicide/baside2b.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index a93159b3705a..7c8731424cca 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -71,7 +71,7 @@ SbxVariable* IsSbxVariable (SbxBase* pBase)
if (SbxVariable* pVar = dynamic_cast<SbxVariable*>(pBase))
if (!dynamic_cast<SbxMethod*>(pVar))
return pVar;
- return 0;
+ return nullptr;
}
Image GetImage (unsigned nId)
@@ -1062,7 +1062,7 @@ void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
SetBackground(Wallpaper(aColor));
Invalidate();
}
- if (pEditEngine != 0)
+ if (pEditEngine != nullptr)
{
aColor = GetSettings().GetStyleSettings().GetFieldTextColor();
if (!pOldSettings || aColor !=
@@ -1463,7 +1463,7 @@ BreakPoint* BreakPointWindow::FindBreakPoint( const Point& rMousePos )
if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) )
return pBrk;
}
- return 0;
+ return nullptr;
}
void BreakPointWindow::MouseButtonDown( const MouseEvent& rMEvt )
@@ -1488,7 +1488,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{
Point aPos( rCEvt.IsMouseEvent() ? rCEvt.GetMousePosPixel() : Point(1,1) );
Point aEventPos( PixelToLogic( aPos ) );
- BreakPoint* pBrk = rCEvt.IsMouseEvent() ? FindBreakPoint( aEventPos ) : 0;
+ BreakPoint* pBrk = rCEvt.IsMouseEvent() ? FindBreakPoint( aEventPos ) : nullptr;
if ( pBrk )
{
// test if break point is enabled...
@@ -1712,7 +1712,7 @@ struct WatchItem
maName(rName),
nDimLevel(0),
nDimCount(0),
- mpArrayParentItem(0)
+ mpArrayParentItem(nullptr)
{ }
void clearWatchItem ()
@@ -1739,7 +1739,7 @@ WatchItem* WatchItem::GetRootItem()
SbxDimArray* WatchItem::GetRootArray()
{
WatchItem* pRootItem = GetRootItem();
- SbxDimArray* pRet = NULL;
+ SbxDimArray* pRet = nullptr;
if( pRootItem )
pRet = pRootItem->mpArray;
return pRet;
@@ -1753,7 +1753,7 @@ void WatchWindow::AddWatch( const OUString& rVName )
OUString aWatchStr_( aVar );
aWatchStr_ += "\t\t";
- SvTreeListEntry* pNewEntry = aTreeListBox->InsertEntry( aWatchStr_, 0, true );
+ SvTreeListEntry* pNewEntry = aTreeListBox->InsertEntry( aWatchStr_, nullptr, true );
pNewEntry->SetUserData( pWatchItem );
aTreeListBox->Select(pNewEntry);
@@ -2127,7 +2127,7 @@ void WatchTreeListBox::dispose()
while ( pEntry )
{
delete static_cast<WatchItem*>(pEntry->GetUserData());
- pEntry->SetUserData(NULL);
+ pEntry->SetUserData(nullptr);
pEntry = Next( pEntry );
}
SvHeaderTabListBox::dispose();
@@ -2247,14 +2247,14 @@ void WatchTreeListBox::RequestingChildren( SvTreeListEntry * pParent )
SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rbArrayElement )
{
- SbxBase* pSBX = NULL;
+ SbxBase* pSBX = nullptr;
rbArrayElement = false;
WatchItem* pItem = static_cast<WatchItem*>(pEntry->GetUserData());
OUString aVName( pItem->maName );
SvTreeListEntry* pParentEntry = GetParent( pEntry );
- WatchItem* pParentItem = pParentEntry ? static_cast<WatchItem*>(pParentEntry->GetUserData()) : NULL;
+ WatchItem* pParentItem = pParentEntry ? static_cast<WatchItem*>(pParentEntry->GetUserData()) : nullptr;
if( pParentItem )
{
SbxObject* pObj = pParentItem->mpObject;
@@ -2271,11 +2271,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvTreeListEntry* pEntry, bool& rb
}
}
// Array?
- else if( (pArray = pItem->GetRootArray()) != NULL )
+ else if( (pArray = pItem->GetRootArray()) != nullptr )
{
rbArrayElement = true;
if( pParentItem->nDimLevel + 1 == pParentItem->nDimCount )
- pSBX = pArray->Get(pItem->vIndices.empty() ? 0 : &*pItem->vIndices.begin());
+ pSBX = pArray->Get(pItem->vIndices.empty() ? nullptr : &*pItem->vIndices.begin());
}
}
else
@@ -2298,7 +2298,7 @@ bool WatchTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
if (IsSbxVariable(pSbx) || bArrayElement)
{
// Accept no objects and only end nodes of arrays for editing
- if( !pItem->mpObject && (pItem->mpArray == NULL || pItem->nDimLevel == pItem->nDimCount) )
+ if( !pItem->mpObject && (pItem->mpArray == nullptr || pItem->nDimLevel == pItem->nDimCount) )
{
aEditingRes = SvHeaderTabListBox::GetEntryText( pEntry, ITEM_ID_VALUE-1 );
aEditingRes = comphelper::string::strip(aEditingRes, ' ');
@@ -2362,7 +2362,7 @@ void implCollapseModifiedObjectEntry( SvTreeListEntry* pParent, WatchTreeListBox
SvTreeList* pModel = pThis->GetModel();
SvTreeListEntry* pDeleteEntry;
- while( (pDeleteEntry = pThis->SvTreeListBox::GetEntry( pParent, 0 )) != NULL )
+ while( (pDeleteEntry = pThis->SvTreeListBox::GetEntry( pParent, 0 )) != nullptr )
{
implCollapseModifiedObjectEntry( pDeleteEntry, pThis );
@@ -2456,7 +2456,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
SbxDimArray* pOldArray = pItem->mpArray;
bool bArrayChanged = false;
- if( pNewArray != NULL && pOldArray != NULL )
+ if( pNewArray != nullptr && pOldArray != nullptr )
{
// Compare Array dimensions to see if array has changed
// Can be a copy, so comparing pointers does not work
@@ -2483,7 +2483,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
}
}
}
- else if( pNewArray == NULL || pOldArray == NULL )
+ else if( pNewArray == nullptr || pOldArray == nullptr )
{
bArrayChanged = true;
}
@@ -2505,7 +2505,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
pItem->nDimCount = nDims;
}
}
- if( bArrayChanged && pOldArray != NULL )
+ if( bArrayChanged && pOldArray != nullptr )
{
bCollapse = true;
}
@@ -2548,7 +2548,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
else
{
aWatchStr = "Null";
- if( pItem->mpObject != NULL )
+ if( pItem->mpObject != nullptr )
{
bCollapse = true;
pItem->clearWatchItem();
@@ -2559,7 +2559,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
}
else
{
- if( pItem->mpObject != NULL )
+ if( pItem->mpObject != nullptr )
{
bCollapse = true;
pItem->clearWatchItem();
@@ -2604,7 +2604,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
if( pItem->mpObject || pItem->mpArray )
{
implCollapseModifiedObjectEntry( pEntry, this );
- pItem->mpObject = NULL;
+ pItem->mpObject = nullptr;
}
}
@@ -2788,7 +2788,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt )
InsertSelectedEntry();
break;
case KEY_UP: case KEY_DOWN:
- NotifyEvent nEvt( MouseNotifyEvent::KEYINPUT, NULL, &rKeyEvt );
+ NotifyEvent nEvt( MouseNotifyEvent::KEYINPUT, nullptr, &rKeyEvt );
PreNotify(nEvt);
break;
}
@@ -2960,7 +2960,7 @@ UnoTypeCodeCompletetor::UnoTypeCodeCompletetor( const std::vector< OUString >& a
std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassMethods() const
{
std::vector< OUString > aRetVect;
- if( bCanComplete && ( xClass != NULL ) )
+ if( bCanComplete && ( xClass != nullptr ) )
{
Sequence< Reference< reflection::XIdlMethod > > aMethods = xClass->getMethods();
if( aMethods.getLength() != 0 )
@@ -2977,7 +2977,7 @@ std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassMethods() const
std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassFields() const
{
std::vector< OUString > aRetVect;
- if( bCanComplete && ( xClass != NULL ) )
+ if( bCanComplete && ( xClass != nullptr ) )
{
Sequence< Reference< reflection::XIdlField > > aFields = xClass->getFields();
if( aFields.getLength() != 0 )
@@ -2995,14 +2995,14 @@ std::vector< OUString > UnoTypeCodeCompletetor::GetXIdlClassFields() const
bool UnoTypeCodeCompletetor::CheckField( const OUString& sFieldName )
{// modifies xClass!!!
- if ( xClass == NULL )
+ if ( xClass == nullptr )
return false;
Reference< reflection::XIdlField> xField = xClass->getField( sFieldName );
- if( xField != NULL )
+ if( xField != nullptr )
{
xClass = xField->getType();
- if( xClass != NULL )
+ if( xClass != nullptr )
{
return true;
}
@@ -3014,14 +3014,14 @@ bool UnoTypeCodeCompletetor::CheckMethod( const OUString& sMethName )
{// modifies xClass!!!
- if ( xClass == NULL )
+ if ( xClass == nullptr )
return false;
Reference< reflection::XIdlMethod> xMethod = xClass->getMethod( sMethName );
- if( xMethod != NULL ) //method OK, check return type
+ if( xMethod != nullptr ) //method OK, check return type
{
xClass = xMethod->getReturnType();
- if( xClass != NULL )
+ if( xClass != nullptr )
{
return true;
}