diff options
Diffstat (limited to 'svx/source/dialog')
34 files changed, 184 insertions, 184 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 84be332dcf15..5433cbd035df 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -212,7 +212,7 @@ IMPL_LINK_TYPED( MaskData, CbxHdl, Button*, pButton, void ) // When a checkbox is checked, the pipette is enabled if ( pCbx->IsChecked() ) { - MaskSet* pSet = NULL; + MaskSet* pSet = nullptr; if (pCbx == pMask->m_pCbx1) pSet = pMask->m_pQSet1; @@ -477,7 +477,7 @@ void SvxBmpMask::dispose() m_pQSet4.disposeAndClear(); m_pCtlPipette.disposeAndClear(); delete pData; - pData = NULL; + pData = nullptr; m_pTbxPipette.clear(); m_pBtnExec.clear(); m_pCbx1.clear(); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 47a5556840bb..33cb2ccb8e24 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -80,7 +80,7 @@ SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW, vcl::Window* _pParent) : SfxFloatingWindow(_pBindings, pCW, _pParent , "FloatingContour", "svx/ui/floatingcontour.ui") - , pSuperClass(NULL) + , pSuperClass(nullptr) { } @@ -211,8 +211,8 @@ void SvxContourDlg::Update( const Graphic& rGraphic, bool bGraphicLinked, SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window* _pParent) : SvxContourDlg ( _pBindings, pCW, _pParent ), - pUpdateEditingObject( NULL ), - pCheckObj ( NULL ), + pUpdateEditingObject( nullptr ), + pCheckObj ( nullptr ), aContourItem ( SID_CONTOUR_EXEC, *this, *_pBindings ), nGrfChanged ( 0UL ), bExecState ( false ), @@ -598,7 +598,7 @@ IMPL_LINK_NOARG_TYPED(SvxSuperContourDlg, CreateHdl, Idle *, void) const bool bValid = aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom(); EnterWait(); - SetPolyPolygon( CreateAutoContour( rGraphic, bValid ? &aWorkRect : NULL ) ); + SetPolyPolygon( CreateAutoContour( rGraphic, bValid ? &aWorkRect : nullptr ) ); LeaveWait(); } @@ -606,7 +606,7 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void ) { const SdrObject* pObj = pWnd->GetSelectedSdrObject(); const SdrView* pView = pWnd->GetSdrView(); - const bool bPolyEdit = ( pObj != NULL ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr; + const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr; const bool bDrawEnabled = !(bPolyEdit && m_pTbx1->IsItemChecked(mnPolyEditId)); const bool bPipette = m_pTbx1->IsItemChecked(mnPipetteId); const bool bWorkplace = m_pTbx1->IsItemChecked(mnWorkSpaceId); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index d79fa3269f79..5c34df44a31a 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -202,7 +202,7 @@ void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt ) void SvxShowCharSet::Command( const CommandEvent& rCEvt ) { - if( !HandleScrollCommand( rCEvt, 0, aVscrollSB.get() ) ) + if( !HandleScrollCommand( rCEvt, nullptr, aVscrollSB.get() ) ) Control::Command( rCEvt ); } @@ -734,8 +734,8 @@ void SvxShowCharSet::dispose() void SvxShowCharSet::ReleaseAccessible() { m_aItems.clear(); - m_pAccessible = NULL; - m_xAccessible = NULL; + m_pAccessible = nullptr; + m_xAccessible = nullptr; } css::uno::Reference< XAccessible > SvxShowCharSet::CreateAccessible() @@ -788,7 +788,7 @@ const Subset* SubsetMap::GetNextSubset( bool bFirst ) const if( bFirst ) maSubsetIterator = maSubsets.begin(); if( maSubsetIterator == maSubsets.end() ) - return NULL; + return nullptr; const Subset* s = &*(maSubsetIterator++); return s; } @@ -799,7 +799,7 @@ const Subset* SubsetMap::GetSubsetByUnicode( sal_UCS4 cChar ) const for( const Subset* s = GetNextSubset( true ); s; s = GetNextSubset( false ) ) if( (s->GetRangeMin() <= cChar) && (cChar <= s->GetRangeMax()) ) return s; - return NULL; + return nullptr; } inline Subset::Subset( sal_UCS4 nMin, sal_UCS4 nMax, int resId) diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index 95dcb74030db..0faa72feb39e 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -66,7 +66,7 @@ void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uLong nPos, void* pUserData, SvLBoxButtonKind eButtonKind ) { - SvTreeListBox::InsertEntry( rStr, NULL, false, nPos, pUserData, + SvTreeListBox::InsertEntry( rStr, nullptr, false, nPos, pUserData, eButtonKind ); } @@ -147,7 +147,7 @@ bool SvxCheckListBox::IsChecked( sal_uLong nPos ) const void* SvxCheckListBox::SetEntryData ( sal_uLong nPos, void* pNewData ) { - void* pOld = NULL; + void* pOld = nullptr; if ( nPos < GetEntryCount() ) { @@ -164,7 +164,7 @@ void* SvxCheckListBox::GetEntryData( sal_uLong nPos ) const if ( nPos < GetEntryCount() ) return GetEntry( nPos )->GetUserData(); else - return NULL; + return nullptr; } diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index b57fb3290b26..3f65607b0157 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -53,7 +53,7 @@ CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings ) : ModalDialog ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ), - m_pGraphicObj ( NULL ), + m_pGraphicObj ( nullptr ), m_aGraphic ( rGraphic ), m_aViewSize100mm ( rViewSize100mm ), m_aCropRectangle ( rCropRectangle ), @@ -414,7 +414,7 @@ SdrGrafObj* CompressGraphicsDialog::GetCompressedSdrGrafObj() return pNewObject; } - return NULL; + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index e0d8145b34a0..ff9e3bd8d3a3 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -38,9 +38,9 @@ SvxXConnectionPreview::SvxXConnectionPreview( vcl::Window* pParent, WinBits nStyle) : Control(pParent, nStyle) - , pEdgeObj(NULL) - , pObjList(NULL) - , pView(NULL) + , pEdgeObj(nullptr) + , pObjList(nullptr) + , pView(nullptr) { SetMapMode( MAP_100TH_MM ); SetStyles(); @@ -181,7 +181,7 @@ void SvxXConnectionPreview::Construct() // not yet one. if(!pObjList) { - pObjList = new SdrObjList( pView->GetModel(), NULL ); + pObjList = new SdrObjList( pView->GetModel(), nullptr ); } if( pTmpObj1 ) @@ -228,7 +228,7 @@ void SvxXConnectionPreview::Paint(vcl::RenderContext& rRenderContext, const Rect aObjectVector.push_back(pObject); } - sdr::contact::ObjectContactOfObjListPainter aPainter(rRenderContext, aObjectVector, 0); + sdr::contact::ObjectContactOfObjListPainter aPainter(rRenderContext, aObjectVector, nullptr); sdr::contact::DisplayInfo aDisplayInfo; // do processing diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index a6deb0bc654e..ea565d049eca 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -117,8 +117,8 @@ public: bool IsRedoPossible() const; void UpdateGraphic( const Graphic& rGraphic, bool bGraphicLinked, - const tools::PolyPolygon* pPolyPoly = NULL, - void* pEditingObj = NULL ); + const tools::PolyPolygon* pPolyPoly = nullptr, + void* pEditingObj = nullptr ); }; diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 6eedfa8e315c..c94d9450df35 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -39,7 +39,7 @@ RedlinData::RedlinData() : aDateTime(DateTime::EMPTY) { bDisabled=false; - pData=NULL; + pData=nullptr; } RedlinData::~RedlinData() @@ -103,7 +103,7 @@ SvxRedlinTable::SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits) , aDaTiLast( DateTime::EMPTY ) , aDaTiFilterFirst( DateTime::EMPTY ) , aDaTiFilterLast( DateTime::EMPTY ) - , pCommentSearcher(0) + , pCommentSearcher(nullptr) { SetNodeDefaultImages(); } @@ -116,7 +116,7 @@ SvxRedlinTable::~SvxRedlinTable() void SvxRedlinTable::dispose() { delete pCommentSearcher; - pCommentSearcher = NULL; + pCommentSearcher = nullptr; SvSimpleTable::dispose(); } @@ -138,7 +138,7 @@ sal_Int32 SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRi RedlinData *pLeftData=static_cast<RedlinData *>(pLeft->GetUserData()); RedlinData *pRightData=static_cast<RedlinData *>(pRight->GetUserData()); - if(pLeftData!=NULL && pRightData!=NULL) + if(pLeftData!=nullptr && pRightData!=nullptr) { if(pLeftData->aDateTime < pRightData->aDateTime) { @@ -265,7 +265,7 @@ void SvxRedlinTable::SetFilterComment(bool bFlag) void SvxRedlinTable::SetCommentParams( const utl::SearchParam* pSearchPara ) { - if(pSearchPara!=NULL) + if(pSearchPara!=nullptr) { delete pCommentSearcher; @@ -536,7 +536,7 @@ IMPL_LINK_TYPED( SvxTPView, PbClickHdl, Button*, pButton, void ) SvxTPFilter::SvxTPFilter( vcl::Window * pParent) : TabPage(pParent, "RedlineFilterPage", "svx/ui/redlinefilterpage.ui") - , pRedlinTable(NULL) + , pRedlinTable(nullptr) , bModified(false) { get(m_pCbDate, "date"); @@ -945,7 +945,7 @@ IMPL_LINK_TYPED( SvxTPFilter, RowEnableHdl, Button*, pButton, void ) m_pEdComment->Invalidate(); } - if(pCB!=NULL) + if(pCB!=nullptr) bModified=true; } @@ -1063,7 +1063,7 @@ IMPL_LINK_TYPED( SvxTPFilter, ModifyDate, Edit&, rTF, void) IMPL_LINK_TYPED( SvxTPFilter, RefHandle, Button*, pRef, void ) { - if(pRef!=NULL) + if(pRef!=nullptr) { aRefLink.Call(this); } @@ -1114,7 +1114,7 @@ void SvxAcceptChgCtr::ShowViewPage() SvxRedlinTable* SvxAcceptChgCtr::GetViewTable() { - return pTPView ? pTPView->GetTableControl() : NULL; + return pTPView ? pTPView->GetTableControl() : nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/databaseregistrationui.cxx b/svx/source/dialog/databaseregistrationui.cxx index 3fbe9d3249e1..aba6a600e1b9 100644 --- a/svx/source/dialog/databaseregistrationui.cxx +++ b/svx/source/dialog/databaseregistrationui.cxx @@ -38,7 +38,7 @@ namespace svx SvxAbstractDialogFactory* pDialogFactory = SvxAbstractDialogFactory::Create(); std::unique_ptr< SfxAbstractDialog > pDialog; if ( pDialogFactory ) - pDialog.reset( pDialogFactory->CreateSfxDialog( _parentWindow, aRegistrationItems, NULL, RID_SFXPAGE_DBREGISTER ) ); + pDialog.reset( pDialogFactory->CreateSfxDialog( _parentWindow, aRegistrationItems, nullptr, RID_SFXPAGE_DBREGISTER ) ); if ( pDialog.get() ) nResult = pDialog->Execute(); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index e0834a7d873f..18f6a5c002b7 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -223,7 +223,7 @@ DialControl::DialControl_Impl::DialControl_Impl ( vcl::Window& rParent ) : mxBmpEnabled(VclPtr<DialControlBmp>::Create(rParent)), mxBmpDisabled(VclPtr<DialControlBmp>::Create(rParent)), mxBmpBuffered(VclPtr<DialControlBmp>::Create(rParent)), - mpLinkField( 0 ), + mpLinkField( nullptr ), mnLinkedFieldValueMultiplyer( 0 ), mnAngle( 0 ), mnInitialAngle( 0 ), diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx index b0d29ca48c57..e683a72fab3c 100644 --- a/svx/source/dialog/dialmgr.cxx +++ b/svx/source/dialog/dialmgr.cxx @@ -22,7 +22,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -static ResMgr* pResMgr=0; +static ResMgr* pResMgr=nullptr; ResMgr* DialogsResMgr::GetResMgr() { diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 36f08fb572df..2dbd53e6f72b 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -43,11 +43,11 @@ using namespace com::sun::star; Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle) : Control(pParent, nStyle), - mpModel(0), - mpFmPage(0), - mp3DView(0), - mpScene(0), - mp3DObj(0), + mpModel(nullptr), + mpFmPage(nullptr), + mp3DView(nullptr), + mpScene(nullptr), + mp3DObj(nullptr), mnObjectType(SvxPreviewObjectType::SPHERE) { Construct(); @@ -197,7 +197,7 @@ void Svx3DPreviewControl::SetObjectType(SvxPreviewObjectType nType) aSet.Put(mp3DObj->GetMergedItemSet()); mpScene->Remove3DObj( mp3DObj ); delete mp3DObj; - mp3DObj = NULL; + mp3DObj = nullptr; } switch( nType ) @@ -255,9 +255,9 @@ Svx3DLightControl::Svx3DLightControl(vcl::Window* pParent, WinBits nStyle) maChangeCallback(), maSelectionChangeCallback(), maSelectedLight(NO_LIGHT_SELECTED), - mpExpansionObject(0), - mpLampBottomObject(0), - mpLampShaftObject(0), + mpExpansionObject(nullptr), + mpLampBottomObject(nullptr), + mpLampShaftObject(nullptr), maLightObjects(MAX_NUMBER_LIGHTS, nullptr), mfRotateX(-20.0), mfRotateY(45.0), @@ -376,7 +376,7 @@ void Svx3DLightControl::ConstructLightObjects() { mpScene->Remove3DObj(maLightObjects[a]); delete maLightObjects[a]; - maLightObjects[a] = 0; + maLightObjects[a] = nullptr; } if(GetLightOnOff(a)) @@ -473,7 +473,7 @@ void Svx3DLightControl::TrySelection(Point aPosPixel) { // exclude expansion object which will be part of // the hits. It's invisible, but for HitTest, it's included - const E3dCompoundObject* pResult = 0; + const E3dCompoundObject* pResult = nullptr; for(sal_uInt32 b(0); !pResult && b < aResult.size(); b++) { diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 2d78701bedb3..9ac39b334142 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -70,12 +70,12 @@ Bitmap& SvxRectCtl::GetRectBitmap() SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RECT_POINT eRpt, sal_uInt16 nBorder, sal_uInt16 nCircle, CTL_STYLE eStyle) : Control(pParent, WB_BORDER | WB_TABSTOP) - , pAccContext(NULL) + , pAccContext(nullptr) , nBorderWidth(nBorder) , nRadius(nCircle) , eDefRP(eRpt) , eCS(eStyle) - , pBitmap(NULL) + , pBitmap(nullptr) , m_nState(CTL_STATE::NONE) , mbCompleteDisable(false) , mbUpdateForeground(true) @@ -827,7 +827,7 @@ SvxPixelCtl::SvxPixelCtl(vcl::Window* pParent, sal_uInt16 nNumber) nSquares = nLines * nLines; pPixel = new sal_uInt16[ nSquares ]; memset(pPixel, 0, nSquares * sizeof(sal_uInt16)); - m_pAccess=NULL; + m_pAccess=nullptr; } void SvxPixelCtl::Resize() @@ -1122,7 +1122,7 @@ void SvxPixelCtl::Reset() SvxBitmapCtl::SvxBitmapCtl( vcl::Window* /*pParent*/, const Size& rSize ) : aSize(rSize) , nLines(0) - , pBmpArray(NULL) + , pBmpArray(nullptr) { } @@ -1189,7 +1189,7 @@ void ColorLB::Modify( const XColorEntry& rEntry, sal_Int32 nPos ) HatchingLB::HatchingLB( vcl::Window* pParent, WinBits nWinStyle) : ListBox( pParent, nWinStyle ), - mpList ( NULL ) + mpList ( nullptr ) { SetEdgeBlending(true); } @@ -1282,7 +1282,7 @@ void FillAttrLB::Fill( const XHatchListRef &pList ) GradientLB::GradientLB( vcl::Window* pParent, WinBits aWB) : ListBox( pParent, aWB ), - mpList(NULL) + mpList(nullptr) { SetEdgeBlending(true); } @@ -1398,7 +1398,7 @@ void FillAttrLB::Fill( const XGradientListRef &pList ) BitmapLB::BitmapLB( vcl::Window* pParent, WinBits aWB) : ListBox( pParent, aWB ), maBitmapEx(), - mpList(NULL) + mpList(nullptr) { SetEdgeBlending(true); } @@ -1947,10 +1947,10 @@ void SvxXLinePreview::Resize() SvxXLinePreview::SvxXLinePreview(vcl::Window* pParent) : SvxPreviewBase(pParent) - , mpLineObjA(NULL) - , mpLineObjB(NULL) - , mpLineObjC(NULL) - , mpGraphic(NULL) + , mpLineObjA(nullptr) + , mpLineObjB(nullptr) + , mpLineObjC(nullptr) + , mpGraphic(nullptr) , mbWithSymbol(false) { InitSettings( true, true ); @@ -2035,7 +2035,7 @@ void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& aObjectVector.push_back(mpLineObjB); aObjectVector.push_back(mpLineObjC); - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, 0); + sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); sdr::contact::DisplayInfo aDisplayInfo; // do processing @@ -2055,7 +2055,7 @@ void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& SvxXRectPreview::SvxXRectPreview(vcl::Window* pParent) : SvxPreviewBase(pParent) - , mpRectangleObject(0) + , mpRectangleObject(nullptr) { InitSettings(true, true); @@ -2106,7 +2106,7 @@ void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& aObjectVector.push_back(mpRectangleObject); - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, 0); + sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); sdr::contact::DisplayInfo aDisplayInfo; aPainter.ProcessDisplay(aDisplayInfo); @@ -2116,8 +2116,8 @@ void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& SvxXShadowPreview::SvxXShadowPreview( vcl::Window* pParent ) : SvxPreviewBase(pParent) - , mpRectangleObject(0) - , mpRectangleShadow(0) + , mpRectangleObject(nullptr) + , mpRectangleShadow(nullptr) { InitSettings(true, true); @@ -2187,7 +2187,7 @@ void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangl aObjectVector.push_back(mpRectangleShadow); aObjectVector.push_back(mpRectangleObject); - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, 0); + sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); sdr::contact::DisplayInfo aDisplayInfo; aPainter.ProcessDisplay(aDisplayInfo); diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index a159d80a22c5..330925d4938c 100644 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -31,7 +31,7 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) { FieldUnit eUnit = FUNIT_INCH; - const SfxPoolItem* pItem = NULL; + const SfxPoolItem* pItem = nullptr; if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC, false, &pItem ) ) eUnit = (FieldUnit) static_cast<const SfxUInt16Item*>(pItem)->GetValue(); else @@ -45,14 +45,14 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) bool GetApplyCharUnit( const SfxItemSet& rSet ) { bool bUseCharUnit = false; - const SfxPoolItem* pItem = NULL; + const SfxPoolItem* pItem = nullptr; if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_APPLYCHARUNIT, false, &pItem ) ) bUseCharUnit = static_cast<const SfxBoolItem*>(pItem)->GetValue(); else { // FIXME - this might be wrong, cf. the DEV300 changes in GetModuleFieldUnit() SfxViewFrame* pFrame = SfxViewFrame::Current(); - SfxObjectShell* pSh = NULL; + SfxObjectShell* pSh = nullptr; if ( pFrame ) pSh = pFrame->GetObjectShell(); if ( pSh ) // the object shell is not always available during reload diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 736c957405b4..a81c3690dda6 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -66,7 +66,7 @@ using namespace ::osl; RecoveryCore::RecoveryCore(const css::uno::Reference< css::uno::XComponentContext >& rxContext, bool bUsedForSaving) : m_xContext ( rxContext ) - , m_pListener ( 0 ) + , m_pListener ( nullptr ) , m_bListenForSaving(bUsedForSaving) { impl_startListening(); @@ -725,7 +725,7 @@ short SaveProgressDialog::Execute() m_pCore->setUpdateListener(this); m_pCore->doEmergencySave(); short nRet = ModalDialog::Execute(); - m_pCore->setUpdateListener(0); + m_pCore->setUpdateListener(nullptr); return nRet; } @@ -767,8 +767,8 @@ RecovDocListEntry::RecovDocListEntry( SvTreeListEntry* pEntry, void RecovDocListEntry::Paint(const Point& aPos, SvTreeListBox& aDevice, vcl::RenderContext& rRenderContext, const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry) { - const Image* pImg = 0; - const OUString* pTxt = 0; + const Image* pImg = nullptr; + const OUString* pTxt = nullptr; RecovDocList* pList = static_cast<RecovDocList*>(&aDevice); TURLInfo* pInfo = static_cast<TURLInfo*>(rEntry.GetUserData()); @@ -797,14 +797,14 @@ void RecovDocListEntry::Paint(const Point& aPos, SvTreeListBox& aDevice, vcl::Re case E_RECOVERY_IS_IN_PROGRESS: { - pImg = 0; + pImg = nullptr; pTxt = &pList->m_aRecovInProgrStr; } break; case E_NOT_RECOVERED_YET: { - pImg = 0; + pImg = nullptr; pTxt = &pList->m_aNotRecovYetStr; } break; @@ -962,7 +962,7 @@ short RecoveryDialog::execute() while(m_bWaitForCore) Application::Yield(); - m_pCore->setUpdateListener(0); + m_pCore->setUpdateListener(nullptr); m_eRecoveryState = RecoveryDialog::E_RECOVERY_CORE_DONE; return execute(); } diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 161d94987716..8511dc0190c9 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -167,7 +167,7 @@ public: mpPrinter(nullptr), mbDelPrinter(false), mpColor(nullptr), - mpBackColor(0), + mpBackColor(nullptr), mnAscent(0), mcStartBracket(0), mcEndBracket(0), @@ -613,7 +613,7 @@ void SvxFontPrevWindow::SetColor(const Color &rColor) void SvxFontPrevWindow::ResetColor() { delete pImpl->mpColor; - pImpl->mpColor = 0; + pImpl->mpColor = nullptr; Invalidate(); } diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index c5bfb6d95f72..12c5c2fd81d1 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -35,7 +35,7 @@ SvLBoxFontString::SvLBoxFontString( const vcl::Font& rFont, const Color* pColor ) : SvLBoxString( pEntry, nFlags, rString ), maFont( rFont ), - mbUseColor( pColor != NULL ) + mbUseColor( pColor != nullptr ) { SetText(rString); if(pColor) @@ -82,7 +82,7 @@ void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEnt SvxFontListBox::SvxFontListBox(vcl::Window* pParent, WinBits nStyle) : SvTabListBox(pParent, nStyle) , maStdFont(GetFont()) - , mpEntryColor(NULL) + , mpEntryColor(nullptr) , mbUseFont(false) { maStdFont.SetTransparent(true); diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index c355e67648b5..89e90261189d 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -64,7 +64,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextStyleItem* pStateItem = dynamic_cast<const XFormTextStyleItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStyleItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextStyleItem expected"); rFontWorkDlg.SetStyle_Impl(pStateItem); break; } @@ -72,7 +72,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextAdjustItem* pStateItem = dynamic_cast<const XFormTextAdjustItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextAdjustItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextAdjustItem expected"); rFontWorkDlg.SetAdjust_Impl(pStateItem); break; } @@ -80,7 +80,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextDistanceItem* pStateItem = dynamic_cast<const XFormTextDistanceItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextDistanceItem erwartet"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextDistanceItem erwartet"); rFontWorkDlg.SetDistance_Impl(pStateItem); break; } @@ -88,7 +88,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextStartItem* pStateItem = dynamic_cast<const XFormTextStartItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStartItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextStartItem expected"); rFontWorkDlg.SetStart_Impl(pStateItem); break; } @@ -96,7 +96,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextMirrorItem* pStateItem = dynamic_cast<const XFormTextMirrorItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextMirrorItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextMirrorItem expected"); rFontWorkDlg.SetMirror_Impl(pStateItem); break; } @@ -104,7 +104,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextHideFormItem* pStateItem = dynamic_cast<const XFormTextHideFormItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextHideFormItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextHideFormItem expected"); rFontWorkDlg.SetShowForm_Impl(pStateItem); break; } @@ -112,7 +112,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextOutlineItem* pStateItem = dynamic_cast<const XFormTextOutlineItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextOutlineItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextOutlineItem expected"); rFontWorkDlg.SetOutline_Impl(pStateItem); break; } @@ -120,7 +120,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextShadowItem* pStateItem = dynamic_cast<const XFormTextShadowItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextShadowItem expected"); rFontWorkDlg.SetShadow_Impl(pStateItem); break; } @@ -128,7 +128,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextShadowColorItem* pStateItem = dynamic_cast<const XFormTextShadowColorItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowColorItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextShadowColorItem expected"); rFontWorkDlg.SetShadowColor_Impl(pStateItem); break; } @@ -136,7 +136,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextShadowXValItem* pStateItem = dynamic_cast<const XFormTextShadowXValItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowXValItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextShadowXValItem expected"); rFontWorkDlg.SetShadowXVal_Impl(pStateItem); break; } @@ -144,7 +144,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState { const XFormTextShadowYValItem* pStateItem = dynamic_cast<const XFormTextShadowYValItem*>( pItem ); - DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowYValItem expected"); + DBG_ASSERT(pStateItem || pItem == nullptr, "XFormTextShadowYValItem expected"); rFontWorkDlg.SetShadowYVal_Impl(pStateItem); break; } diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 72c8c20b655e..0c7583f8bf61 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -232,13 +232,13 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : mbAutoSelect( true ), mbClicked( false ), mbHCMode( false ), - mpAccess( 0 ), - maChildVec( 8, static_cast< a11y::AccFrameSelector* >( 0 ) ), + mpAccess( nullptr ), + maChildVec( 8, static_cast< a11y::AccFrameSelector* >( nullptr ) ), mxChildVec( 8 ) { FreeResource(); - maAllBorders.resize( FRAMEBORDERTYPE_COUNT, 0 ); + maAllBorders.resize( FRAMEBORDERTYPE_COUNT, nullptr ); maAllBorders[ GetIndexFromFrameBorderType( FRAMEBORDER_LEFT ) ] = &maLeft; maAllBorders[ GetIndexFromFrameBorderType( FRAMEBORDER_RIGHT ) ] = &maRight; maAllBorders[ GetIndexFromFrameBorderType( FRAMEBORDER_TOP ) ] = &maTop; @@ -321,7 +321,7 @@ void FrameSelectorImpl::InitArrowImageList() GetRes( SVX_RES( RID_SVXSTR_BORDER_CONTROL ).SetRT( RSC_RESOURCE ) ); maILArrows.InsertFromHorizontalBitmap( - SVX_RES( BMP_FRMSEL_ARROWS ), 16, NULL, pColorAry1, pColorAry2, 3); + SVX_RES( BMP_FRMSEL_ARROWS ), 16, nullptr, pColorAry1, pColorAry2, 3); FreeResource(); DBG_ASSERT( maILArrows.GetImageSize().Height() == maILArrows.GetImageSize().Width(), "svx::FrameSelectorImpl::InitArrowImageList - images are not squarish" ); @@ -853,7 +853,7 @@ const SvxBorderLine* FrameSelector::GetFrameBorderStyle( FrameBorderType eBorder { const SvxBorderLine& rStyle = mxImpl->GetBorder( eBorder ).GetCoreStyle(); // rest of the world uses null pointer for invisible frame border - return rStyle.GetOutWidth() ? &rStyle : 0; + return rStyle.GetOutWidth() ? &rStyle : nullptr; } void FrameSelector::ShowBorder( FrameBorderType eBorder, const SvxBorderLine* pStyle ) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 43735b05e332..cccbef8c476e 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -63,9 +63,9 @@ GraphCtrl::GraphCtrl( vcl::Window* pParent, WinBits nStyle ) : bEditMode ( false ), bSdrMode ( false ), bAnim ( false ), - mpAccContext ( NULL ), - pModel ( NULL ), - pView ( NULL ) + mpAccContext ( nullptr ), + pModel ( nullptr ), + pView ( nullptr ) { pUserCall = new GraphCtrlUserCall( *this ); aUpdateIdle.SetPriority( SchedulerPriority::LOWEST ); @@ -98,11 +98,11 @@ void GraphCtrl::dispose() mpAccContext->release(); } delete pView; - pView = NULL; + pView = nullptr; delete pModel; - pModel = NULL; + pModel = nullptr; delete pUserCall; - pUserCall = NULL; + pUserCall = nullptr; Control::dispose(); } @@ -117,10 +117,10 @@ void GraphCtrl::SetWinStyle( WinBits nWinBits ) SetMapMode( aMap100 ); delete pView; - pView = NULL; + pView = nullptr; delete pModel; - pModel = NULL; + pModel = nullptr; if ( bSdrMode ) InitSdrModel(); @@ -165,7 +165,7 @@ void GraphCtrl::InitSdrModel() pView->SetBufferedOverlayAllowed(true); // Tell the accessibility object about the changes. - if (mpAccContext != NULL) + if (mpAccContext != nullptr) mpAccContext->setModelAndView (pModel, pView); } @@ -453,7 +453,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) const SdrHdlList& rHdlList = pView->GetHdlList(); SdrHdl* pHdl = rHdlList.GetFocusHdl(); - if(0L == pHdl) + if(nullptr == pHdl) { // restrict movement to WorkArea const Rectangle& rWorkArea = pView->GetWorkArea(); @@ -504,7 +504,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) const SdrDragStat& rDragStat = pView->GetDragStat(); // start dragging - pView->BegDragObj(aStartPoint, 0, pHdl, 0); + pView->BegDragObj(aStartPoint, nullptr, pHdl, 0); if(pView->IsDragObj()) { @@ -564,10 +564,10 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) pView->MarkPoint(*pHdl); } - if(0L == rHdlList.GetFocusHdl()) + if(nullptr == rHdlList.GetFocusHdl()) { // restore point with focus - SdrHdl* pNewOne = 0L; + SdrHdl* pNewOne = nullptr; for(size_t a = 0; !pNewOne && a < rHdlList.GetHdlCount(); ++a) { @@ -692,7 +692,7 @@ void GraphCtrl::MouseButtonUp(const MouseEvent& rMEvt) SdrObject* GraphCtrl::GetSelectedSdrObject() const { - SdrObject* pSdrObj = NULL; + SdrObject* pSdrObj = nullptr; if ( bSdrMode ) { @@ -752,7 +752,7 @@ IMPL_LINK_TYPED( GraphCtrl, UpdateHdl, Idle*, pTimer, void ) css::uno::Reference< css::accessibility::XAccessible > GraphCtrl::CreateAccessible() { - if( mpAccContext == NULL ) + if( mpAccContext == nullptr ) { vcl::Window* pParent = GetParent(); diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index 88489955c4f2..25e82dea2b97 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -41,8 +41,8 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj if( rGraphic.GetType() == GRAPHIC_BITMAP ) { SfxViewFrame* pViewFrame = SfxViewFrame::Current(); - SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : NULL; - vcl::Window* pWindow = ( pViewFrame && pViewFrame->GetViewShell() ) ? pViewFrame->GetViewShell()->GetWindow() : NULL; + SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : nullptr; + vcl::Window* pWindow = ( pViewFrame && pViewFrame->GetViewShell() ) ? pViewFrame->GetViewShell()->GetWindow() : nullptr; Graphic aGraphic; switch( rReq.GetSlot() ) diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index b1e9c1b3a251..aca7ecdf70c8 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -149,7 +149,7 @@ SvxFooterPage::SvxFooterPage( vcl::Window* pParent, const SfxItemSet& rAttr ) : SvxHFPage::SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ) : SfxTabPage(pParent, "HFFormatPage", "svx/ui/headfootformatpage.ui", &rSet), nId(nSetId), - pBBSet(NULL), + pBBSet(nullptr), // bitfield mbDisableQueryBox(false), mbEnableBackgroundSelector(true), @@ -384,7 +384,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) m_pCntSharedFirstBox->Show(!bIsCalc); // Evaluate header-/footer- attributes - const SvxSetItem* pSetItem = 0; + const SvxSetItem* pSetItem = nullptr; if ( SfxItemState::SET == rSet->GetItemState( GetWhich(nId), false, reinterpret_cast<const SfxPoolItem**>(&pSetItem) ) ) @@ -401,7 +401,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) static_cast<const SfxBoolItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) )); const SfxBoolItem& rShared = static_cast<const SfxBoolItem&>(rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED ) )); - const SfxBoolItem* pSharedFirst = 0; + const SfxBoolItem* pSharedFirst = nullptr; if (rHeaderSet.HasItem(GetWhich(SID_ATTR_PAGE_SHARED_FIRST))) pSharedFirst = static_cast<const SfxBoolItem*>(&rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED_FIRST ) )); const SvxSizeItem& rSize = @@ -439,7 +439,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) m_pCntSharedFirstBox->Hide(); } else - pSetItem = 0; + pSetItem = nullptr; } else { @@ -457,7 +457,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) m_pCntSharedFirstBox->Check(); } - TurnOnHdl(0); + TurnOnHdl(nullptr); m_pTurnOnBox->SaveValue(); m_pDistEdit->SaveValue(); @@ -468,11 +468,11 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) m_pCntSharedBox->SaveValue(); RangeHdl(); - const SfxPoolItem* pItem = 0; + const SfxPoolItem* pItem = nullptr; SfxObjectShell* pShell; if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem) || - ( 0 != (pShell = SfxObjectShell::Current()) && - 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) + ( nullptr != (pShell = SfxObjectShell::Current()) && + nullptr != (pItem = pShell->GetItem(SID_HTML_MODE)))) { sal_uInt16 nHtmlMode = 0; nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); @@ -949,7 +949,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) } // Evaluate Header attribute - const SvxSetItem* pSetItem = 0; + const SvxSetItem* pSetItem = nullptr; if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), false, @@ -976,7 +976,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) m_pBspWin->SetHeader( true ); } else - pSetItem = 0; + pSetItem = nullptr; } if ( !pSetItem ) @@ -989,7 +989,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) m_pCntSharedFirstBox->Disable(); } } - pSetItem = 0; + pSetItem = nullptr; if ( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), false, @@ -1016,7 +1016,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) m_pBspWin->SetFooter( true ); } else - pSetItem = 0; + pSetItem = nullptr; } if ( !pSetItem ) @@ -1149,7 +1149,7 @@ void SvxHFPage::EnableDynamicSpacing() m_pHeightEdit, m_pHeightDynBtn, m_pBackgroundBtn, - 0 + nullptr }; sal_Int32 nOffset = m_pTurnOnBox->GetPosPixel().Y() - m_pCntSharedBox->GetPosPixel().Y(); sal_Int32 nIdx = 0; diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index 3667bd67f161..96952c601bdf 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -37,7 +37,7 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ), - mpDlg( NULL ) + mpDlg( nullptr ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -47,9 +47,9 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SetWindow( mpDlg->GetWindow() ); SetVisible_Impl(false); - vcl::Window* pTopWindow = 0; + vcl::Window* pTopWindow = nullptr; if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 && - (0 != (pTopWindow = SfxGetpApp()->GetTopWindow()))) + (nullptr != (pTopWindow = SfxGetpApp()->GetTopWindow()))) { Size aParentSize( pTopWindow->GetSizePixel() ); Size aDlgSize ( GetSizePixel () ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 12ed1babc5ef..34b1dbd7d424 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -117,7 +117,7 @@ VCL_BUILDER_FACTORY(StatusBar) SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window* _pParent) : SfxModelessDialog(_pBindings, pCW, _pParent, "ImapDialog", "svx/ui/imapdialog.ui") - , pCheckObj(NULL) + , pCheckObj(nullptr) , aIMapItem(SID_IMAP_EXEC, *this, *_pBindings) { get(m_pTbxIMapDlg1, "toolbar"); @@ -758,7 +758,7 @@ IMPL_LINK_TYPED( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void ) const SdrObject* pObj = pWnd->GetSelectedSdrObject(); const SdrModel* pModel = pWnd->GetSdrModel(); const SdrView* pView = pWnd->GetSdrView(); - const bool bPolyEdit = ( pObj != NULL ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr; + const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr; const bool bDrawEnabled = !( bPolyEdit && m_pTbxIMapDlg1->IsItemChecked( mnPolyEditId ) ); m_pTbxIMapDlg1->EnableItem( mnApplyId, pOwnData->bExecState && pWnd->IsChanged() ); @@ -811,10 +811,10 @@ IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void) SvxIMapDlg* GetIMapDlg() { - SfxChildWindow* pWnd = NULL; + SfxChildWindow* pWnd = nullptr; if (SfxViewFrame::Current() && SfxViewFrame::Current()->HasChildWindow(SvxIMapDlgChildWindow::GetChildWindowId())) pWnd = SfxViewFrame::Current()->GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId()); - return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : NULL; + return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/imapimp.hxx b/svx/source/dialog/imapimp.hxx index 281be4d64cf2..4d5a1d744e7a 100644 --- a/svx/source/dialog/imapimp.hxx +++ b/svx/source/dialog/imapimp.hxx @@ -38,7 +38,7 @@ public: bool bExecState; IMapOwnData() - : pUpdateEditingObject(NULL) + : pUpdateEditingObject(nullptr) , bExecState(false) { } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 90de6e96734e..a174415953a6 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -94,7 +94,7 @@ void IMapWindow::SetImageMap( const ImageMap& rImageMap ) void IMapWindow::ReplaceImageMap( const ImageMap& rImageMap, bool /*bScaleToGraphic*/ ) { - SdrPage* pPage = 0; + SdrPage* pPage = nullptr; aIMap = rImageMap; if(GetSdrModel()) @@ -135,7 +135,7 @@ bool IMapWindow::ReplaceActualIMapInfo( const NotifyInfo& rNewInfo ) IMapObject* pIMapObj; bool bRet = false; - if ( pSdrObj && ( ( pIMapObj = GetIMapObj( pSdrObj ) ) != NULL ) ) + if ( pSdrObj && ( ( pIMapObj = GetIMapObj( pSdrObj ) ) != nullptr ) ) { pIMapObj->SetURL( rNewInfo.aMarkURL ); pIMapObj->SetAltText( rNewInfo.aMarkAltText ); @@ -190,7 +190,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) { Point aPoint; Rectangle aClipRect( aPoint, GetGraphicSize() ); - SdrObject* pSdrObj = NULL; + SdrObject* pSdrObj = nullptr; IMapObjectPtr pCloneIMapObj; switch( pIMapObj->GetType() ) @@ -429,7 +429,7 @@ void IMapWindow::MarkListHasChanged() SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const { - SdrObject* pObj = NULL; + SdrObject* pObj = nullptr; Point aPt = PixelToLogic( rPosPixel ); if ( Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) ) @@ -457,7 +457,7 @@ SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const IMapObject* IMapWindow::GetIMapObj( const SdrObject* pSdrObj ) { - IMapObject* pIMapObj = NULL; + IMapObject* pIMapObj = nullptr; if ( pSdrObj ) { @@ -523,7 +523,7 @@ void IMapWindow::Command(const CommandEvent& rCEvt) sal_Int8 IMapWindow::AcceptDrop( const AcceptDropEvent& rEvt ) { - return( ( GetHitSdrObj( rEvt.maPosPixel ) != NULL ) ? rEvt.mnAction : DND_ACTION_NONE ); + return( ( GetHitSdrObj( rEvt.maPosPixel ) != nullptr ) ? rEvt.mnAction : DND_ACTION_NONE ); } sal_Int8 IMapWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) @@ -559,8 +559,8 @@ void IMapWindow::RequestHelp( const HelpEvent& rHEvt ) if ( Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled() ) { - SdrObject* pSdrObj = NULL; - SdrPageView* pPageView = NULL; + SdrObject* pSdrObj = nullptr; + SdrPageView* pPageView = nullptr; if ( pView->PickObj( aPos, pView->getHitTolLog(), pSdrObj, pPageView ) ) { const IMapObject* pIMapObj = GetIMapObj( pSdrObj ); @@ -615,7 +615,7 @@ void IMapWindow::UpdateInfo( bool bNewObj ) if ( aInfoLink.IsSet() ) { const SdrObject* pSdrObj = GetSelectedSdrObject(); - const IMapObject* pIMapObj = pSdrObj ? GetIMapObj( pSdrObj ) : NULL; + const IMapObject* pIMapObj = pSdrObj ? GetIMapObj( pSdrObj ) : nullptr; aInfo.bNewObj = bNewObj; @@ -781,7 +781,7 @@ void IMapWindow::CreateDefaultObject() aPagePos.Y() += (aPageSize.Height() / 2) - (nDefaultObjectSizeHeight / 2); Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); - SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), 0L, pModel); + SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pModel); pObj->SetLogicRect(aNewObjectRectangle); switch( pObj->GetObjIdentifier() ) diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 1d9c1bd00fbb..533c9f82a377 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -130,7 +130,7 @@ VCL_BUILDER_DECL_FACTORY(SvxLanguageComboBox) } SvxLanguageBoxBase::SvxLanguageBoxBase( bool bCheck ) - : m_pSpellUsedLang(NULL) + : m_pSpellUsedLang(nullptr) , m_nLangList(SvxLanguageListFlags::EMPTY) , m_bHasLangNone(false) , m_bLangNoneIsLangAll(false) @@ -249,7 +249,7 @@ void SvxLanguageBoxBase::SetLanguageList( SvxLanguageListFlags nLangList, else { nCount = SvtLanguageTable::GetLanguageEntryCount(); - pKnown = NULL; + pKnown = nullptr; } for ( sal_uInt32 i = 0; i < nCount; i++ ) { diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index d40d3b01de23..fb10253e2461 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -236,7 +236,7 @@ bool SvxGridTabPage::FillItemSet( SfxItemSet* rCoreSet ) void SvxGridTabPage::Reset( const SfxItemSet* rSet ) { - const SfxPoolItem* pAttr = 0; + const SfxPoolItem* pAttr = nullptr; if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_GRID_OPTIONS , false, &pAttr )) @@ -263,7 +263,7 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet ) { - const SfxPoolItem* pAttr = NULL; + const SfxPoolItem* pAttr = nullptr; if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false, &pAttr )) { diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 2e73bef35180..65a31f216f5d 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -46,7 +46,7 @@ SvxPageWindow::SvxPageWindow(vcl::Window* pParent) nRight(0), //UUUU - pBorder(0), + pBorder(nullptr), bResetBackground(false), bFrameDirection(false), nFrameDirection(0), @@ -56,13 +56,13 @@ SvxPageWindow::SvxPageWindow(vcl::Window* pParent) nHdDist(0), nHdHeight(0), - pHdBorder(0), + pHdBorder(nullptr), nFtLeft(0), nFtRight(0), nFtDist(0), nFtHeight(0), - pFtBorder(0), + pFtBorder(nullptr), maHeaderFillAttributes(), maFooterFillAttributes(), @@ -387,7 +387,7 @@ void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext, if (aSequence.getLength()) { const drawinglayer::geometry::ViewInformation2D aViewInformation2D( - basegfx::B2DHomMatrix(), GetViewTransformation(), aPaintRange, 0, + basegfx::B2DHomMatrix(), GetViewTransformation(), aPaintRange, nullptr, 0.0, css::uno::Sequence<css::beans::PropertyValue >()); std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor; diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index 9eeb0e5be632..35b0435209f2 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -48,7 +48,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, { // SfxItemState::DONTCARE => pState == -1 => PTR_CAST buff if ( eState != SfxItemState::DEFAULT ) - pState = 0; + pState = nullptr; switch(nSID) { diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index e1a7b9d8b8e6..6e308197ffa7 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -99,7 +99,7 @@ public: Reference<XModel> GetModel() { if (!xController.is()) - xModel = 0; + xModel = nullptr; else xModel = xController->getModel(); return xModel; @@ -181,7 +181,7 @@ void SvxRubyData_Impl::disposing(const EventObject&) throw (RuntimeException, st catch (const Exception&) { } - xController = 0; + xController = nullptr; } void SvxRubyData_Impl::AssertOneEntry() @@ -326,7 +326,7 @@ bool SvxRubyDialog::Close() void SvxRubyDialog::Activate() { SfxModelessDialog::Activate(); - SfxPoolItem* pState = 0; + SfxPoolItem* pState = nullptr; SfxItemState eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState ); bool bEnable = (eState < SfxItemState::DEFAULT) || !pState || !static_cast<SfxBoolItem*>(pState)->GetValue(); delete pState; @@ -778,7 +778,7 @@ void SvxRubyDialog::EnableControls(bool bEnable) RubyPreview::RubyPreview(vcl::Window *pParent) : Window(pParent, WB_BORDER) - , m_pParentDlg(NULL) + , m_pParentDlg(nullptr) { SetBorderStyle(WindowBorderStyle::MONO); } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index fefca16e7fa9..54ee17f290d8 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -122,7 +122,7 @@ struct SearchDlg_Impl SearchDlg_Impl() : bSaveToModule(true) , bFocusOnSearch(true) - , pRanges(NULL) + , pRanges(nullptr) { aCommand1URL.Complete = aCommand1URL.Main = "vnd.sun.search:SearchViaComponent1"; aCommand1URL.Protocol = "vnd.sun.search:"; @@ -250,7 +250,7 @@ void SearchAttrItemList::Remove(size_t nPos, size_t nLen) SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind ) : SfxModelessDialog(&rBind, pChildWin, pParent, "FindReplaceDialog", "svx/ui/findreplacedialog.ui") - , mpDocWin(NULL) + , mpDocWin(nullptr) , mbSuccess(false) , rBindings(rBind) , bWriter(false) @@ -261,15 +261,15 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi , bReadOnly(false) , bConstruct(true) , nModifyFlag(0) - , pImpl(NULL) - , pSearchList(NULL) + , pImpl(nullptr) + , pSearchList(nullptr) , pReplaceList(new SearchAttrItemList) - , pSearchItem(NULL) - , pSearchController(NULL) - , pOptionsController(NULL) - , pFamilyController(NULL) - , pSearchSetController(NULL) - , pReplaceSetController(NULL) + , pSearchItem(nullptr) + , pSearchController(nullptr) + , pOptionsController(nullptr) + , pFamilyController(nullptr) + , pSearchSetController(nullptr) + , pReplaceSetController(nullptr) , nTransliterationFlags(0x00000000) { get(m_pSearchFrame, "searchframe"); @@ -439,18 +439,18 @@ void SvxSearchDialog::Construct_Impl() InitControls_Impl(); // Get attribute sets only once in construtor() - const SfxPoolItem* ppArgs[] = { pSearchItem, 0 }; + const SfxPoolItem* ppArgs[] = { pSearchItem, nullptr }; const SvxSetItem* pSrchSetItem = static_cast<const SvxSetItem*>( rBindings.GetDispatcher()->Execute( FID_SEARCH_SEARCHSET, SfxCallMode::SLOT, ppArgs ) ); if ( pSrchSetItem ) - InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 ); + InitAttrList_Impl( &pSrchSetItem->GetItemSet(), nullptr ); const SvxSetItem* pReplSetItem = static_cast<const SvxSetItem*>( rBindings.GetDispatcher()->Execute( FID_SEARCH_REPLACESET, SfxCallMode::SLOT, ppArgs ) ); if ( pReplSetItem ) - InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() ); + InitAttrList_Impl( nullptr, &pReplSetItem->GetItemSet() ); // Create controller and update at once rBindings.EnterRegistrations(); @@ -570,7 +570,7 @@ bool SvxSearchDialog::Close() aOpt.SetSearchFormatted ( m_pSearchFormattedCB->IsChecked() ); aOpt.Commit(); - const SfxPoolItem* ppArgs[] = { pSearchItem, 0 }; + const SfxPoolItem* ppArgs[] = { pSearchItem, nullptr }; rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SfxCallMode::SLOT, ppArgs ); rBindings.Execute( SID_SEARCH_DLG ); @@ -880,18 +880,18 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) if ( !pSearchList ) { // Get attribute sets, if it not has been done already - const SfxPoolItem* ppArgs[] = { pSearchItem, 0 }; + const SfxPoolItem* ppArgs[] = { pSearchItem, nullptr }; const SvxSetItem* pSrchSetItem = static_cast<const SvxSetItem*>(rBindings.GetDispatcher()->Execute( FID_SEARCH_SEARCHSET, SfxCallMode::SLOT, ppArgs )); if ( pSrchSetItem ) - InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 ); + InitAttrList_Impl( &pSrchSetItem->GetItemSet(), nullptr ); const SvxSetItem* pReplSetItem = static_cast<const SvxSetItem*>( rBindings.GetDispatcher()->Execute( FID_SEARCH_REPLACESET, SfxCallMode::SLOT, ppArgs ) ); if ( pReplSetItem ) - InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() ); + InitAttrList_Impl( nullptr, &pReplSetItem->GetItemSet() ); } } } @@ -1322,7 +1322,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) pReplaceList->Clear(); } nModifyFlag = 0; - const SfxPoolItem* ppArgs[] = { pSearchItem, 0 }; + const SfxPoolItem* ppArgs[] = { pSearchItem, nullptr }; rBindings.ExecuteSynchron( FID_SEARCH_NOW, ppArgs ); } else if ( pBtn == m_pCloseBtn ) @@ -2243,7 +2243,7 @@ void SvxSearchDialog::SaveToModule_Impl() pSearchItem->SetCommand( SvxSearchCmd::FIND ); nModifyFlag = 0; - const SfxPoolItem* ppArgs[] = { pSearchItem, 0 }; + const SfxPoolItem* ppArgs[] = { pSearchItem, nullptr }; rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SfxCallMode::SLOT, ppArgs ); } @@ -2305,14 +2305,14 @@ static vcl::Window* lcl_GetSearchLabelWindow() css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement("private:resource/toolbar/findbar"); if (!xUIElement.is()) - return 0; + return nullptr; css::uno::Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), css::uno::UNO_QUERY_THROW); VclPtr< ToolBox > pToolBox = static_cast<ToolBox*>( VCLUnoHelper::GetWindow(xWindow).get() ); for (size_t i = 0; pToolBox && i < pToolBox->GetItemCount(); ++i) if (pToolBox->GetItemCommand(i) == ".uno:SearchLabel") return pToolBox->GetItemWindow(i); - return 0; + return nullptr; } void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL) diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index d7be12c594d3..18884050b214 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -385,7 +385,7 @@ SvxNumValueSet::SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits) : ValueSet(pParent, nWinBits) , ePageType(NumberingPageType::BULLET) , bHTMLMode(false) - , pVDev(NULL) + , pVDev(nullptr) { } @@ -395,7 +395,7 @@ void SvxNumValueSet::init(NumberingPageType eType) { ePageType = eType; bHTMLMode = false; - pVDev = NULL; + pVDev = nullptr; SetColCount( 4 ); SetLineCount( 2 ); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index d5f1a657be12..9f55e1b978a1 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -137,10 +137,10 @@ struct SvxRuler_Impl { bool bIsTabsRelativeToIndent : 1; // Tab stops relative to paragraph indent? SvxRuler_Impl() : - pPercBuf(0), pBlockBuf(0), nPercSize(0), nTotalDist(0), + pPercBuf(nullptr), pBlockBuf(nullptr), nPercSize(0), nTotalDist(0), lOldWinPos(0), lMaxLeftLogic(0), lMaxRightLogic(0), lLastLMargin(0), lLastRMargin(0), aProtectItem(SID_RULER_PROTECT), - pTextRTLItem(0), nControlerItems(0), nIdx(0), + pTextRTLItem(nullptr), nControlerItems(0), nIdx(0), nColLeftPix(0), nColRightPix(0), bIsTableRows(false), bIsTabsRelativeToIndent(true) @@ -150,7 +150,7 @@ struct SvxRuler_Impl { ~SvxRuler_Impl() { nPercSize = 0; nTotalDist = 0; - delete[] pPercBuf; delete[] pBlockBuf; pPercBuf = 0; + delete[] pPercBuf; delete[] pBlockBuf; pPercBuf = nullptr; delete pTextRTLItem; } void SetPercSize(sal_uInt16 nSize); @@ -632,7 +632,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) } case RULER_TYPE_BORDER: { - if (mxColumnItem.get() == NULL) + if (mxColumnItem.get() == nullptr) break; SvxColumnItem& aColumnItem = *mxColumnItem.get(); @@ -750,7 +750,7 @@ void SvxRuler::UpdateTextRTL(const SfxBoolItem* pItem) if(bActive && bHorz) { delete mxRulerImpl->pTextRTLItem; - mxRulerImpl->pTextRTLItem = 0; + mxRulerImpl->pTextRTLItem = nullptr; if(pItem) mxRulerImpl->pTextRTLItem = new SfxBoolItem(*pItem); SetTextRTL(mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue()); @@ -2021,7 +2021,7 @@ void SvxRuler::DragObjectBorder() void SvxRuler::ApplyMargins() { /* Applying margins; changed by dragging. */ - const SfxPoolItem* pItem = NULL; + const SfxPoolItem* pItem = nullptr; sal_uInt16 nId = SID_ATTR_LONG_LRSPACE; if(bHorz) |