diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:10:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:16 +0100 |
commit | 4b0a3da4c5303fc97658050cf790f956f298599a (patch) | |
tree | 43764a1843059b3cdcf2e008c6c06d6a2d8cb87b /basctl/source/dlged | |
parent | 8697284d248f47dd4798f7ef49791fc7686f646d (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I27f1d5ee55338372b1c24187b63d23ae39e0a8b3
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 12 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedfac.cxx | 4 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedfunc.cxx | 8 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 16 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedpage.cxx | 8 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedview.cxx | 4 | ||||
-rw-r--r-- | basctl/source/dlged/managelang.cxx | 4 | ||||
-rw-r--r-- | basctl/source/dlged/propbrw.cxx | 20 |
8 files changed, 38 insertions, 38 deletions
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; } |