diff options
Diffstat (limited to 'basctl')
39 files changed, 213 insertions, 213 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index 5c4c9968cf8e..bb6175d3404b 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -76,7 +76,7 @@ AccessibleDialogControlShape::~AccessibleDialogControlShape() m_xControlModel->removePropertyChangeListener( OUString(), static_cast< beans::XPropertyChangeListener* >( this ) ); delete m_pExternalLock; - m_pExternalLock = NULL; + m_pExternalLock = nullptr; } @@ -180,7 +180,7 @@ void AccessibleDialogControlShape::SetBounds( const awt::Rectangle& aBounds ) vcl::Window* AccessibleDialogControlShape::GetWindow() const { - vcl::Window* pWindow = NULL; + vcl::Window* pWindow = nullptr; if ( m_pDlgEdObj ) { Reference< awt::XControl > xControl( m_pDlgEdObj->GetControl(), UNO_QUERY ); @@ -255,8 +255,8 @@ void AccessibleDialogControlShape::disposing() { AccessibleExtendedComponentHelper_BASE::disposing(); - m_pDialogWindow = NULL; - m_pDlgEdObj = NULL; + m_pDialogWindow = nullptr; + m_pDlgEdObj = nullptr; if ( m_xControlModel.is() ) m_xControlModel->removePropertyChangeListener( OUString(), static_cast< beans::XPropertyChangeListener* >( this ) ); diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index cbdf5c11fcb6..64b84755fe84 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -49,7 +49,7 @@ using namespace ::comphelper; AccessibleDialogWindow::ChildDescriptor::ChildDescriptor( DlgEdObj* _pDlgEdObj ) :pDlgEdObj( _pDlgEdObj ) - ,rxAccessible( 0 ) + ,rxAccessible( nullptr ) { } @@ -106,8 +106,8 @@ bool AccessibleDialogWindow::ChildDescriptor::operator<( const ChildDescriptor& AccessibleDialogWindow::AccessibleDialogWindow (basctl::DialogWindow* pDialogWindow) : AccessibleExtendedComponentHelper_BASE( new VCLExternalSolarLock() ) , m_pDialogWindow(pDialogWindow) - , m_pDlgEditor(NULL) - , m_pDlgEdModel(NULL) + , m_pDlgEditor(nullptr) + , m_pDlgEdModel(nullptr) { m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock() ); @@ -149,7 +149,7 @@ AccessibleDialogWindow::~AccessibleDialogWindow() EndListening( *m_pDlgEdModel ); delete m_pExternalLock; - m_pExternalLock = NULL; + m_pExternalLock = nullptr; } @@ -419,15 +419,15 @@ void AccessibleDialogWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindo if ( m_pDialogWindow ) { m_pDialogWindow->RemoveEventListener( LINK( this, AccessibleDialogWindow, WindowEventListener ) ); - m_pDialogWindow = NULL; + m_pDialogWindow = nullptr; if ( m_pDlgEditor ) EndListening( *m_pDlgEditor ); - m_pDlgEditor = NULL; + m_pDlgEditor = nullptr; if ( m_pDlgEdModel ) EndListening( *m_pDlgEdModel ); - m_pDlgEdModel = NULL; + m_pDlgEdModel = nullptr; // dispose all children for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i ) @@ -569,15 +569,15 @@ void AccessibleDialogWindow::disposing() if ( m_pDialogWindow ) { m_pDialogWindow->RemoveEventListener( LINK( this, AccessibleDialogWindow, WindowEventListener ) ); - m_pDialogWindow = NULL; + m_pDialogWindow = nullptr; if ( m_pDlgEditor ) EndListening( *m_pDlgEditor ); - m_pDlgEditor = NULL; + m_pDlgEditor = nullptr; if ( m_pDlgEdModel ) EndListening( *m_pDlgEdModel ); - m_pDlgEdModel = NULL; + m_pDlgEdModel = nullptr; // dispose all children for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i ) diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 51b66d4712ce..d4102010a6df 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -324,7 +324,7 @@ bool ModulWindow::BasicExecute() TextSelection aSel = GetEditView()->GetSelection(); // Init cursor to top const sal_uInt32 nCurMethodStart = aSel.GetStart().GetPara() + 1; - SbMethod* pMethod = 0; + SbMethod* pMethod = nullptr; // first Macro, else blind "Main" (ExtSearch?) for ( sal_uInt16 nMacro = 0; nMacro < xModule->GetMethods()->Count(); nMacro++ ) { @@ -1276,7 +1276,7 @@ svl::IUndoManager* ModulWindow::GetUndoManager() { if ( GetEditEngine() ) return &GetEditEngine()->GetUndoManager(); - return NULL; + return nullptr; } SearchOptionFlags ModulWindow::GetSearchOptions() @@ -1441,7 +1441,7 @@ void ModulWindow::UpdateModule () ModulWindowLayout::ModulWindowLayout (vcl::Window* pParent, ObjectCatalog& rObjectCatalog_) : Layout(pParent), - pChild(0), + pChild(nullptr), aWatchWindow(VclPtr<WatchWindow>::Create(this)), aStackWindow(VclPtr<StackWindow>::Create(this)), rObjectCatalog(rObjectCatalog_) @@ -1494,12 +1494,12 @@ void ModulWindowLayout::Activating (BaseWindow& rChild) void ModulWindowLayout::Deactivating () { - aSyntaxColors.SetActiveEditor(0); + aSyntaxColors.SetActiveEditor(nullptr); Layout::Deactivating(); aWatchWindow->Hide(); aStackWindow->Hide(); rObjectCatalog.Hide(); - pChild = 0; + pChild = nullptr; } void ModulWindowLayout::GetState (SfxItemSet &rSet, unsigned nWhich) @@ -1534,7 +1534,7 @@ void ModulWindowLayout::OnFirstSize (long const nWidth, long const nHeight) } ModulWindowLayout::SyntaxColors::SyntaxColors () : - pEditor(0) + pEditor(nullptr) { aConfig.AddListener(this); 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; } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 782dc1ad8268..6b1edfbfc524 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -348,7 +348,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) case SID_SHOW_PROPERTYBROWSER: { Shell* pShell = GetShell(); - SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : NULL; + SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : nullptr; if ( pViewFrame && !pViewFrame->HasChildWindow( SID_SHOW_PROPERTYBROWSER ) && !pEditor->GetView().AreObjectsMarked() ) rSet.DisableItem( nWh ); @@ -1148,7 +1148,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script if (basctl::RemoveDialog( rDocument, aLibName, aNewDlgName ) ) { BaseWindow* pDlgWin = pShell->FindDlgWin( rDocument, aLibName, aNewDlgName, false, true ); - if( pDlgWin != NULL ) + if( pDlgWin != nullptr ) pShell->RemoveWindow( pDlgWin, true ); MarkDocumentModified( rDocument ); } @@ -1374,9 +1374,9 @@ ItemType DialogWindow::GetType () const DialogWindowLayout::DialogWindowLayout (vcl::Window* pParent, ObjectCatalog& rObjectCatalog_) : Layout(pParent), - pChild(0), + pChild(nullptr), rObjectCatalog(rObjectCatalog_), - pPropertyBrowser(0) + pPropertyBrowser(nullptr) { ShowPropertyBrowser(); } @@ -1421,7 +1421,7 @@ void DialogWindowLayout::ShowPropertyBrowser () void DialogWindowLayout::DisablePropertyBrowser () { if (pPropertyBrowser) - pPropertyBrowser->Update(0); + pPropertyBrowser->Update(nullptr); } // updates the property browser @@ -1449,7 +1449,7 @@ void DialogWindowLayout::Deactivating () rObjectCatalog.Hide(); if (pPropertyBrowser) pPropertyBrowser->Hide(); - pChild = 0; + pChild = nullptr; } void DialogWindowLayout::ExecuteGlobal (SfxRequest& rReq) diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index c42da35c9d24..df3021bb79aa 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -126,7 +126,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) break; if (it != aWindowTable.end()) ++it; - BaseWindow* pWin = it != aWindowTable.end() ? it->second.get() : 0; + BaseWindow* pWin = it != aWindowTable.end() ? it->second.get() : nullptr; bool bSearchedFromStart = false; while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) ) @@ -134,8 +134,8 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) if ( !pWin ) { SfxViewFrame* pViewFrame = GetViewFrame(); - SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL; - vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL; + SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : nullptr; + vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : nullptr; ScopedVclPtrInstance< QueryBox > aQuery(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)); if ( aQuery->Execute() == RET_YES ) { @@ -166,10 +166,10 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) { if ( it != aWindowTable.end() ) ++it; - pWin = it != aWindowTable.end() ? it->second.get() : 0; + pWin = it != aWindowTable.end() ? it->second.get() : nullptr; } else - pWin = 0; + pWin = nullptr; } if ( !nFound && bSearchedFromStart ) nFound = pCurWin->StartSearchAndReplace(rSearchItem, true); @@ -266,7 +266,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) break; case SID_BASICIDE_CHOOSEMACRO: { - ChooseMacro( NULL, false, OUString() ); + ChooseMacro( nullptr, false, OUString() ); } break; case SID_BASICIDE_CREATEMACRO: @@ -535,7 +535,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) OUString aLibName( rSbxItem.GetLibName() ); OUString aName( rSbxItem.GetName() ); SetCurLib( aDocument, aLibName ); - BaseWindow* pWin = 0; + BaseWindow* pWin = nullptr; if ( rSbxItem.GetType() == TYPE_DIALOG ) { pWin = FindDlgWin( aDocument, aLibName, aName, true ); @@ -595,7 +595,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) if ( pTypeItem ) aType = pTypeItem->GetValue(); - BaseWindow* pWin = 0; + BaseWindow* pWin = nullptr; if ( aType == aModType ) pWin = FindBasWin( *pDocument, aLibName, aName ); else if ( aType == aDlgType ) @@ -895,7 +895,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_REDO: { if( GetUndoManager() ) // recursive GetState else - GetViewFrame()->GetSlotState( nWh, NULL, &rSet ); + GetViewFrame()->GetSlotState( nWh, nullptr, &rSet ); } break; case SID_BASICIDE_CURRENT_LANG: @@ -1008,7 +1008,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe else { SetWindow(pLayout); - pLayout = 0; + pLayout = nullptr; } if ( bUpdateTabBar ) { @@ -1029,10 +1029,10 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe { SetWindow(pLayout); GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW ); - SfxObjectShell::SetCurrentComponent(0); + SfxObjectShell::SetCurrentComponent(nullptr); } aObjectCatalog->SetCurrentEntry(pCurWin); - SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 ); + SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : nullptr ); InvalidateBasicIDESlots(); EnableScrollbars(pCurWin != nullptr); @@ -1104,7 +1104,7 @@ VclPtr<BaseWindow> Shell::FindWindow( if (pWin->Is(rDocument, rLibName, rName, eType, bFindSuspended)) return pWin; } - return 0; + return nullptr; } bool Shell::CallBasicErrorHdl( StarBASIC* pBasic ) @@ -1177,7 +1177,7 @@ VclPtr<ModulWindow> Shell::ShowActiveModuleWindow( StarBASIC* pBasic ) StartListening( *pBasicMgr, true /* log on only once */ ); return pWin; } - return 0; + return nullptr; } void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize ) diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index acaa37a5c9fd..7e1402f17ec0 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -83,7 +83,7 @@ SfxPrinter* Shell::GetPrinter( bool bCreate ) assert(pDocShell && "DocShell ?!"); return pDocShell->GetPrinter( bCreate ); } - return 0; + return nullptr; } sal_uInt16 Shell::SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags , bool ) @@ -211,7 +211,7 @@ VclPtr<ModulWindow> Shell::FindBasWin ( { if (BaseWindow* pWin = FindWindow(rDocument, rLibName, rName, TYPE_MODULE, bFindSuspended)) return VclPtr<ModulWindow>(static_cast<ModulWindow*>(pWin)); - return bCreateIfNotExist ? CreateBasWin(rDocument, rLibName, rName) : 0; + return bCreateIfNotExist ? CreateBasWin(rDocument, rLibName, rName) : nullptr; } void Shell::Move() diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index cd84dd4972b1..f8458f67e385 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -115,7 +115,7 @@ VclPtr<DialogWindow> Shell::FindDlgWin ( { if (BaseWindow* pWin = FindWindow(rDocument, rLibName, rName, TYPE_DIALOG, bFindSuspended)) return static_cast<DialogWindow*>(pWin); - return bCreateIfNotExist ? CreateDlgWin(rDocument, rLibName, rName) : 0; + return bCreateIfNotExist ? CreateDlgWin(rDocument, rLibName, rName) : nullptr; } sal_uInt16 Shell::GetWindowId(const BaseWindow* pWin) const @@ -131,7 +131,7 @@ SdrView* Shell::GetCurDlgView() const if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin.get())) return &pDCurWin->GetView(); else - return 0; + return nullptr; } // only if dialogue window above: diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 0fe7c76e53e3..222e24b741de 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -152,7 +152,7 @@ Shell::Shell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell */ ) : aHScrollBar( VclPtr<ScrollBar>::Create(&GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG )) ), aVScrollBar( VclPtr<ScrollBar>::Create(&GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG )) ), aScrollBarBox( VclPtr<ScrollBarBox>::Create(&GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE )) ), - pLayout(0), + pLayout(nullptr), aObjectCatalog(VclPtr<ObjectCatalog>::Create(&GetViewFrame()->GetWindow())), m_bAppBasicModified( false ), m_aNotifier( *this ) @@ -184,7 +184,7 @@ void Shell::Init() GetViewFrame()->GetWindow().GetSettings().GetStyleSettings().GetWindowColor() ); - pCurWin = 0; + pCurWin = nullptr; m_aCurDocument = ScriptDocument::getApplicationScriptDocument(); bCreatingWindow = false; @@ -222,8 +222,8 @@ Shell::~Shell() // so that on a basic saving error, the shell doesn't pop right up again GetExtraData()->ShellInCriticalSection() = true; - SetWindow( 0 ); - SetCurWindow( 0 ); + SetWindow( nullptr ); + SetCurWindow( nullptr ); aObjectCatalog.disposeAndClear(); aScrollBarBox.disposeAndClear(); @@ -500,7 +500,7 @@ void Shell::ArrangeTabBar() ::svl::IUndoManager* Shell::GetUndoManager() { - ::svl::IUndoManager* pMgr = NULL; + ::svl::IUndoManager* pMgr = nullptr; if( pCurWin ) pMgr = pCurWin->GetUndoManager(); @@ -665,7 +665,7 @@ void Shell::UpdateWindows() if ( bCreatingWindow ) return; - BaseWindow* pNextActiveWindow = 0; + BaseWindow* pNextActiveWindow = nullptr; // show all windows that are to be shown ScriptDocuments aDocuments( ScriptDocument::getAllScriptDocuments( ScriptDocument::AllWithApplication ) ); @@ -701,7 +701,7 @@ void Shell::UpdateWindows() if ( !bProtected ) { - LibInfos::Item const* pLibInfoItem = 0; + LibInfos::Item const* pLibInfoItem = nullptr; if (ExtraData* pData = GetExtraData()) pLibInfoItem = pData->GetLibInfos().GetInfo(*doc, aLibName); @@ -798,7 +798,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange } else { - SetCurWindow( NULL ); + SetCurWindow( nullptr ); } } if ( bDestroy ) diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 68a87ea0172e..c737227fdc6a 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -201,7 +201,7 @@ namespace MacroExecutionData() :aDocument( ScriptDocument::NoDocument ) - ,xMethod( NULL ) + ,xMethod( nullptr ) { } }; @@ -240,7 +240,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, GetExtraData()->ChoosingMacro() = true; OUString aScriptURL; - SbMethod* pMethod = NULL; + SbMethod* pMethod = nullptr; ScopedVclPtrInstance< MacroChooser > pChooser( nullptr, true ); if ( bChooseOnly || !SvtModuleOptions::IsBasicIDE() ) @@ -355,7 +355,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, MacroExecutionData* pExecData = new MacroExecutionData; pExecData->aDocument = aDocument; pExecData->xMethod = pMethod; // keep alive until the event has been processed - Application::PostUserEvent( LINK( NULL, MacroExecution, ExecuteMacroEvent ), pExecData ); + Application::PostUserEvent( LINK( nullptr, MacroExecution, ExecuteMacroEvent ), pExecData ); } } break; @@ -374,8 +374,8 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt if ( rDocument.getModule( rLibName, rModName, aOUSource ) ) { BasicManager* pBasMgr = rDocument.getBasicManager(); - StarBASIC* pSb = pBasMgr ? pBasMgr->GetLib( rLibName ) : NULL; - SbModule* pMod = pSb ? pSb->FindModule( rModName ) : NULL; + StarBASIC* pSb = pBasMgr ? pBasMgr->GetLib( rLibName ) : nullptr; + SbModule* pMod = pSb ? pSb->FindModule( rModName ) : nullptr; SbModuleRef xModule; // Only reparse modules if ScriptDocument source is out of sync @@ -425,8 +425,8 @@ bool HasMethod ( { // Check if we really need to scan the source ( again ) BasicManager* pBasMgr = rDocument.getBasicManager(); - StarBASIC* pSb = pBasMgr ? pBasMgr->GetLib( rLibName ) : NULL; - SbModule* pMod = pSb ? pSb->FindModule( rModName ) : NULL; + StarBASIC* pSb = pBasMgr ? pBasMgr->GetLib( rLibName ) : nullptr; + SbModule* pMod = pSb ? pSb->FindModule( rModName ) : nullptr; SbModuleRef xModule; // Only reparse modules if ScriptDocument source is out of sync // with basic's Module diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index dceb6be61d05..eb7dd6dfc74e 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -59,7 +59,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName ) } if ( pModule->GetMethods()->Find( rMacroName, SbxCLASS_METHOD ) ) - return 0; + return nullptr; OUString aMacroName( rMacroName ); if ( aMacroName.isEmpty() ) @@ -168,7 +168,7 @@ bool RenameDialog ( } Shell* pShell = GetShell(); - DialogWindow* pWin = pShell ? pShell->FindDlgWin(rDocument, rLibName, rOldName) : 0; + DialogWindow* pWin = pShell ? pShell->FindDlgWin(rDocument, rLibName, rOldName) : nullptr; Reference< XNameContainer > xExistingDialog; if ( pWin ) xExistingDialog = pWin->GetEditor().GetDialog(); @@ -247,7 +247,7 @@ BasicManager* FindBasicManager( StarBASIC* pLib ) return pBasicMgr; } } - return NULL; + return nullptr; } void MarkDocumentModified( const ScriptDocument& rDocument ) @@ -314,9 +314,9 @@ void BasicStopped( if ( pnWaitCount ) *pnWaitCount = 0; if ( ppSWActionCount ) - *ppSWActionCount = 0; + *ppSWActionCount = nullptr; if ( ppSWLockViewCount ) - *ppSWLockViewCount = 0; + *ppSWLockViewCount = nullptr; // AppWait? if (Shell* pShell = GetShell()) @@ -378,7 +378,7 @@ long HandleBasicError( StarBASIC* pBasic ) return 2; long nRet = 0; - Shell* pShell = 0; + Shell* pShell = nullptr; if ( SvtModuleOptions::IsBasicIDE() ) { BasicManager* pBasMgr = FindBasicManager( pBasic ); @@ -425,9 +425,9 @@ long HandleBasicError( StarBASIC* pBasic ) SfxBindings* GetBindingsPtr() { - SfxBindings* pBindings = NULL; + SfxBindings* pBindings = nullptr; - SfxViewFrame* pFrame = NULL; + SfxViewFrame* pFrame = nullptr; if (Shell* pShell = GetShell()) { pFrame = pShell->GetViewFrame(); @@ -445,7 +445,7 @@ SfxBindings* GetBindingsPtr() pView = SfxViewFrame::GetNext( *pView ); } } - if ( pFrame != NULL ) + if ( pFrame != nullptr ) pBindings = &pFrame->GetBindings(); return pBindings; @@ -457,7 +457,7 @@ SfxDispatcher* GetDispatcher () if (SfxViewFrame* pViewFrame = pShell->GetViewFrame()) if (SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher()) return pDispatcher; - return 0; + return nullptr; } } // namespace basctl diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 539976eb6c5c..e43fa7250c76 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -221,7 +221,7 @@ void TreeListBox::dispose() while ( pEntry ) { delete static_cast<Entry*>( pEntry->GetUserData() ); - pEntry->SetUserData( NULL ); + pEntry->SetUserData( nullptr ); pEntry = Next( pEntry ); } SvTreeListBox::dispose(); @@ -250,7 +250,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL AddEntry( aRootName, aImage, - 0, true, o3tl::make_unique<DocumentEntry>(rDocument, eLocation)); + nullptr, true, o3tl::make_unique<DocumentEntry>(rDocument, eLocation)); } SetUpdateMode(true); @@ -548,7 +548,7 @@ SvTreeListEntry* TreeListBox::ImpFindEntry( SvTreeListEntry* pParent, const OUSt pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos ); } - return 0; + return nullptr; } void TreeListBox::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) @@ -604,7 +604,7 @@ void TreeListBox::UpdateEntries() EntryDescriptor aCurDesc( GetEntryDescriptor( FirstSelected() ) ); // removing the invalid entries - SvTreeListEntry* pLastValid = 0; + SvTreeListEntry* pLastValid = nullptr; SvTreeListEntry* pEntry = First(); while ( pEntry ) { @@ -667,7 +667,7 @@ SvTreeListEntry* TreeListBox::FindEntry( SvTreeListEntry* pParent, const OUStrin pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos ); } - return 0; + return nullptr; } bool TreeListBox::ExpandingHdl() @@ -822,7 +822,7 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc) { - SvTreeListEntry* pCurEntry = 0; + SvTreeListEntry* pCurEntry = nullptr; EntryDescriptor aDesc = rDesc; if ( aDesc.GetType() == OBJ_TYPE_UNKNOWN ) { diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 94436dac89a4..071ebafd6630 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -162,7 +162,7 @@ void TreeListBox::ScanAllEntries() SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry ) { if ( !pEntry ) - return 0; + return nullptr; ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() ); EntryArray aEntries; @@ -189,7 +189,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry ) pEntry = GetParent( pEntry ); } - SbxVariable* pVar = 0; + SbxVariable* pVar = nullptr; if ( !aEntries.empty() ) { bool bDocumentObjects = false; @@ -241,7 +241,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry ) continue; default: OSL_FAIL( "FindVariable: Unbekannter Typ!" ); - pVar = 0; + pVar = nullptr; break; } if ( !pVar ) @@ -441,7 +441,7 @@ SvTreeListEntry* TreeListBox::FindRootEntry( const ScriptDocument& rDocument, Li return pRootEntry; pRootEntry = GetEntry( ++nRootPos ); } - return 0; + return nullptr; } OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName ) diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 203cf4f6d5a8..450d031436a6 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -48,8 +48,8 @@ BaseWindow::BaseWindow( vcl::Window* pParent, const ScriptDocument& rDocument, c ,m_aLibName( aLibName ) ,m_aName( aName ) { - pShellHScrollBar = 0; - pShellVScrollBar = 0; + pShellHScrollBar = nullptr; + pShellVScrollBar = nullptr; nStatus = 0; } @@ -209,7 +209,7 @@ bool BaseWindow::IsPasteAllowed () ::svl::IUndoManager* BaseWindow::GetUndoManager() { - return NULL; + return nullptr; } SearchOptionFlags BaseWindow::GetSearchOptions() @@ -268,7 +268,7 @@ WinBits const DockingWindow::StyleBits = DockingWindow::DockingWindow (vcl::Window* pParent) : ::DockingWindow(pParent, StyleBits), - pLayout(0), + pLayout(nullptr), nShowCount(0) { } @@ -752,7 +752,7 @@ LibInfos::Item const* LibInfos::GetInfo ( ) { Map::iterator it = m_aMap.find(Key(rDocument, rLibName)); - return it != m_aMap.end() ? &it->second : 0; + return it != m_aMap.end() ? &it->second : nullptr; } LibInfos::Key::Key (ScriptDocument const& rDocument, OUString const& rLibName) : diff --git a/basctl/source/basicide/breakpoint.cxx b/basctl/source/basicide/breakpoint.cxx index 3a15047ea76e..5c59bea38d5a 100644 --- a/basctl/source/basicide/breakpoint.cxx +++ b/basctl/source/basicide/breakpoint.cxx @@ -90,7 +90,7 @@ BreakPoint* BreakPointList::FindBreakPoint(size_t nLine) if ( pBrk->nLine == nLine ) return pBrk; } - return NULL; + return nullptr; } void BreakPointList::AdjustBreakPoints(size_t nLine, bool bInserted) @@ -144,7 +144,7 @@ BreakPoint* BreakPointList::remove(BreakPoint* ptr) return ptr; } } - return NULL; + return nullptr; } size_t BreakPointList::size() const @@ -154,12 +154,12 @@ size_t BreakPointList::size() const BreakPoint* BreakPointList::at(size_t i) { - return i < maBreakPoints.size() ? maBreakPoints[ i ] : NULL; + return i < maBreakPoints.size() ? maBreakPoints[ i ] : nullptr; } const BreakPoint* BreakPointList::at(size_t i) const { - return i < maBreakPoints.size() ? maBreakPoints[ i ] : NULL; + return i < maBreakPoints.size() ? maBreakPoints[ i ] : nullptr; } void BreakPointList::clear() diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 0ca7e8e2dc2d..599744d8ad0e 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -136,7 +136,7 @@ void BreakPointDialog::CheckButtons() // "OK" and "Delete" buttons are enabled: size_t nLine; if (lcl_ParseText(m_pComboBox->GetText(), nLine) - && m_aModifiedBreakPointList.FindBreakPoint(nLine) == 0) + && m_aModifiedBreakPointList.FindBreakPoint(nLine) == nullptr) { m_pNewButton->Enable(); m_pOKButton->Disable(); diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index c35a1b1e7d73..740e0e5ed4fe 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -81,7 +81,7 @@ namespace basctl private: /// determines whether the instance is already disposed - bool impl_isDisposed_nothrow() const { return m_pListener == NULL; } + bool impl_isDisposed_nothrow() const { return m_pListener == nullptr; } /// disposes the instance void impl_dispose_nothrow(); @@ -183,7 +183,7 @@ namespace basctl void DocumentEventNotifier::Impl::impl_dispose_nothrow() { - m_pListener = NULL; + m_pListener = nullptr; m_xModel.clear(); } diff --git a/basctl/source/basicide/docsignature.cxx b/basctl/source/basicide/docsignature.cxx index dd1626a1aead..61827dc9c1aa 100644 --- a/basctl/source/basicide/docsignature.cxx +++ b/basctl/source/basicide/docsignature.cxx @@ -41,7 +41,7 @@ namespace basctl { SfxObjectShell* pShell; - Impl () : pShell(0) { } + Impl () : pShell(nullptr) { } }; // DocumentSignature @@ -70,7 +70,7 @@ namespace basctl bool DocumentSignature::supportsSignatures() const { - return ( m_pImpl->pShell != NULL ); + return ( m_pImpl->pShell != nullptr ); } void DocumentSignature::signScriptingContent() const diff --git a/basctl/source/basicide/documentenumeration.hxx b/basctl/source/basicide/documentenumeration.hxx index c6b464ab0e01..886c9358c62f 100644 --- a/basctl/source/basicide/documentenumeration.hxx +++ b/basctl/source/basicide/documentenumeration.hxx @@ -70,7 +70,7 @@ namespace basctl { namespace docs { class DocumentEnumeration { public: - DocumentEnumeration( css::uno::Reference< css::uno::XComponentContext > const & _rContext, const IDocumentDescriptorFilter* _pFilter = NULL ); + DocumentEnumeration( css::uno::Reference< css::uno::XComponentContext > const & _rContext, const IDocumentDescriptorFilter* _pFilter = nullptr ); ~DocumentEnumeration(); /** retrieves a list of all currently known documents in the application diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index be9715598b01..cc715dfeb296 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -40,7 +40,7 @@ namespace basctl using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -Module* Module::mpModule = 0; +Module* Module::mpModule = nullptr; namespace { @@ -80,7 +80,7 @@ Shell* GetShell () { if (Dll* pDll = theDllInstance::get().get()) return pDll->GetShell(); - return 0; + return nullptr; } void ShellCreated (Shell* pShell) @@ -94,14 +94,14 @@ void ShellDestroyed (Shell* pShell) { Dll* pDll = theDllInstance::get().get(); if (pDll && pDll->GetShell() == pShell) - pDll->SetShell(0); + pDll->SetShell(nullptr); } ExtraData* GetExtraData() { if (Dll* pDll = theDllInstance::get().get()) return pDll->GetExtraData(); - return 0; + return nullptr; } @@ -113,7 +113,7 @@ namespace { Dll::Dll () : - m_pShell(0) + m_pShell(nullptr) { SfxObjectFactory* pFact = &DocShell::Factory(); (void)pFact; diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 032334040750..e85168e8ef10 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -35,7 +35,7 @@ static long const nSplitThickness = 3; // pParent: the parent window (Shell) Layout::Layout (vcl::Window* pParent) : Window(pParent, WB_CLIPCHILDREN), - pChild(0), + pChild(nullptr), bFirstSize(true), aLeftSide(this, SplittedSide::Left), aBottomSide(this, SplittedSide::Bottom) @@ -132,7 +132,7 @@ void Layout::Deactivating () if (pChild) pChild->Deactivating(); Hide(); - pChild = 0; + pChild = nullptr; } // virtual diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 2550f886d76d..b109e68b4724 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -117,7 +117,7 @@ bool isLanguageDependentProperty( const OUString& aName ) { "HelpText", 8 }, { "CurrencySymbol", 14 }, { "StringItemList", 14 }, - { 0, 0 } + { nullptr, 0 } }; for (Prop const* pProp = vProp; pProp->sName; ++pProp) @@ -810,7 +810,7 @@ DialogWindow* FindDialogWindowForEditor( DlgEditor* pEditor ) return pDlgWin; } } - return 0; + return nullptr; } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 97598ff9dff7..93815bec1c3f 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -178,7 +178,7 @@ void MacroChooser::RestoreMacroDescription() if ( !aLastMacro.isEmpty() ) { // find entry in macro box - SvTreeListEntry* pEntry = 0; + SvTreeListEntry* pEntry = nullptr; sal_uLong nPos = 0; SvTreeListEntry* pE = m_pMacroBox->GetEntry( nPos ); while ( pE ) @@ -271,7 +271,7 @@ void MacroChooser::EnableButton( Button& rButton, bool bEnable ) SbMethod* MacroChooser::GetMacro() { - SbMethod* pMethod = 0; + SbMethod* pMethod = nullptr; SbModule* pModule = m_pBasicBox->FindModule( m_pBasicBox->GetCurEntry() ); if ( pModule ) { @@ -332,13 +332,13 @@ void MacroChooser::DeleteMacro() SbMethod* MacroChooser::CreateMacro() { - SbMethod* pMethod = 0; + SbMethod* pMethod = nullptr; SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry(); EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry); ScriptDocument aDocument( aDesc.GetDocument() ); OSL_ENSURE( aDocument.isAlive(), "MacroChooser::CreateMacro: no document!" ); if ( !aDocument.isAlive() ) - return NULL; + return nullptr; OUString aLibName( aDesc.GetLibName() ); @@ -356,10 +356,10 @@ SbMethod* MacroChooser::CreateMacro() xDlgLibContainer->loadLibrary( aOULibName ); BasicManager* pBasMgr = aDocument.getBasicManager(); - StarBASIC* pBasic = pBasMgr ? pBasMgr->GetLib( aLibName ) : 0; + StarBASIC* pBasic = pBasMgr ? pBasMgr->GetLib( aLibName ) : nullptr; if ( pBasic ) { - SbModule* pModule = 0; + SbModule* pModule = nullptr; OUString aModName( aDesc.GetName() ); if ( !aModName.isEmpty() ) { @@ -382,7 +382,7 @@ SbMethod* MacroChooser::CreateMacro() OUString aSubName = m_pMacroNameEdit->GetText(); DBG_ASSERT( !pModule || !pModule->GetMethods()->Find( aSubName, SbxCLASS_METHOD ), "Macro existiert schon!" ); - pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : NULL; + pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : nullptr; } return pMethod; @@ -619,9 +619,9 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) if (nMode == All) { SbMethod* pMethod = GetMacro(); - SbModule* pModule = pMethod ? pMethod->GetModule() : NULL; - StarBASIC* pBasic = pModule ? static_cast<StarBASIC*>(pModule->GetParent()) : NULL; - BasicManager* pBasMgr = pBasic ? FindBasicManager(pBasic) : NULL; + SbModule* pModule = pMethod ? pMethod->GetModule() : nullptr; + StarBASIC* pBasic = pModule ? static_cast<StarBASIC*>(pModule->GetParent()) : nullptr; + BasicManager* pBasMgr = pBasic ? FindBasicManager(pBasic) : nullptr; if ( pBasMgr ) { ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); @@ -754,7 +754,7 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry(); EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry); ScriptDocument aDocument( aDesc.GetDocument() ); - createLibImpl( static_cast<vcl::Window*>( this ), aDocument, NULL, m_pBasicBox ); + createLibImpl( static_cast<vcl::Window*>( this ), aDocument, nullptr, m_pBasicBox ); } else if (pButton == m_pNewModButton) { diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 9490bed33433..37cabb5b7db4 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -170,14 +170,14 @@ CheckBox::~CheckBox() void CheckBox::dispose() { delete pCheckButton; - pCheckButton = NULL; + pCheckButton = nullptr; // delete user data SvTreeListEntry* pEntry = First(); while ( pEntry ) { delete static_cast<LibUserData*>( pEntry->GetUserData() ); - pEntry->SetUserData( NULL ); + pEntry->SetUserData( nullptr ); pEntry = Next( pEntry ); } SvTabListBox::dispose(); @@ -190,7 +190,7 @@ void CheckBox::Init() if (eMode == ObjectMode::Library) EnableCheckButton( pCheckButton ); else - EnableCheckButton( 0 ); + EnableCheckButton( nullptr ); SetHighlightRange(); } @@ -202,7 +202,7 @@ void CheckBox::SetMode (ObjectMode::Mode e) if (eMode == ObjectMode::Library) EnableCheckButton( pCheckButton ); else - EnableCheckButton( 0 ); + EnableCheckButton( nullptr ); } SvTreeListEntry* CheckBox::DoInsertEntry( const OUString& rStr, sal_uLong nPos ) @@ -220,7 +220,7 @@ SvTreeListEntry* CheckBox::FindEntry( const OUString& rName ) if ( rName.equalsIgnoreAsciiCase( GetEntryText( pEntry, 0 ) ) ) return pEntry; } - return 0; + return nullptr; } void CheckBox::CheckEntryPos( sal_uLong nPos ) @@ -491,7 +491,7 @@ LibPage::LibPage(vcl::Window * pParent) get(m_pExportButton, "export"); get(m_pDelButton, "delete"); - pTabDlg = 0; + pTabDlg = nullptr; m_pEditButton->SetClickHdl( LINK( this, LibPage, ButtonHdl ) ); m_pNewLibButton->SetClickHdl( LINK( this, LibPage, ButtonHdl ) ); @@ -732,7 +732,7 @@ IMPL_LINK_TYPED( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg, bool ) void LibPage::NewLib() { - createLibImpl( static_cast<vcl::Window*>( this ), m_aCurDocument, m_pLibBox, NULL); + createLibImpl( static_cast<vcl::Window*>( this ), m_aCurDocument, m_pLibBox, nullptr); } void LibPage::InsertLib() @@ -1190,7 +1190,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) { // file open dialog Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) ); + Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, nullptr) ); Reference< XSimpleFileAccess3 > xSFA = SimpleFileAccess::create(xContext); Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_SIMPLE); @@ -1311,7 +1311,7 @@ void LibPage::ExportAsBasic( const OUString& aLibName ) // Folder picker Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext); - Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) ); + Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, nullptr) ); xFolderPicker->setTitle(IDEResId(RID_STR_EXPORTBASIC).toString()); @@ -1540,7 +1540,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, if( pBasicBox ) { SvTreeListEntry* pEntry = pBasicBox->GetCurEntry(); - SvTreeListEntry* pRootEntry = NULL; + SvTreeListEntry* pRootEntry = nullptr; while( pEntry ) { pRootEntry = pEntry; diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 2041ec2c4e17..f90ac3fd3218 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -567,7 +567,7 @@ ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, sal_uInt16 nM get(m_pNewDlgButton, "newdialog"); get(m_pDelButton, "delete"); - pTabDlg = 0; + pTabDlg = nullptr; m_pEditButton->SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) ); m_pDelButton->SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) ); @@ -967,9 +967,9 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, { OSL_ENSURE( rDocument.isAlive(), "createModImpl: invalid document!" ); if ( !rDocument.isAlive() ) - return NULL; + return nullptr; - SbModule* pModule = NULL; + SbModule* pModule = nullptr; OUString aLibName( rLibName ); if ( aLibName.isEmpty() ) @@ -992,10 +992,10 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, OUString sModuleCode; // the module has existed if( rDocument.hasModule( aLibName, aModName ) ) - return NULL; + return nullptr; rDocument.createModule( aLibName, aModName, bMain, sModuleCode ); BasicManager* pBasMgr = rDocument.getBasicManager(); - StarBASIC* pBasic = pBasMgr? pBasMgr->GetLib( aLibName ) : 0; + StarBASIC* pBasic = pBasMgr? pBasMgr->GetLib( aLibName ) : nullptr; if ( pBasic ) pModule = pBasic->FindModule( aModName ); SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, TYPE_MODULE ); diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx index df819c33680d..30e06909c618 100644 --- a/basctl/source/basicide/register.cxx +++ b/basctl/source/basicide/register.cxx @@ -39,11 +39,11 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL basctl_component_getFactory( const sal_Char* (void)pRegistryKey; // Set default return value for this operation - if it failed. - void* pReturn = NULL ; + void* pReturn = nullptr ; if ( - ( pImplementationName != NULL ) && - ( pServiceManager != NULL ) + ( pImplementationName != nullptr ) && + ( pServiceManager != nullptr ) ) { // Define variables which are used in following macros. diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 4ce587241c0c..d239fd29fe3e 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -415,7 +415,7 @@ namespace basctl { OSL_ENSURE( isValid(), "ScriptDocument::Impl::getBasicManager: invalid state!" ); if ( !isValid() ) - return NULL; + return nullptr; if ( isApplication() ) return SfxApplication::GetBasicManager(); @@ -426,7 +426,7 @@ namespace basctl { SAL_WARN( "basctl.basicide", "ScriptDocument::getBasicManager: Caught exception: " << e.Message ); } - return NULL; + return nullptr; } Reference< XModel > ScriptDocument::Impl::getDocument() const @@ -434,7 +434,7 @@ namespace basctl OSL_ENSURE( isValid(), "ScriptDocument::Impl::getDocument: invalid state!" ); OSL_ENSURE( isDocument(), "ScriptDocument::Impl::getDocument: for documents only!" ); if ( !isValid() || !isDocument() ) - return NULL; + return nullptr; return m_xDocument; } @@ -1336,7 +1336,7 @@ namespace basctl { if ( isDocument() ) return m_pImpl->getDocument(); - return NULL; + return nullptr; } @@ -1364,7 +1364,7 @@ namespace basctl bool ScriptDocument::renameModule( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName ) const { - return m_pImpl->renameModuleOrDialog( E_SCRIPTS, _rLibName, _rOldName, _rNewName, NULL ); + return m_pImpl->renameModuleOrDialog( E_SCRIPTS, _rLibName, _rOldName, _rNewName, nullptr ); } diff --git a/basctl/source/basicide/unomodel.hxx b/basctl/source/basicide/unomodel.hxx index c6ec667a20ae..15afdf7abd59 100644 --- a/basctl/source/basicide/unomodel.hxx +++ b/basctl/source/basicide/unomodel.hxx @@ -30,7 +30,7 @@ class SIDEModel : public SfxBaseModel, { static void notImplemented() throw ( css::io::IOException ); public: - explicit SIDEModel(SfxObjectShell *pObjSh = 0); + explicit SIDEModel(SfxObjectShell *pObjSh = nullptr); virtual ~SIDEModel(); //XInterface diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index b49bee77f031..c1217366dcb6 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -68,7 +68,7 @@ static const char aTitlePropName[] = "Title"; DlgEdHint::DlgEdHint(Kind eHint) : eKind(eHint) - , pDlgEdObj(0) + , pDlgEdObj(nullptr) { } @@ -179,8 +179,8 @@ DlgEditor::DlgEditor ( css::uno::Reference<css::frame::XModel> const& xModel, css::uno::Reference<css::container::XNameContainer> xDialogModel ) - :pHScroll(NULL) - ,pVScroll(NULL) + :pHScroll(nullptr) + ,pVScroll(nullptr) ,pDlgEdModel(new DlgEdModel()) ,pDlgEdPage(new DlgEdPage(*pDlgEdModel)) ,m_ClipboardDataFlavors(1) @@ -420,7 +420,7 @@ void DlgEditor::ResetDialog () bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); pDlgEdView->UnmarkAll(); pPage->Clear(); - pPage->SetDlgEdForm( NULL ); + pPage->SetDlgEdForm( nullptr ); SetDialog( m_xUnoControlDialogModel ); if( bWasMarked ) pDlgEdView->MarkObj( pDlgEdForm, pPgView ); @@ -549,7 +549,7 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect const vcl::Region aPaintRectRegion(aPaintRect); // #i74769# - SdrPaintWindow* pTargetPaintWindow = 0; + SdrPaintWindow* pTargetPaintWindow = nullptr; // mark repaint start if (pPgView) @@ -750,7 +750,7 @@ void DlgEditor::Copy() {} } - DlgEdTransferableImpl* pTrans = NULL; + DlgEdTransferableImpl* pTrans = nullptr; if( xStringResourcePersistence.is() ) { // With resource, support old and new format diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index b53572f83eeb..83d3d48da8b2 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -102,7 +102,7 @@ IMPL_LINK_TYPED( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory, void ) case OBJ_DLG_FORMCOMBO: case OBJ_DLG_COMBOBOX: { - DlgEdObj* pNew = NULL; + DlgEdObj* pNew = nullptr; if ( pObjFactory->nIdentifier == OBJ_DLG_COMBOBOX ) pNew = new DlgEdObj( "com.sun.star.awt.UnoControlComboBoxModel", xDialogSFact ); else @@ -152,7 +152,7 @@ IMPL_LINK_TYPED( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory, void ) case OBJ_DLG_FORMVSCROLL: case OBJ_DLG_VSCROLLBAR: { - DlgEdObj* pNew = NULL; + DlgEdObj* pNew = nullptr; if ( pObjFactory->nIdentifier == OBJ_DLG_VSCROLLBAR ) pNew = new DlgEdObj( "com.sun.star.awt.UnoControlScrollBarModel", xDialogSFact ); else diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx index 3ebe2f8ee91d..c087cdd228d4 100644 --- a/basctl/source/dlged/dlgedfunc.cxx +++ b/basctl/source/dlged/dlgedfunc.cxx @@ -223,7 +223,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) const SdrHdlList& rHdlList = rView.GetHdlList(); SdrHdl* pHdl = rHdlList.GetFocusHdl(); - if ( pHdl == 0 ) + if ( pHdl == nullptr ) { // no handle selected if ( rView.IsMoveAllowed() ) @@ -269,7 +269,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) const SdrDragStat& rDragStat = rView.GetDragStat(); // start dragging - rView.BegDragObj( aStartPoint, 0, pHdl, 0 ); + rView.BegDragObj( aStartPoint, nullptr, pHdl, 0 ); if ( rView.IsDragObj() ) { @@ -362,7 +362,7 @@ bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) SdrHdl* pHdl = rView.PickHandle(aPos); // if selected object was hit, drag object - if ( pHdl!=NULL || rView.IsMarkedHit(aPos, nHitLog) ) + if ( pHdl!=nullptr || rView.IsMarkedHit(aPos, nHitLog) ) rView.BegDragObj(aPos, nullptr, pHdl, nDrgLog); else if ( rView.AreObjectsMarked() ) rView.UnmarkAll(); @@ -459,7 +459,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) SdrHdl* pHdl = rView.PickHandle(aMDPos); // hit selected object? - if ( pHdl!=NULL || rView.IsMarkedHit(aMDPos, nHitLog) ) + if ( pHdl!=nullptr || rView.IsMarkedHit(aMDPos, nHitLog) ) { rView.BegDragObj(aMDPos, nullptr, pHdl, nDrgLog); } diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 37c8037a1fc9..70e2df693f15 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -65,7 +65,7 @@ DlgEditor& DlgEdObj::GetDialogEditor () DlgEdObj::DlgEdObj() :SdrUnoObj(OUString(), false) ,bIsListening(false) - ,pDlgEdForm( NULL ) + ,pDlgEdForm( nullptr ) { } @@ -73,7 +73,7 @@ DlgEdObj::DlgEdObj(const OUString& rModelName, const css::uno::Reference< css::lang::XMultiServiceFactory >& rxSFac) :SdrUnoObj(rModelName, rxSFac, false) ,bIsListening(false) - ,pDlgEdForm( NULL ) + ,pDlgEdForm( nullptr ) { } @@ -103,7 +103,7 @@ namespace if ( !_out_pDlgEdForm ) _out_pDlgEdForm = _pObject->GetDlgEdForm(); DBG_ASSERT( _out_pDlgEdForm, "lcl_getDlgEdForm: no form!" ); - return ( _out_pDlgEdForm != NULL ); + return ( _out_pDlgEdForm != nullptr ); } } @@ -127,7 +127,7 @@ bool DlgEdObj::TransformSdrToControlCoordinates( Size aSize( nWidthIn, nHeightIn ); // form position - DlgEdForm* pForm = NULL; + DlgEdForm* pForm = nullptr; if ( !lcl_getDlgEdForm( this, pForm ) ) return false; Rectangle aFormRect = pForm->GetSnapRect(); @@ -190,7 +190,7 @@ bool DlgEdObj::TransformSdrToFormCoordinates( aSize = pDevice->LogicToPixel( aSize, MapMode( MAP_100TH_MM ) ); // take window borders into account - DlgEdForm* pForm = NULL; + DlgEdForm* pForm = nullptr; if ( !lcl_getDlgEdForm( this, pForm ) ) return false; @@ -229,7 +229,7 @@ bool DlgEdObj::TransformControlToSdrCoordinates( Size aSize( nWidthIn, nHeightIn ); // form position - DlgEdForm* pForm = NULL; + DlgEdForm* pForm = nullptr; if ( !lcl_getDlgEdForm( this, pForm ) ) return false; @@ -295,7 +295,7 @@ bool DlgEdObj::TransformFormToSdrCoordinates( return false; // take window borders into account - DlgEdForm* pForm = NULL; + DlgEdForm* pForm = nullptr; if ( !lcl_getDlgEdForm( this, pForm ) ) return false; @@ -907,7 +907,7 @@ void DlgEdObj::clonedFrom(const DlgEdObj* _pSource) DlgEdObj* DlgEdObj::Clone() const { DlgEdObj* pDlgEdObj = CloneHelper< DlgEdObj >(); - DBG_ASSERT( pDlgEdObj != NULL, "DlgEdObj::Clone: invalid clone!" ); + DBG_ASSERT( pDlgEdObj != nullptr, "DlgEdObj::Clone: invalid clone!" ); if ( pDlgEdObj ) pDlgEdObj->clonedFrom( this ); diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx index b3ed46ceffce..8ef9a497fabe 100644 --- a/basctl/source/dlged/dlgedpage.cxx +++ b/basctl/source/dlged/dlgedpage.cxx @@ -29,13 +29,13 @@ TYPEINIT1( DlgEdPage, SdrPage ); DlgEdPage::DlgEdPage(DlgEdModel& rModel, bool bMasterPage) : SdrPage(rModel, bMasterPage) - , pDlgEdForm(0) + , pDlgEdForm(nullptr) { } DlgEdPage::DlgEdPage(const DlgEdPage& rSrcPage) : SdrPage(rSrcPage) - , pDlgEdForm(0) + , pDlgEdForm(nullptr) { } @@ -47,13 +47,13 @@ DlgEdPage::~DlgEdPage() SdrPage* DlgEdPage::Clone() const { - return Clone(0); + return Clone(nullptr); } SdrPage* DlgEdPage::Clone(SdrModel* const pNewModel) const { DlgEdPage* const pNewPage = new DlgEdPage( *this ); - DlgEdModel* pDlgEdModel = 0; + DlgEdModel* pDlgEdModel = nullptr; if ( pNewModel ) { pDlgEdModel = dynamic_cast<DlgEdModel*>( pNewModel ); diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx index d3825459484c..31e8e7cb0884 100644 --- a/basctl/source/dlged/dlgedview.cxx +++ b/basctl/source/dlged/dlgedview.cxx @@ -130,7 +130,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt { bool bExcludeInner(false); - if(0 != dynamic_cast< DlgEdForm* >(pRetval)) + if(nullptr != dynamic_cast< DlgEdForm* >(pRetval)) { // from DlgEdForm::CheckHit; exclude inner for DlgEdForm bExcludeInner = true; @@ -160,7 +160,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt if(aOuterRange.isInside(basegfx::B2DPoint(rPnt.X(), rPnt.Y()))) { - pRetval = 0; + pRetval = nullptr; } } } diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index 3d4fb1f4f19b..3864f83c22ff 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -230,7 +230,7 @@ IMPL_LINK_NOARG_TYPED(ManageLanguageDialog, SelectHdl, ListBox&, void) SetDefaultLanguageDialog::SetDefaultLanguageDialog(vcl::Window* pParent, std::shared_ptr<LocalizationMgr> xLMgr) : ModalDialog(pParent, "DefaultLanguageDialog", "modules/BasicIDE/ui/defaultlanguage.ui") - , m_pCheckLangLB(NULL) + , m_pCheckLangLB(nullptr) , m_xLocalizationMgr(xLMgr) { get(m_pLanguageLB, "entries"); @@ -295,7 +295,7 @@ void SetDefaultLanguageDialog::FillLanguageBox() m_pCheckLangLB->InsertEntry( m_pLanguageLB->GetEntry(j), LISTBOX_APPEND, m_pLanguageLB->GetEntryData(j) ); } - m_pLanguageLB = NULL; + m_pLanguageLB = nullptr; } else // preselect current UI language diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 544fbdec4b1b..0260d771f7ff 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -60,9 +60,9 @@ void PropBrw::Update( const SfxViewShell* pShell ) if (pIdeShell) ImplUpdate(pIdeShell->GetCurrentDocument(), pIdeShell->GetCurDlgView()); else if (pShell) - ImplUpdate(NULL, pShell->GetDrawView()); + ImplUpdate(nullptr, pShell->GetDrawView()); else - ImplUpdate(NULL, NULL); + ImplUpdate(nullptr, nullptr); } @@ -83,7 +83,7 @@ PropBrw::PropBrw (DialogWindowLayout& rLayout_): DockingWindow(&rLayout_), m_bInitialStateChange(true), m_xContextDocument(SfxViewShell::Current() ? SfxViewShell::Current()->GetCurrentDocument() : Reference<XModel>()), - pView(0) + pView(nullptr) { Size aPropWinSize(STD_WIN_SIZE_X,STD_WIN_SIZE_Y); SetMinOutputSizePixel(Size(STD_MIN_SIZE_X,STD_MIN_SIZE_Y)); @@ -204,11 +204,11 @@ void PropBrw::ImplDestroyController() implSetNewObject( Reference< XPropertySet >() ); if ( m_xMeAsFrame.is() ) - m_xMeAsFrame->setComponent( NULL, NULL ); + m_xMeAsFrame->setComponent( nullptr, nullptr ); Reference< XController > xAsXController( m_xBrowserController, UNO_QUERY ); if ( xAsXController.is() ) - xAsXController->attachFrame( NULL ); + xAsXController->attachFrame( nullptr ); try { @@ -249,7 +249,7 @@ Sequence< Reference< XInterface > > if (pCurrent->IsGroupObject()) { pGroupIterator.reset(new SdrObjListIter(*pCurrent->GetSubList())); - pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL; + pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr; } while (pCurrent) @@ -262,7 +262,7 @@ Sequence< Reference< XInterface > > } // next element - pCurrent = pGroupIterator && pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL; + pCurrent = pGroupIterator && pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr; } } @@ -458,7 +458,7 @@ void PropBrw::ImplUpdate( const Reference< XModel >& _rxContextDocument, SdrView if ( pView ) { EndListening( *(pView->GetModel()) ); - pView = NULL; + pView = nullptr; } if ( !pNewView ) @@ -480,8 +480,8 @@ void PropBrw::ImplUpdate( const Reference< XModel >& _rxContextDocument, SdrView if ( nMarkCount == 0 ) { EndListening( *(pView->GetModel()) ); - pView = NULL; - implSetNewObject( NULL ); + pView = nullptr; + implSetNewObject( nullptr ); return; } diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx index 6b27edb904a0..295cd96bf3a7 100644 --- a/basctl/source/inc/basobj.hxx +++ b/basctl/source/inc/basobj.hxx @@ -44,8 +44,8 @@ namespace basctl StarBASIC* FindBasic( const SbxVariable* pVar ); void StopBasic(); long HandleBasicError( StarBASIC* pBasic ); - void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0, - SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 ); + void BasicStopped( bool* pbAppWindowDisabled = nullptr, bool* pbDispatcherLocked = nullptr, sal_uInt16* pnWaitCount = nullptr, + SfxUInt16Item** ppSWActionCount = nullptr, SfxUInt16Item** ppSWLockViewCount = nullptr ); bool IsValidSbxName( const OUString& rName ); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 92ff5b5746c4..52a49b258924 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -292,11 +292,11 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName ); sal_uLong CalcLineCount( SvStream& rStream ); -bool QueryReplaceMacro( const OUString& rName, vcl::Window* pParent = 0 ); -bool QueryDelMacro( const OUString& rName, vcl::Window* pParent = 0 ); -bool QueryDelDialog( const OUString& rName, vcl::Window* pParent = 0 ); -bool QueryDelModule( const OUString& rName, vcl::Window* pParent = 0 ); -bool QueryDelLib( const OUString& rName, bool bRef = false, vcl::Window* pParent = 0 ); +bool QueryReplaceMacro( const OUString& rName, vcl::Window* pParent = nullptr ); +bool QueryDelMacro( const OUString& rName, vcl::Window* pParent = nullptr ); +bool QueryDelDialog( const OUString& rName, vcl::Window* pParent = nullptr ); +bool QueryDelModule( const OUString& rName, vcl::Window* pParent = nullptr ); +bool QueryDelLib( const OUString& rName, bool bRef = false, vcl::Window* pParent = nullptr ); bool QueryPassword( const css::uno::Reference< css::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false ); class ModuleInfoHelper diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx index 37dd1ffe4e55..174fc1bb4f4e 100644 --- a/basctl/source/inc/sbxitem.hxx +++ b/basctl/source/inc/sbxitem.hxx @@ -48,7 +48,7 @@ public: SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, ItemType); SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, const OUString& aMethodName, ItemType eType); - virtual SfxPoolItem* Clone(SfxItemPool *pPool = 0) const override; + virtual SfxPoolItem* Clone(SfxItemPool *pPool = nullptr) const override; virtual bool operator==(const SfxPoolItem&) const override; ScriptDocument const& GetDocument () const { return m_aDocument; } |