summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:25:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:50 +0100
commit6cd7bf2043146a630925a2e49336f02c802f707a (patch)
tree786cecd8ab993e25cda497d45b68007050c30d61 /svx/source/svdraw
parent28f4bee7bd7378141d8569186162e1a3166eb012 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I71682f28c6a54d33da6b0c971f34d0a705ff04f5
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/clonelist.cxx4
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx4
-rw-r--r--svx/source/svdraw/sdrmasterpagedescriptor.cxx6
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx14
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx4
-rw-r--r--svx/source/svdraw/sdrundomanager.cxx6
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/svdraw/svdcrtv.cxx72
-rw-r--r--svx/source/svdraw/svddrag.cxx12
-rw-r--r--svx/source/svdraw/svddrgmt.cxx72
-rw-r--r--svx/source/svdraw/svddrgv.cxx56
-rw-r--r--svx/source/svdraw/svdedtv.cxx18
-rw-r--r--svx/source/svdraw/svdedtv1.cxx36
-rw-r--r--svx/source/svdraw/svdedtv2.cxx100
-rw-r--r--svx/source/svdraw/svdedxv.cxx234
-rw-r--r--svx/source/svdraw/svdetc.cxx22
-rw-r--r--svx/source/svdraw/svdfmtf.cxx14
-rw-r--r--svx/source/svdraw/svdfmtf.hxx2
-rw-r--r--svx/source/svdraw/svdglev.cxx18
-rw-r--r--svx/source/svdraw/svdglue.cxx16
-rw-r--r--svx/source/svdraw/svdhdl.cxx60
-rw-r--r--svx/source/svdraw/svdibrow.cxx26
-rw-r--r--svx/source/svdraw/svditer.cxx2
-rw-r--r--svx/source/svdraw/svdlayer.cxx24
-rw-r--r--svx/source/svdraw/svdmark.cxx50
-rw-r--r--svx/source/svdraw/svdmodel.cxx124
-rw-r--r--svx/source/svdraw/svdmrkv.cxx202
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx62
-rw-r--r--svx/source/svdraw/svdoashp.cxx48
-rw-r--r--svx/source/svdraw/svdobj.cxx238
-rw-r--r--svx/source/svdraw/svdobjplusdata.cxx12
-rw-r--r--svx/source/svdraw/svdocapt.cxx18
-rw-r--r--svx/source/svdraw/svdocirc.cxx12
-rw-r--r--svx/source/svdraw/svdoedge.cxx126
-rw-r--r--svx/source/svdraw/svdograf.cxx60
-rw-r--r--svx/source/svdraw/svdogrp.cxx16
-rw-r--r--svx/source/svdraw/svdomeas.cxx16
-rw-r--r--svx/source/svdraw/svdomedia.cxx6
-rw-r--r--svx/source/svdraw/svdoole2.cxx60
-rw-r--r--svx/source/svdraw/svdopage.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx64
-rw-r--r--svx/source/svdraw/svdorect.cxx16
-rw-r--r--svx/source/svdraw/svdotext.cxx78
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx12
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx2
-rw-r--r--svx/source/svdraw/svdotxat.cxx16
-rw-r--r--svx/source/svdraw/svdotxdr.cxx6
-rw-r--r--svx/source/svdraw/svdotxed.cxx22
-rw-r--r--svx/source/svdraw/svdotxln.cxx28
-rw-r--r--svx/source/svdraw/svdotxtr.cxx8
-rw-r--r--svx/source/svdraw/svdouno.cxx18
-rw-r--r--svx/source/svdraw/svdoutl.cxx4
-rw-r--r--svx/source/svdraw/svdoutlinercache.cxx18
-rw-r--r--svx/source/svdraw/svdovirt.cxx20
-rw-r--r--svx/source/svdraw/svdpage.cxx178
-rw-r--r--svx/source/svdraw/svdpagv.cxx46
-rw-r--r--svx/source/svdraw/svdpntv.cxx50
-rw-r--r--svx/source/svdraw/svdpoev.cxx16
-rw-r--r--svx/source/svdraw/svdsnpv.cxx32
-rw-r--r--svx/source/svdraw/svdtext.cxx12
-rw-r--r--svx/source/svdraw/svdtrans.cxx20
-rw-r--r--svx/source/svdraw/svdundo.cxx64
-rw-r--r--svx/source/svdraw/svdview.cxx88
-rw-r--r--svx/source/svdraw/svdviter.cxx16
-rw-r--r--svx/source/svdraw/svdxcgv.cxx36
-rw-r--r--svx/source/svdraw/textchainflow.cxx14
66 files changed, 1383 insertions, 1383 deletions
diff --git a/svx/source/svdraw/clonelist.cxx b/svx/source/svdraw/clonelist.cxx
index 4d37a48cdf46..9f3574c2e6ca 100644
--- a/svx/source/svdraw/clonelist.cxx
+++ b/svx/source/svdraw/clonelist.cxx
@@ -91,7 +91,7 @@ void CloneList::CopyConnections() const
if(it != maOriginalList.end())
{
- SdrObject *cObj = NULL;
+ SdrObject *cObj = nullptr;
if (nPos < cloneCount)
cObj = GetClone(nPos);
@@ -111,7 +111,7 @@ void CloneList::CopyConnections() const
if(it != maOriginalList.end())
{
- SdrObject *cObj = NULL;
+ SdrObject *cObj = nullptr;
if (nPos < cloneCount)
cObj = GetClone(nPos);
diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx
index dab3e14e2b3e..4ea659954b60 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -41,7 +41,7 @@ SdrObject* SdrObjectPrimitiveHit(
const SetOfByte* pVisiLayer,
bool bTextOnly)
{
- SdrObject* pResult = 0;
+ SdrObject* pResult = nullptr;
if(rObject.GetSubList() && rObject.GetSubList()->GetObjCount())
{
@@ -100,7 +100,7 @@ SdrObject* SdrObjListPrimitiveHit(
bool bTextOnly)
{
size_t nObjNum(rList.GetObjCount());
- SdrObject* pRetval = 0;
+ SdrObject* pRetval = nullptr;
while(!pRetval && nObjNum > 0)
{
diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
index 6ef787d53dd5..22f50a5dec3e 100644
--- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx
+++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
@@ -37,7 +37,7 @@ namespace sdr
MasterPageDescriptor::MasterPageDescriptor(SdrPage& aOwnerPage, SdrPage& aUsedPage)
: maOwnerPage(aOwnerPage),
maUsedPage(aUsedPage),
- mpViewContact(0L)
+ mpViewContact(nullptr)
{
// all layers visible
maVisibleLayers.SetAll();
@@ -54,7 +54,7 @@ namespace sdr
if(mpViewContact)
{
delete mpViewContact;
- mpViewContact = 0L;
+ mpViewContact = nullptr;
}
}
@@ -119,7 +119,7 @@ namespace sdr
// else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all
// MasterPages should have a StyleSheet excactly for this reason, but historically
// e.g. the Notes MasterPage has no StyleSheet set (and there maybe others).
- pCorrectProperties = 0;
+ pCorrectProperties = nullptr;
}
return pCorrectProperties;
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index 00fc659aada2..9b8f4aa3790d 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -58,10 +58,10 @@ struct SdrPageWindow::Impl
uno::Reference<awt::XControlContainer> mxControlContainer;
Impl( SdrPageView& rPageView, SdrPaintWindow& rPaintWindow ) :
- mpObjectContact(NULL),
+ mpObjectContact(nullptr),
mrPageView(rPageView),
mpPaintWindow(&rPaintWindow),
- mpOriginalPaintWindow(NULL)
+ mpOriginalPaintWindow(nullptr)
{
}
@@ -187,7 +187,7 @@ void SdrPageWindow::unpatchPaintWindow()
if (mpImpl->mpOriginalPaintWindow)
{
mpImpl->mpPaintWindow = mpImpl->mpOriginalPaintWindow;
- mpImpl->mpOriginalPaintWindow = NULL;
+ mpImpl->mpOriginalPaintWindow = nullptr;
}
}
@@ -345,7 +345,7 @@ void SdrPageWindow::RedrawAll( sdr::contact::ViewObjectContactRedirector* pRedir
}
// reset redirector
- GetObjectContact().SetViewObjectContactRedirector(0L);
+ GetObjectContact().SetViewObjectContactRedirector(nullptr);
// LineClip test
#ifdef CLIPPER_TEST
@@ -404,7 +404,7 @@ void SdrPageWindow::RedrawLayer( const SdrLayerID* pId, sdr::contact::ViewObject
}
// reset redirector
- GetObjectContact().SetViewObjectContactRedirector(0L);
+ GetObjectContact().SetViewObjectContactRedirector(nullptr);
}
// Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...)
@@ -456,7 +456,7 @@ sdr::contact::ObjectContact& SdrPageWindow::GetObjectContact()
bool SdrPageWindow::HasObjectContact() const
{
- return mpImpl->mpObjectContact != NULL;
+ return mpImpl->mpObjectContact != nullptr;
}
// #i26631#
@@ -465,7 +465,7 @@ void SdrPageWindow::ResetObjectContact()
if (mpImpl->mpObjectContact)
{
delete mpImpl->mpObjectContact;
- mpImpl->mpObjectContact = 0L;
+ mpImpl->mpObjectContact = nullptr;
}
}
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index dea8e6c9fbb1..c35207e1049d 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -242,7 +242,7 @@ SdrPaintWindow::SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut,
: mrOutputDevice(rOut),
mpWindow(pWindow),
mrPaintView(rNewPaintView),
- mpPreRenderDevice(0L),
+ mpPreRenderDevice(nullptr),
mbTemporaryTarget(false), // #i72889#
mbUseBuffer(true)
{
@@ -309,7 +309,7 @@ void SdrPaintWindow::DestroyPreRenderDevice()
if(mpPreRenderDevice)
{
delete mpPreRenderDevice;
- mpPreRenderDevice = 0L;
+ mpPreRenderDevice = nullptr;
}
}
diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx
index 1a4541d0158e..374cb8f05f7c 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -24,7 +24,7 @@
SdrUndoManager::SdrUndoManager(sal_uInt16 nMaxUndoActionCount)
: EditUndoManager(nMaxUndoActionCount)
, maEndTextEditHdl()
- , mpLastUndoActionBeforeTextEdit(0)
+ , mpLastUndoActionBeforeTextEdit(nullptr)
, mbEndTextEditTriggeredFromUndo(false)
{
}
@@ -107,7 +107,7 @@ void SdrUndoManager::SetEndTextEditHdl(const Link<SdrUndoManager*,void>& rLink)
if(isTextEditActive())
{
// text edit start, remember last non-textedit action for later cleanup
- mpLastUndoActionBeforeTextEdit = GetUndoActionCount() ? GetUndoAction() : 0;
+ mpLastUndoActionBeforeTextEdit = GetUndoActionCount() ? GetUndoAction() : nullptr;
}
else
{
@@ -123,7 +123,7 @@ void SdrUndoManager::SetEndTextEditHdl(const Link<SdrUndoManager*,void>& rLink)
ClearRedo();
// forget marker again
- mpLastUndoActionBeforeTextEdit = 0;
+ mpLastUndoActionBeforeTextEdit = nullptr;
}
}
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 80813a275a4b..49a50b550a8e 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -368,12 +368,12 @@ SdrItemPool::~SdrItemPool()
{
SetRefCount(*mppLocalPoolDefaults[i],0);
delete mppLocalPoolDefaults[i];
- mppLocalPoolDefaults[i] = 0L;
+ mppLocalPoolDefaults[i] = nullptr;
}
}
// split pools before destroying
- SetSecondaryPool(NULL);
+ SetSecondaryPool(nullptr);
}
bool SdrItemPool::GetPresentation(
@@ -871,7 +871,7 @@ bool SdrAngleItem::GetPresentation(
sal_Unicode aUnicodeNull('0');
sal_Int32 nCount(2);
- const IntlWrapper* pMyIntlWrapper = NULL;
+ const IntlWrapper* pMyIntlWrapper = nullptr;
if(!pIntlWrapper)
pIntlWrapper = pMyIntlWrapper = new IntlWrapper(
Application::GetSettings().GetLanguageTag() );
@@ -908,7 +908,7 @@ bool SdrAngleItem::GetPresentation(
if ( pMyIntlWrapper )
{
delete pMyIntlWrapper;
- pIntlWrapper = NULL;
+ pIntlWrapper = nullptr;
}
}
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index fe3aceabc9c2..709ba718ea4d 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -189,7 +189,7 @@ void SdrCreateView::ImpClearConnectMarker()
if(mpCoMaOverlay)
{
delete mpCoMaOverlay;
- mpCoMaOverlay = 0L;
+ mpCoMaOverlay = nullptr;
}
}
@@ -197,8 +197,8 @@ void SdrCreateView::ImpClearVars()
{
nAktInvent=SdrInventor;
nAktIdent=OBJ_NONE;
- pAktCreate=NULL;
- pCreatePV=NULL;
+ pAktCreate=nullptr;
+ pCreatePV=nullptr;
bAutoTextEdit=false;
b1stPointAsCenter=false;
aAktCreatePointer=Pointer(PointerStyle::Cross);
@@ -212,7 +212,7 @@ void SdrCreateView::ImpClearVars()
SdrCreateView::SdrCreateView(SdrModel* pModel1, OutputDevice* pOut)
: SdrDragView(pModel1,pOut),
- mpCoMaOverlay(0L),
+ mpCoMaOverlay(nullptr),
mpCreateViewExtraData(new ImpSdrCreateViewExtraData())
{
ImpClearVars();
@@ -227,26 +227,26 @@ SdrCreateView::~SdrCreateView()
bool SdrCreateView::IsAction() const
{
- return SdrDragView::IsAction() || pAktCreate!=NULL;
+ return SdrDragView::IsAction() || pAktCreate!=nullptr;
}
void SdrCreateView::MovAction(const Point& rPnt)
{
SdrDragView::MovAction(rPnt);
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=nullptr) {
MovCreateObj(rPnt);
}
}
void SdrCreateView::EndAction()
{
- if (pAktCreate!=NULL) EndCreateObj(SDRCREATE_FORCEEND);
+ if (pAktCreate!=nullptr) EndCreateObj(SDRCREATE_FORCEEND);
SdrDragView::EndAction();
}
void SdrCreateView::BckAction()
{
- if (pAktCreate!=NULL) BckCreateObj();
+ if (pAktCreate!=nullptr) BckCreateObj();
SdrDragView::BckAction();
}
@@ -258,7 +258,7 @@ void SdrCreateView::BrkAction()
void SdrCreateView::TakeActionRect(Rectangle& rRect) const
{
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
rRect=maDragStat.GetActionRect();
if (rRect.IsEmpty())
@@ -274,7 +274,7 @@ void SdrCreateView::TakeActionRect(Rectangle& rRect) const
bool SdrCreateView::CheckEdgeMode()
{
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
// is managed by EdgeObj
if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return false;
@@ -330,9 +330,9 @@ bool SdrCreateView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
{
// TODO: Change default hit tolerance at IsMarkedHit() some time!
Point aPos(pWin->PixelToLogic(rMEvt.GetPosPixel()));
- bool bMarkHit=PickHandle(aPos)!=NULL || IsMarkedObjHit(aPos);
+ bool bMarkHit=PickHandle(aPos)!=nullptr || IsMarkedObjHit(aPos);
SdrObjConnection aCon;
- if (!bMarkHit) SdrEdgeObj::ImpFindConnector(aPos,*pPV,aCon,NULL,pWin);
+ if (!bMarkHit) SdrEdgeObj::ImpFindConnector(aPos,*pPV,aCon,nullptr,pWin);
SetConnectMarker(aCon,*pPV);
}
}
@@ -360,7 +360,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent)
{
nAktInvent=nInvent;
nAktIdent=nIdent;
- SdrObject* pObj = SdrObjFactory::MakeNewObject(nInvent,nIdent,NULL);
+ SdrObject* pObj = SdrObjFactory::MakeNewObject(nInvent,nIdent,nullptr);
if(pObj)
{
@@ -396,7 +396,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
ImpClearConnectMarker();
- if (pPV!=NULL)
+ if (pPV!=nullptr)
{
pCreatePV=pPV;
}
@@ -404,7 +404,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
{
pCreatePV = GetSdrPageView();
}
- if (pCreatePV!=NULL)
+ if (pCreatePV!=nullptr)
{ // otherwise no side registered!
OUString aLay(maActualLayer);
@@ -441,9 +441,9 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
nAktIdent!=sal_uInt16(OBJ_FREEFILL) )) { // no snapping for Edge and Freehand
aPnt=GetSnapPos(aPnt,pCreatePV);
}
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
- if (mpDefaultStyleSheet!=NULL) pAktCreate->NbcSetStyleSheet(mpDefaultStyleSheet, false);
+ if (mpDefaultStyleSheet!=nullptr) pAktCreate->NbcSetStyleSheet(mpDefaultStyleSheet, false);
// SW uses a naked SdrObject for frame construction. Normally, such an
// object should not be created. Since it is possible to use it as a helper
@@ -515,8 +515,8 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
else
{
SdrObject::Free( pAktCreate );
- pAktCreate=NULL;
- pCreatePV=NULL;
+ pAktCreate=nullptr;
+ pCreatePV=nullptr;
}
}
}
@@ -526,7 +526,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
bool SdrCreateView::BegCreateObj(const Point& rPnt, OutputDevice* pOut, short nMinMov, SdrPageView* pPV)
{
- return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,pPV,Rectangle(), 0L);
+ return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,pPV,Rectangle(), nullptr);
}
bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject)
@@ -540,19 +540,19 @@ bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov
nIdent = pPreparedFactoryObject->GetObjIdentifier();
}
- return ImpBegCreateObj(nInvent, nIdent, rPnt, 0L, nMinMov, 0L, Rectangle(), pPreparedFactoryObject);
+ return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, nullptr, Rectangle(), pPreparedFactoryObject);
}
bool SdrCreateView::BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz,
OutputDevice* pOut, short nMinMov, SdrPageView* pPV)
{
return ImpBegCreateObj(SdrInventor,OBJ_CAPTION,rPnt,pOut,nMinMov,pPV,
- Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), 0L);
+ Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr);
}
void SdrCreateView::MovCreateObj(const Point& rPnt)
{
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=nullptr) {
Point aPnt(rPnt);
if (!maDragStat.IsNoSnap())
{
@@ -599,7 +599,7 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
SdrObject* pObjMerk=pAktCreate;
SdrPageView* pPVMerk=pCreatePV;
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
sal_uIntPtr nCount=maDragStat.GetPointAnz();
@@ -622,7 +622,7 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
{
// otherwise Brk, because all points are equal
SdrObject* pObj=pAktCreate;
- pAktCreate=NULL;
+ pAktCreate=nullptr;
const SdrLayerAdmin& rAd = pCreatePV->GetPage()->GetLayerAdmin();
SdrLayerID nLayer(0);
@@ -659,7 +659,7 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
{
// delete object, its content is cloned and inserted
SdrObject::Free( pObjMerk );
- pObjMerk = 0L;
+ pObjMerk = nullptr;
bSceneIntoScene = true;
}
}
@@ -670,7 +670,7 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
InsertObjectAtView(pObj, *pCreatePV);
}
- pCreatePV=NULL;
+ pCreatePV=nullptr;
bRet=true; // sal_True = event interpreted
}
else
@@ -694,10 +694,10 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
bRet=true;
}
}
- if (bRet && pObjMerk!=NULL && IsTextEditAfterCreate())
+ if (bRet && pObjMerk!=nullptr && IsTextEditAfterCreate())
{
SdrTextObj* pText=dynamic_cast<SdrTextObj*>( pObjMerk );
- if (pText!=NULL && pText->IsTextFrame())
+ if (pText!=nullptr && pText->IsTextFrame())
{
SdrBeginTextEdit(pText, pPVMerk, nullptr, true);
}
@@ -708,7 +708,7 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
void SdrCreateView::BckCreateObj()
{
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
if (maDragStat.GetPointAnz()<=2 )
{
@@ -732,13 +732,13 @@ void SdrCreateView::BckCreateObj()
void SdrCreateView::BrkCreateObj()
{
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
HideCreateObj();
pAktCreate->BrkCreate(maDragStat);
SdrObject::Free( pAktCreate );
- pAktCreate=NULL;
- pCreatePV=NULL;
+ pAktCreate=nullptr;
+ pCreatePV=nullptr;
}
}
@@ -841,7 +841,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
// object according to current zoom so as objects relative
// position to grid appears stable
aPoly.transform( basegfx::tools::createTranslateB2DHomMatrix( aGridOff.X(), aGridOff.Y() ) );
- mpCreateViewExtraData->CreateAndShowOverlay(*this, 0, aPoly);
+ mpCreateViewExtraData->CreateAndShowOverlay(*this, nullptr, aPoly);
}
// #i101679# Force changed overlay to be shown
@@ -905,7 +905,7 @@ bool SdrCreateView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
SfxStyleSheet* SdrCreateView::GetStyleSheet() const
{
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
return pAktCreate->GetStyleSheet();
}
@@ -917,7 +917,7 @@ SfxStyleSheet* SdrCreateView::GetStyleSheet() const
bool SdrCreateView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
{
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
pAktCreate->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
return true;
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index f6ed475da790..91cd2d145072 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -27,7 +27,7 @@ void SdrDragStat::Clear(bool bLeaveOne)
aPnts.pop_back();
}
delete pUser;
- pUser=NULL;
+ pUser=nullptr;
aPnts.clear();
if (bLeaveOne) {
aPnts.push_back(new Point);
@@ -36,18 +36,18 @@ void SdrDragStat::Clear(bool bLeaveOne)
void SdrDragStat::Reset()
{
- pView=NULL;
- pPageView=NULL;
+ pView=nullptr;
+ pPageView=nullptr;
bShown=false;
nMinMov=1;
bMinMoved=false;
bHorFixed=false;
bVerFixed=false;
bWantNoSnap=false;
- pHdl=NULL;
+ pHdl=nullptr;
bOrtho4=false;
bOrtho8=false;
- pDragMethod=NULL;
+ pDragMethod=nullptr;
bEndDragChangesAttributes=false;
bEndDragChangesGeoAndAttributes=false;
bMouseIsUp=false;
@@ -132,7 +132,7 @@ void SdrDragStat::TakeCreateRect(Rectangle& rRect) const
rRect.Right()=aBtmRgt.X();
rRect.Bottom()=aBtmRgt.Y();
}
- if (pView!=NULL && pView->IsCreate1stPointAsCenter()) {
+ if (pView!=nullptr && pView->IsCreate1stPointAsCenter()) {
rRect.Top()+=rRect.Top()-rRect.Bottom();
rRect.Left()+=rRect.Left()-rRect.Right();
}
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 2040694f077b..d97ef1b85278 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -142,7 +142,7 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragEntryPolyPolygon::createPr
SdrDragEntrySdrObject::SdrDragEntrySdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify)
: SdrDragEntry(),
maOriginal(rOriginal),
- mpClone(0),
+ mpClone(nullptr),
mrObjectContact(rObjectContact),
mbModify(bModify)
{
@@ -167,7 +167,7 @@ void SdrDragEntrySdrObject::prepareCurrentState(SdrDragMethod& rDragMethod)
if(mpClone)
{
SdrObject::Free(mpClone);
- mpClone = 0;
+ mpClone = nullptr;
}
if(mbModify)
@@ -574,17 +574,17 @@ void SdrDragMethod::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr
SdrObject* SdrDragMethod::GetDragObj() const
{
- SdrObject* pObj=NULL;
- if (getSdrDragView().mpDragHdl!=NULL) pObj=getSdrDragView().mpDragHdl->GetObj();
- if (pObj==NULL) pObj=getSdrDragView().mpMarkedObj;
+ SdrObject* pObj=nullptr;
+ if (getSdrDragView().mpDragHdl!=nullptr) pObj=getSdrDragView().mpDragHdl->GetObj();
+ if (pObj==nullptr) pObj=getSdrDragView().mpMarkedObj;
return pObj;
}
SdrPageView* SdrDragMethod::GetDragPV() const
{
- SdrPageView* pPV=NULL;
- if (getSdrDragView().mpDragHdl!=NULL) pPV=getSdrDragView().mpDragHdl->GetPageView();
- if (pPV==NULL) pPV=getSdrDragView().mpMarkedPV;
+ SdrPageView* pPV=nullptr;
+ if (getSdrDragView().mpDragHdl!=nullptr) pPV=getSdrDragView().mpDragHdl->GetPageView();
+ if (pPV==nullptr) pPV=getSdrDragView().mpMarkedPV;
return pPV;
}
@@ -997,7 +997,7 @@ bool SdrDragMovHdl::BeginSdrDrag()
if (eKind==HDL_MIRX)
{
- if (pH1==NULL || pH2==NULL)
+ if (pH1==nullptr || pH2==nullptr)
{
OSL_FAIL("SdrDragMovHdl::BeginSdrDrag(): Moving the axis of reflection: reference handles not found.");
return false;
@@ -1025,7 +1025,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
- if (pH1==NULL || pH2==NULL)
+ if (pH1==nullptr || pH2==nullptr)
return;
if (!DragStat().IsNoSnap())
@@ -1035,8 +1035,8 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
bool bXSnapped=false;
bool bYSnapped=false;
Point aDif(aPnt-DragStat().GetStart());
- getSdrDragView().CheckSnap(Ref1()+aDif,NULL,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
- getSdrDragView().CheckSnap(Ref2()+aDif,NULL,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ getSdrDragView().CheckSnap(Ref1()+aDif,nullptr,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ getSdrDragView().CheckSnap(Ref2()+aDif,nullptr,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
aPnt.X()+=nBestXSnap;
aPnt.Y()+=nBestYSnap;
}
@@ -1084,7 +1084,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
SdrHdl* pH=GetHdlList().GetHdl(eRef);
- if (pH!=NULL)
+ if (pH!=nullptr)
{
Point aRef(pH->GetPos());
long nAngle=NormAngle360(GetAngle(aPnt-aRef));
@@ -1171,7 +1171,7 @@ Pointer SdrDragMovHdl::GetSdrDragPointer() const
{
const SdrHdl* pHdl = GetDragHdl();
- if (pHdl!=NULL)
+ if (pHdl!=nullptr)
{
return pHdl->GetPointer();
}
@@ -1185,7 +1185,7 @@ TYPEINIT1(SdrDragObjOwn,SdrDragMethod);
SdrDragObjOwn::SdrDragObjOwn(SdrDragView& rNewView)
: SdrDragMethod(rNewView),
- mpClone(0)
+ mpClone(nullptr)
{
const SdrObject* pObj = GetDragObj();
@@ -1345,7 +1345,7 @@ void SdrDragObjOwn::MoveSdrDrag(const Point& rNoSnapPnt)
if(mpClone)
{
SdrObject::Free(mpClone);
- mpClone = 0;
+ mpClone = nullptr;
}
// create a new clone and modify to current drag state
@@ -1377,8 +1377,8 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
if(pObj)
{
- SdrUndoAction* pUndo = NULL;
- SdrUndoAction* pUndo2 = NULL;
+ SdrUndoAction* pUndo = nullptr;
+ SdrUndoAction* pUndo2 = nullptr;
const bool bUndo = getSdrDragView().IsUndoEnabled();
if( bUndo )
@@ -1686,7 +1686,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
{
const SdrMark* pM=rML.GetMark(nMarkNum);
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- const size_t nPointCount=pPts==NULL ? 0 : pPts->size();
+ const size_t nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0)
{
@@ -1831,7 +1831,7 @@ void SdrDragResize::TakeSdrDragComment(OUString& rStr) const
bool SdrDragResize::BeginSdrDrag()
{
SdrHdlKind eRefHdl=HDL_MOVE;
- SdrHdl* pRefHdl=NULL;
+ SdrHdl* pRefHdl=nullptr;
switch (GetDragHdlKind())
{
@@ -1849,7 +1849,7 @@ bool SdrDragResize::BeginSdrDrag()
if (eRefHdl!=HDL_MOVE)
pRefHdl=GetHdlList().GetHdl(eRefHdl);
- if (pRefHdl!=NULL && !getSdrDragView().IsResizeAtCenter())
+ if (pRefHdl!=nullptr && !getSdrDragView().IsResizeAtCenter())
{
// Calc hack to adjust for calc grid
DragStat().Ref1()=pRefHdl->GetPos() - getSdrDragView().GetGridOffset();
@@ -1859,7 +1859,7 @@ bool SdrDragResize::BeginSdrDrag()
SdrHdl* pRef1=GetHdlList().GetHdl(HDL_UPLFT);
SdrHdl* pRef2=GetHdlList().GetHdl(HDL_LWRGT);
- if (pRef1!=NULL && pRef2!=NULL)
+ if (pRef1!=nullptr && pRef2!=nullptr)
{
DragStat().Ref1()=Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center();
}
@@ -2094,7 +2094,7 @@ Pointer SdrDragResize::GetSdrDragPointer() const
{
const SdrHdl* pHdl=GetDragHdl();
- if (pHdl!=NULL)
+ if (pHdl!=nullptr)
{
return pHdl->GetPointer();
}
@@ -2144,7 +2144,7 @@ bool SdrDragRotate::BeginSdrDrag()
{
SdrHdl* pH=GetHdlList().GetHdl(HDL_REF1);
- if (pH!=NULL)
+ if (pH!=nullptr)
{
Show();
DragStat().Ref1()=pH->GetPos();
@@ -2279,7 +2279,7 @@ void SdrDragShear::TakeSdrDragComment(OUString& rStr) const
bool SdrDragShear::BeginSdrDrag()
{
SdrHdlKind eRefHdl=HDL_MOVE;
- SdrHdl* pRefHdl=NULL;
+ SdrHdl* pRefHdl=nullptr;
switch (GetDragHdlKind())
{
@@ -2293,7 +2293,7 @@ bool SdrDragShear::BeginSdrDrag()
if (eRefHdl!=HDL_MOVE)
pRefHdl=GetHdlList().GetHdl(eRefHdl);
- if (pRefHdl!=NULL)
+ if (pRefHdl!=nullptr)
{
DragStat().Ref1()=pRefHdl->GetPos();
nAngle0=GetAngle(DragStat().GetStart()-DragStat().GetRef1());
@@ -2570,7 +2570,7 @@ bool SdrDragMirror::BeginSdrDrag()
SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
- if (pH1!=NULL && pH2!=NULL)
+ if (pH1!=nullptr && pH2!=nullptr)
{
DragStat().Ref1()=pH1->GetPos();
DragStat().Ref2()=pH2->GetPos();
@@ -2658,7 +2658,7 @@ TYPEINIT1(SdrDragGradient, SdrDragMethod);
SdrDragGradient::SdrDragGradient(SdrDragView& rNewView, bool bGrad)
: SdrDragMethod(rNewView),
- pIAOHandle(NULL),
+ pIAOHandle(nullptr),
bIsGradient(bGrad)
{
}
@@ -3037,9 +3037,9 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
switch (eMode)
{
- case SDRCROOK_ROTATE : CrookRotateXPoint (aCtr1,NULL,NULL,aC,aRad,nSin,nCos,bVertical); break;
- case SDRCROOK_SLANT : CrookSlantXPoint (aCtr1,NULL,NULL,aC,aRad,nSin,nCos,bVertical); break;
- case SDRCROOK_STRETCH: CrookStretchXPoint(aCtr1,NULL,NULL,aC,aRad,nSin,nCos,bVertical,aMarkRect); break;
+ case SDRCROOK_ROTATE : CrookRotateXPoint (aCtr1,nullptr,nullptr,aC,aRad,nSin,nCos,bVertical); break;
+ case SDRCROOK_SLANT : CrookSlantXPoint (aCtr1,nullptr,nullptr,aC,aRad,nSin,nCos,bVertical); break;
+ case SDRCROOK_STRETCH: CrookStretchXPoint(aCtr1,nullptr,nullptr,aC,aRad,nSin,nCos,bVertical,aMarkRect); break;
} // switch
}
@@ -3071,8 +3071,8 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
while (i<nPointCount)
{
Point* pPnt=&aPol[i];
- Point* pC1=NULL;
- Point* pC2=NULL;
+ Point* pC1=nullptr;
+ Point* pC2=nullptr;
if (i+1<nPointCount && aPol.IsControl(i))
{ // control point on the left
@@ -3102,8 +3102,8 @@ void SdrDragCrook::_MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
void SdrDragCrook::_MovCrookPoint(Point& rPnt, Point* pC1, Point* pC2)
{
bool bVert=bVertical;
- bool bC1=pC1!=NULL;
- bool bC2=pC2!=NULL;
+ bool bC1=pC1!=nullptr;
+ bool bC2=pC2!=nullptr;
Point aC(aCenter);
if (bResize)
@@ -3684,7 +3684,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
SdrHdl* pRef1=GetHdlList().GetHdl(HDL_UPLFT);
SdrHdl* pRef2=GetHdlList().GetHdl(HDL_LWRGT);
- if (pRef1==NULL || pRef2==NULL)
+ if (pRef1==nullptr || pRef2==nullptr)
return false;
Rectangle rect(pRef1->GetPos(),pRef2->GetPos());
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index da6660341d0c..62b2b81bc059 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -56,14 +56,14 @@ void SdrDragView::ImpClearVars()
mbDragLimit=false;
mbMarkedHitMovesAlways=false;
meDragHdl=HDL_MOVE;
- mpDragHdl=NULL;
+ mpDragHdl=nullptr;
mbDragHdl=false;
mbDragSpecial=false;
- mpCurrentSdrDragMethod=NULL;
+ mpCurrentSdrDragMethod=nullptr;
mbDragStripes=false;
mbMirrRefDragObj=true;
mbDragWithCopy=false;
- mpInsPointUndo=NULL;
+ mpInsPointUndo=nullptr;
mbInsGluePoint=false;
mbInsObjPointMode=false;
mbInsGluePointMode=false;
@@ -214,23 +214,23 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
{
SetDragWithCopy(false);
//TODO: aAni.Reset();
- mpCurrentSdrDragMethod=NULL;
+ mpCurrentSdrDragMethod=nullptr;
mbDragSpecial=false;
mbDragLimit=false;
SdrDragMode eTmpMode=meDragMode;
- if (eTmpMode==SDRDRAG_MOVE && pHdl!=NULL && pHdl->GetKind()!=HDL_MOVE) {
+ if (eTmpMode==SDRDRAG_MOVE && pHdl!=nullptr && pHdl->GetKind()!=HDL_MOVE) {
eTmpMode=SDRDRAG_RESIZE;
}
mbDragLimit=TakeDragLimit(eTmpMode,maDragLimit);
mbFramDrag=ImpIsFrameHandles();
if (!mbFramDrag &&
- (mpMarkedObj==NULL || !mpMarkedObj->hasSpecialDrag()) &&
- (pHdl==NULL || pHdl->GetObj()==NULL)) {
+ (mpMarkedObj==nullptr || !mpMarkedObj->hasSpecialDrag()) &&
+ (pHdl==nullptr || pHdl->GetObj()==nullptr)) {
mbFramDrag=true;
}
Point aPnt(rPnt);
- if(pHdl == NULL
+ if(pHdl == nullptr
|| pHdl->GetKind() == HDL_MOVE
|| pHdl->GetKind() == HDL_MIRX
|| pHdl->GetKind() == HDL_TRNS
@@ -250,7 +250,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
maDragStat.NextPoint();
mpDragWin=pOut;
mpDragHdl=pHdl;
- meDragHdl= pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ meDragHdl= pHdl==nullptr ? HDL_MOVE : pHdl->GetKind();
mbDragHdl=meDragHdl==HDL_REF1 || meDragHdl==HDL_REF2 || meDragHdl==HDL_MIRX;
// Expand test for HDL_ANCHOR_TR
@@ -479,7 +479,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
}
}
}
- if (pForcedMeth!=NULL)
+ if (pForcedMeth!=nullptr)
{
delete mpCurrentSdrDragMethod;
mpCurrentSdrDragMethod = pForcedMeth;
@@ -490,11 +490,11 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
bRet = mpCurrentSdrDragMethod->BeginSdrDrag();
if (!bRet)
{
- if (pHdl==NULL && dynamic_cast< const SdrDragObjOwn* >(mpCurrentSdrDragMethod) != nullptr)
+ if (pHdl==nullptr && dynamic_cast< const SdrDragObjOwn* >(mpCurrentSdrDragMethod) != nullptr)
{
// Obj may not Move SpecialDrag, so try with MoveFrameDrag
delete mpCurrentSdrDragMethod;
- mpCurrentSdrDragMethod = 0;
+ mpCurrentSdrDragMethod = nullptr;
mbDragSpecial=false;
if (!IsMoveAllowed())
@@ -509,7 +509,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
if (!bRet)
{
delete mpCurrentSdrDragMethod;
- mpCurrentSdrDragMethod = 0;
+ mpCurrentSdrDragMethod = nullptr;
maDragStat.SetDragMethod(mpCurrentSdrDragMethod);
}
}
@@ -555,7 +555,7 @@ bool SdrDragView::EndDragObj(bool bCopy)
EndUndo();
delete mpCurrentSdrDragMethod;
- mpCurrentSdrDragMethod = 0;
+ mpCurrentSdrDragMethod = nullptr;
if (bEliminatePolyPoints)
{
@@ -578,7 +578,7 @@ bool SdrDragView::EndDragObj(bool bCopy)
}
meDragHdl=HDL_MOVE;
- mpDragHdl=NULL;
+ mpDragHdl=nullptr;
if (!mbSomeObjChgdFlag)
{
@@ -607,13 +607,13 @@ void SdrDragView::BrkDragObj()
mpCurrentSdrDragMethod->CancelSdrDrag();
delete mpCurrentSdrDragMethod;
- mpCurrentSdrDragMethod = 0;
+ mpCurrentSdrDragMethod = nullptr;
if (mbInsPolyPoint)
{
mpInsPointUndo->Undo(); // delete inserted point again
delete mpInsPointUndo;
- mpInsPointUndo=NULL;
+ mpInsPointUndo=nullptr;
SetMarkHandles();
mbInsPolyPoint=false;
}
@@ -622,18 +622,18 @@ void SdrDragView::BrkDragObj()
{
mpInsPointUndo->Undo(); // delete inserted glue point again
delete mpInsPointUndo;
- mpInsPointUndo=NULL;
+ mpInsPointUndo=nullptr;
SetInsertGluePoint(false);
}
meDragHdl=HDL_MOVE;
- mpDragHdl=NULL;
+ mpDragHdl=nullptr;
}
}
bool SdrDragView::IsInsObjPointPossible() const
{
- return mpMarkedObj!=NULL && mpMarkedObj->IsPolyObj();
+ return mpMarkedObj!=nullptr && mpMarkedObj->IsPolyObj();
}
bool SdrDragView::ImpBegInsObjPoint(bool bIdxZwang, sal_uInt32 nIdx, const Point& rPnt, bool bNewObj, OutputDevice* pOut)
@@ -692,7 +692,7 @@ bool SdrDragView::ImpBegInsObjPoint(bool bIdxZwang, sal_uInt32 nIdx, const Point
else
{
delete mpInsPointUndo;
- mpInsPointUndo = NULL;
+ mpInsPointUndo = nullptr;
}
}
@@ -754,22 +754,22 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
maInsPointUndoStr = aStr.replaceFirst("%1", pObj->TakeObjNameSingul() );
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- if (pGPL!=NULL)
+ if (pGPL!=nullptr)
{
sal_uInt16 nGlueIdx=pGPL->Insert(SdrGluePoint());
SdrGluePoint& rGP=(*pGPL)[nGlueIdx];
sal_uInt16 nGlueId=rGP.GetId();
rGP.SetAbsolutePos(rPnt,*pObj);
- SdrHdl* pHdl=NULL;
+ SdrHdl* pHdl=nullptr;
if (MarkGluePoint(pObj,nGlueId,pPV))
{
pHdl=GetGluePointHdl(pObj,nGlueId);
}
- if (pHdl!=NULL && pHdl->GetKind()==HDL_GLUE && pHdl->GetObj()==pObj && pHdl->GetObjHdlNum()==nGlueId)
+ if (pHdl!=nullptr && pHdl->GetKind()==HDL_GLUE && pHdl->GetObj()==pObj && pHdl->GetObjHdlNum()==nGlueId)
{
SetInsertGluePoint(true);
- bRet=BegDragObj(rPnt,NULL,pHdl,0);
+ bRet=BegDragObj(rPnt,nullptr,pHdl,0);
if (bRet)
{
maDragStat.SetMinMoved();
@@ -779,7 +779,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
{
SetInsertGluePoint(false);
delete mpInsPointUndo;
- mpInsPointUndo=NULL;
+ mpInsPointUndo=nullptr;
}
}
else
@@ -792,7 +792,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
// no glue points possible for this object (e. g. Edge)
SetInsertGluePoint(false);
delete mpInsPointUndo;
- mpInsPointUndo=NULL;
+ mpInsPointUndo=nullptr;
}
}
@@ -887,7 +887,7 @@ bool SdrDragView::IsOrthoDesired() const
void SdrDragView::SetMarkHandles()
{
if( mpDragHdl )
- mpDragHdl = 0;
+ mpDragHdl = nullptr;
SdrExchangeView::SetMarkHandles();
}
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 7bf5c5cbdc88..c2d705c17ff0 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -350,7 +350,7 @@ void SdrEditView::ImpBroadcastEdgesOfMarkedNodes()
SdrMark* pEM = GetMarkedEdgesOfMarkedNodes().GetMark(i);
SdrObject* pEdgeTmp=pEM->GetMarkedSdrObj();
SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pEdgeTmp );
- if (pEdge!=NULL) {
+ if (pEdge!=nullptr) {
pEdge->SetEdgeTrackDirty();
}
}
@@ -491,8 +491,8 @@ void SdrEditView::CheckPossibilities()
// still missing ...
const SdrObject* pObj=GetMarkedObjectByIndex(0);
//const SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pObj );
- bool bGroup=pObj->GetSubList()!=NULL;
- bool bHasText=pObj->GetOutlinerParaObject()!=NULL;
+ bool bGroup=pObj->GetSubList()!=nullptr;
+ bool bHasText=pObj->GetOutlinerParaObject()!=nullptr;
if (bGroup || bHasText) {
bCombinePossible=true;
}
@@ -540,7 +540,7 @@ void SdrEditView::CheckPossibilities()
}
bool bNoMovRotFound=false;
- const SdrPageView* pPV0=NULL;
+ const SdrPageView* pPV0=nullptr;
for (size_t nm=0; nm<nMarkCount; ++nm) {
const SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -593,7 +593,7 @@ void SdrEditView::CheckPossibilities()
bCanConvToContour = false;
// Ungroup
- if (!bUnGroupPossible) bUnGroupPossible=pObj->GetSubList()!=NULL;
+ if (!bUnGroupPossible) bUnGroupPossible=pObj->GetSubList()!=nullptr;
// ConvertToCurve: If at least one can be converted, that is fine.
if (aInfo.bCanConvToPath ) bCanConvToPath =true;
if (aInfo.bCanConvToPoly ) bCanConvToPoly =true;
@@ -650,10 +650,10 @@ void SdrEditView::CheckPossibilities()
if (nMarkCount==1) {
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pObj );
- if (pEdge!=NULL) {
+ if (pEdge!=nullptr) {
SdrObject* pNode1=pEdge->GetConnectedNode(true);
SdrObject* pNode2=pEdge->GetConnectedNode(false);
- if (pNode1!=NULL || pNode2!=NULL) bMoveAllowed=false;
+ if (pNode1!=nullptr || pNode2!=nullptr) bMoveAllowed=false;
}
}
}
@@ -911,7 +911,7 @@ void SdrEditView::CopyMarkedObj()
for (size_t nm=0; nm<nMarkCount; ++nm) {
SdrMark* pM=aSourceObjectsForCopy.GetMark(nm);
SdrObject* pO=pM->GetMarkedSdrObj()->Clone();
- if (pO!=NULL) {
+ if (pO!=nullptr) {
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pM->GetPageView()->GetObjList()->InsertObject(pO, SAL_MAX_SIZE, &aReason);
@@ -972,7 +972,7 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser
pObj->NbcSetLayer(nLayer);
}
if (nOptions & SdrInsertFlags::SETDEFATTR) {
- if (mpDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
+ if (mpDefaultStyleSheet!=nullptr) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
pObj->SetMergedItemSet(maDefaultAttr);
}
if (!pObj->IsInserted()) {
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index bf38d8699531..863f8d48fd60 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -512,7 +512,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pO );
bool bDone = false;
- if(pPath!=NULL && !bNoContortion)
+ if(pPath!=nullptr && !bNoContortion)
{
XPolyPolygon aXPP(pPath->GetPathPoly());
switch (eMode) {
@@ -569,9 +569,9 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa
switch (eMode)
{
- case SDRCROOK_ROTATE : nAngle=CrookRotateXPoint (aCtr1,NULL,NULL,rRef,rRad,nSin,nCos,bVertical); bRotOk=bRotate; break;
- case SDRCROOK_SLANT : nAngle=CrookSlantXPoint (aCtr1,NULL,NULL,rRef,rRad,nSin,nCos,bVertical); break;
- case SDRCROOK_STRETCH: nAngle=CrookStretchXPoint(aCtr1,NULL,NULL,rRef,rRad,nSin,nCos,bVertical,rMarkRect); break;
+ case SDRCROOK_ROTATE : nAngle=CrookRotateXPoint (aCtr1,nullptr,nullptr,rRef,rRad,nSin,nCos,bVertical); bRotOk=bRotate; break;
+ case SDRCROOK_SLANT : nAngle=CrookSlantXPoint (aCtr1,nullptr,nullptr,rRef,rRad,nSin,nCos,bVertical); break;
+ case SDRCROOK_STRETCH: nAngle=CrookStretchXPoint(aCtr1,nullptr,nullptr,rRef,rRad,nSin,nCos,bVertical,rMarkRect); break;
}
}
@@ -613,7 +613,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
const SdrObjList* pOL=pO->GetSubList();
- if (bNoContortion || pOL==NULL) {
+ if (bNoContortion || pOL==nullptr) {
ImpCrookObj(pO,rRef,rRad,eMode,bVertical,bNoContortion,bRotate,aMarkRect);
} else {
SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
@@ -689,7 +689,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto
Rectangle aRefRect(rRef);
XPolygon aRefPoly(rDistortedRect);
const SdrObjList* pOL=pO->GetSubList();
- if (bNoContortion || pOL==NULL) {
+ if (bNoContortion || pOL==nullptr) {
ImpDistortObj(pO,aRefRect,aRefPoly,bNoContortion);
} else {
SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
@@ -709,7 +709,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep
{
// bReplaceAll has no effect here
Rectangle aAllSnapRect(GetMarkedObjRect());
- const SfxPoolItem *pPoolItem=NULL;
+ const SfxPoolItem *pPoolItem=nullptr;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue();
SetRef1(Point(n,GetRef1().Y()));
@@ -960,7 +960,7 @@ std::vector<sal_uInt16> GetAllCharPropIds(const SfxItemSet& rSet)
{
SfxItemIter aIter(rSet);
const SfxPoolItem* pItem=aIter.FirstItem();
- while (pItem!=NULL)
+ while (pItem!=nullptr)
{
if (!IsInvalidItem(pItem))
{
@@ -983,7 +983,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
bool bHasEEFeatureItems=false;
SfxItemIter aIter(rAttr);
const SfxPoolItem* pItem=aIter.FirstItem();
- while (!bHasEEFeatureItems && pItem!=NULL) {
+ while (!bHasEEFeatureItems && pItem!=nullptr) {
if (!IsInvalidItem(pItem)) {
sal_uInt16 nW=pItem->Which();
if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=true;
@@ -1092,7 +1092,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
// multiple portions exist with multiple formats. If a OutlinerParaObject
// really exists and needs to be rescued is evaluated in the undo
// implementation itself.
- const bool bRescueText = dynamic_cast< SdrTextObj* >(pObj) != 0;
+ const bool bRescueText = dynamic_cast< SdrTextObj* >(pObj) != nullptr;
// add attribute undo
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,false,bHasEEItems || bPossibleGeomChange || bRescueText));
@@ -1192,14 +1192,14 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() const
{
- SfxStyleSheet* pRet=NULL;
+ SfxStyleSheet* pRet=nullptr;
bool b1st=true;
const size_t nMarkCount=GetMarkedObjectCount();
for (size_t nm=0; nm<nMarkCount; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SfxStyleSheet* pSS=pM->GetMarkedSdrObj()->GetStyleSheet();
if (b1st) pRet=pSS;
- else if (pRet!=pSS) return NULL; // different stylesheets
+ else if (pRet!=pSS) return nullptr; // different stylesheets
b1st=false;
}
return pRet;
@@ -1214,7 +1214,7 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe
if( bUndo )
{
OUString aStr;
- if (pStyleSheet!=NULL)
+ if (pStyleSheet!=nullptr)
ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr);
else
ImpTakeDescriptionStr(STR_EditDelStylesheet,aStr);
@@ -1474,7 +1474,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
long nOldShearAngle=GetMarkedObjShear();
const SdrMarkList& rMarkList=GetMarkedObjectList();
const size_t nMarkCount=rMarkList.GetMarkCount();
- SdrObject* pObj=NULL;
+ SdrObject* pObj=nullptr;
RECT_POINT eSizePoint=RP_MM;
long nPosDX=0;
@@ -1516,7 +1516,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
bool bSetAttr=false;
SfxItemSet aSetAttr(mpModel->GetItemPool());
- const SfxPoolItem* pPoolItem=NULL;
+ const SfxPoolItem* pPoolItem=nullptr;
// position
if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)) {
@@ -1825,13 +1825,13 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, bool
const SdrObject* pObj=GetMarkedObjectByIndex(0);
const SdrPage* pPage=pObj->GetPage();
const SdrPageGridFrameList* pGFL=pPage->GetGridFrameList(GetSdrPageViewOfMarkedByIndex(0),&(pObj->GetSnapRect()));
- const SdrPageGridFrame* pFrame=NULL;
- if (pGFL!=NULL && pGFL->GetCount()!=0)
+ const SdrPageGridFrame* pFrame=nullptr;
+ if (pGFL!=nullptr && pGFL->GetCount()!=0)
{ // Writer
pFrame=&((*pGFL)[0]);
}
- if (pFrame!=NULL)
+ if (pFrame!=nullptr)
{ // Writer
aBound=pFrame->GetUserArea();
}
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 851d1090d29e..42248be8ecae 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -49,12 +49,12 @@ using namespace com::sun::star;
SdrObject* SdrEditView::GetMaxToTopObj(SdrObject* /*pObj*/) const
{
- return NULL;
+ return nullptr;
}
SdrObject* SdrEditView::GetMaxToBtmObj(SdrObject* /*pObj*/) const
{
- return NULL;
+ return nullptr;
}
void SdrEditView::ObjOrderChanged(SdrObject* /*pObj*/, sal_uIntPtr /*nOldPos*/, sal_uIntPtr /*nNewPos*/)
@@ -77,7 +77,7 @@ void SdrEditView::MovMarkedToTop()
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
bool bChg=false;
- SdrObjList* pOL0=NULL;
+ SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
for (size_t nm=nAnz; nm>0;)
{
@@ -94,7 +94,7 @@ void SdrEditView::MovMarkedToTop()
const Rectangle& rBR=pObj->GetCurrentBoundRect();
size_t nCmpPos = nNowPos+1;
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
- if (pMaxObj!=NULL)
+ if (pMaxObj!=nullptr)
{
size_t nMaxPos=pMaxObj->GetOrdNum();
if (nMaxPos!=0)
@@ -108,7 +108,7 @@ void SdrEditView::MovMarkedToTop()
while (nCmpPos<nNewPos && !bEnd)
{
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
- if (pCmpObj==NULL)
+ if (pCmpObj==nullptr)
{
OSL_FAIL("MovMarkedToTop(): Reference object not found.");
bEnd=true;
@@ -165,7 +165,7 @@ void SdrEditView::MovMarkedToBtm()
}
bool bChg=false;
- SdrObjList* pOL0=NULL;
+ SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
for (size_t nm=0; nm<nAnz; ++nm)
{
@@ -183,7 +183,7 @@ void SdrEditView::MovMarkedToBtm()
if (nCmpPos>0)
--nCmpPos;
SdrObject* pMaxObj=GetMaxToBtmObj(pObj);
- if (pMaxObj!=NULL)
+ if (pMaxObj!=nullptr)
{
const size_t nMinPos=pMaxObj->GetOrdNum()+1;
if (nNewPos<nMinPos)
@@ -198,7 +198,7 @@ void SdrEditView::MovMarkedToBtm()
while (nCmpPos>nNewPos && !bEnd)
{
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
- if (pCmpObj==NULL)
+ if (pCmpObj==nullptr)
{
OSL_FAIL("MovMarkedToBtm(): Reference object not found.");
bEnd=true;
@@ -240,7 +240,7 @@ void SdrEditView::MovMarkedToBtm()
void SdrEditView::PutMarkedToTop()
{
- PutMarkedInFrontOfObj(NULL);
+ PutMarkedInFrontOfObj(nullptr);
}
void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
@@ -254,7 +254,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
SortMarkedObjects();
- if (pRefObj!=NULL)
+ if (pRefObj!=nullptr)
{
// Make "in front of the object" work, even if the
// selected objects are already in front of the other object
@@ -277,7 +277,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
bool bChg=false;
- SdrObjList* pOL0=NULL;
+ SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
for (size_t nm=nAnz; nm>0;)
{
@@ -294,7 +294,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
const size_t nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
- if (pMaxObj!=NULL)
+ if (pMaxObj!=nullptr)
{
size_t nMaxOrd=pMaxObj->GetOrdNum(); // sadly doesn't work any other way
if (nMaxOrd>0)
@@ -304,7 +304,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
if (nNewPos<nNowPos)
nNewPos=nNowPos; // nor go into the other direction
}
- if (pRefObj!=NULL)
+ if (pRefObj!=nullptr)
{
if (pRefObj->GetObjList()==pObj->GetObjList())
{
@@ -341,7 +341,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
void SdrEditView::PutMarkedToBtm()
{
- PutMarkedBehindObj(NULL);
+ PutMarkedBehindObj(nullptr);
}
void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
@@ -355,7 +355,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
BegUndo(ImpGetResStr(STR_EditPutToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOBTM);
SortMarkedObjects();
- if (pRefObj!=NULL)
+ if (pRefObj!=nullptr)
{
// Make "behind the object" work, even if the
// selected objects are already behind the other object
@@ -377,7 +377,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
bool bChg=false;
- SdrObjList* pOL0=NULL;
+ SdrObjList* pOL0=nullptr;
size_t nNewPos=0;
for (size_t nm=0; nm<nAnz; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -390,12 +390,12 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
}
const size_t nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMinObj=GetMaxToBtmObj(pObj);
- if (pMinObj!=NULL) {
+ if (pMinObj!=nullptr) {
const size_t nMinOrd=pMinObj->GetOrdNum()+1; // sadly doesn't work any differently
if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
if (nNewPos>nNowPos) nNewPos=nNowPos; // nor go into the other direction
}
- if (pRefObj!=NULL) {
+ if (pRefObj!=nullptr) {
if (pRefObj->GetObjList()==pObj->GetObjList()) {
const size_t nMinOrd=pRefObj->GetOrdNum(); // sadly doesn't work any differently
if (nNewPos<nMinOrd) nNewPos=nMinOrd; // neither go faster...
@@ -488,19 +488,19 @@ void SdrEditView::ImpCheckToTopBtmPossible()
size_t nMin=0;
const size_t nObjNum=pObj->GetOrdNum();
SdrObject* pRestrict=GetMaxToTopObj(pObj);
- if (pRestrict!=NULL) {
+ if (pRestrict!=nullptr) {
const size_t nRestrict=pRestrict->GetOrdNum();
if (nRestrict<nMax) nMax=nRestrict;
}
pRestrict=GetMaxToBtmObj(pObj);
- if (pRestrict!=NULL) {
+ if (pRestrict!=nullptr) {
const size_t nRestrict=pRestrict->GetOrdNum();
if (nRestrict>nMin) nMin=nRestrict;
}
bToTopPossible=nObjNum<nMax-1;
bToBtmPossible=nObjNum>nMin;
} else { // multiple selection
- SdrObjList* pOL0=NULL;
+ SdrObjList* pOL0=nullptr;
size_t nPos0 = 0;
for (size_t nm = 0; !bToBtmPossible && nm<nAnz; ++nm) { // check 'send to background'
SdrObject* pObj=GetMarkedObjectByIndex(nm);
@@ -514,7 +514,7 @@ void SdrEditView::ImpCheckToTopBtmPossible()
nPos0 = nPos;
}
- pOL0=NULL;
+ pOL0=nullptr;
nPos0 = SAL_MAX_SIZE;
for (size_t nm=nAnz; !bToTopPossible && nm>0; ) { // check 'bring to front'
--nm;
@@ -537,9 +537,9 @@ void SdrEditView::ImpCheckToTopBtmPossible()
void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) const
{
- if (pSource!=NULL) {
+ if (pSource!=nullptr) {
SdrObjList* pOL=pSource->GetSubList();
- if (pOL!=NULL && !pSource->Is3DObj()) { // get first non-group object from group
+ if (pOL!=nullptr && !pSource->Is3DObj()) { // get first non-group object from group
SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
pSource=aIter.Next();
}
@@ -770,7 +770,7 @@ void SdrEditView::DistributeMarkedObjects()
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- std::unique_ptr<AbstractSvxDistributeDialog> pDlg(pFact->CreateSvxDistributeDialog(NULL, aNewAttr));
+ std::unique_ptr<AbstractSvxDistributeDialog> pDlg(pFact->CreateSvxDistributeDialog(nullptr, aNewAttr));
DBG_ASSERT(pDlg, "Dialog creation failed!");
sal_uInt16 nResult = pDlg->Execute();
@@ -1001,12 +1001,12 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
BegUndo();
size_t nInsPos = SAL_MAX_SIZE;
- const SdrObject* pAttrObj = NULL;
+ const SdrObject* pAttrObj = nullptr;
basegfx::B2DPolyPolygon aMergePolyPolygonA;
basegfx::B2DPolyPolygon aMergePolyPolygonB;
- SdrObjList* pInsOL = NULL;
- SdrPageView* pInsPV = NULL;
+ SdrObjList* pInsOL = nullptr;
+ SdrPageView* pInsPV = nullptr;
bool bFirstObjectComplete(false);
// make sure selected objects are contour objects
@@ -1266,14 +1266,14 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
// continue as before
basegfx::B2DPolyPolygon aPolyPolygon;
- SdrObjList* pAktOL = 0L;
+ SdrObjList* pAktOL = nullptr;
SdrMarkList aRemoveMerker;
SortMarkedObjects();
size_t nInsPos = SAL_MAX_SIZE;
- SdrObjList* pInsOL = 0L;
- SdrPageView* pInsPV = 0L;
- const SdrObject* pAttrObj = 0L;
+ SdrObjList* pInsOL = nullptr;
+ SdrPageView* pInsPV = nullptr;
+ const SdrObject* pAttrObj = nullptr;
for(size_t a = GetMarkedObjectCount(); a; )
{
@@ -1514,7 +1514,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
if(pSrcPath)
{
// #i74631# redesigned due to XpolyPolygon removal and explicit constructors
- SdrObject* pLast = 0; // to be able to apply OutlinerParaObject
+ SdrObject* pLast = nullptr; // to be able to apply OutlinerParaObject
const basegfx::B2DPolyPolygon& rPolyPolygon(pSrcPath->GetPathPoly());
const sal_uInt32 nPolyCount(rPolyPolygon.count());
@@ -1609,7 +1609,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
{
// #i37011# also create a text object and add at rPos + 1
SdrObject* pTextObj = SdrObjFactory::MakeNewObject(
- pCustomShape->GetObjInventor(), OBJ_TEXT, 0L, pCustomShape->GetModel());
+ pCustomShape->GetObjInventor(), OBJ_TEXT, nullptr, pCustomShape->GetModel());
// Copy text content
OutlinerParaObject* pParaObj = pCustomShape->GetOutlinerParaObject();
@@ -1670,7 +1670,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
BegUndo("", "", bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS);
}
- SdrObjList* pOL0=NULL;
+ SdrObjList* pOL0=nullptr;
for (size_t nm=GetMarkedObjectCount(); nm>0;) {
--nm;
SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -1683,7 +1683,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
const size_t nPos0=pObj->GetOrdNumDirect();
size_t nPos=nPos0+1;
SdrObjList* pSubList=pObj->GetSubList();
- if (pSubList!=NULL && !pObj->Is3DObj()) {
+ if (pSubList!=nullptr && !pObj->Is3DObj()) {
SdrObjListIter aIter(*pSubList,IM_DEEPNOGROUPS);
while (aIter.IsMore()) {
const SdrObject* pObj1=aIter.Next();
@@ -1748,8 +1748,8 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
// make sure OrdNums are correct
if (pSrcLst->IsObjOrdNumsDirty())
pSrcLst->RecalcObjOrdNums();
- SdrObject* pGrp=NULL;
- SdrObjList* pDstLst=NULL;
+ SdrObject* pGrp=nullptr;
+ SdrObjList* pDstLst=nullptr;
// if all selected objects come from foreign object lists.
// the group object is the last one in the list.
size_t nInsPos=pSrcLst->GetObjCount();
@@ -1760,14 +1760,14 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
SdrMark* pM=GetSdrMarkByIndex(nm);
if (pM->GetPageView()==pPV)
{
- if (pGrp==NULL)
+ if (pGrp==nullptr)
{
- if (pUserGrp!=NULL)
+ if (pUserGrp!=nullptr)
pGrp=pUserGrp->Clone();
- if (pGrp==NULL)
+ if (pGrp==nullptr)
pGrp=new SdrObjGroup;
pDstLst=pGrp->GetSubList();
- DBG_ASSERT(pDstLst!=NULL,"Alleged group object doesn't return object list.");
+ DBG_ASSERT(pDstLst!=nullptr,"Alleged group object doesn't return object list.");
}
SdrObject* pObj=pM->GetMarkedSdrObj();
pSrcLst=pObj->GetObjList();
@@ -1792,7 +1792,7 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
pSrcLst0=pSrcLst;
}
}
- if (pGrp!=NULL)
+ if (pGrp!=nullptr)
{
aNewMark.InsertEntry(SdrMark(pGrp,pPV));
const size_t nAnz=pDstLst->GetObjCount();
@@ -1837,7 +1837,7 @@ void SdrEditView::UnGroupMarked()
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pGrp=pM->GetMarkedSdrObj();
SdrObjList* pSrcLst=pGrp->GetSubList();
- if (pSrcLst!=NULL) {
+ if (pSrcLst!=nullptr) {
nCount++;
if (nCount==1) {
aName = pGrp->TakeObjNameSingul(); // retrieve name of group
@@ -1922,11 +1922,11 @@ void SdrEditView::UnGroupMarked()
SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLineToArea)
{
SdrObject* pNewObj = pObj->ConvertToPolyObj(bPath, bLineToArea);
- if (pNewObj!=NULL)
+ if (pNewObj!=nullptr)
{
SdrObjList* pOL=pObj->GetObjList();
- DBG_ASSERT(pOL!=NULL,"ConvertTo: Object doesn't return object list");
- if (pOL!=NULL)
+ DBG_ASSERT(pOL!=nullptr,"ConvertTo: Object doesn't return object list");
+ if (pOL!=nullptr)
{
const bool bUndo = IsUndoEnabled();
if( bUndo )
@@ -1982,7 +1982,7 @@ void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
}
} else {
SdrObject* pNewObj=ImpConvertOneObj(pObj,bPath,bLineToArea);
- if (pNewObj!=NULL) {
+ if (pNewObj!=nullptr) {
bMrkChg=true;
GetMarkedObjectListWriteAccess().ReplaceMark(SdrMark(pNewObj,pPV),nm);
}
@@ -2023,7 +2023,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
for (size_t nm=nAnz; nm>0;)
{ // create Undo objects for all new objects
// check for cancellation between the metafiles
- if( pProgrInfo != NULL )
+ if( pProgrInfo != nullptr )
{
pProgrInfo->SetNextObject();
if(!pProgrInfo->ReportActions(0))
@@ -2061,7 +2061,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
nInsAnz = aFilter.DoImport(aMetaFile, *pOL, nInsPos, pProgrInfo);
}
}
- if ( pOle2!=NULL && pOle2->GetGraphic() )
+ if ( pOle2!=nullptr && pOle2->GetGraphic() )
{
aLogicRect = pOle2->GetLogicRect();
ImpSdrGDIMetaFileImport aFilter(*mpModel, pObj->GetLayer(), aLogicRect);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index b676dc210d08..492906d1e4f7 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -70,17 +70,17 @@ void SdrObjEditView::ImpClearVars()
{
bQuickTextEditMode=true;
bMacroMode=true;
- pTextEditOutliner=NULL;
- pTextEditOutlinerView=NULL;
- pTextEditPV=NULL;
- pTextEditWin=NULL;
- pTextEditCursorMerker=NULL;
- pEditPara=NULL;
+ pTextEditOutliner=nullptr;
+ pTextEditOutlinerView=nullptr;
+ pTextEditPV=nullptr;
+ pTextEditWin=nullptr;
+ pTextEditCursorMerker=nullptr;
+ pEditPara=nullptr;
bTextEditNewObj=false;
bMacroDown=false;
- pMacroObj=NULL;
- pMacroPV=NULL;
- pMacroWin=NULL;
+ pMacroObj=nullptr;
+ pMacroPV=nullptr;
+ pMacroWin=nullptr;
nMacroTol=0;
bTextEditDontDelete=false;
bTextEditOnlyOneView=false;
@@ -88,14 +88,14 @@ void SdrObjEditView::ImpClearVars()
SdrObjEditView::SdrObjEditView(SdrModel* pModel1, OutputDevice* pOut):
SdrGlueEditView(pModel1,pOut),
- mpOldTextEditUndoManager(0)
+ mpOldTextEditUndoManager(nullptr)
{
ImpClearVars();
}
SdrObjEditView::~SdrObjEditView()
{
- pTextEditWin = NULL; // so there's no ShowCursor in SdrEndTextEdit
+ pTextEditWin = nullptr; // so there's no ShowCursor in SdrEndTextEdit
if (IsTextEdit())
SdrEndTextEdit();
delete pTextEditOutliner;
@@ -147,7 +147,7 @@ void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
SdrGlueEditView::Notify(rBC,rHint);
// change of printer while editing
const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
- if (pSdrHint!=NULL && pTextEditOutliner!=NULL) {
+ if (pSdrHint!=nullptr && pTextEditOutliner!=nullptr) {
SdrHintKind eKind=pSdrHint->GetKind();
if (eKind==HINT_REFDEVICECHG) {
pTextEditOutliner->SetRefDevice(mpModel->GetRefDevice());
@@ -171,7 +171,7 @@ void SdrObjEditView::ModelHasChanged()
// TextEditObj changed?
if (IsTextEdit()) {
SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( mxTextEditObj.get() );
- if (pTextObj!=NULL) {
+ if (pTextObj!=nullptr) {
sal_uIntPtr nOutlViewAnz=pTextEditOutliner->GetViewCount();
bool bAreaChg=false;
bool bAnchorChg=false;
@@ -233,7 +233,7 @@ void SdrObjEditView::ModelHasChanged()
bAreaChg=true;
}
}
- if (pTextEditOutlinerView!=NULL) { // check fill and anchor
+ if (pTextEditOutlinerView!=nullptr) { // check fill and anchor
EVAnchorMode eOldAnchor=pTextEditOutlinerView->GetAnchorMode();
eNewAnchor=(EVAnchorMode)pTextObj->GetOutlinerViewAnchorMode();
bAnchorChg=eOldAnchor!=eNewAnchor;
@@ -442,12 +442,12 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
// background
Color aBackground(GetTextEditBackgroundColor(*this));
SdrTextObj* pText = dynamic_cast< SdrTextObj * >( mxTextEditObj.get() );
- bool bTextFrame=pText!=NULL && pText->IsTextFrame();
- bool bContourFrame=pText!=NULL && pText->IsContourTextFrame();
+ bool bTextFrame=pText!=nullptr && pText->IsTextFrame();
+ bool bContourFrame=pText!=nullptr && pText->IsContourTextFrame();
// create OutlinerView
OutlinerView* pOutlView=pGivenView;
pTextEditOutliner->SetUpdateMode(false);
- if (pOutlView==NULL) pOutlView = new OutlinerView(pTextEditOutliner,pWin);
+ if (pOutlView==nullptr) pOutlView = new OutlinerView(pTextEditOutliner,pWin);
else pOutlView->SetWindow(pWin);
// disallow scrolling
EVControlBits nStat=pOutlView->GetControlWord();
@@ -463,7 +463,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
pOutlView->SetBackgroundColor( aBackground );
pOutlView->setTiledRendering(GetModel()->isTiledRendering());
pOutlView->registerLibreOfficeKitCallback(GetModel()->getLibreOfficeKitCallback(), GetModel()->getLibreOfficeKitData());
- if (pText!=NULL)
+ if (pText!=nullptr)
{
pOutlView->SetAnchorMode((EVAnchorMode)(pText->GetOutlinerViewAnchorMode()));
pTextEditOutliner->SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(pText->GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
@@ -529,7 +529,7 @@ void SdrObjEditView::ImpChainingEventHdl()
if (!pTxtUndo->IsDifferent())
{
delete pTxtUndo;
- pTxtUndo=NULL;
+ pTxtUndo=nullptr;
}
}
@@ -588,16 +588,16 @@ IMPL_LINK_TYPED(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI,v
OUString& rStr=pFI->GetRepresentation();
rStr.clear();
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( mxTextEditObj.get() );
- if (pTextObj!=NULL) {
- Color* pTxtCol=NULL;
- Color* pFldCol=NULL;
+ if (pTextObj!=nullptr) {
+ Color* pTxtCol=nullptr;
+ Color* pFldCol=nullptr;
bOk=pTextObj->CalcFieldValue(pFI->GetField(),pFI->GetPara(),pFI->GetPos(),true,pTxtCol,pFldCol,rStr);
if (bOk) {
- if (pTxtCol!=NULL) {
+ if (pTxtCol!=nullptr) {
pFI->SetTextColor(*pTxtCol);
delete pTxtCol;
}
- if (pFldCol!=NULL) {
+ if (pFldCol!=nullptr) {
pFI->SetFieldColor(*pFldCol);
delete pFldCol;
} else {
@@ -624,7 +624,7 @@ IMPL_LINK_NOARG_TYPED(SdrObjEditView, EndTextEditHdl, SdrUndoManager*, void)
SdrUndoManager* SdrObjEditView::getSdrUndoManagerForEnhancedTextEdit() const
{
// default returns registered UndoManager
- return GetModel() ? dynamic_cast< SdrUndoManager* >(GetModel()->GetSdrUndoManager()) : 0;
+ return GetModel() ? dynamic_cast< SdrUndoManager* >(GetModel()->GetSdrUndoManager()) : nullptr;
}
bool SdrObjEditView::SdrBeginTextEdit(
@@ -636,7 +636,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
{
SdrEndTextEdit();
- if( dynamic_cast< SdrTextObj* >( pObj ) == 0 )
+ if( dynamic_cast< SdrTextObj* >( pObj ) == nullptr )
return false; // currently only possible with text objects
if(bGrabFocus && pWin)
@@ -645,7 +645,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
pWin->GrabFocus(); // to force the cursor into the edit view
}
- bTextEditDontDelete=bDontDeleteOutliner && pGivenOutliner!=NULL;
+ bTextEditDontDelete=bDontDeleteOutliner && pGivenOutliner!=nullptr;
bTextEditOnlyOneView=bOnlyOneView;
bTextEditNewObj=bIsNewObj;
const sal_uInt32 nWinCount(PaintWindowCount());
@@ -701,7 +701,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
{
OSL_FAIL("SdrObjEditView::SdrBeginTextEdit(): Old Outliner still exists.");
delete pTextEditOutliner;
- pTextEditOutliner = 0L;
+ pTextEditOutliner = nullptr;
}
if(!bBrk)
@@ -710,7 +710,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
pTextEditPV=pPV;
mxTextEditObj.reset( pObj );
pTextEditOutliner=pGivenOutliner;
- if (pTextEditOutliner==NULL)
+ if (pTextEditOutliner==nullptr)
pTextEditOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *mxTextEditObj->GetModel() );
{
@@ -718,7 +718,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
pTextEditOutliner->ForceAutoColor( aOptions.GetIsAutomaticFontColor() );
}
- bool bEmpty = mxTextEditObj->GetOutlinerParaObject()==NULL;
+ bool bEmpty = mxTextEditObj->GetOutlinerParaObject()==nullptr;
aOldCalcFieldValueLink=pTextEditOutliner->GetCalcFieldValueHdl();
// FieldHdl has to be set by SdrBeginTextEdit, because this call an UpdateFields
@@ -745,14 +745,14 @@ bool SdrObjEditView::SdrBeginTextEdit(
if (pTextEditOutliner->GetViewCount()!=0)
{
OutlinerView* pTmpOLV=pTextEditOutliner->RemoveView(static_cast<size_t>(0));
- if(pTmpOLV!=NULL && pTmpOLV!=pGivenOutlinerView)
+ if(pTmpOLV!=nullptr && pTmpOLV!=pGivenOutlinerView)
delete pTmpOLV;
}
// Determine EditArea via TakeTextEditArea.
// TODO: This could theoretically be left out, because TakeTextRect() calculates the aTextEditArea,
// but aMinTextEditArea has to happen, too (therefore leaving this in right now)
- pTextObj->TakeTextEditArea(NULL,NULL,&aTextEditArea,&aMinTextEditArea);
+ pTextObj->TakeTextEditArea(nullptr,nullptr,&aTextEditArea,&aMinTextEditArea);
Rectangle aTextRect;
Rectangle aAnchorRect;
@@ -811,7 +811,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
if(&rOutDev != pWin && OUTDEV_WINDOW == rOutDev.GetOutDevType())
{
- OutlinerView* pOutlView = ImpMakeOutlinerView(static_cast<vcl::Window*>(&rOutDev), !bEmpty, 0L);
+ OutlinerView* pOutlView = ImpMakeOutlinerView(static_cast<vcl::Window*>(&rOutDev), !bEmpty, nullptr);
pTextEditOutliner->InsertView(pOutlView, (sal_uInt16)i);
}
}
@@ -840,7 +840,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
GetModel()->Broadcast(aHint);
}
- pTextEditOutliner->setVisualizedPage(0);
+ pTextEditOutliner->setVisualizedPage(nullptr);
if( mxSelectionController.is() )
mxSelectionController->onSelectionHasChanged();
@@ -859,7 +859,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
// should not happen, delete it since it was probably forgotten somewhere
OSL_ENSURE(false, "Deleting forgotten old TextEditUndoManager, should be checked (!)");
delete mpOldTextEditUndoManager;
- mpOldTextEditUndoManager = 0;
+ mpOldTextEditUndoManager = nullptr;
}
mpOldTextEditUndoManager = pTextEditOutliner->SetUndoManager(pSdrUndoManager);
@@ -880,35 +880,35 @@ bool SdrObjEditView::SdrBeginTextEdit(
pTextEditOutliner->SetEndPasteOrDropHdl(Link<PasteOrDropInfos*,void>());
}
}
- if (pTextEditOutliner != NULL)
+ if (pTextEditOutliner != nullptr)
{
- pTextEditOutliner->setVisualizedPage(0);
+ pTextEditOutliner->setVisualizedPage(nullptr);
}
// something went wrong...
if(!bDontDeleteOutliner)
{
- if(pGivenOutliner!=NULL)
+ if(pGivenOutliner!=nullptr)
{
delete pGivenOutliner;
- pTextEditOutliner = NULL;
+ pTextEditOutliner = nullptr;
}
- if(pGivenOutlinerView!=NULL)
+ if(pGivenOutlinerView!=nullptr)
{
delete pGivenOutlinerView;
- pGivenOutlinerView = NULL;
+ pGivenOutlinerView = nullptr;
}
}
- if( pTextEditOutliner!=NULL )
+ if( pTextEditOutliner!=nullptr )
{
delete pTextEditOutliner;
}
- pTextEditOutliner=NULL;
- pTextEditOutlinerView=NULL;
- mxTextEditObj.reset(0);
- pTextEditPV=NULL;
- pTextEditWin=NULL;
+ pTextEditOutliner=nullptr;
+ pTextEditOutlinerView=nullptr;
+ mxTextEditObj.reset(nullptr);
+ pTextEditPV=nullptr;
+ pTextEditWin=nullptr;
maHdlList.SetMoveOutside(false);
return false;
@@ -922,14 +922,14 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
SdrOutliner* pTEOutliner =pTextEditOutliner;
OutlinerView* pTEOutlinerView=pTextEditOutlinerView;
vcl::Cursor* pTECursorMerker=pTextEditCursorMerker;
- SdrUndoManager* pUndoEditUndoManager = 0;
+ SdrUndoManager* pUndoEditUndoManager = nullptr;
bool bNeedToUndoSavedRedoTextEdit(false);
if (GetModel() && IsUndoEnabled() && pTEObj && pTEOutliner && !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
// change back the UndoManager to the remembered original one
::svl::IUndoManager* pOriginal = pTEOutliner->SetUndoManager(mpOldTextEditUndoManager);
- mpOldTextEditUndoManager = 0;
+ mpOldTextEditUndoManager = nullptr;
if(pOriginal)
{
@@ -975,26 +975,26 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
GetModel()->Broadcast(aHint);
}
- mxTextEditObj.reset(0);
- pTextEditPV=NULL;
- pTextEditWin=NULL;
- pTextEditOutliner=NULL;
- pTextEditOutlinerView=NULL;
- pTextEditCursorMerker=NULL;
+ mxTextEditObj.reset(nullptr);
+ pTextEditPV=nullptr;
+ pTextEditWin=nullptr;
+ pTextEditOutliner=nullptr;
+ pTextEditOutlinerView=nullptr;
+ pTextEditCursorMerker=nullptr;
aTextEditArea=Rectangle();
- if (pTEOutliner!=NULL)
+ if (pTEOutliner!=nullptr)
{
bool bModified=pTEOutliner->IsModified();
- if (pTEOutlinerView!=NULL)
+ if (pTEOutlinerView!=nullptr)
{
pTEOutlinerView->HideCursor();
}
- if (pTEObj!=NULL)
+ if (pTEObj!=nullptr)
{
pTEOutliner->CompleteOnlineSpelling();
- SdrUndoObjSetText* pTxtUndo = 0;
+ SdrUndoObjSetText* pTxtUndo = nullptr;
if( bModified )
{
@@ -1026,20 +1026,20 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
pTEObj->ActionChanged();
}
- if (pTxtUndo!=NULL)
+ if (pTxtUndo!=nullptr)
{
pTxtUndo->AfterSetText();
if (!pTxtUndo->IsDifferent())
{
delete pTxtUndo;
- pTxtUndo=NULL;
+ pTxtUndo=nullptr;
}
}
// check deletion of entire TextObj
- SdrUndoAction* pDelUndo=NULL;
+ SdrUndoAction* pDelUndo=nullptr;
bool bDelObj=false;
SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( pTEObj );
- if (pTextObj!=NULL && bTextEditNewObj)
+ if (pTextObj!=nullptr && bTextEditNewObj)
{
bDelObj=pTextObj->IsTextFrame() &&
!pTextObj->HasText() &&
@@ -1056,13 +1056,13 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
}
}
}
- if (pTxtUndo!=NULL)
+ if (pTxtUndo!=nullptr)
{
if( bUndo )
AddUndo(pTxtUndo);
eRet=SDRENDTEXTEDIT_CHANGED;
}
- if (pDelUndo!=NULL)
+ if (pDelUndo!=nullptr)
{
if( bUndo )
{
@@ -1073,8 +1073,8 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
delete pDelUndo;
}
eRet=SDRENDTEXTEDIT_DELETED;
- DBG_ASSERT(pTEObj->GetObjList()!=NULL,"SdrObjEditView::SdrEndTextEdit(): Fatal: Object edited doesn't have an ObjList!");
- if (pTEObj->GetObjList()!=NULL)
+ DBG_ASSERT(pTEObj->GetObjList()!=nullptr,"SdrObjEditView::SdrEndTextEdit(): Fatal: Object edited doesn't have an ObjList!");
+ if (pTEObj->GetObjList()!=nullptr)
{
pTEObj->GetObjList()->RemoveObject(pTEObj->GetOrdNum());
CheckMarked(); // remove selection immediately...
@@ -1127,7 +1127,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
// and now the Outliner itself
if (!bTextEditDontDelete) delete pTEOutliner;
else pTEOutliner->Clear();
- if (pTEWin!=NULL) {
+ if (pTEWin!=nullptr) {
pTEWin->SetCursor(pTECursorMerker);
}
maHdlList.SetMoveOutside(false);
@@ -1189,11 +1189,11 @@ SdrPageView* SdrObjEditView::GetTextEditPageView() const
OutlinerView* SdrObjEditView::ImpFindOutlinerView(vcl::Window* pWin) const
{
- if (pWin==NULL) return NULL;
- if (pTextEditOutliner==NULL) return NULL;
- OutlinerView* pNewView=NULL;
+ if (pWin==nullptr) return nullptr;
+ if (pTextEditOutliner==nullptr) return nullptr;
+ OutlinerView* pNewView=nullptr;
sal_uIntPtr nWinCount=pTextEditOutliner->GetViewCount();
- for (sal_uIntPtr i=0; i<nWinCount && pNewView==NULL; i++) {
+ for (sal_uIntPtr i=0; i<nWinCount && pNewView==nullptr; i++) {
OutlinerView* pView=pTextEditOutliner->GetView(i);
if (pView->GetWindow()==pWin) pNewView=pView;
}
@@ -1202,12 +1202,12 @@ OutlinerView* SdrObjEditView::ImpFindOutlinerView(vcl::Window* pWin) const
void SdrObjEditView::SetTextEditWin(vcl::Window* pWin)
{
- if(mxTextEditObj.is() && pWin!=NULL && pWin!=pTextEditWin)
+ if(mxTextEditObj.is() && pWin!=nullptr && pWin!=pTextEditWin)
{
OutlinerView* pNewView=ImpFindOutlinerView(pWin);
- if (pNewView!=NULL && pNewView!=pTextEditOutlinerView)
+ if (pNewView!=nullptr && pNewView!=pTextEditOutlinerView)
{
- if (pTextEditOutlinerView!=NULL)
+ if (pTextEditOutlinerView!=nullptr)
{
pTextEditOutlinerView->HideCursor();
}
@@ -1227,7 +1227,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const
{
Rectangle aEditArea;
OutlinerView* pOLV=pTextEditOutliner->GetView(0);
- if (pOLV!=NULL)
+ if (pOLV!=nullptr)
{
aEditArea.Union(pOLV->GetOutputArea());
}
@@ -1256,7 +1256,7 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const
if( pOLV )
{
vcl::Window* pWin=pOLV->GetWindow();
- if (pText!=NULL && pText->IsTextFrame() && pOLV!=NULL && pWin!=NULL) {
+ if (pText!=nullptr && pText->IsTextFrame() && pOLV!=nullptr && pWin!=nullptr) {
sal_uInt16 nPixSiz=pOLV->GetInvalidateMore();
Rectangle aEditArea(aMinTextEditArea);
aEditArea.Union(pOLV->GetOutputArea());
@@ -1282,14 +1282,14 @@ TextChainCursorManager *SdrObjEditView::ImpHandleMotionThroughBoxesKeyInput(
*bOutHandled = false;
if (!mxTextEditObj.is())
- return NULL;
+ return nullptr;
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(mxTextEditObj.get());
if (!pTextObj)
- return NULL;
+ return nullptr;
if (!pTextObj->GetNextLinkInChain() && !pTextObj->GetPrevLinkInChain())
- return NULL;
+ return nullptr;
TextChainCursorManager *pCursorManager = new TextChainCursorManager(this, pTextObj);
if( pCursorManager->HandleKeyEvent(rKEvt) ) {
@@ -1327,7 +1327,7 @@ bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
ImpMoveCursorAfterChainingEvent(xCursorManager.get());
/* End chaining processing */
- if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
+ if (pWin!=nullptr && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
if (mpItemBrowser!=nullptr) mpItemBrowser->SetDirty();
#endif
@@ -1340,11 +1340,11 @@ bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
{
- if (pTextEditOutlinerView!=NULL) {
+ if (pTextEditOutlinerView!=nullptr) {
bool bPostIt=pTextEditOutliner->IsInSelectionMode();
if (!bPostIt) {
Point aPt(rMEvt.GetPosPixel());
- if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ if (pWin!=nullptr) aPt=pWin->PixelToLogic(aPt);
else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt);
}
@@ -1361,7 +1361,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
rMEvt.GetButtons(),rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseButtonDown(aMEvt)) {
- if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
+ if (pWin!=nullptr && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
if (mpItemBrowser!=nullptr) mpItemBrowser->SetDirty();
#endif
@@ -1375,11 +1375,11 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
{
- if (pTextEditOutlinerView!=NULL) {
+ if (pTextEditOutlinerView!=nullptr) {
bool bPostIt=pTextEditOutliner->IsInSelectionMode();
if (!bPostIt) {
Point aPt(rMEvt.GetPosPixel());
- if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ if (pWin!=nullptr) aPt=pWin->PixelToLogic(aPt);
else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt);
}
@@ -1406,7 +1406,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
{
- if (pTextEditOutlinerView!=NULL) {
+ if (pTextEditOutlinerView!=nullptr) {
bool bSelMode=pTextEditOutliner->IsInSelectionMode();
bool bPostIt=bSelMode;
if (!bPostIt) {
@@ -1445,13 +1445,13 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
{
// as long as OutlinerView returns a sal_Bool, it only gets CommandEventId::StartDrag
- if (pTextEditOutlinerView!=NULL)
+ if (pTextEditOutlinerView!=nullptr)
{
if (rCEvt.GetCommand()==CommandEventId::StartDrag) {
bool bPostIt=pTextEditOutliner->IsInSelectionMode() || !rCEvt.IsMouseEvent();
if (!bPostIt && rCEvt.IsMouseEvent()) {
Point aPt(rCEvt.GetMousePosPixel());
- if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ if (pWin!=nullptr) aPt=pWin->PixelToLogic(aPt);
else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt);
}
@@ -1467,7 +1467,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
CommandEvent aCEvt(aPixPos,rCEvt.GetCommand(),rCEvt.IsMouseEvent());
// Command is void at the OutlinerView, sadly
pTextEditOutlinerView->Command(aCEvt);
- if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
+ if (pWin!=nullptr && pWin!=pTextEditWin) SetTextEditWin(pWin);
#ifdef DBG_UTIL
if (mpItemBrowser!=nullptr) mpItemBrowser->SetDirty();
#endif
@@ -1489,7 +1489,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
bool SdrObjEditView::ImpIsTextEditAllSelected() const
{
bool bRet=false;
- if (pTextEditOutliner!=NULL && pTextEditOutlinerView!=NULL)
+ if (pTextEditOutliner!=nullptr && pTextEditOutlinerView!=nullptr)
{
if(SdrTextObj::HasTextImpl( pTextEditOutliner ) )
{
@@ -1521,7 +1521,7 @@ void SdrObjEditView::ImpMakeTextCursorAreaVisible()
{
if (pTextEditOutlinerView!=nullptr && pTextEditWin!=nullptr) {
vcl::Cursor* pCsr=pTextEditWin->GetCursor();
- if (pCsr!=NULL) {
+ if (pCsr!=nullptr) {
Size aSiz(pCsr->GetSize());
if (aSiz.Width()!=0 && aSiz.Height()!=0) {
MakeVisible(Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin);
@@ -1571,8 +1571,8 @@ bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
if(IsTextEdit())
{
- DBG_ASSERT(pTextEditOutlinerView!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
- DBG_ASSERT(pTextEditOutliner!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
+ DBG_ASSERT(pTextEditOutlinerView!=nullptr,"SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
+ DBG_ASSERT(pTextEditOutliner!=nullptr,"SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
// take care of bOnlyHardAttr(!)
if(!bOnlyHardAttr && mxTextEditObj->GetStyleSheet())
@@ -1607,7 +1607,7 @@ bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
bool bRet=false;
- bool bTextEdit=pTextEditOutlinerView!=NULL && mxTextEditObj.is();
+ bool bTextEdit=pTextEditOutlinerView!=nullptr && mxTextEditObj.is();
bool bAllTextSelected=ImpIsTextEditAllSelected();
const SfxItemSet* pSet=&rSet;
@@ -1629,7 +1629,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
bool bHasEEFeatureItems=false;
SfxItemIter aIter(rSet);
const SfxPoolItem* pItem=aIter.FirstItem();
- while (!bHasEEFeatureItems && pItem!=NULL)
+ while (!bHasEEFeatureItems && pItem!=nullptr)
{
if (!IsInvalidItem(pItem))
{
@@ -1750,7 +1750,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
SfxStyleSheet* SdrObjEditView::GetStyleSheet() const
{
- SfxStyleSheet* pSheet = 0;
+ SfxStyleSheet* pSheet = nullptr;
if( mxSelectionController.is() )
{
@@ -1779,7 +1779,7 @@ bool SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveH
// if we are currently in edit mode we must also set the stylesheet
// on all paragraphs in the Outliner for the edit view
- if( NULL != pTextEditOutlinerView )
+ if( nullptr != pTextEditOutlinerView )
{
Outliner* pOutliner = pTextEditOutlinerView->GetOutliner();
@@ -1801,7 +1801,7 @@ void SdrObjEditView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window *pW
if(mxTextEditObj.is() && !bTextEditOnlyOneView && pNewWin->GetOutDevType()==OUTDEV_WINDOW)
{
- OutlinerView* pOutlView=ImpMakeOutlinerView(static_cast<vcl::Window*>(pNewWin),false,NULL);
+ OutlinerView* pOutlView=ImpMakeOutlinerView(static_cast<vcl::Window*>(pNewWin),false,nullptr);
pTextEditOutliner->InsertView(pOutlView);
}
}
@@ -1824,7 +1824,7 @@ void SdrObjEditView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
bool SdrObjEditView::IsTextEditInSelectionMode() const
{
- return pTextEditOutliner!=NULL && pTextEditOutliner->IsInSelectionMode();
+ return pTextEditOutliner!=nullptr && pTextEditOutliner->IsInSelectionMode();
}
@@ -1834,8 +1834,8 @@ bool SdrObjEditView::IsTextEditInSelectionMode() const
bool SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin)
{
BrkMacroObj();
- if (pObj!=NULL && pPV!=NULL && pWin!=NULL && pObj->HasMacro()) {
- nTol=ImpGetHitTolLogic(nTol,NULL);
+ if (pObj!=nullptr && pPV!=nullptr && pWin!=nullptr && pObj->HasMacro()) {
+ nTol=ImpGetHitTolLogic(nTol,nullptr);
pMacroObj=pObj;
pMacroPV=pPV;
pMacroWin=pWin;
@@ -1849,7 +1849,7 @@ bool SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj,
void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
{
- if (pMacroObj!=NULL && bMacroDown)
+ if (pMacroObj!=nullptr && bMacroDown)
{
SdrObjMacroHitRec aHitRec;
aHitRec.aPos=rUpPos;
@@ -1865,7 +1865,7 @@ void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
{
- if (pMacroObj!=NULL && !bMacroDown)
+ if (pMacroObj!=nullptr && !bMacroDown)
{
SdrObjMacroHitRec aHitRec;
aHitRec.aPos=rDownPos;
@@ -1882,7 +1882,7 @@ void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
void SdrObjEditView::MovMacroObj(const Point& rPnt)
{
- if (pMacroObj!=NULL) {
+ if (pMacroObj!=nullptr) {
SdrObjMacroHitRec aHitRec;
aHitRec.aPos=rPnt;
aHitRec.aDownPos=aMacroDownPos;
@@ -1899,17 +1899,17 @@ void SdrObjEditView::MovMacroObj(const Point& rPnt)
void SdrObjEditView::BrkMacroObj()
{
- if (pMacroObj!=NULL) {
+ if (pMacroObj!=nullptr) {
ImpMacroUp(aMacroDownPos);
- pMacroObj=NULL;
- pMacroPV=NULL;
- pMacroWin=NULL;
+ pMacroObj=nullptr;
+ pMacroPV=nullptr;
+ pMacroWin=nullptr;
}
}
bool SdrObjEditView::EndMacroObj()
{
- if (pMacroObj!=NULL && bMacroDown) {
+ if (pMacroObj!=nullptr && bMacroDown) {
ImpMacroUp(aMacroDownPos);
SdrObjMacroHitRec aHitRec;
aHitRec.aPos=aMacroDownPos;
@@ -1920,9 +1920,9 @@ bool SdrObjEditView::EndMacroObj()
aHitRec.bDown=true;
aHitRec.pOut=pMacroWin.get();
bool bRet=pMacroObj->DoMacro(aHitRec);
- pMacroObj=NULL;
- pMacroPV=NULL;
- pMacroWin=NULL;
+ pMacroObj=nullptr;
+ pMacroPV=nullptr;
+ pMacroWin=nullptr;
return bRet;
} else {
BrkMacroObj();
@@ -2018,8 +2018,8 @@ sal_uInt16 SdrObjEditView::GetSelectionLevel() const
sal_uInt16 nLevel = 0xFFFF;
if( IsTextEdit() )
{
- DBG_ASSERT(pTextEditOutlinerView!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
- DBG_ASSERT(pTextEditOutliner!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
+ DBG_ASSERT(pTextEditOutlinerView!=nullptr,"SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
+ DBG_ASSERT(pTextEditOutliner!=nullptr,"SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
if( pTextEditOutlinerView )
{
//start and end position
@@ -2120,7 +2120,7 @@ bool SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rForma
{
OutlinerView* pOLV = GetTextEditOutlinerView();
- rFormatSet.reset( new SfxItemSet( GetModel()->GetItemPool(), GetFormatRangeImpl( pOLV != NULL ) ) );
+ rFormatSet.reset( new SfxItemSet( GetModel()->GetItemPool(), GetFormatRangeImpl( pOLV != nullptr ) ) );
if( pOLV )
{
rFormatSet->Put( pOLV->GetAttribs() );
@@ -2167,7 +2167,7 @@ static SfxItemSet CreatePaintSet( const sal_uInt16 *pRanges, SfxItemPool& rPool,
void SdrObjEditView::ApplyFormatPaintBrushToText( SfxItemSet& rFormatSet, SdrTextObj& rTextObj, SdrText* pText, bool bNoCharacterFormats, bool bNoParagraphFormats )
{
- OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : 0;
+ OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
if(pParaObj)
{
SdrOutliner& rOutliner = rTextObj.ImpGetDrawOutliner();
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 3227bf331889..9efc087bfef5 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -69,11 +69,11 @@ using namespace ::com::sun::star;
// Global data of the DrawingEngine
SdrGlobalData::SdrGlobalData() :
- pSysLocale(NULL),
- pLocaleData(NULL),
- pOutliner(NULL),
- pDefaults(NULL),
- pResMgr(NULL),
+ pSysLocale(nullptr),
+ pLocaleData(nullptr),
+ pOutliner(nullptr),
+ pDefaults(nullptr),
+ pResMgr(nullptr),
nExchangeFormat(0)
{
if (!utl::ConfigManager::IsAvoidConfig())
@@ -409,7 +409,7 @@ SdrEngineDefaults::SdrEngineDefaults():
SdrEngineDefaults& SdrEngineDefaults::GetDefaults()
{
SdrGlobalData& rGlobalData=GetSdrGlobalData();
- if (rGlobalData.pDefaults==NULL) {
+ if (rGlobalData.pDefaults==nullptr) {
rGlobalData.pDefaults=new SdrEngineDefaults;
}
return *rGlobalData.pDefaults;
@@ -471,7 +471,7 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* pbOnl
{
bool bHas=false;
bool bOnly=true;
- bool bLookOnly=pbOnlyEE!=NULL;
+ bool bLookOnly=pbOnlyEE!=nullptr;
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich=aIter.FirstWhich();
while (((bLookOnly && bOnly) || !bHas) && nWhich!=0) {
@@ -486,7 +486,7 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* pbOnl
nWhich=aIter.NextWhich();
}
if (!bHas) bOnly=false;
- if (pbOnlyEE!=NULL) *pbOnlyEE=bOnly;
+ if (pbOnlyEE!=nullptr) *pbOnlyEE=bOnly;
return bHas;
}
@@ -584,7 +584,7 @@ bool SvdProgressInfo::ReportActions( sal_uIntPtr nAnzActions )
if(nCurAction > nActionCount)
nCurAction = nActionCount;
- return maLink.Call(NULL);
+ return maLink.Call(nullptr);
}
bool SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts )
@@ -592,13 +592,13 @@ bool SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts )
nSumCurAction += nAnzInserts;
nCurInsert += nAnzInserts;
- return maLink.Call(NULL);
+ return maLink.Call(nullptr);
}
bool SvdProgressInfo::ReportRescales( sal_uIntPtr nAnzRescales )
{
nSumCurAction += nAnzRescales;
- return maLink.Call(NULL);
+ return maLink.Call(nullptr);
}
void SvdProgressInfo::SetActionCount( sal_uIntPtr _nActionCount )
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 394cc3781829..04d97c7c59a5 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -81,9 +81,9 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(
mpVD(VclPtr<VirtualDevice>::Create()),
maScaleRect(rRect),
mnMapScalingOfs(0),
- mpLineAttr(0),
- mpFillAttr(0),
- mpTextAttr(0),
+ mpLineAttr(nullptr),
+ mpFillAttr(nullptr),
+ mpTextAttr(nullptr),
mpModel(&rModel),
mnLayer(nLay),
maOldLineColor(),
@@ -782,7 +782,7 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc
// #i73407# reformulation to use new B2DPolygon classes
if(mbLastObjWasLine && (maOldLineColor == mpVD->GetLineColor()) && rSrcPoly.count())
{
- SdrObject* pTmpObj = maTmpList.size() ? maTmpList[maTmpList.size() - 1] : 0;
+ SdrObject* pTmpObj = maTmpList.size() ? maTmpList[maTmpList.size() - 1] : nullptr;
SdrPathObj* pLastPoly = dynamic_cast< SdrPathObj* >(pTmpObj);
if(pLastPoly)
@@ -848,14 +848,14 @@ bool ImpSdrGDIMetaFileImport::CheckLastPolyLineAndFillMerge(const basegfx::B2DPo
// #i73407# reformulation to use new B2DPolygon classes
if(mbLastObjWasPolyWithoutLine)
{
- SdrObject* pTmpObj = maTmpList.size() ? maTmpList[maTmpList.size() - 1] : 0;
+ SdrObject* pTmpObj = maTmpList.size() ? maTmpList[maTmpList.size() - 1] : nullptr;
SdrPathObj* pLastPoly = dynamic_cast< SdrPathObj* >(pTmpObj);
if(pLastPoly)
{
if(pLastPoly->GetPathPoly() == rPolyPolygon)
{
- SetAttributes(NULL);
+ SetAttributes(nullptr);
if(!mbNoLine && mbNoFill)
{
@@ -1278,7 +1278,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaTextRectAction& rAct)
GDIMetaFile aTemp;
mpVD->AddTextRectActions(rAct.GetRect(), rAct.GetText(), rAct.GetStyle(), aTemp);
- DoLoopActions(aTemp, 0, 0);
+ DoLoopActions(aTemp, nullptr, nullptr);
}
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct)
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index f06003b3a252..a14bda004bc3 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -168,7 +168,7 @@ public:
const GDIMetaFile& rMtf,
SdrObjList& rDestList,
size_t nInsPos = SAL_MAX_SIZE,
- SvdProgressInfo* pProgrInfo = 0);
+ SvdProgressInfo* pProgrInfo = nullptr);
};
#endif // INCLUDED_SVX_SOURCE_SVDRAW_SVDFMTF_HXX
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index cf771b170727..3b603b332ce3 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -49,16 +49,16 @@ void SdrGlueEditView::ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, co
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size();
+ sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0) {
- SdrGluePointList* pGPL=NULL;
+ SdrGluePointList* pGPL=nullptr;
if (bConst) {
const SdrGluePointList* pConstGPL=pObj->GetGluePointList();
pGPL=const_cast<SdrGluePointList*>(pConstGPL);
} else {
pGPL=pObj->ForceGluePointList();
}
- if (pGPL!=NULL)
+ if (pGPL!=nullptr)
{
if(!bConst && IsUndoEnabled() )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
@@ -235,11 +235,11 @@ void SdrGlueEditView::DeleteMarkedGluePoints()
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size();
+ sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0)
{
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- if (pGPL!=NULL)
+ if (pGPL!=nullptr)
{
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
@@ -281,8 +281,8 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints()
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrUShortCont* pPts=pM->GetMarkedGluePoints();
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size();
- if (nPointCount!=0 && pGPL!=NULL)
+ sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
+ if (nPointCount!=0 && pGPL!=nullptr)
{
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
@@ -324,10 +324,10 @@ void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const vo
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size();
+ sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
if (nPointCount!=0) {
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- if (pGPL!=NULL)
+ if (pGPL!=nullptr)
{
if( IsUndoEnabled() )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 31cb7cd797dd..4ec986e7f336 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -187,7 +187,7 @@ SdrEscapeDirection SdrGluePoint::EscAngleToDir(long nAngle)
void SdrGluePoint::Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj)
{
- Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
RotatePoint(aPt,rRef,sn,cs);
// rotate reference edge
if(nAlign != (SdrAlign::HORZ_CENTER|SdrAlign::VERT_CENTER))
@@ -202,12 +202,12 @@ void SdrGluePoint::Rotate(const Point& rRef, long nAngle, double sn, double cs,
if (nEscDir0&SdrEscapeDirection::RIGHT ) nEscDir1 |= EscAngleToDir(EscDirToAngle(SdrEscapeDirection::RIGHT )+nAngle);
if (nEscDir0&SdrEscapeDirection::BOTTOM) nEscDir1 |= EscAngleToDir(EscDirToAngle(SdrEscapeDirection::BOTTOM)+nAngle);
nEscDir=nEscDir1;
- if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
+ if (pObj!=nullptr) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
}
void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj)
{
- Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
MirrorPoint(aPt,rRef1,rRef2);
// mirror reference edge
if(nAlign != (SdrAlign::HORZ_CENTER|SdrAlign::VERT_CENTER))
@@ -240,20 +240,20 @@ void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nAngle, c
nEscDir1|=EscAngleToDir(nEW);
}
nEscDir=nEscDir1;
- if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
+ if (pObj!=nullptr) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
}
void SdrGluePoint::Shear(const Point& rRef, long /*nAngle*/, double tn, bool bVShear, const SdrObject* pObj)
{
- Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
ShearPoint(aPt,rRef,tn,bVShear);
- if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
+ if (pObj!=nullptr) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
}
void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const
{
bool bMapMerk=rWin.IsMapModeEnabled();
- Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
aPt=rWin.LogicToPixel(aPt);
rWin.EnableMapMode(false);
@@ -269,7 +269,7 @@ void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const
bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const
{
- Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
Size aSiz=rOut.PixelToLogic(aGlueHalfSize);
Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
return aRect.IsInside(rPnt);
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 84a53dce82f0..10db049cecbb 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -270,9 +270,9 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
SdrHdl::SdrHdl():
- pObj(NULL),
- pPV(NULL),
- pHdlList(NULL),
+ pObj(nullptr),
+ pPV(nullptr),
+ pHdlList(nullptr),
eKind(HDL_MOVE),
nRotationAngle(0),
nObjHdlNum(0),
@@ -288,9 +288,9 @@ SdrHdl::SdrHdl():
}
SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind):
- pObj(NULL),
- pPV(NULL),
- pHdlList(NULL),
+ pObj(nullptr),
+ pPV(nullptr),
+ pHdlList(nullptr),
aPos(rPnt),
eKind(eNewKind),
nRotationAngle(0),
@@ -577,7 +577,7 @@ void SdrHdl::CreateB2dIAObject()
if (xManager.is())
{
basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
- sdr::overlay::OverlayObject* pNewOverlayObject = NULL;
+ sdr::overlay::OverlayObject* pNewOverlayObject = nullptr;
if (getenv ("SVX_DRAW_HANDLES") && (eKindOfMarker == Rect_7x7 || eKindOfMarker == Rect_9x9 || eKindOfMarker == Rect_11x11))
{
double fSize = 7.0;
@@ -684,7 +684,7 @@ sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject(
const basegfx::B2DPoint& rPos,
BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker, OutputDevice& rOutDev, Point aMoveOutsideOffset)
{
- sdr::overlay::OverlayObject* pRetval = 0L;
+ sdr::overlay::OverlayObject* pRetval = nullptr;
// support bigger sizes
bool bForceBiggerSize(false);
@@ -857,9 +857,9 @@ Pointer SdrHdl::GetPointer() const
{
PointerStyle ePtr=PointerStyle::Move;
const bool bSize=eKind>=HDL_UPLFT && eKind<=HDL_LWRGT;
- const bool bRot=pHdlList!=NULL && pHdlList->IsRotateShear();
- const bool bDis=pHdlList!=NULL && pHdlList->IsDistortShear();
- if (bSize && pHdlList!=NULL && (bRot || bDis)) {
+ const bool bRot=pHdlList!=nullptr && pHdlList->IsRotateShear();
+ const bool bDis=pHdlList!=nullptr && pHdlList->IsDistortShear();
+ if (bSize && pHdlList!=nullptr && (bRot || bDis)) {
switch (eKind) {
case HDL_UPLFT: case HDL_UPRGT:
case HDL_LWLFT: case HDL_LWRGT: ePtr=bRot ? PointerStyle::Rotate : PointerStyle::RefHand; break;
@@ -1127,8 +1127,8 @@ void SdrHdlColor::SetSize(const Size& rNew)
SdrHdlGradient::SdrHdlGradient(const Point& rRef1, const Point& rRef2, bool bGrad)
: SdrHdl(rRef1, bGrad ? HDL_GRAD : HDL_TRNS)
- , pColHdl1(NULL)
- , pColHdl2(NULL)
+ , pColHdl1(nullptr)
+ , pColHdl2(nullptr)
, a2ndPos(rRef2)
, bGradient(bGrad)
, bMoveSingleHandle(false)
@@ -1490,7 +1490,7 @@ void ImpEdgeHdl::CreateB2dIAObject()
{
const SdrEdgeObj* pEdge = static_cast<SdrEdgeObj*>(pObj);
- if(pEdge->GetConnectedNode(nObjHdlNum == 0) != NULL)
+ if(pEdge->GetConnectedNode(nObjHdlNum == 0) != nullptr)
eColIndex = LightRed;
if(nPPntNum < 2)
@@ -1555,7 +1555,7 @@ void ImpEdgeHdl::SetLineCode(SdrEdgeLineCode eCode)
Pointer ImpEdgeHdl::GetPointer() const
{
SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pObj );
- if (pEdge==NULL)
+ if (pEdge==nullptr)
return SdrHdl::GetPointer();
if (nObjHdlNum<=1)
return Pointer(PointerStyle::MovePoint);
@@ -1568,7 +1568,7 @@ Pointer ImpEdgeHdl::GetPointer() const
bool ImpEdgeHdl::IsHorzDrag() const
{
SdrEdgeObj* pEdge=dynamic_cast<SdrEdgeObj*>( pObj );
- if (pEdge==NULL)
+ if (pEdge==nullptr)
return false;
if (nObjHdlNum<=1)
return false;
@@ -2006,7 +2006,7 @@ SdrHdl* SdrHdlList::GetFocusHdl() const
if(mnFocusIndex < GetHdlCount())
return GetHdl(mnFocusIndex);
else
- return 0L;
+ return nullptr;
}
void SdrHdlList::SetFocusHdl(SdrHdl* pNew)
@@ -2173,7 +2173,7 @@ void SdrHdlList::Sort()
size_t SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
{
- if (pHdl==NULL)
+ if (pHdl==nullptr)
return SAL_MAX_SIZE;
std::deque<SdrHdl*>::const_iterator it = std::find( aList.begin(), aList.end(), pHdl);
if( it == aList.end() )
@@ -2183,7 +2183,7 @@ size_t SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
void SdrHdlList::AddHdl(SdrHdl* pHdl, bool bAtBegin)
{
- if (pHdl!=NULL)
+ if (pHdl!=nullptr)
{
if (bAtBegin)
{
@@ -2199,10 +2199,10 @@ void SdrHdlList::AddHdl(SdrHdl* pHdl, bool bAtBegin)
SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, bool bBack, bool bNext, SdrHdl* pHdl0) const
{
- SdrHdl* pRet=NULL;
+ SdrHdl* pRet=nullptr;
const size_t nCount=GetHdlCount();
size_t nNum=bBack ? 0 : nCount;
- while ((bBack ? nNum<nCount : nNum>0) && pRet==NULL)
+ while ((bBack ? nNum<nCount : nNum>0) && pRet==nullptr)
{
if (!bBack)
nNum--;
@@ -2225,8 +2225,8 @@ SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, bool bBack, bool bNext, SdrH
SdrHdl* SdrHdlList::GetHdl(SdrHdlKind eKind1) const
{
- SdrHdl* pRet=NULL;
- for (size_t i=0; i<GetHdlCount() && pRet==NULL; ++i)
+ SdrHdl* pRet=nullptr;
+ for (size_t i=0; i<GetHdlCount() && pRet==nullptr; ++i)
{
SdrHdl* pHdl=GetHdl(i);
if (pHdl->GetKind()==eKind1)
@@ -2250,8 +2250,8 @@ SdrCropHdl::SdrCropHdl(
BitmapEx SdrCropHdl::GetHandlesBitmap()
{
- static BitmapEx* pModernBitmap = 0;
- if( pModernBitmap == 0 )
+ static BitmapEx* pModernBitmap = nullptr;
+ if( pModernBitmap == nullptr )
pModernBitmap = new BitmapEx(ResId(SIP_SA_CROP_MARKERS, *ImpGetResMgr()));
return *pModernBitmap;
}
@@ -2305,8 +2305,8 @@ void SdrCropHdl::CreateB2dIAObject()
// first throw away old one
GetRidOfIAObject();
- SdrMarkView* pView = pHdlList ? pHdlList->GetView() : 0;
- SdrPageView* pPageView = pView ? pView->GetSdrPageView() : 0;
+ SdrMarkView* pView = pHdlList ? pHdlList->GetView() : nullptr;
+ SdrPageView* pPageView = pView ? pView->GetSdrPageView() : nullptr;
if( pPageView && !pView->areMarkHandlesHidden() )
{
@@ -2327,7 +2327,7 @@ void SdrCropHdl::CreateB2dIAObject()
{
basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
- sdr::overlay::OverlayObject* pOverlayObject = 0L;
+ sdr::overlay::OverlayObject* pOverlayObject = nullptr;
// animate focused handles
if(IsFocusHdl() && (pHdlList->GetFocusHdl() == this))
@@ -2420,8 +2420,8 @@ void translateRotationToMirroring(basegfx::B2DVector & scale, double * rotate) {
void SdrCropViewHdl::CreateB2dIAObject()
{
GetRidOfIAObject();
- SdrMarkView* pView = pHdlList ? pHdlList->GetView() : 0;
- SdrPageView* pPageView = pView ? pView->GetSdrPageView() : 0;
+ SdrMarkView* pView = pHdlList ? pHdlList->GetView() : nullptr;
+ SdrPageView* pPageView = pView ? pView->GetSdrPageView() : nullptr;
if(!pPageView || pView->areMarkHandlesHidden())
{
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 90e9e38da989..ecd92f45b54b 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -100,7 +100,7 @@ public:
ImpItemListRow()
: eState(SfxItemState::UNKNOWN),
nWhichId(0),
- pType(NULL),
+ pType(nullptr),
eItemType(ITEM_DONTKNOW),
nVal(0),
nMin(0),
@@ -231,8 +231,8 @@ void _SdrItemBrowserControl::dispose()
void _SdrItemBrowserControl::ImpCtor()
{
- pEditControl = NULL;
- pAktChangeEntry = NULL;
+ pEditControl = nullptr;
+ pAktChangeEntry = nullptr;
nLastWhichOfs = 0;
nLastWhich = 0;
nLastWhichOben = 0; // not implemented yet
@@ -496,7 +496,7 @@ bool _SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
BreakChangeEntry();
bool bRet = false;
ImpItemListRow* pEntry=ImpGetEntry(nPos);
- if (pEntry!=NULL && !pEntry->bComment) {
+ if (pEntry!=nullptr && !pEntry->bComment) {
SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT));
pEditControl=VclPtr<ImpItemEdit>::Create(&GetDataWindow(),this,0);
Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false));
@@ -545,7 +545,7 @@ void _SdrItemBrowserControl::BreakChangeEntry()
if (pEditControl!=nullptr) {
pEditControl.disposeAndClear();
delete pAktChangeEntry;
- pAktChangeEntry=NULL;
+ pAktChangeEntry=nullptr;
vcl::Window* pParent=GetParent();
pParent->SetText(aWNamMerk);
SetMode(MYBROWSEMODE);
@@ -589,14 +589,14 @@ bool ImpGetItem(const SfxItemSet& rSet, sal_uInt16 nWhich, const SfxPoolItem*& r
if (eState==SfxItemState::DEFAULT) {
rpItem=&rSet.Get(nWhich);
}
- return (eState==SfxItemState::DEFAULT || eState==SfxItemState::SET) && rpItem!=NULL;
+ return (eState==SfxItemState::DEFAULT || eState==SfxItemState::SET) && rpItem!=nullptr;
}
bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rIndent)
{
rIndent=0;
- if (pSet==NULL) return false;
- const SfxPoolItem* pItem=NULL;
+ if (pSet==nullptr) return false;
+ const SfxPoolItem* pItem=nullptr;
bool bRet = false;
switch (nWhich) {
case XATTR_LINEDASH :
@@ -905,7 +905,7 @@ sal_uInt16 ImpSortWhich(sal_uInt16 nWhich)
void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet)
{
SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT));
- if (pSet!=NULL) {
+ if (pSet!=nullptr) {
sal_uInt16 nEntryNum=0;
SfxWhichIter aIter(*pSet);
const SfxItemPool* pPool=pSet->GetPool();
@@ -917,7 +917,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
// at this position in the Set.
if (!bDontSortItems) nWhich=ImpSortWhich(nWhich);
SfxItemState eState=pSet->GetItemState(nWhich);
- if (p2ndSet!=NULL) {
+ if (p2ndSet!=nullptr) {
SfxItemState e2ndState=p2ndSet->GetItemState(nWhich);
if (eState==SfxItemState::DEFAULT) eState=SfxItemState::DISABLED;
else if (e2ndState==SfxItemState::DEFAULT) eState=SfxItemState::DEFAULT;
@@ -1098,13 +1098,13 @@ vcl::Window* SdrItemBrowser::ImpGetViewWin(SdrView& rView)
}
}
- return 0L;
+ return nullptr;
}
void SdrItemBrowser::ForceParent()
{
vcl::Window* pWin=ImpGetViewWin(*pView);
- if (pWin!=NULL) SetParent(pWin);
+ if (pWin!=nullptr) SetParent(pWin);
}
void SdrItemBrowser::SetDirty()
@@ -1145,7 +1145,7 @@ IMPL_LINK_NOARG_TYPED(SdrItemBrowser, IdleHdl, Idle *, void)
IMPL_LINK_TYPED(SdrItemBrowser, ChangedHdl, _SdrItemBrowserControl&, rBrowse, void)
{
const ImpItemListRow* pEntry = rBrowse.GetAktChangeEntry();
- if (pEntry!=NULL)
+ if (pEntry!=nullptr)
{
SfxItemSet aSet(pView->GetModel()->GetItemPool());
pView->GetAttributes(aSet);
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index c2c92ea9d9e1..e26465dcc13c 100644
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -65,7 +65,7 @@ void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMod
{
SdrObject* pObj = bUseZOrder ?
rObjList.GetObj( nIdx ) : rObjList.GetObjectForNavigationPosition( nIdx );
- OSL_ASSERT( pObj != 0 );
+ OSL_ASSERT( pObj != nullptr );
if( pObj )
ImpProcessObj( pObj, eMode, bUseZOrder );
}
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index 53bddf9c4e8a..644b44958dbe 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -101,7 +101,7 @@ void SetOfByte::QueryValue( css::uno::Any & rAny ) const
}
SdrLayer::SdrLayer(SdrLayerID nNewID, const OUString& rNewName) :
- maName(rNewName), pModel(NULL), nType(0), nID(nNewID)
+ maName(rNewName), pModel(nullptr), nType(0), nID(nNewID)
{
}
@@ -111,7 +111,7 @@ void SdrLayer::SetStandardLayer(bool bStd)
if (bStd) {
maName = ImpGetResStr(STR_StandardLayerName);
}
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
SdrHint aHint(HINT_LAYERCHG);
pModel->Broadcast(aHint);
pModel->SetChanged();
@@ -144,15 +144,15 @@ bool SdrLayer::operator==(const SdrLayer& rCmpLayer) const
SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent):
aLayer(),
pParent(pNewParent),
- pModel(NULL),
+ pModel(nullptr),
maControlLayerName("Controls")
{
}
SdrLayerAdmin::SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin):
aLayer(),
- pParent(NULL),
- pModel(NULL),
+ pParent(nullptr),
+ pModel(nullptr),
maControlLayerName("Controls")
{
*this = rSrcLayerAdmin;
@@ -211,7 +211,7 @@ void SdrLayerAdmin::SetModel(SdrModel* pNewModel)
void SdrLayerAdmin::Broadcast() const
{
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
SdrHint aHint(HINT_LAYERORDERCHG);
pModel->Broadcast(aHint);
pModel->SetChanged();
@@ -256,7 +256,7 @@ SdrLayer* SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos)
sal_uInt16 SdrLayerAdmin::GetLayerPos(SdrLayer* pLayer) const
{
sal_uIntPtr nRet=SDRLAYER_NOTFOUND;
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
std::vector<SdrLayer*>::const_iterator it = std::find(aLayer.begin(), aLayer.end(), pLayer);
if (it==aLayer.end()) {
nRet=SDRLAYER_NOTFOUND;
@@ -275,7 +275,7 @@ SdrLayer* SdrLayerAdmin::GetLayer(const OUString& rName, bool bInherited)
const SdrLayer* SdrLayerAdmin::GetLayer(const OUString& rName, bool /*bInherited*/) const
{
sal_uInt16 i(0);
- const SdrLayer* pLay = NULL;
+ const SdrLayer* pLay = nullptr;
while(i < GetLayerCount() && !pLay)
{
@@ -297,15 +297,15 @@ SdrLayerID SdrLayerAdmin::GetLayerID(const OUString& rName, bool bInherited) con
{
SdrLayerID nRet=SDRLAYER_NOTFOUND;
const SdrLayer* pLay=GetLayer(rName,bInherited);
- if (pLay!=NULL) nRet=pLay->GetID();
+ if (pLay!=nullptr) nRet=pLay->GetID();
return nRet;
}
const SdrLayer* SdrLayerAdmin::GetLayerPerID(sal_uInt16 nID) const
{
sal_uInt16 i=0;
- const SdrLayer* pLay=NULL;
- while (i<GetLayerCount() && pLay==NULL) {
+ const SdrLayer* pLay=nullptr;
+ while (i<GetLayerCount() && pLay==nullptr) {
if (nID==GetLayer(i)->GetID()) pLay=GetLayer(i);
else i++;
}
@@ -319,7 +319,7 @@ const SdrLayer* SdrLayerAdmin::GetLayerPerID(sal_uInt16 nID) const
SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const
{
SetOfByte aSet;
- bool bDown = (pParent == NULL);
+ bool bDown = (pParent == nullptr);
sal_uInt16 j;
for (j=0; j<GetLayerCount(); j++)
{
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 407cd0fd55fb..a17bc051e037 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -48,9 +48,9 @@ void SdrMark::setTime()
SdrMark::SdrMark(SdrObject* pNewObj, SdrPageView* pNewPageView)
: mpSelectedSdrObject(pNewObj),
mpPageView(pNewPageView),
- mpPoints(0L),
- mpLines(0L),
- mpGluePoints(0L),
+ mpPoints(nullptr),
+ mpLines(nullptr),
+ mpGluePoints(nullptr),
mbCon1(false),
mbCon2(false),
mnUser(0)
@@ -65,11 +65,11 @@ SdrMark::SdrMark(SdrObject* pNewObj, SdrPageView* pNewPageView)
SdrMark::SdrMark(const SdrMark& rMark)
: ObjectUser(),
mnTimeStamp(0),
- mpSelectedSdrObject(0L),
- mpPageView(0L),
- mpPoints(0L),
- mpLines(0L),
- mpGluePoints(0L),
+ mpSelectedSdrObject(nullptr),
+ mpPageView(nullptr),
+ mpPoints(nullptr),
+ mpLines(nullptr),
+ mpGluePoints(nullptr),
mbCon1(false),
mbCon2(false),
mnUser(0)
@@ -105,7 +105,7 @@ void SdrMark::ObjectInDestruction(const SdrObject& rObject)
(void) rObject; // avoid warnings
OSL_ENSURE(mpSelectedSdrObject && mpSelectedSdrObject == &rObject, "SdrMark::ObjectInDestruction: called form object different from hosted one (!)");
OSL_ENSURE(mpSelectedSdrObject, "SdrMark::ObjectInDestruction: still selected SdrObject is deleted, deselect first (!)");
- mpSelectedSdrObject = 0L;
+ mpSelectedSdrObject = nullptr;
}
void SdrMark::SetMarkedSdrObj(SdrObject* pNewObj)
@@ -137,7 +137,7 @@ SdrMark& SdrMark::operator=(const SdrMark& rMark)
if(mpPoints)
{
delete mpPoints;
- mpPoints = 0L;
+ mpPoints = nullptr;
}
}
else
@@ -157,7 +157,7 @@ SdrMark& SdrMark::operator=(const SdrMark& rMark)
if(mpLines)
{
delete mpLines;
- mpLines = 0L;
+ mpLines = nullptr;
}
}
else
@@ -177,7 +177,7 @@ SdrMark& SdrMark::operator=(const SdrMark& rMark)
if(mpGluePoints)
{
delete mpGluePoints;
- mpGluePoints = 0L;
+ mpGluePoints = nullptr;
}
}
else
@@ -199,13 +199,13 @@ bool SdrMark::operator==(const SdrMark& rMark) const
{
bool bRet(mpSelectedSdrObject == rMark.mpSelectedSdrObject && mpPageView == rMark.mpPageView && mbCon1 == rMark.mbCon1 && mbCon2 == rMark.mbCon2 && mnUser == rMark.mnUser);
- if((mpPoints != 0L) != (rMark.mpPoints != 0L))
+ if((mpPoints != nullptr) != (rMark.mpPoints != nullptr))
bRet = false;
- if((mpLines != 0L) != (rMark.mpLines != 0L))
+ if((mpLines != nullptr) != (rMark.mpLines != nullptr))
bRet = false;
- if((mpGluePoints != 0L) != (rMark.mpGluePoints != 0L))
+ if((mpGluePoints != nullptr) != (rMark.mpGluePoints != nullptr))
bRet = false;
if(bRet && mpPoints && *mpPoints != *rMark.mpPoints)
@@ -226,8 +226,8 @@ static bool ImpSdrMarkListSorter(SdrMark* const& lhs, SdrMark* const& rhs)
{
SdrObject* pObj1 = lhs->GetMarkedSdrObj();
SdrObject* pObj2 = rhs->GetMarkedSdrObj();
- SdrObjList* pOL1 = (pObj1) ? pObj1->GetObjList() : 0L;
- SdrObjList* pOL2 = (pObj2) ? pObj2->GetObjList() : 0L;
+ SdrObjList* pOL1 = (pObj1) ? pObj1->GetObjList() : nullptr;
+ SdrObjList* pOL2 = (pObj2) ? pObj2->GetObjList() : nullptr;
if (pOL1 == pOL2)
{
@@ -268,7 +268,7 @@ void SdrMarkList::ImpForceSort()
for(std::vector<SdrMark*>::iterator it = maList.begin(); it != maList.end(); )
{
SdrMark* pAkt = *it;
- if(pAkt->GetMarkedSdrObj() == 0)
+ if(pAkt->GetMarkedSdrObj() == nullptr)
{
it = maList.erase( it );
delete pAkt;
@@ -348,7 +348,7 @@ void SdrMarkList::operator=(const SdrMarkList& rLst)
SdrMark* SdrMarkList::GetMark(size_t nNum) const
{
- return (nNum < maList.size()) ? maList[nNum] : NULL;
+ return (nNum < maList.size()) ? maList[nNum] : nullptr;
}
size_t SdrMarkList::FindObject(const SdrObject* pObj) const
@@ -410,13 +410,13 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, bool bChkSort)
maList.push_back(pKopie);
// now check if the sort is ok
- const SdrObjList* pLastOL = pLastObj!=0L ? pLastObj->GetObjList() : 0L;
- const SdrObjList* pNeuOL = pNeuObj !=0L ? pNeuObj ->GetObjList() : 0L;
+ const SdrObjList* pLastOL = pLastObj!=nullptr ? pLastObj->GetObjList() : nullptr;
+ const SdrObjList* pNeuOL = pNeuObj !=nullptr ? pNeuObj ->GetObjList() : nullptr;
if(pLastOL == pNeuOL)
{
- const sal_uLong nLastNum(pLastObj!=0L ? pLastObj->GetOrdNum() : 0);
- const sal_uLong nNeuNum(pNeuObj !=0L ? pNeuObj ->GetOrdNum() : 0);
+ const sal_uLong nLastNum(pLastObj!=nullptr ? pLastObj->GetOrdNum() : 0);
+ const sal_uLong nNeuNum(pNeuObj !=nullptr ? pNeuObj ->GetOrdNum() : 0);
if(nNeuNum < nLastNum)
{
@@ -438,7 +438,7 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, bool bChkSort)
void SdrMarkList::DeleteMark(size_t nNum)
{
SdrMark* pMark = GetMark(nNum);
- DBG_ASSERT(pMark!=0L,"DeleteMark: MarkEntry not found.");
+ DBG_ASSERT(pMark!=nullptr,"DeleteMark: MarkEntry not found.");
if(pMark)
{
@@ -451,7 +451,7 @@ void SdrMarkList::DeleteMark(size_t nNum)
void SdrMarkList::ReplaceMark(const SdrMark& rNewMark, size_t nNum)
{
SdrMark* pMark = GetMark(nNum);
- DBG_ASSERT(pMark!=0L,"ReplaceMark: MarkEntry not found.");
+ DBG_ASSERT(pMark!=nullptr,"ReplaceMark: MarkEntry not found.");
if(pMark)
{
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index becf1d5f9e56..7df403858ee3 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -110,8 +110,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
bool bUseExtColorTable, bool bLoadRefCounts)
{
mpImpl = new SdrModelImpl;
- mpImpl->mpUndoManager=0;
- mpImpl->mpUndoFactory=0;
+ mpImpl->mpUndoManager=nullptr;
+ mpImpl->mpUndoFactory=nullptr;
mbInDestruction = false;
aObjUnit=SdrEngineDefaults::GetMapFraction();
eObjUnit=SdrEngineDefaults::GetMapUnit();
@@ -119,27 +119,27 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
aUIScale=Fraction(1,1);
nUIUnitKomma=0;
bUIOnlyKomma=false;
- pLayerAdmin=NULL;
+ pLayerAdmin=nullptr;
pItemPool=pPool;
bMyPool=false;
m_pEmbeddedHelper=_pEmbeddedHelper;
- pDrawOutliner=NULL;
- pHitTestOutliner=NULL;
- pRefOutDev=NULL;
+ pDrawOutliner=nullptr;
+ pHitTestOutliner=nullptr;
+ pRefOutDev=nullptr;
mbTiledRendering = false;
- mpLibreOfficeKitCallback = 0;
- mpLibreOfficeKitData = 0;
+ mpLibreOfficeKitCallback = nullptr;
+ mpLibreOfficeKitData = nullptr;
nProgressAkt=0;
nProgressMax=0;
nProgressOfs=0;
- pDefaultStyleSheet=NULL;
- mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj = 0;
- pLinkManager=NULL;
- pUndoStack=NULL;
- pRedoStack=NULL;
+ pDefaultStyleSheet=nullptr;
+ mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj = nullptr;
+ pLinkManager=nullptr;
+ pUndoStack=nullptr;
+ pRedoStack=nullptr;
nMaxUndoCount=16;
mnUniqueCommentID=0;
- pAktUndoGroup=NULL;
+ pAktUndoGroup=nullptr;
nUndoLevel=0;
mbUndoEnabled=true;
nProgressPercent=0;
@@ -161,13 +161,13 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
bReadOnly=false;
nStreamNumberFormat=SvStreamEndian::BIG;
nDefaultTabulator=0;
- mpNumberFormatter = NULL;
+ mpNumberFormatter = nullptr;
bTransparentTextFrames=false;
bStarDrawPreviewMode = false;
nStarDrawPreviewMasterPageNum = SDRPAGE_NOTFOUND;
- mpForbiddenCharactersTable = NULL;
+ mpForbiddenCharactersTable = nullptr;
mbModelLocked = false;
- mpOutlinerCache = NULL;
+ mpOutlinerCache = nullptr;
mbKernAsianPunctuation = false;
mbAddExtLeading = false;
mnHandoutPageCount = 0;
@@ -188,9 +188,9 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
#endif
bExtColorTable=bUseExtColorTable;
- if ( pPool == NULL )
+ if ( pPool == nullptr )
{
- pItemPool=new SdrItemPool(0L, bLoadRefCounts);
+ pItemPool=new SdrItemPool(nullptr, bLoadRefCounts);
// Outliner doesn't have its own Pool, so use the EditEngine's
SfxItemPool* pOutlPool=EditEngine::CreatePool( bLoadRefCounts );
// OutlinerPool as SecondaryPool of SdrPool
@@ -239,7 +239,7 @@ SdrModel::SdrModel():
maMaPag(),
maPages()
{
- ImpCtor(NULL, NULL, false, LOADREFCOUNTS);
+ ImpCtor(nullptr, nullptr, false, LOADREFCOUNTS);
}
SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, bool bLoadRefCounts):
@@ -346,7 +346,7 @@ void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nCount)
{
if (nCount<1) nCount=1;
nMaxUndoCount=nCount;
- if (pUndoStack!=NULL) {
+ if (pUndoStack!=nullptr) {
while (pUndoStack->size()>nMaxUndoCount) {
delete pUndoStack->back();
pUndoStack->pop_back();
@@ -356,21 +356,21 @@ void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nCount)
void SdrModel::ClearUndoBuffer()
{
- if (pUndoStack!=NULL) {
+ if (pUndoStack!=nullptr) {
while (!pUndoStack->empty()) {
delete pUndoStack->back();
pUndoStack->pop_back();
}
delete pUndoStack;
- pUndoStack=NULL;
+ pUndoStack=nullptr;
}
- if (pRedoStack!=NULL) {
+ if (pRedoStack!=nullptr) {
while (!pRedoStack->empty()) {
delete pRedoStack->back();
pRedoStack->pop_back();
}
delete pRedoStack;
- pRedoStack=NULL;
+ pRedoStack=nullptr;
}
}
@@ -393,13 +393,13 @@ bool SdrModel::Undo()
}
else
{
- SfxUndoAction* pDo = HasUndoActions() ? pUndoStack->front() : NULL;
- if(pDo!=NULL)
+ SfxUndoAction* pDo = HasUndoActions() ? pUndoStack->front() : nullptr;
+ if(pDo!=nullptr)
{
const bool bWasUndoEnabled = mbUndoEnabled;
mbUndoEnabled = false;
pDo->Undo();
- if(pRedoStack==NULL)
+ if(pRedoStack==nullptr)
pRedoStack=new std::deque<SfxUndoAction*>;
SfxUndoAction* p = pUndoStack->front();
pUndoStack->pop_front();
@@ -419,13 +419,13 @@ bool SdrModel::Redo()
}
else
{
- SfxUndoAction* pDo = HasRedoActions() ? pRedoStack->front() : NULL;
- if(pDo!=NULL)
+ SfxUndoAction* pDo = HasRedoActions() ? pRedoStack->front() : nullptr;
+ if(pDo!=nullptr)
{
const bool bWasUndoEnabled = mbUndoEnabled;
mbUndoEnabled = false;
pDo->Redo();
- if(pUndoStack==NULL)
+ if(pUndoStack==nullptr)
pUndoStack=new std::deque<SfxUndoAction*>;
SfxUndoAction* p = pRedoStack->front();
pRedoStack->pop_front();
@@ -445,8 +445,8 @@ bool SdrModel::Repeat(SfxRepeatTarget& rView)
}
else
{
- SfxUndoAction* pDo = HasUndoActions() ? pUndoStack->front() : NULL;
- if(pDo!=NULL)
+ SfxUndoAction* pDo = HasUndoActions() ? pUndoStack->front() : nullptr;
+ if(pDo!=nullptr)
{
if(pDo->CanRepeat(rView))
{
@@ -460,7 +460,7 @@ bool SdrModel::Repeat(SfxRepeatTarget& rView)
void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
{
- DBG_ASSERT( mpImpl->mpUndoManager == 0, "svx::SdrModel::ImpPostUndoAction(), method not supported with application undo manager!" );
+ DBG_ASSERT( mpImpl->mpUndoManager == nullptr, "svx::SdrModel::ImpPostUndoAction(), method not supported with application undo manager!" );
if( IsUndoEnabled() )
{
if (aUndoLink.IsSet())
@@ -469,7 +469,7 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
}
else
{
- if (pUndoStack==NULL)
+ if (pUndoStack==nullptr)
pUndoStack=new std::deque<SfxUndoAction*>;
pUndoStack->push_front(pUndo);
while (pUndoStack->size()>nMaxUndoCount)
@@ -477,7 +477,7 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
delete pUndoStack->back();
pUndoStack->pop_back();
}
- if (pRedoStack!=NULL)
+ if (pRedoStack!=nullptr)
pRedoStack->clear();
}
}
@@ -496,7 +496,7 @@ void SdrModel::BegUndo()
}
else if( IsUndoEnabled() )
{
- if(pAktUndoGroup==NULL)
+ if(pAktUndoGroup==nullptr)
{
pAktUndoGroup = new SdrUndoGroup(*this);
nUndoLevel=1;
@@ -562,7 +562,7 @@ void SdrModel::EndUndo()
}
else
{
- if(pAktUndoGroup!=NULL && IsUndoEnabled())
+ if(pAktUndoGroup!=nullptr && IsUndoEnabled())
{
nUndoLevel--;
if(nUndoLevel==0)
@@ -570,14 +570,14 @@ void SdrModel::EndUndo()
if(pAktUndoGroup->GetActionCount()!=0)
{
SdrUndoAction* pUndo=pAktUndoGroup;
- pAktUndoGroup=NULL;
+ pAktUndoGroup=nullptr;
ImpPostUndoAction(pUndo);
}
else
{
// was empty
delete pAktUndoGroup;
- pAktUndoGroup=NULL;
+ pAktUndoGroup=nullptr;
}
}
}
@@ -630,7 +630,7 @@ void SdrModel::AddUndo(SdrUndoAction* pUndo)
}
else
{
- if (pAktUndoGroup!=NULL)
+ if (pAktUndoGroup!=nullptr)
{
pAktUndoGroup->AddAction(pUndo);
}
@@ -783,10 +783,10 @@ SdrOutliner& SdrModel::GetChainingOutliner(const SdrTextObj* pObj) const
const SdrTextObj* SdrModel::GetFormattingTextObj() const
{
- if (pDrawOutliner!=NULL) {
+ if (pDrawOutliner!=nullptr) {
return pDrawOutliner->GetTextObj();
}
- return NULL;
+ return nullptr;
}
void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit )
@@ -898,7 +898,7 @@ uno::Reference<embed::XStorage> SdrModel::GetDocumentStorage() const
if (!xSBD.is())
{
SAL_WARN("svx", "no UNO model");
- return 0;
+ return nullptr;
}
return xSBD->getDocumentStorage();
}
@@ -911,13 +911,13 @@ SdrModel::GetDocumentStream( OUString const& rURL,
if (!xStorage.is())
{
SAL_WARN("svx", "no storage?");
- return 0;
+ return nullptr;
}
try {
uno::Reference<io::XStream> const xStream(
::comphelper::OStorageHelper::GetStreamAtPackageURL(
xStorage, rURL, embed::ElementModes::READ, rProxy));
- return (xStream.is()) ? xStream->getInputStream() : 0;
+ return (xStream.is()) ? xStream->getInputStream() : nullptr;
}
catch (container::NoSuchElementException const&)
{
@@ -927,7 +927,7 @@ SdrModel::GetDocumentStream( OUString const& rURL,
{
SAL_WARN("svx", "exception: '" << e.Message << "'");
}
- return 0;
+ return nullptr;
}
// convert template attributes from the string into "hard" attributes
@@ -1462,7 +1462,7 @@ SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
SdrPage* pPg=maPages[nPgNum];
maPages.erase(maPages.begin()+nPgNum);
PageListChanged();
- if (pPg!=NULL) {
+ if (pPg!=nullptr) {
pPg->SetInserted(false);
}
bPagNumsDirty=true;
@@ -1476,7 +1476,7 @@ SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
void SdrModel::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
SdrPage* pPg=maPages[nPgNum];
- if (pPg!=NULL) {
+ if (pPg!=nullptr) {
maPages.erase(maPages.begin()+nPgNum); // shortcut to avoid two broadcasts
PageListChanged();
pPg->SetInserted(false);
@@ -1542,7 +1542,7 @@ void SdrModel::MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
SdrPage* pPg=maMaPag[nPgNum];
maMaPag.erase(maMaPag.begin()+nPgNum);
MasterPageListChanged();
- if (pPg!=NULL) {
+ if (pPg!=nullptr) {
pPg->SetInserted(false);
maMaPag.insert(maMaPag.begin()+nNewPos,pPg);
MasterPageListChanged();
@@ -1704,14 +1704,14 @@ void SdrModel::Merge(SdrModel& rSourceModel,
for (sal_uInt16 i=nSrcMasterPageAnz; i>0;) {
i--;
if (pMasterNeed[i]) {
- SdrPage* pPg=NULL;
+ SdrPage* pPg=nullptr;
if (bTreadSourceAsConst) {
const SdrPage* pPg1=rSourceModel.GetMasterPage(i);
pPg=pPg1->Clone();
} else {
pPg=rSourceModel.RemoveMasterPage(i);
}
- if (pPg!=NULL) {
+ if (pPg!=nullptr) {
// Now append all of them to the end of the DstModel.
// Don't use InsertMasterPage(), because everything is
// inconsistent until all are in.
@@ -1734,14 +1734,14 @@ void SdrModel::Merge(SdrModel& rSourceModel,
sal_uInt16 nMergeCount=sal_uInt16(std::abs((long)((long)nFirstPageNum-nLastPageNum))+1);
if (nDestPos>GetPageCount()) nDestPos=GetPageCount();
while (nMergeCount>0) {
- SdrPage* pPg=NULL;
+ SdrPage* pPg=nullptr;
if (bTreadSourceAsConst) {
const SdrPage* pPg1=rSourceModel.GetPage(nSourcePos);
pPg=pPg1->Clone();
} else {
pPg=rSourceModel.RemovePage(nSourcePos);
}
- if (pPg!=NULL) {
+ if (pPg!=nullptr) {
InsertPage(pPg,nDestPos);
if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pPg));
@@ -1850,7 +1850,7 @@ void SdrModel::setLock( bool bLock )
void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModel )
{
- assert(pNewModel != 0);
+ assert(pNewModel != nullptr);
if( pSourceSet && pDestSet && (pSourceSet != pDestSet ) )
{
SfxWhichIter aWhichIter(*pSourceSet);
@@ -1861,7 +1861,7 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
{
if(SfxItemState::SET == pSourceSet->GetItemState(nWhich, false, &pPoolItem))
{
- const SfxPoolItem* pResultItem = NULL;
+ const SfxPoolItem* pResultItem = nullptr;
switch( nWhich )
{
@@ -1957,7 +1957,7 @@ void SdrModel::ReformatAllTextObjects()
SdrOutliner* SdrModel::createOutliner( sal_uInt16 nOutlinerMode )
{
- if( NULL == mpOutlinerCache )
+ if( nullptr == mpOutlinerCache )
mpOutlinerCache = new SdrOutlinerCache(this);
return mpOutlinerCache->createOutliner( nOutlinerMode );
@@ -1994,13 +1994,13 @@ SvxNumType SdrModel::GetPageNumType() const
const SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum) const
{
DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
- return nPgNum < maPages.size() ? maPages[nPgNum] : NULL;
+ return nPgNum < maPages.size() ? maPages[nPgNum] : nullptr;
}
SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum)
{
DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
- return nPgNum < maPages.size() ? maPages[nPgNum] : NULL;
+ return nPgNum < maPages.size() ? maPages[nPgNum] : nullptr;
}
sal_uInt16 SdrModel::GetPageCount() const
@@ -2092,9 +2092,9 @@ const css::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelImplementationId()
SdrHint::SdrHint(SdrHintKind eNewHint)
-: mpPage(0L),
- mpObj(0L),
- mpObjList(0L),
+: mpPage(nullptr),
+ mpObj(nullptr),
+ mpObjList(nullptr),
meHint(eNewHint)
{
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index ec449b1691ad..eaf6f6246d3f 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -132,8 +132,8 @@ void SdrMarkView::ImpClearVars()
meEditMode=SDREDITMODE_EDIT;
meEditMode0=SDREDITMODE_EDIT;
mbDesignMode=false;
- mpMarkedObj=NULL;
- mpMarkedPV=NULL;
+ mpMarkedObj=nullptr;
+ mpMarkedPV=nullptr;
mbForceFrameHandles=false;
mbPlusHdlAlways=false;
mnFrameHandlesLimit=50;
@@ -155,9 +155,9 @@ void SdrMarkView::ImpClearVars()
SdrMarkView::SdrMarkView(SdrModel* pModel1, OutputDevice* pOut)
: SdrSnapView(pModel1,pOut),
- mpMarkObjOverlay(0L),
- mpMarkPointsOverlay(0L),
- mpMarkGluePointsOverlay(0L),
+ mpMarkObjOverlay(nullptr),
+ mpMarkPointsOverlay(nullptr),
+ mpMarkGluePointsOverlay(nullptr),
maHdlList(this),
mpSdrViewSelection(new sdr::ViewSelection())
{
@@ -204,7 +204,7 @@ void SdrMarkView::ModelHasChanged()
mbMrkPntDirty=true;
UndirtyMrkPnt();
SdrView* pV=static_cast<SdrView*>(this);
- if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) {
+ if (pV!=nullptr && !pV->IsDragObj() && !pV->IsInsObjPoint()) {
AdjustMarkHdl();
}
}
@@ -317,7 +317,7 @@ bool SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark)
{
BrkAction();
- DBG_ASSERT(0L == mpMarkObjOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkObjOverlay (!)");
+ DBG_ASSERT(nullptr == mpMarkObjOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkObjOverlay (!)");
basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
mpMarkObjOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark);
@@ -366,7 +366,7 @@ void SdrMarkView::BrkMarkObj()
{
DBG_ASSERT(mpMarkObjOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
delete mpMarkObjOverlay;
- mpMarkObjOverlay = 0L;
+ mpMarkObjOverlay = nullptr;
}
}
@@ -378,7 +378,7 @@ bool SdrMarkView::BegMarkPoints(const Point& rPnt, bool bUnmark)
{
BrkAction();
- DBG_ASSERT(0L == mpMarkPointsOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkPointsOverlay (!)");
+ DBG_ASSERT(nullptr == mpMarkPointsOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkPointsOverlay (!)");
basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
mpMarkPointsOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark);
@@ -432,7 +432,7 @@ void SdrMarkView::BrkMarkPoints()
{
DBG_ASSERT(mpMarkPointsOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
delete mpMarkPointsOverlay;
- mpMarkPointsOverlay = 0L;
+ mpMarkPointsOverlay = nullptr;
}
}
@@ -444,7 +444,7 @@ bool SdrMarkView::BegMarkGluePoints(const Point& rPnt, bool bUnmark)
{
BrkAction();
- DBG_ASSERT(0L == mpMarkGluePointsOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkGluePointsOverlay (!)");
+ DBG_ASSERT(nullptr == mpMarkGluePointsOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkGluePointsOverlay (!)");
basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
mpMarkGluePointsOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark);
@@ -498,7 +498,7 @@ void SdrMarkView::BrkMarkGluePoints()
{
DBG_ASSERT(mpMarkGluePointsOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
delete mpMarkGluePointsOverlay;
- mpMarkGluePointsOverlay = 0L;
+ mpMarkGluePointsOverlay = nullptr;
}
}
@@ -610,7 +610,7 @@ void SdrMarkView::SetMarkHandles()
bool bSaveOldFocus(false);
sal_uInt32 nSavePolyNum(0L), nSavePointNum(0L);
SdrHdlKind eSaveKind(HDL_MOVE);
- SdrObject* pSaveObj = NULL;
+ SdrObject* pSaveObj = nullptr;
if(pSaveOldFocusHdl
&& pSaveOldFocusHdl->GetObj()
@@ -628,8 +628,8 @@ void SdrMarkView::SetMarkHandles()
maHdlList.Clear();
maHdlList.SetRotateShear(meDragMode==SDRDRAG_ROTATE);
maHdlList.SetDistortShear(meDragMode==SDRDRAG_SHEAR);
- mpMarkedObj=NULL;
- mpMarkedPV=NULL;
+ mpMarkedObj=nullptr;
+ mpMarkedPV=nullptr;
// are handles enabled at all? Create only then
if(!areMarkHandlesHidden())
@@ -653,13 +653,13 @@ void SdrMarkView::SetMarkHandles()
{
mpMarkedPV=GetSdrPageViewOfMarkedByIndex(0);
- for (size_t nMarkNum=0; nMarkNum<nMarkCount && (mpMarkedPV!=NULL || !bFrmHdl); ++nMarkNum)
+ for (size_t nMarkNum=0; nMarkNum<nMarkCount && (mpMarkedPV!=nullptr || !bFrmHdl); ++nMarkNum)
{
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
if (mpMarkedPV!=pM->GetPageView())
{
- mpMarkedPV=NULL;
+ mpMarkedPV=nullptr;
}
}
}
@@ -825,7 +825,7 @@ void SdrMarkView::SetMarkHandles()
if (bPoly)
{
- bool bSelected=pMrkPnts!=NULL
+ bool bSelected=pMrkPnts!=nullptr
&& pMrkPnts->find( sal_uInt16(i-nSiz0) ) != pMrkPnts->end();
pHdl->SetSelected(bSelected);
if (mbPlusHdlAlways || bSelected)
@@ -834,7 +834,7 @@ void SdrMarkView::SetMarkHandles()
for (sal_uInt32 nPlusNum=0; nPlusNum<nPlusAnz; nPlusNum++)
{
SdrHdl* pPlusHdl=pObj->GetPlusHdl(*pHdl,nPlusNum);
- if (pPlusHdl!=NULL)
+ if (pPlusHdl!=nullptr)
{
pPlusHdl->SetObj(pObj);
pPlusHdl->SetPageView(pPV);
@@ -856,10 +856,10 @@ void SdrMarkView::SetMarkHandles()
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrPageView* pPV=pM->GetPageView();
const SdrUShortCont* pMrkGlue=pM->GetMarkedGluePoints();
- if (pMrkGlue!=NULL)
+ if (pMrkGlue!=nullptr)
{
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- if (pGPL!=NULL)
+ if (pGPL!=nullptr)
{
for(SdrUShortCont::const_iterator it = pMrkGlue->begin(); it != pMrkGlue->end(); ++it)
{
@@ -1081,7 +1081,7 @@ bool SdrMarkView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
{
if(maHdlList.GetHdlCount())
{
- SdrHdl* pMouseOverHdl = 0;
+ SdrHdl* pMouseOverHdl = nullptr;
if( !rMEvt.IsLeaveWindow() && pWin )
{
Point aMDPos( pWin->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -1136,7 +1136,7 @@ void SdrMarkView::ForceRefToMarked()
long nObjDst=0;
long nOutHgt=0;
OutputDevice* pOut=GetFirstOutputDevice();
- if (pOut!=NULL) {
+ if (pOut!=nullptr) {
// minimum length: 50 pixels
nMinLen=pOut->PixelToLogic(Size(0,50)).Height();
// 20 pixels distance to the Obj for the reference point
@@ -1170,9 +1170,9 @@ void SdrMarkView::ForceRefToMarked()
long nY1=aCenter.Y()-(nHgt+1)/2;
long nY2=nY1+nHgt;
- if (pOut!=NULL && nMinLen>nOutHgt) nMinLen=nOutHgt; // TODO: maybe shorten this a little
+ if (pOut!=nullptr && nMinLen>nOutHgt) nMinLen=nOutHgt; // TODO: maybe shorten this a little
- if (pOut!=NULL) { // now move completely into the visible area
+ if (pOut!=nullptr) { // now move completely into the visible area
if (nY1<nOutMin) {
nY1=nOutMin;
if (nY2<nY1+nMinLen) nY2=nY1+nMinLen;
@@ -1245,7 +1245,7 @@ bool SdrPageView::IsObjSelectable(SdrObject *pObj) const
// have to be deselected, though.
const SdrObjList* pOOL=pObj->GetObjList();
const SdrObjList* pVOL=GetObjList();
- while (pOOL!=NULL && pOOL!=pVOL) {
+ while (pOOL!=nullptr && pOOL!=pVOL) {
pOOL=pOOL->GetUpList();
}
bRaus=pOOL!=pVOL;
@@ -1269,7 +1269,7 @@ void SdrMarkView::CheckMarked()
{
if (!IsGluePointEditMode()) { // selected glue points only in GlueEditMode
SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- if (pPts!=NULL) {
+ if (pPts!=nullptr) {
pPts->clear();
}
}
@@ -1336,17 +1336,17 @@ bool SdrMarkView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
return false;
}
}
- return pPV==NULL || pPV->IsObjMarkable(pObj);
+ return pPV==nullptr || pPV->IsObjMarkable(pObj);
}
bool SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const
{
bool bRet=false;
- nTol=ImpGetHitTolLogic(nTol,NULL);
+ nTol=ImpGetHitTolLogic(nTol,nullptr);
Point aPt(rPnt);
for (size_t nm=0; nm<GetMarkedObjectCount() && !bRet; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
- bRet = 0 != CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,0);
+ bRet = nullptr != CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,nullptr);
}
return bRet;
}
@@ -1366,7 +1366,7 @@ bool SdrMarkView::MarkObj(const Point& rPnt, short nTol, bool bToggle, bool bDee
{
SdrObject* pObj;
SdrPageView* pPV;
- nTol=ImpGetHitTolLogic(nTol,NULL);
+ nTol=ImpGetHitTolLogic(nTol,nullptr);
SdrSearchOptions nOptions=SdrSearchOptions::PICKMARKABLE;
if (bDeep) nOptions=nOptions|SdrSearchOptions::DEEP;
bool bRet=PickObj(rPnt,(sal_uInt16)nTol,pObj,pPV,nOptions);
@@ -1393,17 +1393,17 @@ bool SdrMarkView::MarkNextObj(bool bPrev)
if (nMarkCount!=0) {
nChgMarkNum=bPrev ? 0 : nMarkCount-1;
SdrMark* pM=GetSdrMarkByIndex(nChgMarkNum);
- OSL_ASSERT(pM!=NULL);
- if (pM->GetMarkedSdrObj() != NULL)
+ OSL_ASSERT(pM!=nullptr);
+ if (pM->GetMarkedSdrObj() != nullptr)
nSearchObjNum = pM->GetMarkedSdrObj()->GetNavigationPosition();
}
- SdrObject* pMarkObj=NULL;
+ SdrObject* pMarkObj=nullptr;
SdrObjList* pSearchObjList=pPageView->GetObjList();
const size_t nObjCount = pSearchObjList->GetObjCount();
if (nObjCount!=0) {
if (nSearchObjNum>nObjCount) nSearchObjNum=nObjCount;
- while (pMarkObj==NULL && ((!bPrev && nSearchObjNum>0) || (bPrev && nSearchObjNum<nObjCount)))
+ while (pMarkObj==nullptr && ((!bPrev && nSearchObjNum>0) || (bPrev && nSearchObjNum<nObjCount)))
{
if (!bPrev)
nSearchObjNum--;
@@ -1435,46 +1435,46 @@ bool SdrMarkView::MarkNextObj(bool bPrev)
bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
{
SortMarkedObjects();
- nTol=ImpGetHitTolLogic(nTol,NULL);
+ nTol=ImpGetHitTolLogic(nTol,nullptr);
Point aPt(rPnt);
- SdrMark* pTopMarkHit=NULL;
- SdrMark* pBtmMarkHit=NULL;
+ SdrMark* pTopMarkHit=nullptr;
+ SdrMark* pBtmMarkHit=nullptr;
size_t nTopMarkHit=0;
size_t nBtmMarkHit=0;
// find topmost of the selected objects that is hit by rPnt
const size_t nMarkCount=GetMarkedObjectCount();
- for (size_t nm=nMarkCount; nm>0 && pTopMarkHit==NULL;) {
+ for (size_t nm=nMarkCount; nm>0 && pTopMarkHit==nullptr;) {
--nm;
SdrMark* pM=GetSdrMarkByIndex(nm);
- if(CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,0))
+ if(CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,nullptr))
{
pTopMarkHit=pM;
nTopMarkHit=nm;
}
}
// nothing found, in this case, just select an object
- if (pTopMarkHit==NULL) return MarkObj(rPnt,sal_uInt16(nTol));
+ if (pTopMarkHit==nullptr) return MarkObj(rPnt,sal_uInt16(nTol));
SdrObject* pTopObjHit=pTopMarkHit->GetMarkedSdrObj();
SdrObjList* pObjList=pTopObjHit->GetObjList();
SdrPageView* pPV=pTopMarkHit->GetPageView();
// find lowermost of the selected objects that is hit by rPnt
// and is placed on the same PageView as pTopMarkHit
- for (size_t nm=0; nm<nMarkCount && pBtmMarkHit==NULL; ++nm) {
+ for (size_t nm=0; nm<nMarkCount && pBtmMarkHit==nullptr; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrPageView* pPV2=pM->GetPageView();
- if (pPV2==pPV && CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pPV2,SdrSearchOptions::NONE,0))
+ if (pPV2==pPV && CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pPV2,SdrSearchOptions::NONE,nullptr))
{
pBtmMarkHit=pM;
nBtmMarkHit=nm;
}
}
- if (pBtmMarkHit==NULL) { pBtmMarkHit=pTopMarkHit; nBtmMarkHit=nTopMarkHit; }
+ if (pBtmMarkHit==nullptr) { pBtmMarkHit=pTopMarkHit; nBtmMarkHit=nTopMarkHit; }
SdrObject* pBtmObjHit=pBtmMarkHit->GetMarkedSdrObj();
const size_t nObjCount = pObjList->GetObjCount();
size_t nSearchBeg = 0;
- E3dScene* pScene = NULL;
+ E3dScene* pScene = nullptr;
SdrObject* pObjHit = (bPrev) ? pBtmObjHit : pTopObjHit;
bool bRemap = dynamic_cast< const E3dCompoundObject* >(pObjHit) != nullptr
&& static_cast<E3dCompoundObject*>(pObjHit)->IsAOrdNumRemapCandidate(pScene);
@@ -1503,8 +1503,8 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
}
size_t no=nSearchBeg;
- SdrObject* pFndObj=NULL;
- while (pFndObj==NULL && ((!bPrev && no>0) || (bPrev && no<nObjCount))) {
+ SdrObject* pFndObj=nullptr;
+ while (pFndObj==nullptr && ((!bPrev && no>0) || (bPrev && no<nObjCount))) {
if (!bPrev) no--;
SdrObject* pObj;
@@ -1517,7 +1517,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
pObj = pObjList->GetObj(no);
}
- if (CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pObj,pPV,SdrSearchOptions::TESTMARKABLE,0))
+ if (CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pObj,pPV,SdrSearchOptions::TESTMARKABLE,nullptr))
{
if (TryToFindMarkedObject(pObj)==SAL_MAX_SIZE) {
pFndObj=pObj;
@@ -1527,14 +1527,14 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
}
if (bPrev) no++;
}
- if (pFndObj!=NULL)
+ if (pFndObj!=nullptr)
{
GetMarkedObjectListWriteAccess().DeleteMark(bPrev?nBtmMarkHit:nTopMarkHit);
GetMarkedObjectListWriteAccess().InsertEntry(SdrMark(pFndObj,pPV));
MarkListHasChanged();
AdjustMarkHdl();
}
- return pFndObj!=NULL;
+ return pFndObj!=nullptr;
}
bool SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark)
@@ -1581,7 +1581,7 @@ bool SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark)
void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark, bool bImpNoSetMarkHdl)
{
- if (pObj!=NULL && pPV!=NULL && IsObjMarkable(pObj, pPV)) {
+ if (pObj!=nullptr && pPV!=nullptr && IsObjMarkable(pObj, pPV)) {
BrkAction();
if (!bUnmark)
{
@@ -1625,14 +1625,14 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
{
if(((nOptions & SdrSearchOptions::IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
{
- return NULL;
+ return nullptr;
}
const bool bCheckIfMarkable(nOptions & SdrSearchOptions::TESTMARKABLE);
const bool bDeep(nOptions & SdrSearchOptions::DEEP);
const bool bOLE(dynamic_cast< const SdrOle2Obj* >(pObj) != nullptr);
const bool bTXT(dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsTextFrame());
- SdrObject* pRet=NULL;
+ SdrObject* pRet=nullptr;
Rectangle aRect(pObj->GetCurrentBoundRect());
// hack for calc grid sync
aRect += pObj->GetGridOffset();
@@ -1656,7 +1656,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
{
SdrObjList* pOL=pObj->GetSubList();
- if (pOL!=NULL && pOL->GetObjCount()!=0)
+ if (pOL!=nullptr && pOL->GetObjCount()!=0)
{
SdrObject* pTmpObj;
// adjustment hit point for virtual objects
@@ -1680,7 +1680,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
}
}
- if (!bDeep && pRet!=NULL)
+ if (!bDeep && pRet!=nullptr)
{
pRet=pObj;
}
@@ -1690,21 +1690,21 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
{
- return (*this).CheckSingleSdrObjectHit(rPnt,nTol,pOL,pPV,nOptions,pMVisLay,rpRootObj,NULL);
+ return (*this).CheckSingleSdrObjectHit(rPnt,nTol,pOL,pPV,nOptions,pMVisLay,rpRootObj,nullptr);
}
SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const
{
- SdrObject* pRet=NULL;
- rpRootObj=NULL;
- if (pOL!=NULL)
+ SdrObject* pRet=nullptr;
+ rpRootObj=nullptr;
+ if (pOL!=nullptr)
{
bool bBack(nOptions & SdrSearchOptions::BACKWARD);
bool bRemap(pOL->GetOwnerObj() && dynamic_cast< const E3dScene* >(pOL->GetOwnerObj()) != nullptr);
- E3dScene* pRemapScene = (bRemap ? static_cast<E3dScene*>(pOL->GetOwnerObj()) : 0L);
+ E3dScene* pRemapScene = (bRemap ? static_cast<E3dScene*>(pOL->GetOwnerObj()) : nullptr);
const size_t nObjCount=pOL->GetObjCount();
size_t nObjNum=bBack ? 0 : nObjCount;
- while (pRet==NULL && (bBack ? nObjNum<nObjCount : nObjNum>0)) {
+ while (pRet==nullptr && (bBack ? nObjNum<nObjCount : nObjNum>0)) {
if (!bBack) nObjNum--;
SdrObject* pObj;
@@ -1718,16 +1718,16 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
}
if (nOptions & SdrSearchOptions::BEFOREMARK)
{
- if ((pMarkList)!=NULL)
+ if ((pMarkList)!=nullptr)
{
if ((*pMarkList).FindObject(pObj)!=SAL_MAX_SIZE)
{
- return NULL;
+ return nullptr;
}
}
}
pRet=CheckSingleSdrObjectHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
- if (pRet!=NULL) rpRootObj=pObj;
+ if (pRet!=nullptr) rpRootObj=pObj;
if (bBack) nObjNum++;
}
}
@@ -1736,16 +1736,16 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
{
- return PickObj(rPnt,nTol,rpObj,rpPV,nOptions,NULL);
+ return PickObj(rPnt,nTol,rpObj,rpPV,nOptions,nullptr);
}
bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions, SdrObject** ppRootObj, bool* pbHitPassDirect) const
{ // TODO: lacks a Pass2,Pass3
SortMarkedObjects();
- if (ppRootObj!=NULL) *ppRootObj=NULL;
- if (pbHitPassDirect!=NULL) *pbHitPassDirect=true;
- rpObj=NULL;
- rpPV=NULL;
+ if (ppRootObj!=nullptr) *ppRootObj=nullptr;
+ if (pbHitPassDirect!=nullptr) *pbHitPassDirect=true;
+ rpObj=nullptr;
+ rpPV=nullptr;
bool bWholePage(nOptions & SdrSearchOptions::WHOLEPAGE);
bool bMarked(nOptions & SdrSearchOptions::MARKED);
bool bMasters=!bMarked && bool(nOptions & SdrSearchOptions::ALSOONMASTER);
@@ -1755,11 +1755,11 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
bool bBoundCheckOn2ndPass(nOptions & SdrSearchOptions::PASS2BOUND); (void)bBoundCheckOn2ndPass;// n.i.
bool bCheckNearestOn3rdPass(nOptions & SdrSearchOptions::PASS3NEAREST); (void)bCheckNearestOn3rdPass;// n.i.
#endif
- if (nTol<0) nTol=ImpGetHitTolLogic(nTol,NULL);
+ if (nTol<0) nTol=ImpGetHitTolLogic(nTol,nullptr);
Point aPt(rPnt);
- SdrObject* pObj=NULL;
- SdrObject* pHitObj=NULL;
- SdrPageView* pPV=NULL;
+ SdrObject* pObj=nullptr;
+ SdrObject* pHitObj=nullptr;
+ SdrPageView* pPV=nullptr;
if (!bBack && static_cast<const SdrObjEditView*>(this)->IsTextEditFrameHit(rPnt)) {
pObj=static_cast<const SdrObjEditView*>(this)->GetTextEditObject();
pHitObj=pObj;
@@ -1768,12 +1768,12 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
if (bMarked) {
const size_t nMrkAnz=GetMarkedObjectCount();
size_t nMrkNum=bBack ? 0 : nMrkAnz;
- while (pHitObj==NULL && (bBack ? nMrkNum<nMrkAnz : nMrkNum>0)) {
+ while (pHitObj==nullptr && (bBack ? nMrkNum<nMrkAnz : nMrkNum>0)) {
if (!bBack) nMrkNum--;
SdrMark* pM=GetSdrMarkByIndex(nMrkNum);
pObj=pM->GetMarkedSdrObj();
pPV=pM->GetPageView();
- pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,nOptions,NULL);
+ pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,nOptions,nullptr);
if (bBack) nMrkNum++;
}
}
@@ -1794,18 +1794,18 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
bool bExtraPassForWholePage=bWholePage && pPage!=pPV->GetObjList();
if (bExtraPassForWholePage) nPgAnz++; // First search in AktObjList, then on the entire page
sal_uInt16 nPgNum=bBack ? 0 : nPgAnz;
- while (pHitObj==NULL && (bBack ? nPgNum<nPgAnz : nPgNum>0)) {
+ while (pHitObj==nullptr && (bBack ? nPgNum<nPgAnz : nPgNum>0)) {
SdrSearchOptions nTmpOptions=nOptions;
if (!bBack) nPgNum--;
- const SetOfByte* pMVisLay=NULL;
- SdrObjList* pObjList=NULL;
- if (pbHitPassDirect!=NULL) *pbHitPassDirect = true;
+ const SetOfByte* pMVisLay=nullptr;
+ SdrObjList* pObjList=nullptr;
+ if (pbHitPassDirect!=nullptr) *pbHitPassDirect = true;
if (nPgNum>=nPgAnz-1 || (bExtraPassForWholePage && nPgNum>=nPgAnz-2))
{
pObjList=pPV->GetObjList();
if (bExtraPassForWholePage && nPgNum==nPgAnz-2) {
pObjList=pPage;
- if (pbHitPassDirect!=NULL) *pbHitPassDirect = false;
+ if (pbHitPassDirect!=nullptr) *pbHitPassDirect = false;
}
}
else
@@ -1815,7 +1815,7 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
pMVisLay = &pPage->TRG_GetMasterPageVisibleLayers();
pObjList = &rMasterPage;
- if (pbHitPassDirect!=NULL) *pbHitPassDirect = false;
+ if (pbHitPassDirect!=nullptr) *pbHitPassDirect = false;
nTmpOptions=nTmpOptions | SdrSearchOptions::IMPISMASTER;
}
pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj,&(GetMarkedObjectList()));
@@ -1823,37 +1823,37 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
}
}
}
- if (pHitObj!=NULL) {
- if (ppRootObj!=NULL) *ppRootObj=pObj;
+ if (pHitObj!=nullptr) {
+ if (ppRootObj!=nullptr) *ppRootObj=pObj;
if (nOptions & SdrSearchOptions::DEEP) pObj=pHitObj;
if (nOptions & SdrSearchOptions::TESTTEXTEDIT) {
if (!pObj->HasTextEdit() || pPV->GetLockedLayers().IsSet(pObj->GetLayer())) {
- pObj=NULL;
+ pObj=nullptr;
}
}
- if (pObj!=NULL && (nOptions & SdrSearchOptions::TESTMACRO)) {
+ if (pObj!=nullptr && (nOptions & SdrSearchOptions::TESTMACRO)) {
SdrObjMacroHitRec aHitRec;
aHitRec.aPos=aPt;
aHitRec.aDownPos=aPt;
aHitRec.nTol=nTol;
aHitRec.pVisiLayer=&pPV->GetVisibleLayers();
aHitRec.pPageView=pPV;
- if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=NULL;
+ if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=nullptr;
}
- if (pObj!=NULL && (nOptions & SdrSearchOptions::WITHTEXT) && pObj->GetOutlinerParaObject()==NULL) pObj=NULL;
- if (pObj!=NULL && (nOptions & SdrSearchOptions::TESTTEXTAREA) && pPV)
+ if (pObj!=nullptr && (nOptions & SdrSearchOptions::WITHTEXT) && pObj->GetOutlinerParaObject()==nullptr) pObj=nullptr;
+ if (pObj!=nullptr && (nOptions & SdrSearchOptions::TESTTEXTAREA) && pPV)
{
- if(!SdrObjectPrimitiveHit(*pObj, aPt, 0, *pPV, 0, true))
+ if(!SdrObjectPrimitiveHit(*pObj, aPt, 0, *pPV, nullptr, true))
{
- pObj = 0;
+ pObj = nullptr;
}
}
- if (pObj!=NULL) {
+ if (pObj!=nullptr) {
rpObj=pObj;
rpPV=pPV;
}
}
- return rpObj!=NULL;
+ return rpObj!=nullptr;
}
bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
@@ -1861,8 +1861,8 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SortMarkedObjects();
bool bBoundCheckOn2ndPass(nOptions & SdrSearchOptions::PASS2BOUND);
bool bCheckNearestOn3rdPass(nOptions & SdrSearchOptions::PASS3NEAREST);
- rpObj=NULL;
- rpPV=NULL;
+ rpObj=nullptr;
+ rpPV=nullptr;
Point aPt(rPnt);
sal_uInt16 nTol=(sal_uInt16)mnHitTolLog;
bool bFnd=false;
@@ -1872,15 +1872,15 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj();
- bFnd = 0 != CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,SdrSearchOptions::TESTMARKABLE,0);
+ bFnd = nullptr != CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,SdrSearchOptions::TESTMARKABLE,nullptr);
if (bFnd) {
rpObj=pObj;
rpPV=pPV;
}
}
if ((bBoundCheckOn2ndPass || bCheckNearestOn3rdPass) && !bFnd) {
- SdrObject* pBestObj=NULL;
- SdrPageView* pBestPV=NULL;
+ SdrObject* pBestObj=nullptr;
+ SdrPageView* pBestPV=nullptr;
sal_uIntPtr nBestDist=ULONG_MAX;
for (size_t nMarkNum=nMarkCount; nMarkNum>0 && !bFnd;) {
--nMarkNum;
@@ -1911,7 +1911,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
if (bCheckNearestOn3rdPass && !bFnd) {
rpObj=pBestObj;
rpPV=pBestPV;
- bFnd=pBestObj!=NULL;
+ bFnd=pBestObj!=nullptr;
}
}
return bFnd;
@@ -1922,7 +1922,7 @@ void SdrMarkView::UnmarkAllObj(SdrPageView* pPV)
{
if (GetMarkedObjectCount()!=0) {
BrkAction();
- if (pPV!=NULL)
+ if (pPV!=nullptr)
{
GetMarkedObjectListWriteAccess().DeletePageView(*pPV);
}
@@ -1930,8 +1930,8 @@ void SdrMarkView::UnmarkAllObj(SdrPageView* pPV)
{
GetMarkedObjectListWriteAccess().Clear();
}
- mpMarkedObj=NULL;
- mpMarkedPV=NULL;
+ mpMarkedObj=nullptr;
+ mpMarkedPV=nullptr;
MarkListHasChanged();
AdjustMarkHdl();
}
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 61b241c3c4f6..beb13620e84d 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -76,7 +76,7 @@ bool SdrMarkView::HasMarkedPoints() const
for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) {
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
const SdrUShortCont* pPts=pM->GetMarkedPoints();
- bRet=pPts!=NULL && !pPts->empty();
+ bRet=pPts!=nullptr && !pPts->empty();
}
}
}
@@ -93,7 +93,7 @@ sal_uIntPtr SdrMarkView::GetMarkedPointCount() const
for (size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) {
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
const SdrUShortCont* pPts=pM->GetMarkedPoints();
- if (pPts!=NULL) nCount+=pPts->size();
+ if (pPts!=nullptr) nCount+=pPts->size();
}
}
}
@@ -102,7 +102,7 @@ sal_uIntPtr SdrMarkView::GetMarkedPointCount() const
bool SdrMarkView::IsPointMarkable(const SdrHdl& rHdl) const
{
- return !ImpIsFrameHandles() && !rHdl.IsPlusHdl() && rHdl.GetKind()!=HDL_GLUE && rHdl.GetKind()!=HDL_SMARTTAG && rHdl.GetObj()!=NULL && rHdl.GetObj()->IsPolyObj();
+ return !ImpIsFrameHandles() && !rHdl.IsPlusHdl() && rHdl.GetKind()!=HDL_GLUE && rHdl.GetKind()!=HDL_SMARTTAG && rHdl.GetObj()!=nullptr && rHdl.GetObj()->IsPolyObj();
}
bool SdrMarkView::MarkPointHelper(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark)
@@ -112,17 +112,17 @@ bool SdrMarkView::MarkPointHelper(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark)
bool SdrMarkView::ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark)
{
- if (pHdl==NULL || pHdl->IsPlusHdl() || pHdl->GetKind()==HDL_GLUE)
+ if (pHdl==nullptr || pHdl->IsPlusHdl() || pHdl->GetKind()==HDL_GLUE)
return false;
if (pHdl->IsSelected() != bUnmark)
return false;
SdrObject* pObj=pHdl->GetObj();
- if (pObj==NULL || !pObj->IsPolyObj())
+ if (pObj==nullptr || !pObj->IsPolyObj())
return false;
- if (pMark==NULL)
+ if (pMark==nullptr)
{
const size_t nMarkNum=TryToFindMarkedObject(pObj);
if (nMarkNum==SAL_MAX_SIZE)
@@ -157,7 +157,7 @@ bool SdrMarkView::ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark)
for (sal_uInt32 i=0; i<nCount; i++)
{
SdrHdl* pPlusHdl=pObj->GetPlusHdl(*pHdl,i);
- if (pPlusHdl!=NULL)
+ if (pPlusHdl!=nullptr)
{
pPlusHdl->SetObj(pObj);
pPlusHdl->SetPageView(pMark->GetPageView());
@@ -212,9 +212,9 @@ bool SdrMarkView::MarkPoints(const Rectangle* pRect, bool bUnmark)
ForceUndirtyMrkPnt();
bool bChgd=false;
SortMarkedObjects();
- const SdrObject* pObj0=NULL;
- const SdrPageView* pPV0=NULL;
- SdrMark* pM=NULL;
+ const SdrObject* pObj0=nullptr;
+ const SdrPageView* pPV0=nullptr;
+ SdrMark* pM=nullptr;
maHdlList.Sort();
const size_t nHdlAnz=maHdlList.GetHdlCount();
for (size_t nHdlNum=nHdlAnz; nHdlNum>0;) {
@@ -223,7 +223,7 @@ bool SdrMarkView::MarkPoints(const Rectangle* pRect, bool bUnmark)
if (IsPointMarkable(*pHdl) && pHdl->IsSelected()==bUnmark) {
const SdrObject* pObj=pHdl->GetObj();
const SdrPageView* pPV=pHdl->GetPageView();
- if (pObj!=pObj0 || pPV!=pPV0 || pM==NULL) { // This section is for optimization,
+ if (pObj!=pObj0 || pPV!=pPV0 || pM==nullptr) { // This section is for optimization,
const size_t nMarkNum=TryToFindMarkedObject(pObj); // so ImpMarkPoint() doesn't always
if (nMarkNum!=SAL_MAX_SIZE) { // have to search the object in the MarkList.
pM=GetSdrMarkByIndex(nMarkNum);
@@ -236,11 +236,11 @@ bool SdrMarkView::MarkPoints(const Rectangle* pRect, bool bUnmark)
OSL_FAIL("SdrMarkView::MarkPoints(const Rectangle* pRect): Selected object not found.");
}
#endif
- pM=NULL;
+ pM=nullptr;
}
}
Point aPos(pHdl->GetPos());
- if (pM!=NULL && (pRect==NULL || pRect->IsInside(aPos))) {
+ if (pM!=nullptr && (pRect==nullptr || pRect->IsInside(aPos))) {
if (ImpMarkPoint(pHdl,pM,bUnmark)) bChgd=true;
}
}
@@ -319,7 +319,7 @@ void SdrMarkView::UndirtyMrkPnt() const
const SdrObject* pObj=pM->GetMarkedSdrObj();
// PolyPoints
SdrUShortCont* pPts=pM->GetMarkedPoints();
- if (pPts!=NULL) {
+ if (pPts!=nullptr) {
if (pObj->IsPolyObj()) {
// Remove invalid selected points, that is, all
// entries above the number of points in the object.
@@ -346,8 +346,8 @@ void SdrMarkView::UndirtyMrkPnt() const
// GluePoints
pPts=pM->GetMarkedGluePoints();
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- if (pPts!=NULL) {
- if (pGPL!=NULL) {
+ if (pPts!=nullptr) {
+ if (pGPL!=nullptr) {
// Remove invalid selected glue points, that is, all entries
// (IDs) that aren't contained in the GluePointList of the
// object
@@ -362,7 +362,7 @@ void SdrMarkView::UndirtyMrkPnt() const
++it;
}
} else {
- if (pPts!=NULL && !pPts->empty()) {
+ if (pPts!=nullptr && !pPts->empty()) {
pPts->clear(); // object doesn't have any glue points (any more)
bChg=true;
}
@@ -410,7 +410,7 @@ bool SdrMarkView::HasMarkedGluePoints() const
for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) {
const SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- bRet=pPts!=NULL && !pPts->empty();
+ bRet=pPts!=nullptr && !pPts->empty();
}
return bRet;
}
@@ -427,13 +427,13 @@ bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark)
const SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrGluePointList* pGPL=pObj->GetGluePointList();
SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- if (bUnmark && pRect==NULL) { // UnmarkAll
- if (pPts!=NULL && !pPts->empty()) {
+ if (bUnmark && pRect==nullptr) { // UnmarkAll
+ if (pPts!=nullptr && !pPts->empty()) {
pPts->clear();
bChgd=true;
}
} else {
- if (pGPL!=NULL && (pPts!=NULL || !bUnmark)) {
+ if (pGPL!=nullptr && (pPts!=nullptr || !bUnmark)) {
sal_uInt16 nGPAnz=pGPL->GetCount();
for (sal_uInt16 nGPNum=0; nGPNum<nGPAnz; nGPNum++) {
const SdrGluePoint& rGP=(*pGPL)[nGPNum];
@@ -442,8 +442,8 @@ bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark)
if(rGP.IsUserDefined())
{
Point aPos(rGP.GetAbsolutePos(*pObj));
- if (pRect==NULL || pRect->IsInside(aPos)) {
- if (pPts==NULL)
+ if (pRect==nullptr || pRect->IsInside(aPos)) {
+ if (pPts==nullptr)
pPts=pM->ForceMarkedGluePoints();
bool bContains = pPts->find( rGP.GetId() ) != pPts->end();
if (!bUnmark && !bContains) {
@@ -471,13 +471,13 @@ bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16
{
SdrObject* pObj0=rpObj;
sal_uInt16 nId0=rnId;
- rpObj=NULL; rpPV=NULL; rnId=0;
+ rpObj=nullptr; rpPV=nullptr; rnId=0;
if (!IsGluePointEditMode()) return false;
bool bBack(nOptions & SdrSearchOptions::BACKWARD);
bool bNext(nOptions & SdrSearchOptions::NEXT);
OutputDevice* pOut=mpActualOutDev.get();
- if (pOut==NULL) pOut=GetFirstOutputDevice();
- if (pOut==NULL) return false;
+ if (pOut==nullptr) pOut=GetFirstOutputDevice();
+ if (pOut==nullptr) return false;
SortMarkedObjects();
const size_t nMarkCount=GetMarkedObjectCount();
size_t nMarkNum=bBack ? 0 : nMarkCount;
@@ -492,7 +492,7 @@ bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrPageView* pPV=pM->GetPageView();
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- if (pGPL!=NULL) {
+ if (pGPL!=nullptr) {
sal_uInt16 nNum=pGPL->HitTest(rPnt,*pOut,pObj,bBack,bNext,nId0);
if (nNum!=SDRGLUEPOINT_NOTFOUND)
{
@@ -519,12 +519,12 @@ bool SdrMarkView::MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const Sdr
if (!IsGluePointEditMode()) return false;
ForceUndirtyMrkPnt();
bool bChgd=false;
- if (pObj!=NULL) {
+ if (pObj!=nullptr) {
const size_t nMarkPos=TryToFindMarkedObject(pObj);
if (nMarkPos!=SAL_MAX_SIZE) {
SdrMark* pM=GetSdrMarkByIndex(nMarkPos);
SdrUShortCont* pPts=bUnmark ? pM->GetMarkedGluePoints() : pM->ForceMarkedGluePoints();
- if (pPts!=NULL) {
+ if (pPts!=nullptr) {
bool bContains = pPts->find( nId ) != pPts->end();
if (!bUnmark && !bContains) {
bChgd=true;
@@ -554,7 +554,7 @@ bool SdrMarkView::IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const
if (nPos!=SAL_MAX_SIZE) {
const SdrMark* pM=GetSdrMarkByIndex(nPos);
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
- if (pPts!=NULL) {
+ if (pPts!=nullptr) {
bRet = pPts->find( nId ) != pPts->end();
}
}
@@ -571,7 +571,7 @@ SdrHdl* SdrMarkView::GetGluePointHdl(const SdrObject* pObj, sal_uInt16 nId) cons
pHdl->GetKind()==HDL_GLUE &&
pHdl->GetObjHdlNum()==nId ) return pHdl;
}
- return NULL;
+ return nullptr;
}
bool SdrMarkView::MarkNextGluePoint(const Point& /*rPnt*/, bool /*bPrev*/)
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 6f217513cf93..04acaef39c32 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -205,7 +205,7 @@ static bool ImpVerticalSwitch( const SdrObjCustomShape& rCustoShape )
// and translation executed, too.
SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemSet& rOriginalSet)
{
- SdrObject* pRetval = 0L;
+ SdrObject* pRetval = nullptr;
const bool bShadow(static_cast<const SdrOnOffItem&>(rOriginalSet.Get(SDRATTR_SHADOW)).GetValue());
if(bShadow)
@@ -443,7 +443,7 @@ const SdrObject* SdrObjCustomShape::GetSdrObjectFromCustomShape() const
}
SdrObject* pRenderedCustomShape = mXRenderedCustomShape.is()
? GetSdrObjectFromXShape( mXRenderedCustomShape )
- : NULL;
+ : nullptr;
return pRenderedCustomShape;
}
@@ -837,7 +837,7 @@ TYPEINIT1(SdrObjCustomShape,SdrTextObj);
SdrObjCustomShape::SdrObjCustomShape() :
SdrTextObj(),
fObjectRotation( 0.0 ),
- mpLastShadowGeometry(0L)
+ mpLastShadowGeometry(nullptr)
{
bClosedObj = true; // custom shapes may be filled
bTextFrame = true;
@@ -875,7 +875,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
}
MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
- const sal_Int32* pDefData = NULL;
+ const sal_Int32* pDefData = nullptr;
const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eSpType );
if ( pDefCustomShape )
pDefData = pDefCustomShape->pDefData;
@@ -1144,7 +1144,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
bIsDefaultGeometry = true;
}
}
- else if ( pDefCustomShape && ( ( pDefCustomShape->nVertices == 0 ) || ( pDefCustomShape->pVertices == 0 ) ) )
+ else if ( pDefCustomShape && ( ( pDefCustomShape->nVertices == 0 ) || ( pDefCustomShape->pVertices == nullptr ) ) )
bIsDefaultGeometry = true;
}
break;
@@ -1214,7 +1214,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
}
}
}
- else if ( pDefCustomShape && ( ( pDefCustomShape->nElements == 0 ) || ( pDefCustomShape->pElements == 0 ) ) )
+ else if ( pDefCustomShape && ( ( pDefCustomShape->nElements == 0 ) || ( pDefCustomShape->pElements == nullptr ) ) )
bIsDefaultGeometry = true;
}
break;
@@ -1275,7 +1275,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
bIsDefaultGeometry = true;
}
}
- else if ( pDefCustomShape && ( ( pDefCustomShape->nCalculation == 0 ) || ( pDefCustomShape->pCalculation == 0 ) ) )
+ else if ( pDefCustomShape && ( ( pDefCustomShape->nCalculation == 0 ) || ( pDefCustomShape->pCalculation == nullptr ) ) )
bIsDefaultGeometry = true;
}
break;
@@ -1303,7 +1303,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
bIsDefaultGeometry = true;
}
}
- else if ( pDefCustomShape && ( ( pDefCustomShape->nTextRect == 0 ) || ( pDefCustomShape->pTextRect == 0 ) ) )
+ else if ( pDefCustomShape && ( ( pDefCustomShape->nTextRect == 0 ) || ( pDefCustomShape->pTextRect == nullptr ) ) )
bIsDefaultGeometry = true;
}
break;
@@ -1332,7 +1332,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
bIsDefaultGeometry = true;
}
}
- else if ( pDefCustomShape && ( ( pDefCustomShape->nHandles == 0 ) || ( pDefCustomShape->pHandles == 0 ) ) )
+ else if ( pDefCustomShape && ( ( pDefCustomShape->nHandles == 0 ) || ( pDefCustomShape->pHandles == nullptr ) ) )
bIsDefaultGeometry = true;
}
break;
@@ -1875,7 +1875,7 @@ SdrGluePointList* SdrObjCustomShape::ForceGluePointList()
}
else
{
- return 0L;
+ return nullptr;
}
}
@@ -1890,7 +1890,7 @@ sal_uInt32 SdrObjCustomShape::GetHdlCount() const
SdrHdl* SdrObjCustomShape::GetHdl( sal_uInt32 nHdlNum ) const
{
- SdrHdl* pH = NULL;
+ SdrHdl* pH = nullptr;
const sal_uInt32 nBasicHdlCount(SdrTextObj::GetHdlCount());
if ( nHdlNum < nBasicHdlCount )
@@ -1939,7 +1939,7 @@ bool SdrObjCustomShape::beginSpecialDrag(SdrDragStat& rDrag) const
else
{
const SdrHdl* pHdl2 = rDrag.GetHdl();
- const SdrHdlKind eHdl((pHdl2 == NULL) ? HDL_MOVE : pHdl2->GetKind());
+ const SdrHdlKind eHdl((pHdl2 == nullptr) ? HDL_MOVE : pHdl2->GetKind());
switch( eHdl )
{
@@ -2105,7 +2105,7 @@ void SdrObjCustomShape::DragMoveCustomShapeHdl( const Point& rDestination,
bool SdrObjCustomShape::applySpecialDrag(SdrDragStat& rDrag)
{
const SdrHdl* pHdl = rDrag.GetHdl();
- const SdrHdlKind eHdl((pHdl == NULL) ? HDL_MOVE : pHdl->GetKind());
+ const SdrHdlKind eHdl((pHdl == nullptr) ? HDL_MOVE : pHdl->GetKind());
switch(eHdl)
{
@@ -2374,7 +2374,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt,
rOutliner.SetUpdateMode(true);
// TODO: add the optimization with bPortionInfoChecked again.
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
- if( pOutlinerParaObject != NULL )
+ if( pOutlinerParaObject != nullptr )
{
rOutliner.SetText(*pOutlinerParaObject);
rOutliner.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
@@ -2579,7 +2579,7 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Recta
Size aAnkSiz(aViewInit.GetSize());
aAnkSiz.Width()--; aAnkSiz.Height()--; // because GetSize() adds 1
Size aMaxSiz(1000000,1000000);
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
Size aTmpSiz(pModel->GetMaxObjSize());
if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
@@ -2648,9 +2648,9 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Recta
if(SDRTEXTVERTADJUST_BLOCK != eVAdj )
aPaperMin.Height() = 0;
- if (pPaperMin!=NULL) *pPaperMin=aPaperMin;
- if (pPaperMax!=NULL) *pPaperMax=aPaperMax;
- if (pViewInit!=NULL) *pViewInit=aViewInit;
+ if (pPaperMin!=nullptr) *pPaperMin=aPaperMin;
+ if (pPaperMax!=nullptr) *pPaperMax=aPaperMax;
+ if (pViewInit!=nullptr) *pViewInit=aViewInit;
}
void SdrObjCustomShape::EndTextEdit( SdrOutliner& rOutl )
{
@@ -2743,7 +2743,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe
}
else
{
- rOutliner.SetTextObj( NULL );
+ rOutliner.SetTextObj( nullptr );
}
if (pEdtOutl && !bNoEditText && pPara)
delete pPara;
@@ -2871,8 +2871,8 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeContour() const
SdrObject* SdrObjCustomShape::DoConvertToPolyObj(bool bBezier, bool bAddText) const
{
// #i37011#
- SdrObject* pRetval = 0L;
- SdrObject* pRenderedCustomShape = 0L;
+ SdrObject* pRetval = nullptr;
+ SdrObject* pRenderedCustomShape = nullptr;
if ( !mXRenderedCustomShape.is() )
{
@@ -3223,9 +3223,9 @@ bool SdrObjCustomShape::doConstructOrthogonal(const OUString& rName)
// #i37011# centralize throw-away of render geometry
void SdrObjCustomShape::InvalidateRenderGeometry()
{
- mXRenderedCustomShape = 0L;
+ mXRenderedCustomShape = nullptr;
SdrObject::Free( mpLastShadowGeometry );
- mpLastShadowGeometry = 0L;
+ mpLastShadowGeometry = nullptr;
}
void SdrObjCustomShape::impl_setUnoShape(const uno::Reference<uno::XInterface>& rxUnoShape)
@@ -3234,7 +3234,7 @@ void SdrObjCustomShape::impl_setUnoShape(const uno::Reference<uno::XInterface>&
// The shape engine is created with _current_ shape. This means we
// _must_ reset it when the shape changes.
- mxCustomShapeEngine.set(0);
+ mxCustomShapeEngine.set(nullptr);
}
OUString SdrObjCustomShape::GetCustomShapeName()
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index c2ed3bad1ae0..d02a1b53a20f 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -154,9 +154,9 @@ void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*
}
SdrObjMacroHitRec::SdrObjMacroHitRec() :
- pOut(NULL),
- pVisiLayer(NULL),
- pPageView(NULL),
+ pOut(nullptr),
+ pVisiLayer(nullptr),
+ pPageView(nullptr),
nTol(0),
bDown(false) {}
@@ -175,7 +175,7 @@ SdrObjUserData::SdrObjUserData(const SdrObjUserData& rData) :
SdrObjUserData::~SdrObjUserData() {}
SdrObjGeoData::SdrObjGeoData():
- pGPL(NULL),
+ pGPL(nullptr),
bMovProt(false),
bSizProt(false),
bNoPrint(false),
@@ -302,18 +302,18 @@ TYPEINIT1(SdrObject,SfxListener);
SdrObject::SdrObject() :
mpImpl(new Impl),
- mpProperties(0L)
- ,mpViewContact(0L)
- ,pObjList(NULL)
- ,pPage(NULL)
- ,pModel(NULL)
- ,pUserCall(NULL)
- ,pPlusData(NULL)
+ mpProperties(nullptr)
+ ,mpViewContact(nullptr)
+ ,pObjList(nullptr)
+ ,pPage(nullptr)
+ ,pModel(nullptr)
+ ,pUserCall(nullptr)
+ ,pPlusData(nullptr)
,nOrdNum(0)
- ,pGrabBagItem(NULL)
+ ,pGrabBagItem(nullptr)
,mnNavigationPosition(SAL_MAX_UINT32)
,mnLayerID(0)
- ,mpSvxShape( NULL )
+ ,mpSvxShape( nullptr )
,maWeakUnoShape()
,mbDoNotInsertIntoPageAutomatically(false)
{
@@ -382,13 +382,13 @@ SdrObject::~SdrObject()
if(mpProperties)
{
delete mpProperties;
- mpProperties = 0L;
+ mpProperties = nullptr;
}
if(mpViewContact)
{
delete mpViewContact;
- mpViewContact = 0L;
+ mpViewContact = nullptr;
}
delete mpImpl;
@@ -396,8 +396,8 @@ SdrObject::~SdrObject()
void SdrObject::Free( SdrObject*& _rpObject )
{
- SdrObject* pObject = _rpObject; _rpObject = NULL;
- if ( pObject == NULL )
+ SdrObject* pObject = _rpObject; _rpObject = nullptr;
+ if ( pObject == nullptr )
// nothing to do
return;
@@ -420,7 +420,7 @@ void SdrObject::SetRectsDirty(bool bNotMyself)
SetBoundRectDirty();
bSnapRectDirty=true;
}
- if (pObjList!=NULL) {
+ if (pObjList!=nullptr) {
pObjList->SetRectsDirty();
}
}
@@ -431,7 +431,7 @@ void SdrObject::SetModel(SdrModel* pNewModel)
{
if(pPage->GetModel() != pNewModel)
{
- pPage = NULL;
+ pPage = nullptr;
}
}
@@ -459,9 +459,9 @@ void SdrObject::SetPage(SdrPage* pNewPage)
SdrPage* pOldPage = pPage;
pPage=pNewPage;
- if (pPage!=NULL) {
+ if (pPage!=nullptr) {
SdrModel* pMod=pPage->GetModel();
- if (pMod!=pModel && pMod!=NULL) {
+ if (pMod!=pModel && pMod!=nullptr) {
SetModel(pMod);
}}
@@ -475,13 +475,13 @@ void SdrObject::SetPage(SdrPage* pNewPage)
{
SvxShape* const pShape(getSvxShape());
if (pShape && !pShape->HasSdrObjectOwnership())
- setUnoShape(NULL);
+ setUnoShape(nullptr);
}
}
// init global static itempool
-SdrItemPool* SdrObject::mpGlobalItemPool = NULL;
+SdrItemPool* SdrObject::mpGlobalItemPool = nullptr;
SdrItemPool& SdrObject::GetGlobalDrawObjectItemPool()
{
@@ -520,7 +520,7 @@ void SdrObject::SetRelativeHeightRelation( sal_Int16 eValue )
const double* SdrObject::GetRelativeWidth( ) const
{
if (!mpImpl->mnRelativeWidth)
- return NULL;
+ return nullptr;
return &mpImpl->mnRelativeWidth.get();
}
@@ -533,7 +533,7 @@ sal_Int16 SdrObject::GetRelativeWidthRelation() const
const double* SdrObject::GetRelativeHeight( ) const
{
if (!mpImpl->mnRelativeHeight)
- return NULL;
+ return nullptr;
return &mpImpl->mnRelativeHeight.get();
}
@@ -586,7 +586,7 @@ void SdrObject::getMergedHierarchyLayerSet(SetOfByte& rSet) const
{
rSet.Set(GetLayer());
SdrObjList* pOL=GetSubList();
- if (pOL!=NULL) {
+ if (pOL!=nullptr) {
const size_t nObjCount = pOL->GetObjCount();
for (size_t nObjNum = 0; nObjNum<nObjCount; ++nObjNum) {
pOL->GetObj(nObjNum)->getMergedHierarchyLayerSet(rSet);
@@ -609,24 +609,24 @@ void SdrObject::SetLayer(SdrLayerID nLayer)
void SdrObject::AddListener(SfxListener& rListener)
{
ImpForcePlusData();
- if (pPlusData->pBroadcast==NULL) pPlusData->pBroadcast=new SfxBroadcaster;
+ if (pPlusData->pBroadcast==nullptr) pPlusData->pBroadcast=new SfxBroadcaster;
rListener.StartListening(*pPlusData->pBroadcast);
}
void SdrObject::RemoveListener(SfxListener& rListener)
{
- if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
+ if (pPlusData!=nullptr && pPlusData->pBroadcast!=nullptr) {
rListener.EndListening(*pPlusData->pBroadcast);
if (!pPlusData->pBroadcast->HasListeners()) {
delete pPlusData->pBroadcast;
- pPlusData->pBroadcast=NULL;
+ pPlusData->pBroadcast=nullptr;
}
}
}
const SfxBroadcaster* SdrObject::GetBroadcaster() const
{
- return pPlusData!=NULL ? pPlusData->pBroadcast : NULL;
+ return pPlusData!=nullptr ? pPlusData->pBroadcast : nullptr;
}
void SdrObject::AddReference(SdrVirtObj& rVrtObj)
@@ -641,17 +641,17 @@ void SdrObject::DelReference(SdrVirtObj& rVrtObj)
bool SdrObject::IsGroupObject() const
{
- return GetSubList()!=NULL;
+ return GetSubList()!=nullptr;
}
SdrObjList* SdrObject::GetSubList() const
{
- return NULL;
+ return nullptr;
}
SdrObject* SdrObject::GetUpGroup() const
{
- return pObjList!=NULL ? pObjList->GetOwnerObj() : NULL;
+ return pObjList!=nullptr ? pObjList->GetOwnerObj() : nullptr;
}
void SdrObject::SetName(const OUString& rStr)
@@ -788,7 +788,7 @@ OUString SdrObject::GetDescription() const
sal_uInt32 SdrObject::GetOrdNum() const
{
- if (pObjList!=NULL) {
+ if (pObjList!=nullptr) {
if (pObjList->IsObjOrdNumsDirty()) {
pObjList->RecalcObjOrdNums();
}
@@ -804,7 +804,7 @@ void SdrObject::SetOrdNum(sal_uInt32 nNum)
void SdrObject::GetGrabBagItem(css::uno::Any& rVal) const
{
- if (pGrabBagItem != NULL)
+ if (pGrabBagItem != nullptr)
pGrabBagItem->QueryValue(rVal);
else {
uno::Sequence<beans::PropertyValue> aValue(0);
@@ -814,7 +814,7 @@ void SdrObject::GetGrabBagItem(css::uno::Any& rVal) const
void SdrObject::SetGrabBagItem(const css::uno::Any& rVal)
{
- if (pGrabBagItem == NULL)
+ if (pGrabBagItem == nullptr)
pGrabBagItem = new SfxGrabBagItem;
pGrabBagItem->PutValue(rVal, 0);
@@ -825,7 +825,7 @@ void SdrObject::SetGrabBagItem(const css::uno::Any& rVal)
sal_uInt32 SdrObject::GetNavigationPosition()
{
- if (pObjList!=NULL && pObjList->RecalcNavigationPositions())
+ if (pObjList!=nullptr && pObjList->RecalcNavigationPositions())
{
return mnNavigationPosition;
}
@@ -972,13 +972,13 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
if(mpProperties)
{
delete mpProperties;
- mpProperties = 0L;
+ mpProperties = nullptr;
}
if(mpViewContact)
{
delete mpViewContact;
- mpViewContact = 0L;
+ mpViewContact = nullptr;
}
// The Clone() method uses the local copy constructor from the individual
@@ -1002,18 +1002,18 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
bSnapRectDirty=true;
bNotMasterCachable=rObj.bNotMasterCachable;
delete pPlusData;
- pPlusData=NULL;
- if (rObj.pPlusData!=NULL) {
+ pPlusData=nullptr;
+ if (rObj.pPlusData!=nullptr) {
pPlusData=rObj.pPlusData->Clone(this);
}
- if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
+ if (pPlusData!=nullptr && pPlusData->pBroadcast!=nullptr) {
delete pPlusData->pBroadcast; // broadcaster isn't copied
- pPlusData->pBroadcast=NULL;
+ pPlusData->pBroadcast=nullptr;
}
delete pGrabBagItem;
- pGrabBagItem=NULL;
- if (rObj.pGrabBagItem!=NULL)
+ pGrabBagItem=nullptr;
+ if (rObj.pGrabBagItem!=nullptr)
pGrabBagItem=static_cast< SfxGrabBagItem* >( rObj.pGrabBagItem->Clone() );
aGridOffset = rObj.aGridOffset;
@@ -1067,7 +1067,7 @@ void SdrObject::ImpForcePlusData()
OUString SdrObject::GetAngleStr(long nAngle, bool bNoDegChar) const
{
OUString aStr;
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
SdrModel::TakeAngleStr(nAngle,aStr,bNoDegChar);
}
return aStr;
@@ -1076,7 +1076,7 @@ OUString SdrObject::GetAngleStr(long nAngle, bool bNoDegChar) const
OUString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, bool bNoUnitChars) const
{
OUString aStr;
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
pModel->TakeMetricStr(nVal,aStr,bNoUnitChars);
}
return aStr;
@@ -1108,7 +1108,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
{
// no text and no text animation
pClone->SetMergedItem(SdrTextAniKindItem(SDRTEXTANI_NONE));
- pClone->SetOutlinerParaObject(0);
+ pClone->SetOutlinerParaObject(nullptr);
}
const SdrEdgeObj* pEdgeObj = dynamic_cast< const SdrEdgeObj* >(this);
@@ -1186,7 +1186,7 @@ sal_uInt32 SdrObject::GetHdlCount() const
SdrHdl* SdrObject::GetHdl(sal_uInt32 nHdlNum) const
{
- SdrHdl* pH=NULL;
+ SdrHdl* pH=nullptr;
const Rectangle& rR=GetSnapRect();
switch (nHdlNum) {
case 0: pH=new SdrHdl(rR.TopLeft(), HDL_UPLFT); break;
@@ -1208,7 +1208,7 @@ sal_uInt32 SdrObject::GetPlusHdlCount(const SdrHdl& /*rHdl*/) const
SdrHdl* SdrObject::GetPlusHdl(const SdrHdl& /*rHdl*/, sal_uInt32 /*nPlNum*/) const
{
- return 0L;
+ return nullptr;
}
void SdrObject::AddToHdlList(SdrHdlList& rHdlList) const
@@ -1216,7 +1216,7 @@ void SdrObject::AddToHdlList(SdrHdlList& rHdlList) const
sal_uInt32 nCount=GetHdlCount();
for (sal_uInt32 i=0L; i<nCount; i++) {
SdrHdl* pHdl=GetHdl(i);
- if (pHdl!=NULL) {
+ if (pHdl!=nullptr) {
rHdlList.AddHdl(pHdl);
}
}
@@ -1233,9 +1233,9 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
Rectangle aTmpRect(GetSnapRect());
Rectangle aRect(aTmpRect);
const SdrHdl* pHdl=rDrag.GetHdl();
- SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ SdrHdlKind eHdl=pHdl==nullptr ? HDL_MOVE : pHdl->GetKind();
bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT);
- bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho();
+ bool bOrtho=rDrag.GetView()!=nullptr && rDrag.GetView()->IsOrtho();
bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho();
Point aPos(rDrag.GetNow());
bool bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT);
@@ -1319,7 +1319,7 @@ bool SdrObject::beginSpecialDrag(SdrDragStat& rDrag) const
{
const SdrHdl* pHdl = rDrag.GetHdl();
- SdrHdlKind eHdl = (pHdl == NULL) ? HDL_MOVE : pHdl->GetKind();
+ SdrHdlKind eHdl = (pHdl == nullptr) ? HDL_MOVE : pHdl->GetKind();
if(eHdl==HDL_UPLFT || eHdl==HDL_UPPER || eHdl==HDL_UPRGT ||
eHdl==HDL_LEFT || eHdl==HDL_RIGHT || eHdl==HDL_LWLFT ||
@@ -1506,7 +1506,7 @@ void SdrObject::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear
void SdrObject::Move(const Size& rSiz)
{
if (rSiz.Width()!=0 || rSiz.Height()!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcMove(rSiz);
SetChanged();
BroadcastObjectChange();
@@ -1528,7 +1528,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction&
mpImpl->meRelativeHeightRelation = text::RelOrientation::PAGE_FRAME;
mpImpl->mnRelativeHeight.reset();
}
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcResize(rRef,xFact,yFact);
SetChanged();
BroadcastObjectChange();
@@ -1538,7 +1538,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction&
void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcCrop(rRef, xFact, yFact);
SetChanged();
BroadcastObjectChange();
@@ -1548,7 +1548,7 @@ void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& y
void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcRotate(rRef,nAngle,sn,cs);
SetChanged();
BroadcastObjectChange();
@@ -1558,7 +1558,7 @@ void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs)
void SdrObject::Mirror(const Point& rRef1, const Point& rRef2)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcMirror(rRef1,rRef2);
SetChanged();
BroadcastObjectChange();
@@ -1568,7 +1568,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2)
void SdrObject::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcShear(rRef,nAngle,tn,bVShear);
SetChanged();
BroadcastObjectChange();
@@ -1586,7 +1586,7 @@ void SdrObject::NbcSetRelativePos(const Point& rPnt)
void SdrObject::SetRelativePos(const Point& rPnt)
{
if (rPnt!=GetRelativePos()) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetRelativePos(rPnt);
SetChanged();
BroadcastObjectChange();
@@ -1614,7 +1614,7 @@ void SdrObject::NbcSetAnchorPos(const Point& rPnt)
void SdrObject::SetAnchorPos(const Point& rPnt)
{
if (rPnt!=aAnchor) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetAnchorPos(rPnt);
SetChanged();
BroadcastObjectChange();
@@ -1658,7 +1658,7 @@ void SdrObject::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly
void SdrObject::SetSnapRect(const Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetSnapRect(rRect);
SetChanged();
BroadcastObjectChange();
@@ -1667,7 +1667,7 @@ void SdrObject::SetSnapRect(const Rectangle& rRect)
void SdrObject::SetLogicRect(const Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetLogicRect(rRect);
SetChanged();
BroadcastObjectChange();
@@ -1711,7 +1711,7 @@ Point SdrObject::GetPoint(sal_uInt32 /*i*/) const
void SdrObject::SetPoint(const Point& rPnt, sal_uInt32 i)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetPoint(rPnt, i);
SetChanged();
BroadcastObjectChange();
@@ -1792,7 +1792,7 @@ void SdrObject::EndTextEdit(SdrOutliner& /*rOutl*/)
void SdrObject::SetOutlinerParaObject(OutlinerParaObject* pTextObject)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetOutlinerParaObject(pTextObject);
SetChanged();
BroadcastObjectChange();
@@ -1807,7 +1807,7 @@ void SdrObject::NbcSetOutlinerParaObject(OutlinerParaObject* /*pTextObject*/)
OutlinerParaObject* SdrObject::GetOutlinerParaObject() const
{
- return NULL;
+ return nullptr;
}
void SdrObject::NbcReformatText()
@@ -1816,7 +1816,7 @@ void SdrObject::NbcReformatText()
void SdrObject::ReformatText()
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcReformatText();
SetChanged();
BroadcastObjectChange();
@@ -1842,7 +1842,7 @@ SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
return SdrObjectPrimitiveHit(*this, rRec.aPos, rRec.nTol, *rRec.pPageView, rRec.pVisiLayer, false);
}
- return 0;
+ return nullptr;
}
Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec&) const
@@ -1880,7 +1880,7 @@ OUString SdrObject::GetMacroPopupComment(const SdrObjMacroHitRec&) const
bool SdrObject::IsMacroHit(const SdrObjMacroHitRec& rRec) const
{
- return CheckMacroHit(rRec) != NULL;
+ return CheckMacroHit(rRec) != nullptr;
}
@@ -1902,16 +1902,16 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
rGeo.mnLayerID = mnLayerID;
// user-defined glue points
- if (pPlusData!=NULL && pPlusData->pGluePoints!=NULL) {
- if (rGeo.pGPL!=NULL) {
+ if (pPlusData!=nullptr && pPlusData->pGluePoints!=nullptr) {
+ if (rGeo.pGPL!=nullptr) {
*rGeo.pGPL=*pPlusData->pGluePoints;
} else {
rGeo.pGPL=new SdrGluePointList(*pPlusData->pGluePoints);
}
} else {
- if (rGeo.pGPL!=NULL) {
+ if (rGeo.pGPL!=nullptr) {
delete rGeo.pGPL;
- rGeo.pGPL=NULL;
+ rGeo.pGPL=nullptr;
}
}
}
@@ -1929,17 +1929,17 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
mnLayerID = rGeo.mnLayerID;
// user-defined glue points
- if (rGeo.pGPL!=NULL) {
+ if (rGeo.pGPL!=nullptr) {
ImpForcePlusData();
- if (pPlusData->pGluePoints!=NULL) {
+ if (pPlusData->pGluePoints!=nullptr) {
*pPlusData->pGluePoints=*rGeo.pGPL;
} else {
pPlusData->pGluePoints=new SdrGluePointList(*rGeo.pGPL);
}
} else {
- if (pPlusData!=NULL && pPlusData->pGluePoints!=NULL) {
+ if (pPlusData!=nullptr && pPlusData->pGluePoints!=nullptr) {
delete pPlusData->pGluePoints;
- pPlusData->pGluePoints=NULL;
+ pPlusData->pGluePoints=nullptr;
}
}
}
@@ -1953,7 +1953,7 @@ SdrObjGeoData* SdrObject::GetGeoData() const
void SdrObject::SetGeoData(const SdrObjGeoData& rGeo)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
RestGeoData(rGeo);
SetChanged();
BroadcastObjectChange();
@@ -2020,7 +2020,7 @@ void SdrObject::SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClear
void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcApplyNotPersistAttr(rAttr);
SetChanged();
BroadcastObjectChange();
@@ -2033,7 +2033,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
const Rectangle& rLogic=GetLogicRect();
Point aRef1(rSnap.Center());
Point aRef2(aRef1); aRef2.Y()++;
- const SfxPoolItem *pPoolItem=NULL;
+ const SfxPoolItem *pPoolItem=nullptr;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
aRef1.X()=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue();
}
@@ -2141,12 +2141,12 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) {
nLayer=static_cast<const SdrLayerIdItem*>(pPoolItem)->GetValue();
}
- if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET && pModel!=NULL) {
+ if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET && pModel!=nullptr) {
OUString aLayerName=static_cast<const SdrLayerNameItem*>(pPoolItem)->GetValue();
- const SdrLayerAdmin* pLayAd=pPage!=NULL ? &pPage->GetLayerAdmin() : pModel!=NULL ? &pModel->GetLayerAdmin() : NULL;
- if (pLayAd!=NULL) {
+ const SdrLayerAdmin* pLayAd=pPage!=nullptr ? &pPage->GetLayerAdmin() : pModel!=nullptr ? &pModel->GetLayerAdmin() : nullptr;
+ if (pLayAd!=nullptr) {
const SdrLayer* pLayer=pLayAd->GetLayer(aLayerName, true);
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
nLayer=pLayer->GetID();
}
}
@@ -2219,10 +2219,10 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, bool bMerge) const
}
lcl_SetItem(rAttr,bMerge,SdrLayerIdItem(GetLayer()));
- const SdrLayerAdmin* pLayAd=pPage!=NULL ? &pPage->GetLayerAdmin() : pModel!=NULL ? &pModel->GetLayerAdmin() : NULL;
- if (pLayAd!=NULL) {
+ const SdrLayerAdmin* pLayAd=pPage!=nullptr ? &pPage->GetLayerAdmin() : pModel!=nullptr ? &pModel->GetLayerAdmin() : nullptr;
+ if (pLayAd!=nullptr) {
const SdrLayer* pLayer=pLayAd->GetLayerPerID(GetLayer());
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
lcl_SetItem(rAttr,bMerge,SdrLayerNameItem(pLayer->GetName()));
}
}
@@ -2308,15 +2308,15 @@ SdrGluePoint SdrObject::GetCornerGluePoint(sal_uInt16 nPosNum) const
const SdrGluePointList* SdrObject::GetGluePointList() const
{
- if (pPlusData!=NULL) return pPlusData->pGluePoints;
- return NULL;
+ if (pPlusData!=nullptr) return pPlusData->pGluePoints;
+ return nullptr;
}
SdrGluePointList* SdrObject::ForceGluePointList()
{
ImpForcePlusData();
- if (pPlusData->pGluePoints==NULL) {
+ if (pPlusData->pGluePoints==nullptr) {
pPlusData->pGluePoints=new SdrGluePointList;
}
return pPlusData->pGluePoints;
@@ -2326,7 +2326,7 @@ void SdrObject::SetGlueReallyAbsolute(bool bOn)
{
// First a const call to see whether there are any glue points.
// Force const call!
- if (GetGluePointList()!=NULL) {
+ if (GetGluePointList()!=nullptr) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->SetReallyAbsolute(bOn,*this);
}
@@ -2336,7 +2336,7 @@ void SdrObject::NbcRotateGluePoints(const Point& rRef, long nAngle, double sn, d
{
// First a const call to see whether there are any glue points.
// Force const call!
- if (GetGluePointList()!=NULL) {
+ if (GetGluePointList()!=nullptr) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->Rotate(rRef,nAngle,sn,cs,this);
}
@@ -2346,7 +2346,7 @@ void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2)
{
// First a const call to see whether there are any glue points.
// Force const call!
- if (GetGluePointList()!=NULL) {
+ if (GetGluePointList()!=nullptr) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->Mirror(rRef1,rRef2,this);
}
@@ -2356,7 +2356,7 @@ void SdrObject::NbcShearGluePoints(const Point& rRef, long nAngle, double tn, bo
{
// First a const call to see whether there are any glue points.
// Force const call!
- if (GetGluePointList()!=NULL) {
+ if (GetGluePointList()!=nullptr) {
SdrGluePointList* pGPL=ForceGluePointList();
pGPL->Shear(rRef,nAngle,tn,bVShear,this);
}
@@ -2372,7 +2372,7 @@ void SdrObject::DisconnectFromNode(bool /*bTail1*/)
SdrObject* SdrObject::GetConnectedNode(bool /*bTail1*/) const
{
- return NULL;
+ return nullptr;
}
@@ -2442,8 +2442,8 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas
{
SfxItemSet aSet(pRet->GetMergedItemSet());
drawing::FillStyle eOldFillStyle = static_cast<const XFillStyleItem&>(aSet.Get(XATTR_FILLSTYLE)).GetValue();
- SdrPathObj* aLinePolygonPart = NULL;
- SdrPathObj* aLineHairlinePart = NULL;
+ SdrPathObj* aLinePolygonPart = nullptr;
+ SdrPathObj* aLineHairlinePart = nullptr;
bool bBuildGroup(false);
if(aMergedLineFillPolyPolygon.count())
@@ -2662,7 +2662,7 @@ SdrObject* SdrObject::ConvertToPolyObj(bool bBezier, bool bLineToArea) const
SdrObject* SdrObject::DoConvertToPolyObj(bool /*bBezier*/, bool /*bAddText*/) const
{
- return NULL;
+ return nullptr;
}
@@ -2675,7 +2675,7 @@ void SdrObject::SetInserted(bool bIns)
if (bIns) SendUserCall(SDRUSERCALL_INSERTED,aBoundRect0);
else SendUserCall(SDRUSERCALL_REMOVED,aBoundRect0);
- if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
+ if (pPlusData!=nullptr && pPlusData->pBroadcast!=nullptr) {
SdrHint aHint(*this);
aHint.SetKind(bIns?HINT_OBJINSERTED:HINT_OBJREMOVED);
pPlusData->pBroadcast->Broadcast(aHint);
@@ -2711,7 +2711,7 @@ void SdrObject::SetPrintable(bool bPrn)
{
bNoPrint=!bPrn;
SetChanged();
- if (IsInserted() && pModel!=NULL)
+ if (IsInserted() && pModel!=nullptr)
{
SdrHint aHint(*this);
pModel->Broadcast(aHint);
@@ -2725,7 +2725,7 @@ void SdrObject::SetVisible(bool bVisible)
{
mbVisible = bVisible;
SetChanged();
- if (IsInserted() && pModel!=NULL)
+ if (IsInserted() && pModel!=nullptr)
{
SdrHint aHint(*this);
pModel->Broadcast(aHint);
@@ -2737,13 +2737,13 @@ void SdrObject::SetVisible(bool bVisible)
sal_uInt16 SdrObject::GetUserDataCount() const
{
- if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return 0;
+ if (pPlusData==nullptr || pPlusData->pUserDataList==nullptr) return 0;
return pPlusData->pUserDataList->GetUserDataCount();
}
SdrObjUserData* SdrObject::GetUserData(sal_uInt16 nNum) const
{
- if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return NULL;
+ if (pPlusData==nullptr || pPlusData->pUserDataList==nullptr) return nullptr;
return &pPlusData->pUserDataList->GetUserData(nNum);
}
@@ -2769,7 +2769,7 @@ void SdrObject::DeleteUserData(sal_uInt16 nNum)
pPlusData->pUserDataList->DeleteUserData(nNum);
if (nCount==1) {
delete pPlusData->pUserDataList;
- pPlusData->pUserDataList=NULL;
+ pPlusData->pUserDataList=nullptr;
}
} else {
OSL_FAIL("SdrObject::DeleteUserData(): Invalid Index.");
@@ -2784,7 +2784,7 @@ void SdrObject::SetUserCall(SdrObjUserCall* pUser)
void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect) const
{
- SdrObject* pGroup = NULL;
+ SdrObject* pGroup = nullptr;
if( pObjList && pObjList->GetListKind() == SDROBJLIST_GROUPOBJ )
pGroup = pObjList->GetOwnerObj();
@@ -2842,7 +2842,7 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundR
pGroup != pObjList->GetOwnerObj() )
pGroup = pObjList->GetOwnerObj();
else
- pGroup = NULL;
+ pGroup = nullptr;
}
// notify our UNO shape listeners
@@ -2880,7 +2880,7 @@ void SdrObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& _rxUn
// make sure there is no stale impl. pointer if the UNO
// shape was destroyed meanwhile (remember we only hold weak
// reference to it!)
- mpSvxShape = 0;
+ mpSvxShape = nullptr;
}
return;
}
@@ -2920,7 +2920,7 @@ SvxShape* SdrObject::getSvxShape()
#endif
//#113608#, make sure mpSvxShape is always synchronized with maWeakUnoShape
if ( mpSvxShape && !xShape.is() )
- mpSvxShape = NULL;
+ mpSvxShape = nullptr;
return mpSvxShape;
}
@@ -2931,7 +2931,7 @@ css::uno::Reference< css::uno::XInterface > SdrObject::getUnoShape()
uno::Reference< uno::XInterface > xShape( getWeakUnoShape() );
if( !xShape.is() )
{
- OSL_ENSURE( mpSvxShape == NULL, "SdrObject::getUnoShape: XShape already dead, but still an IMPL pointer!" );
+ OSL_ENSURE( mpSvxShape == nullptr, "SdrObject::getUnoShape: XShape already dead, but still an IMPL pointer!" );
if ( pPage )
{
uno::Reference< uno::XInterface > xPage( pPage->getUnoPage() );
@@ -3152,11 +3152,11 @@ SdrObjFactory::SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNe
{
nInventor=nInvent;
nIdentifier=nIdent;
- pNewObj=NULL;
+ pNewObj=nullptr;
pPage=pNewPage;
pModel=pNewModel;
- pObj=NULL;
- pNewData=NULL;
+ pObj=nullptr;
+ pNewData=nullptr;
}
SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uInt16 nIdentifier, SdrPage* pPage, SdrModel* pModel )
@@ -3166,7 +3166,7 @@ SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uIn
SdrLinkList& rLL = ImpGetUserMakeObjHdl();
unsigned n = rLL.GetLinkCount();
unsigned i = 0;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
while (i < n && !pObj)
{
rLL.GetLink(i).Call(pFact.get());
@@ -3182,7 +3182,7 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
if (!pModel && pPage)
pModel = pPage->GetModel();
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if (nInvent == SdrInventor)
{
@@ -3230,7 +3230,7 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
if (!pObj)
{
// Well, if no one wants it...
- return NULL;
+ return nullptr;
}
if (pPage)
@@ -3244,9 +3244,9 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
SdrObject* SdrObjFactory::MakeNewObject(
sal_uInt32 nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage )
{
- SdrModel* pModel = pPage ? pPage->GetModel() : NULL;
+ SdrModel* pModel = pPage ? pPage->GetModel() : nullptr;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
bool bSetSnapRect = true;
@@ -3317,7 +3317,7 @@ SdrObject* SdrObjFactory::MakeNewObject(
if (!pObj)
{
// Well, if no one wants it...
- return NULL;
+ return nullptr;
}
if (pPage)
diff --git a/svx/source/svdraw/svdobjplusdata.cxx b/svx/source/svdraw/svdobjplusdata.cxx
index 91ec34d7145a..b021e3723994 100644
--- a/svx/source/svdraw/svdobjplusdata.cxx
+++ b/svx/source/svdraw/svdobjplusdata.cxx
@@ -16,9 +16,9 @@
#include <vcl/outdev.hxx>
SdrObjPlusData::SdrObjPlusData():
- pBroadcast(NULL),
- pUserDataList(NULL),
- pGluePoints(NULL)
+ pBroadcast(nullptr),
+ pUserDataList(nullptr),
+ pGluePoints(nullptr)
{
}
@@ -32,13 +32,13 @@ SdrObjPlusData::~SdrObjPlusData()
SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
{
SdrObjPlusData* pNeuPlusData=new SdrObjPlusData;
- if (pUserDataList!=NULL) {
+ if (pUserDataList!=nullptr) {
sal_uInt16 nCount=pUserDataList->GetUserDataCount();
if (nCount!=0) {
pNeuPlusData->pUserDataList=new SdrObjUserDataList;
for (sal_uInt16 i=0; i<nCount; i++) {
SdrObjUserData* pNeuUserData=pUserDataList->GetUserData(i).Clone(pObj1);
- if (pNeuUserData!=NULL) {
+ if (pNeuUserData!=nullptr) {
pNeuPlusData->pUserDataList->AppendUserData(pNeuUserData);
} else {
OSL_FAIL("SdrObjPlusData::Clone(): UserData.Clone() returns NULL.");
@@ -46,7 +46,7 @@ SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
}
}
}
- if (pGluePoints!=NULL) pNeuPlusData->pGluePoints=new SdrGluePointList(*pGluePoints);
+ if (pGluePoints!=nullptr) pNeuPlusData->pGluePoints=new SdrGluePointList(*pGluePoints);
// MtfAnimator isn't copied either
// #i68101#
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index b7f6b5e5874d..aac0488f37b5 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -302,7 +302,7 @@ SdrHdl* SdrCaptionObj::GetHdl(sal_uInt32 nHdlNum) const
}
else
{
- return 0L;
+ return nullptr;
}
}
}
@@ -338,7 +338,7 @@ bool SdrCaptionObj::beginSpecialDrag(SdrDragStat& rDrag) const
Point aHit(rDrag.GetStart());
- if(rDrag.GetPageView() && SdrObjectPrimitiveHit(*this, aHit, 0, *rDrag.GetPageView(), 0, false))
+ if(rDrag.GetPageView() && SdrObjectPrimitiveHit(*this, aHit, 0, *rDrag.GetPageView(), nullptr, false))
{
return true;
}
@@ -685,7 +685,7 @@ const Point& SdrCaptionObj::GetTailPos() const
void SdrCaptionObj::SetTailPos(const Point& rPos)
{
if (aTailPoly.GetSize()==0 || aTailPoly[0]!=rPos) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetTailPos(rPos);
SetChanged();
BroadcastObjectChange();
@@ -746,15 +746,15 @@ SdrObject* SdrCaptionObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
{
SdrObject* pRect=SdrRectObj::DoConvertToPolyObj(bBezier, bAddText);
SdrObject* pTail = ImpConvertMakeObj(basegfx::B2DPolyPolygon(aTailPoly.getB2DPolygon()), false, bBezier);
- SdrObject* pRet=(pTail!=NULL) ? pTail : pRect;
- if (pTail!=NULL && pRect!=NULL) {
+ SdrObject* pRet=(pTail!=nullptr) ? pTail : pRect;
+ if (pTail!=nullptr && pRect!=nullptr) {
bool bInsRect = true;
bool bInsTail = true;
SdrObjList* pOL=pTail->GetSubList();
- if (pOL!=NULL) { pRet=pRect; bInsTail = false; }
- if (pOL==NULL) pOL=pRect->GetSubList();
- if (pOL!=NULL) { pRet=pRect; bInsRect = false; }
- if (pOL==NULL) {
+ if (pOL!=nullptr) { pRet=pRect; bInsTail = false; }
+ if (pOL==nullptr) pOL=pRect->GetSubList();
+ if (pOL!=nullptr) { pRet=pRect; bInsRect = false; }
+ if (pOL==nullptr) {
SdrObjGroup* pGrp=new SdrObjGroup;
pOL=pGrp->GetSubList();
pRet=pGrp;
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index d0716bd841cc..7f99164f541e 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -399,7 +399,7 @@ SdrHdl* SdrCircObj::GetHdl(sal_uInt32 nHdlNum) const
nHdlNum += 2L;
}
- SdrHdl* pH = NULL;
+ SdrHdl* pH = nullptr;
Point aPnt;
SdrHdlKind eLocalKind(HDL_MOVE);
sal_uInt32 nPNum(0);
@@ -639,7 +639,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat& rStat)
if (nWdt!=0) aP.X()=aP.X()*nHgt/nWdt;
}
nStart=NormAngle360(GetAngle(aP));
- if (rStat.GetView()!=NULL && rStat.GetView()->IsAngleSnapEnabled()) {
+ if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) {
long nSA=rStat.GetView()->GetSnapAngle();
if (nSA!=0) { // angle snapping
nStart+=nSA/2;
@@ -660,7 +660,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat& rStat)
aP.X()=BigMulDiv(aP.X(),nHgt,nWdt);
}
nEnd=NormAngle360(GetAngle(aP));
- if (rStat.GetView()!=NULL && rStat.GetView()->IsAngleSnapEnabled()) {
+ if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) {
long nSA=rStat.GetView()->GetSnapAngle();
if (nSA!=0) { // angle snapping
nEnd+=nSA/2;
@@ -676,7 +676,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat& rStat)
void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat) const
{
ImpCircUser* pU=static_cast<ImpCircUser*>(rStat.GetUser());
- if (pU==NULL) {
+ if (pU==nullptr) {
pU=new ImpCircUser;
rStat.SetUser(pU);
}
@@ -746,7 +746,7 @@ bool SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
ImpSetCircInfoToAttr();
if (bRet) {
delete pU;
- rStat.SetUser(NULL);
+ rStat.SetUser(nullptr);
}
return bRet;
}
@@ -755,7 +755,7 @@ void SdrCircObj::BrkCreate(SdrDragStat& rStat)
{
ImpCircUser* pU=static_cast<ImpCircUser*>(rStat.GetUser());
delete pU;
- rStat.SetUser(NULL);
+ rStat.SetUser(nullptr);
}
bool SdrCircObj::BckCreate(SdrDragStat& rStat)
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index a1e42f3a3edf..e7556d4ca866 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -56,7 +56,7 @@ SdrObjConnection::~SdrObjConnection()
void SdrObjConnection::ResetVars()
{
- pObj=NULL;
+ pObj=nullptr;
nConId=0;
nXDist=0;
nYDist=0;
@@ -71,7 +71,7 @@ void SdrObjConnection::ResetVars()
bool SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, bool bSetAbsPos) const
{
bool bRet = false;
- if (pObj!=NULL) { // one object has to be docked already!
+ if (pObj!=nullptr) { // one object has to be docked already!
if (bAutoVertex) {
rGP=pObj->GetVertexGluePoint(nConId);
bRet = true;
@@ -80,7 +80,7 @@ bool SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, bool bSetAbsPos) const
bRet = true;
} else {
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- if (pGPL!=NULL) {
+ if (pGPL!=nullptr) {
sal_uInt16 nNum=pGPL->FindGluePoint(nConId);
if (nNum!=SDRGLUEPOINT_NOTFOUND) {
rGP=(*pGPL)[nNum];
@@ -417,8 +417,8 @@ SdrGluePoint SdrEdgeObj::GetVertexGluePoint(sal_uInt16 nNum) const
if (nPointCount>0)
{
Point aOfs = GetSnapRect().Center();
- if (nNum==2 && GetConnectedNode(true)==NULL) aPt=(*pEdgeTrack)[0];
- else if (nNum==3 && GetConnectedNode(false)==NULL) aPt=(*pEdgeTrack)[nPointCount-1];
+ if (nNum==2 && GetConnectedNode(true)==nullptr) aPt=(*pEdgeTrack)[0];
+ else if (nNum==3 && GetConnectedNode(false)==nullptr) aPt=(*pEdgeTrack)[nPointCount-1];
else {
if ((nPointCount & 1) ==1) {
aPt=(*pEdgeTrack)[nPointCount/2];
@@ -445,19 +445,19 @@ SdrGluePoint SdrEdgeObj::GetCornerGluePoint(sal_uInt16 nNum) const
const SdrGluePointList* SdrEdgeObj::GetGluePointList() const
{
- return NULL; // no user defined glue points for connectors
+ return nullptr; // no user defined glue points for connectors
}
SdrGluePointList* SdrEdgeObj::ForceGluePointList()
{
- return NULL; // no user defined glue points for connectors
+ return nullptr; // no user defined glue points for connectors
}
void SdrEdgeObj::ConnectToNode(bool bTail1, SdrObject* pObj)
{
SdrObjConnection& rCon=GetConnection(bTail1);
DisconnectFromNode(bTail1);
- if (pObj!=NULL) {
+ if (pObj!=nullptr) {
pObj->AddListener(*this);
rCon.pObj=pObj;
@@ -471,16 +471,16 @@ void SdrEdgeObj::ConnectToNode(bool bTail1, SdrObject* pObj)
void SdrEdgeObj::DisconnectFromNode(bool bTail1)
{
SdrObjConnection& rCon=GetConnection(bTail1);
- if (rCon.pObj!=NULL) {
+ if (rCon.pObj!=nullptr) {
rCon.pObj->RemoveListener(*this);
- rCon.pObj=NULL;
+ rCon.pObj=nullptr;
}
}
SdrObject* SdrEdgeObj::GetConnectedNode(bool bTail1) const
{
SdrObject* pObj=GetConnection(bTail1).pObj;
- if (pObj!=NULL && (pObj->GetPage()!=pPage || !pObj->IsInserted())) pObj=NULL;
+ if (pObj!=nullptr && (pObj->GetPage()!=pPage || !pObj->IsInserted())) pObj=nullptr;
return pObj;
}
@@ -489,9 +489,9 @@ bool SdrEdgeObj::CheckNodeConnection(bool bTail1) const
bool bRet = false;
const SdrObjConnection& rCon=GetConnection(bTail1);
sal_uInt16 nPointCount=pEdgeTrack->GetPointCount();
- if (rCon.pObj!=NULL && rCon.pObj->GetPage()==pPage && nPointCount!=0) {
+ if (rCon.pObj!=nullptr && rCon.pObj->GetPage()==pPage && nPointCount!=0) {
const SdrGluePointList* pGPL=rCon.pObj->GetGluePointList();
- sal_uInt16 nConAnz=pGPL==NULL ? 0 : pGPL->GetCount();
+ sal_uInt16 nConAnz=pGPL==nullptr ? 0 : pGPL->GetCount();
sal_uInt16 nGesAnz=nConAnz+8;
Point aTail(bTail1 ? (*pEdgeTrack)[0] : (*pEdgeTrack)[sal_uInt16(nPointCount-1)]);
for (sal_uInt16 i=0; i<nGesAnz && !bRet; i++) {
@@ -579,7 +579,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack()
mbSuppressed = false;
}
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetCurrentBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
SetRectsDirty();
*pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
ImpSetEdgeInfoToAttr(); // copy values from aEdgeInfo into the pool
@@ -596,7 +596,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack()
SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt)
{
- if (pObj==NULL) return SdrEscapeDirection::ALL;
+ if (pObj==nullptr) return SdrEscapeDirection::ALL;
Rectangle aR(pObj->GetSnapRect());
long dxl=rPt.X()-aR.Left();
long dyo=rPt.Y()-aR.Top();
@@ -714,8 +714,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
}
// #i54102# To allow interactive preview, do also if not inserted
- bool bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage;
- bool bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage;
+ bool bCon1=rCon1.pObj!=nullptr && rCon1.pObj->GetPage()==pPage;
+ bool bCon2=rCon2.pObj!=nullptr && rCon2.pObj->GetPage()==pPage;
const SfxItemSet& rSet = GetObjectItemSet();
@@ -799,7 +799,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
if ((nEsc1&nE1) && (nEsc2&nE2)) {
sal_uIntPtr nQual=0;
SdrEdgeInfoRec aInfo;
- if (pInfo!=NULL) aInfo=*pInfo;
+ if (pInfo!=nullptr) aInfo=*pInfo;
XPolygon aXP(ImpCalcEdgeTrack(aPt1,nA1,aBoundRect1,aBewareRect1,aPt2,nA2,aBoundRect2,aBewareRect2,&nQual,&aInfo));
if (nQual<nBestQual) {
aBestXP=aXP;
@@ -815,7 +815,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
}
if (bAuto1) rCon1.nConId=nBestAuto1;
if (bAuto2) rCon2.nConId=nBestAuto2;
- if (pInfo!=NULL) *pInfo=aBestInfo;
+ if (pInfo!=nullptr) *pInfo=aBestInfo;
return aBestXP;
}
@@ -836,7 +836,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
bool bUnt2=nAngle2==27000;
bool bHor2=bLks2 || bRts2;
bool bVer2=bObn2 || bUnt2;
- bool bInfo=pInfo!=NULL;
+ bool bInfo=pInfo!=nullptr;
if (bInfo) {
pInfo->cOrthoForm=0;
pInfo->nAngle1=nAngle1;
@@ -856,7 +856,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
XPolygon aXP(2);
aXP[0]=rPt1;
aXP[1]=rPt2;
- if (pnQuality!=NULL) {
+ if (pnQuality!=nullptr) {
*pnQuality=std::abs(rPt1.X()-rPt2.X())+std::abs(rPt1.Y()-rPt2.Y());
}
return aXP;
@@ -874,7 +874,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
if (bObn2) aXP[2].Y()=aBewareRect2.Top(); //-=500;
if (bLks2) aXP[2].X()=aBewareRect2.Left(); //-=500;
if (bUnt2) aXP[2].Y()=aBewareRect2.Bottom(); //+=500;
- if (pnQuality!=NULL) {
+ if (pnQuality!=nullptr) {
long nQ=std::abs(aXP[1].X()-aXP[0].X())+std::abs(aXP[1].Y()-aXP[0].Y());
nQ+=std::abs(aXP[2].X()-aXP[1].X())+std::abs(aXP[2].Y()-aXP[1].Y());
nQ+=std::abs(aXP[3].X()-aXP[2].X())+std::abs(aXP[3].Y()-aXP[2].Y());
@@ -1263,7 +1263,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
}
sal_uInt16 nPointCount=aXP1.GetPointCount();
char cForm;
- if (bInfo || pnQuality!=NULL) {
+ if (bInfo || pnQuality!=nullptr) {
if (nPointCount==2) cForm='I';
else if (nPointCount==3) cForm='L';
else if (nPointCount==4) { // Z or U
@@ -1308,7 +1308,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
{
cForm = 0;
}
- if (pnQuality!=NULL) {
+ if (pnQuality!=nullptr) {
sal_uIntPtr nQual=0;
sal_uIntPtr nQual0=nQual; // prevent overruns
bool bOverflow = false;
@@ -1565,16 +1565,16 @@ line (CL). The number of object margins per object varies between 0 and 3:
void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
- sal_uIntPtr nId=pSimple==0 ? 0 : pSimple->GetId();
+ sal_uIntPtr nId=pSimple==nullptr ? 0 : pSimple->GetId();
bool bDataChg=nId==SFX_HINT_DATACHANGED;
bool bDying=nId==SFX_HINT_DYING;
- bool bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC;
- bool bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC;
+ bool bObj1=aCon1.pObj!=nullptr && aCon1.pObj->GetBroadcaster()==&rBC;
+ bool bObj2=aCon2.pObj!=nullptr && aCon2.pObj->GetBroadcaster()==&rBC;
if (bDying && (bObj1 || bObj2)) {
// catch Dying, so AttrObj doesn't start broadcasting
// about an alleged change of template
- if (bObj1) aCon1.pObj=NULL;
- if (bObj2) aCon2.pObj=NULL;
+ if (bObj1) aCon1.pObj=nullptr;
+ if (bObj2) aCon2.pObj=nullptr;
return;
}
if ( bObj1 || bObj2 )
@@ -1594,7 +1594,7 @@ void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
(pSdrHint && pSdrHint->GetKind()==HINT_OBJREMOVED))
{
// broadcasting only, if on the same page
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetCurrentBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
ImpDirtyEdgeTrack();
// only redraw here, object hasn't actually changed
@@ -1611,13 +1611,13 @@ void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
*/
void SdrEdgeObj::Reformat()
{
- if( NULL != aCon1.pObj )
+ if( nullptr != aCon1.pObj )
{
SfxSimpleHint aHint( SFX_HINT_DATACHANGED );
Notify( *const_cast<SfxBroadcaster*>(aCon1.pObj->GetBroadcaster()), aHint );
}
- if( NULL != aCon2.pObj )
+ if( nullptr != aCon2.pObj )
{
SfxSimpleHint aHint( SFX_HINT_DATACHANGED );
Notify( *const_cast<SfxBroadcaster*>(aCon2.pObj->GetBroadcaster()), aHint );
@@ -1638,8 +1638,8 @@ SdrEdgeObj& SdrEdgeObj::operator=(const SdrEdgeObj& rObj)
bEdgeTrackDirty=rObj.bEdgeTrackDirty;
aCon1 =rObj.aCon1;
aCon2 =rObj.aCon2;
- aCon1.pObj=NULL;
- aCon2.pObj=NULL;
+ aCon1.pObj=nullptr;
+ aCon2.pObj=nullptr;
aEdgeInfo=rObj.aEdgeInfo;
return *this;
}
@@ -1745,15 +1745,15 @@ sal_uInt32 SdrEdgeObj::GetHdlCount() const
SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const
{
- SdrHdl* pHdl=NULL;
+ SdrHdl* pHdl=nullptr;
sal_uInt32 nPointCount(pEdgeTrack->GetPointCount());
if (nPointCount!=0) {
if (nHdlNum==0) {
pHdl=new ImpEdgeHdl((*pEdgeTrack)[0],HDL_POLY);
- if (aCon1.pObj!=NULL && aCon1.bBestVertex) pHdl->Set1PixMore();
+ if (aCon1.pObj!=nullptr && aCon1.bBestVertex) pHdl->Set1PixMore();
} else if (nHdlNum==1) {
pHdl=new ImpEdgeHdl((*pEdgeTrack)[sal_uInt16(nPointCount-1)],HDL_POLY);
- if (aCon2.pObj!=NULL && aCon2.bBestVertex) pHdl->Set1PixMore();
+ if (aCon2.pObj!=nullptr && aCon2.bBestVertex) pHdl->Set1PixMore();
} else {
SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue();
if (eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) {
@@ -1789,18 +1789,18 @@ SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const
pHdl->SetPos(aPos);
} else {
delete pHdl;
- pHdl=NULL;
+ pHdl=nullptr;
}
} else if (eKind==SDREDGE_THREELINES) {
sal_uInt32 nNum(nHdlNum);
- if (GetConnectedNode(true)==NULL) nNum++;
+ if (GetConnectedNode(true)==nullptr) nNum++;
Point aPos((*pEdgeTrack)[(sal_uInt16)nNum-1]);
pHdl=new ImpEdgeHdl(aPos,HDL_POLY);
if (nNum==2) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ1LINE2);
if (nNum==3) static_cast<ImpEdgeHdl*>(pHdl)->SetLineCode(OBJ2LINE2);
}
}
- if (pHdl!=NULL) {
+ if (pHdl!=nullptr) {
pHdl->SetPointNum(nHdlNum);
}
}
@@ -1877,7 +1877,7 @@ bool SdrEdgeObj::applySpecialDrag(SdrDragStat& rDragStat)
// if found, officially connect to it; ImpFindConnector only
// sets pObj hard
SdrObject* pNewConnection = pDraggedOne->pObj;
- pDraggedOne->pObj = 0;
+ pDraggedOne->pObj = nullptr;
ConnectToNode(bDragA, pNewConnection);
}
@@ -2029,7 +2029,7 @@ bool SdrEdgeObj::BegCreate(SdrDragStat& rDragStat)
pEdgeTrack->SetPointCount(2);
(*pEdgeTrack)[0]=rDragStat.GetStart();
(*pEdgeTrack)[1]=rDragStat.GetNow();
- if (rDragStat.GetPageView()!=NULL) {
+ if (rDragStat.GetPageView()!=nullptr) {
ImpFindConnector(rDragStat.GetStart(),*rDragStat.GetPageView(),aCon1,this);
ConnectToNode(true,aCon1.pObj);
}
@@ -2041,7 +2041,7 @@ bool SdrEdgeObj::MovCreate(SdrDragStat& rDragStat)
{
sal_uInt16 nMax=pEdgeTrack->GetPointCount();
(*pEdgeTrack)[nMax-1]=rDragStat.GetNow();
- if (rDragStat.GetPageView()!=NULL) {
+ if (rDragStat.GetPageView()!=nullptr) {
ImpFindConnector(rDragStat.GetNow(),*rDragStat.GetPageView(),aCon2,this);
rDragStat.GetView()->SetConnectMarker(aCon2,*rDragStat.GetPageView());
}
@@ -2059,7 +2059,7 @@ bool SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd)
if (bOk) {
ConnectToNode(true,aCon1.pObj);
ConnectToNode(false,aCon2.pObj);
- if (rDragStat.GetView()!=NULL) {
+ if (rDragStat.GetView()!=nullptr) {
rDragStat.GetView()->HideConnectMarker();
}
ImpSetEdgeInfoToAttr(); // copy values from aEdgeInfo into the pool
@@ -2070,7 +2070,7 @@ bool SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd)
bool SdrEdgeObj::BckCreate(SdrDragStat& rDragStat)
{
- if (rDragStat.GetView()!=NULL) {
+ if (rDragStat.GetView()!=nullptr) {
rDragStat.GetView()->HideConnectMarker();
}
return false;
@@ -2078,7 +2078,7 @@ bool SdrEdgeObj::BckCreate(SdrDragStat& rDragStat)
void SdrEdgeObj::BrkCreate(SdrDragStat& rDragStat)
{
- if (rDragStat.GetView()!=NULL) {
+ if (rDragStat.GetView()!=nullptr) {
rDragStat.GetView()->HideConnectMarker();
}
}
@@ -2098,8 +2098,8 @@ Pointer SdrEdgeObj::GetCreatePointer() const
bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut)
{
rCon.ResetVars();
- if (pOut==NULL) pOut=rPV.GetView().GetFirstOutputDevice();
- if (pOut==NULL) return false;
+ if (pOut==nullptr) pOut=rPV.GetView().GetFirstOutputDevice();
+ if (pOut==nullptr) return false;
SdrObjList* pOL=rPV.GetObjList();
const SetOfByte& rVisLayer=rPV.GetVisibleLayers();
// sensitive area of connectors is twice as large as the one of the handles
@@ -2122,7 +2122,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
no--;
SdrObject* pObj=pOL->GetObj(no);
if (rVisLayer.IsSet(pObj->GetLayer()) && pObj->IsVisible() && // only visible objects
- (pThis==NULL || pObj!=static_cast<SdrObject const *>(pThis)) && // don't connect it to itself
+ (pThis==nullptr || pObj!=static_cast<SdrObject const *>(pThis)) && // don't connect it to itself
pObj->IsNode())
{
Rectangle aObjBound(pObj->GetCurrentBoundRect());
@@ -2133,7 +2133,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
// After those come Vertex, Corner and center (Best), all prioritized equally.
// Finally, a HitTest for the object.
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- sal_uInt16 nConAnz=pGPL==NULL ? 0 : pGPL->GetCount();
+ sal_uInt16 nConAnz=pGPL==nullptr ? 0 : pGPL->GetCount();
sal_uInt16 nGesAnz=nConAnz+9;
bool bUserFnd = false;
sal_uIntPtr nBestDist=0xFFFFFFFF;
@@ -2285,8 +2285,8 @@ void SdrEdgeObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
else
{
// handle start and end point if not connected
- bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
- bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
+ bool bCon1=aCon1.pObj!=nullptr && aCon1.pObj->GetPage()==pPage;
+ bool bCon2=aCon2.pObj!=nullptr && aCon2.pObj->GetPage()==pPage;
if(!bCon1 && pEdgeTrack)
{
@@ -2316,8 +2316,8 @@ void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2)
else
{
// handle start and end point if not connected
- bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
- bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
+ bool bCon1=aCon1.pObj!=nullptr && aCon1.pObj->GetPage()==pPage;
+ bool bCon2=aCon2.pObj!=nullptr && aCon2.pObj->GetPage()==pPage;
if(!bCon1 && pEdgeTrack)
{
@@ -2347,8 +2347,8 @@ void SdrEdgeObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea
else
{
// handle start and end point if not connected
- bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage;
- bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage;
+ bool bCon1=aCon1.pObj!=nullptr && aCon1.pObj->GetPage()==pPage;
+ bool bCon2=aCon2.pObj!=nullptr && aCon2.pObj->GetPage()==pPage;
if(!bCon1 && pEdgeTrack)
{
@@ -2459,14 +2459,14 @@ void SdrEdgeObj::RestGeoData(const SdrObjGeoData& rGeo)
SdrTextObj::RestGeoData(rGeo);
const SdrEdgeObjGeoData& rEGeo=static_cast<const SdrEdgeObjGeoData&>(rGeo);
if (aCon1.pObj!=rEGeo.aCon1.pObj) {
- if (aCon1.pObj!=NULL) aCon1.pObj->RemoveListener(*this);
+ if (aCon1.pObj!=nullptr) aCon1.pObj->RemoveListener(*this);
aCon1=rEGeo.aCon1;
- if (aCon1.pObj!=NULL) aCon1.pObj->AddListener(*this);
+ if (aCon1.pObj!=nullptr) aCon1.pObj->AddListener(*this);
}
if (aCon2.pObj!=rEGeo.aCon2.pObj) {
- if (aCon2.pObj!=NULL) aCon2.pObj->RemoveListener(*this);
+ if (aCon2.pObj!=nullptr) aCon2.pObj->RemoveListener(*this);
aCon2=rEGeo.aCon2;
- if (aCon2.pObj!=NULL) aCon2.pObj->AddListener(*this);
+ if (aCon2.pObj!=nullptr) aCon2.pObj->AddListener(*this);
}
*pEdgeTrack =*rEGeo.pEdgeTrack;
bEdgeTrackDirty=rEGeo.bEdgeTrackDirty;
@@ -2512,7 +2512,7 @@ void SdrEdgeObj::SetTailPoint( bool bTail, const Point& rPt )
*/
void SdrEdgeObj::setGluePointIndex( bool bTail, sal_Int32 nIndex /* = -1 */ )
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetCurrentBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect();
SdrObjConnection& rConn1 = GetConnection( bTail );
@@ -2526,8 +2526,8 @@ void SdrEdgeObj::setGluePointIndex( bool bTail, sal_Int32 nIndex /* = -1 */ )
// for user defined glue points we have
// to get the id for this index first
- const SdrGluePointList* pList = rConn1.GetObject() ? rConn1.GetObject()->GetGluePointList() : NULL;
- if( pList == NULL || SDRGLUEPOINT_NOTFOUND == pList->FindGluePoint((sal_uInt16)nIndex) )
+ const SdrGluePointList* pList = rConn1.GetObject() ? rConn1.GetObject()->GetGluePointList() : nullptr;
+ if( pList == nullptr || SDRGLUEPOINT_NOTFOUND == pList->FindGluePoint((sal_uInt16)nIndex) )
return;
}
else if( nIndex < 0 )
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index fef7e7847e18..cea2d2d8fea1 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -99,7 +99,7 @@ const Graphic ImpLoadLinkedGraphic( const OUString& aFileName, const OUString& a
// to interpret included links may fail.
// Alternatively the path may be set at the result after this call when it is known
// that it is a SVG graphic, but only because no one yet tried to interpret it.
- rGF.ImportGraphic( aGraphic, aFileName, *pInStrm, nFilter, NULL, GraphicFilterImportFlags::NONE, &aFilterData );
+ rGF.ImportGraphic( aGraphic, aFileName, *pInStrm, nFilter, nullptr, GraphicFilterImportFlags::NONE, &aFilterData );
}
return aGraphic;
}
@@ -120,7 +120,7 @@ public:
const OUString& rMimeType, const css::uno::Any & rValue ) override;
void DataChanged( const Graphic& rGraphic );
- bool Connect() { return 0 != GetRealObject(); }
+ bool Connect() { return nullptr != GetRealObject(); }
void UpdateAsynchron();
void RemoveGraphicUpdater();
@@ -197,7 +197,7 @@ void SAL_CALL SdrGraphicUpdater::run()
SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj)
: ::sfx2::SvBaseLink( ::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB )
, rGrafObj( rObj )
-, pGraphicUpdater( NULL )
+, pGraphicUpdater( nullptr )
{
SetSynchron( false );
}
@@ -215,18 +215,18 @@ void SdrGraphicLink::DataChanged( const Graphic& rGraphic )
void SdrGraphicLink::RemoveGraphicUpdater()
{
- pGraphicUpdater = NULL;
+ pGraphicUpdater = nullptr;
}
::sfx2::SvBaseLink::UpdateResult SdrGraphicLink::DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue )
{
SdrModel* pModel = rGrafObj.GetModel();
- sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
+ sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : nullptr;
if( pLinkManager && rValue.hasValue() )
{
- sfx2::LinkManager::GetDisplayNames( this, 0, &rGrafObj.aFileName, 0, &rGrafObj.aFilterName );
+ sfx2::LinkManager::GetDisplayNames( this, nullptr, &rGrafObj.aFileName, nullptr, &rGrafObj.aFilterName );
Graphic aGraphic;
if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic ))
@@ -247,7 +247,7 @@ void SdrGraphicLink::Closed()
{
// close connection; set pLink of the object to NULL, as link instance is just about getting destructed.
rGrafObj.ForceSwapIn();
- rGrafObj.pGraphicLink=NULL;
+ rGrafObj.pGraphicLink=nullptr;
rGrafObj.ReleaseGraphicLink();
SvBaseLink::Closed();
}
@@ -334,11 +334,11 @@ TYPEINIT1(SdrGrafObj,SdrRectObj);
SdrGrafObj::SdrGrafObj()
: SdrRectObj(),
- pGraphicLink ( NULL ),
+ pGraphicLink ( nullptr ),
bMirrored ( false )
{
pGraphic = new GraphicObject;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
pGraphic->SetSwapStreamHdl( LINK(this, SdrGrafObj, ImpSwapHdl) );
onGraphicChanged();
@@ -358,11 +358,11 @@ SdrGrafObj::SdrGrafObj()
SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
: SdrRectObj ( rRect ),
- pGraphicLink ( NULL ),
+ pGraphicLink ( nullptr ),
bMirrored ( false )
{
pGraphic = new GraphicObject( rGrf );
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
pGraphic->SetSwapStreamHdl( LINK(this, SdrGrafObj, ImpSwapHdl) );
onGraphicChanged();
@@ -382,11 +382,11 @@ SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
SdrGrafObj::SdrGrafObj( const Graphic& rGrf )
: SdrRectObj(),
- pGraphicLink ( NULL ),
+ pGraphicLink ( nullptr ),
bMirrored ( false )
{
pGraphic = new GraphicObject( rGrf );
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
pGraphic->SetSwapStreamHdl( LINK(this, SdrGrafObj, ImpSwapHdl) );
onGraphicChanged();
@@ -415,7 +415,7 @@ void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj )
{
*pGraphic = rGrfObj;
delete mpReplacementGraphic;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
pGraphic->SetSwapStreamHdl( LINK(this, SdrGrafObj, ImpSwapHdl) );
pGraphic->SetUserData();
mbIsPreview = false;
@@ -453,7 +453,7 @@ void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf )
{
pGraphic->SetGraphic( rGrf );
delete mpReplacementGraphic;
- mpReplacementGraphic = 0;
+ mpReplacementGraphic = nullptr;
pGraphic->SetUserData();
mbIsPreview = false;
onGraphicChanged();
@@ -590,15 +590,15 @@ void SdrGrafObj::ForceSwapIn() const
void SdrGrafObj::ImpLinkAnmeldung()
{
- sfx2::LinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel != nullptr ? pModel->GetLinkManager() : nullptr;
- if( pLinkManager != NULL && pGraphicLink == NULL )
+ if( pLinkManager != nullptr && pGraphicLink == nullptr )
{
if (!aFileName.isEmpty())
{
pGraphicLink = new SdrGraphicLink( *this );
pLinkManager->InsertFileLink(
- *pGraphicLink, OBJECT_CLIENT_GRF, aFileName, (aFilterName.isEmpty() ? NULL : &aFilterName));
+ *pGraphicLink, OBJECT_CLIENT_GRF, aFileName, (aFilterName.isEmpty() ? nullptr : &aFilterName));
pGraphicLink->Connect();
}
}
@@ -606,13 +606,13 @@ void SdrGrafObj::ImpLinkAnmeldung()
void SdrGrafObj::ImpLinkAbmeldung()
{
- sfx2::LinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel != nullptr ? pModel->GetLinkManager() : nullptr;
- if( pLinkManager != NULL && pGraphicLink!=NULL)
+ if( pLinkManager != nullptr && pGraphicLink!=nullptr)
{
// When using Remove, the *pGraphicLink is implicitly deleted
pLinkManager->Remove( pGraphicLink );
- pGraphicLink=NULL;
+ pGraphicLink=nullptr;
}
}
@@ -944,8 +944,8 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo)
void SdrGrafObj::SetPage( SdrPage* pNewPage )
{
- bool bRemove = pNewPage == NULL && pPage != NULL;
- bool bInsert = pNewPage != NULL && pPage == NULL;
+ bool bRemove = pNewPage == nullptr && pPage != nullptr;
+ bool bInsert = pNewPage != nullptr && pPage == nullptr;
if( bRemove )
{
@@ -953,7 +953,7 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage )
if( pGraphic->IsAnimated())
pGraphic->StopAnimation();
- if( pGraphicLink != NULL )
+ if( pGraphicLink != nullptr )
ImpLinkAbmeldung();
}
@@ -994,7 +994,7 @@ void SdrGrafObj::SetModel( SdrModel* pNewModel )
ForceSwapIn();
}
- if( pGraphicLink != NULL )
+ if( pGraphicLink != nullptr )
ImpLinkAbmeldung();
}
@@ -1046,7 +1046,7 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const
SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
{
- SdrObject* pRetval = NULL;
+ SdrObject* pRetval = nullptr;
GraphicType aGraphicType(GetGraphicType());
GDIMetaFile aMtf;
@@ -1306,7 +1306,7 @@ IMPL_LINK_TYPED( SdrGrafObj, ImpSwapHdl, const GraphicObject*, pO, SvStream* )
else if( pO->IsInSwapIn() )
{
// can be loaded from the original document stream later
- if( pModel != NULL )
+ if( pModel != nullptr )
{
if( pGraphic->HasUserData() )
{
@@ -1317,9 +1317,9 @@ IMPL_LINK_TYPED( SdrGrafObj, ImpSwapHdl, const GraphicObject*, pO, SvStream* )
std::unique_ptr<SvStream> const pStream( (xStream.is())
? ::utl::UcbStreamHelper::CreateStream(xStream)
- : 0 );
+ : nullptr );
- if( pStream != 0 )
+ if( pStream != nullptr )
{
Graphic aGraphic;
@@ -1346,7 +1346,7 @@ IMPL_LINK_TYPED( SdrGrafObj, ImpSwapHdl, const GraphicObject*, pO, SvStream* )
if(!GraphicFilter::GetGraphicFilter().ImportGraphic(
aGraphic, aUserData, *pStream,
- GRFILTER_FORMAT_DONTKNOW, NULL, GraphicFilterImportFlags::NONE, pFilterData.get()))
+ GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pFilterData.get()))
{
const OUString aNewUserData( pGraphic->GetUserData() );
pGraphic->SetGraphic( aGraphic );
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 7adae6656e4c..679b42842d5a 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -72,7 +72,7 @@ TYPEINIT1(SdrObjGroup,SdrObject);
SdrObjGroup::SdrObjGroup()
{
- pSub=new SdrObjList(NULL,NULL);
+ pSub=new SdrObjList(nullptr,nullptr);
pSub->SetOwnerObj(this);
pSub->SetListKind(SDROBJLIST_GROUPOBJ);
bRefPoint=false;
@@ -511,7 +511,7 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt)
void SdrObjGroup::SetSnapRect(const Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
Rectangle aOld(GetSnapRect());
long nMulX=rRect.Right()-rRect.Left();
long nDivX=aOld.Right()-aOld.Left();
@@ -543,7 +543,7 @@ void SdrObjGroup::SetLogicRect(const Rectangle& rRect)
void SdrObjGroup::Move(const Size& rSiz)
{
if (rSiz.Width()!=0 || rSiz.Height()!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
MovePoint(aRefPoint,rSiz);
if (pSub->GetObjCount()!=0) {
// first move the connectors, then everything else
@@ -587,7 +587,7 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio
NbcMirrorGluePoints(aRef1,aRef2);
}
}
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
ResizePoint(aRefPoint,rRef,xFact,yFact);
if (pSub->GetObjCount()!=0) {
// move the connectors first, everything else afterwards
@@ -617,7 +617,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs)
{
if (nAngle!=0) {
SetGlueReallyAbsolute(true);
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
RotatePoint(aRefPoint,rRef,sn,cs);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
@@ -642,7 +642,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs)
void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2)
{
SetGlueReallyAbsolute(true);
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc!
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
@@ -667,7 +667,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
SetGlueReallyAbsolute(true);
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
ShearPoint(aRefPoint,rRef,tn);
// move the connectors first, everything else afterwards
SdrObjList* pOL=pSub;
@@ -691,7 +691,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
void SdrObjGroup::SetAnchorPos(const Point& rPnt)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
bool bChg=aAnchor!=rPnt;
aAnchor=rPnt;
Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index baec88151335..130710e740a9 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -423,7 +423,7 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
if (rPol.eUsedTextVPos==SDRMEASURETEXT_VERTICALCENTERED)
{
OutlinerParaObject* pOutlinerParaObject = SdrTextObj::GetOutlinerParaObject();
- if (pOutlinerParaObject!=NULL && pOutlinerParaObject->GetTextObject().GetParagraphCount()==1)
+ if (pOutlinerParaObject!=nullptr && pOutlinerParaObject->GetTextObject().GetParagraphCount()==1)
{
bBrkLine=true; // dashed line if there's only on paragraph.
}
@@ -587,13 +587,13 @@ bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara,
{
const SvxFieldData* pField=rField.GetField();
const SdrMeasureField* pMeasureField=dynamic_cast<const SdrMeasureField*>( pField );
- if (pMeasureField!=NULL) {
+ if (pMeasureField!=nullptr) {
rRet = TakeRepresentation(pMeasureField->GetMeasureFieldKind());
- if (rpFldColor!=NULL) {
+ if (rpFldColor!=nullptr) {
if (!bEdit)
{
delete rpFldColor;
- rpFldColor=NULL;
+ rpFldColor=nullptr;
}
}
return true;
@@ -608,7 +608,7 @@ void SdrMeasureObj::UndirtyText() const
{
SdrOutliner& rOutliner=ImpGetDrawOutliner();
OutlinerParaObject* pOutlinerParaObject = SdrTextObj::GetOutlinerParaObject();
- if(pOutlinerParaObject==NULL)
+ if(pOutlinerParaObject==nullptr)
{
rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS), EE_FEATURE_FIELD), ESelection(0,0));
rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_VALUE), EE_FEATURE_FIELD),ESelection(0,1));
@@ -910,7 +910,7 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c
const SdrHdl* pHdl=rDrag.GetHdl();
sal_uInt32 nHdlNum(pHdl->GetObjHdlNum());
- bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho();
+ bool bOrtho=rDrag.GetView()!=nullptr && rDrag.GetView()->IsOrtho();
bool bBigOrtho=bOrtho && rDrag.GetView()->IsBigOrtho();
bool bBelow=rRec.bBelowRefEdge;
Point aPt(rDrag.GetNow());
@@ -985,7 +985,7 @@ bool SdrMeasureObj::MovCreate(SdrDragStat& rStat)
SdrView* pView=rStat.GetView();
aPt1=rStat.GetStart();
aPt2=rStat.GetNow();
- if (pView!=NULL && pView->IsCreate1stPointAsCenter()) {
+ if (pView!=nullptr && pView->IsCreate1stPointAsCenter()) {
aPt1+=aPt1;
aPt1-=rStat.Now();
}
@@ -1477,7 +1477,7 @@ void SdrMeasureObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons
if(aNewPt1 != aPt1 || aNewPt2 != aPt2)
{
// set model values and broadcast
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
aPt1 = aNewPt1;
aPt2 = aNewPt2;
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 9735c4868041..64a07c6a1f09 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -266,7 +266,7 @@ uno::Reference<io::XInputStream> SdrMediaObj::GetInputStream()
if (!m_xImpl->m_pTempFile)
{
SAL_WARN("svx", "this is only intended for embedded media");
- return 0;
+ return nullptr;
}
ucbhelper::Content tempFile(m_xImpl->m_pTempFile->m_TempFileURL,
uno::Reference<ucb::XCommandEnvironment>(),
@@ -282,7 +282,7 @@ static bool lcl_HandleJsonPackageURL(
OUString& o_rTempDirURL)
{
// Create a temporary folder which will contain all files of glTF model
- o_rTempDirURL = ::utl::TempFile(NULL, true).GetURL();
+ o_rTempDirURL = ::utl::TempFile(nullptr, true).GetURL();
const sal_uInt16 nPackageLength = OString("vnd.sun.star.Package:").getLength();
const OUString sUrlPath = rURL.copy(nPackageLength,rURL.lastIndexOf("/")-nPackageLength);
@@ -342,7 +342,7 @@ static bool lcl_CopyToTempFile(
{
OUString tempFileURL;
::osl::FileBase::RC const err =
- ::osl::FileBase::createTempFile(0, 0, & tempFileURL);
+ ::osl::FileBase::createTempFile(nullptr, nullptr, & tempFileURL);
if (::osl::FileBase::E_None != err)
{
SAL_INFO("svx", "cannot create temp file");
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 268fccd9ae12..bec870ba25b7 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -190,7 +190,7 @@ void SdrLightEmbeddedClient_Impl::Release()
{
{
SolarMutexGuard aGuard;
- mpObj = NULL;
+ mpObj = nullptr;
}
release();
@@ -602,7 +602,7 @@ public:
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
- bool Connect() { return GetRealObject() != NULL; }
+ bool Connect() { return GetRealObject() != nullptr; }
};
@@ -693,9 +693,9 @@ public:
SvxUnoShapeModifyListener* mpModifyListener;
explicit SdrOle2ObjImpl( bool bFrame ) :
- mpGraphic(NULL),
- mpGraphicObject(NULL),
- pLightClient (NULL),
+ mpGraphic(nullptr),
+ mpGraphicObject(nullptr),
+ pLightClient (nullptr),
mbFrame(bFrame),
mbInDestruction(false),
mbSuppressSetVisAreaSize(false),
@@ -703,17 +703,17 @@ public:
mbIsChart(false),
mbLoadingOLEObjectFailed(false),
mbConnected(false),
- mpObjectLink(NULL),
- mpModifyListener(NULL)
+ mpObjectLink(nullptr),
+ mpModifyListener(nullptr)
{
mxObjRef.Lock();
}
SdrOle2ObjImpl( bool bFrame, const svt::EmbeddedObjectRef& rObjRef ) :
mxObjRef(rObjRef),
- mpGraphic(NULL),
- mpGraphicObject(NULL),
- pLightClient (NULL),
+ mpGraphic(nullptr),
+ mpGraphicObject(nullptr),
+ pLightClient (nullptr),
mbFrame(bFrame),
mbInDestruction(false),
mbSuppressSetVisAreaSize(false),
@@ -721,8 +721,8 @@ public:
mbIsChart(false),
mbLoadingOLEObjectFailed(false),
mbConnected(false),
- mpObjectLink(NULL),
- mpModifyListener(NULL)
+ mpObjectLink(nullptr),
+ mpModifyListener(nullptr)
{
mxObjRef.Lock();
}
@@ -826,7 +826,7 @@ SdrOle2Obj::~SdrOle2Obj()
if ( mpImpl->pLightClient )
{
mpImpl->pLightClient->Release();
- mpImpl->pLightClient = NULL;
+ mpImpl->pLightClient = nullptr;
}
delete mpImpl;
@@ -863,9 +863,9 @@ void SdrOle2Obj::SetGraphic_Impl(const Graphic* pGrf)
if (mpImpl->mpGraphic)
{
delete mpImpl->mpGraphic;
- mpImpl->mpGraphic = NULL;
+ mpImpl->mpGraphic = nullptr;
delete mpImpl->mpGraphicObject;
- mpImpl->mpGraphicObject = NULL;
+ mpImpl->mpGraphicObject = nullptr;
}
if (pGrf)
@@ -926,11 +926,11 @@ bool SdrOle2Obj::UpdateLinkURL_Impl()
if ( mpImpl->mpObjectLink )
{
- sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : nullptr;
if ( pLinkManager )
{
OUString aNewLinkURL;
- sfx2::LinkManager::GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL );
+ sfx2::LinkManager::GetDisplayNames( mpImpl->mpObjectLink, nullptr, &aNewLinkURL );
if ( !aNewLinkURL.equalsIgnoreAsciiCase( mpImpl->maLinkURL ) )
{
GetObjRef_Impl();
@@ -1015,11 +1015,11 @@ void SdrOle2Obj::BreakFileLink_Impl()
void SdrOle2Obj::DisconnectFileLink_Impl()
{
- sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : nullptr;
if ( pLinkManager && mpImpl->mpObjectLink )
{
pLinkManager->Remove( mpImpl->mpObjectLink );
- mpImpl->mpObjectLink = NULL;
+ mpImpl->mpObjectLink = nullptr;
}
}
@@ -1250,7 +1250,7 @@ void SdrOle2Obj::Disconnect_Impl()
if ( pContainer )
{
pContainer->CloseEmbeddedObject( mpImpl->mxObjRef.GetObject() );
- mpImpl->mxObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
+ mpImpl->mxObjRef.AssignToContainer( nullptr, mpImpl->aPersistName );
}
// happens later than the destruction of the model, so we can't assert that).
@@ -1285,7 +1285,7 @@ void SdrOle2Obj::Disconnect_Impl()
// TODO/LATER: mpImpl->aPersistName contains outdated information, to keep it updated
// it should be returned from RemoveEmbeddedObject call. Currently it is no problem,
// since no container is adjusted, actually the empty string could be provided as a name here
- mpImpl->mxObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
+ mpImpl->mxObjRef.AssignToContainer( nullptr, mpImpl->aPersistName );
}
DisconnectFileLink_Impl();
@@ -1297,7 +1297,7 @@ void SdrOle2Obj::Disconnect_Impl()
{
mpImpl->mxObjRef->removeStateChangeListener ( mpImpl->pLightClient );
mpImpl->mxObjRef->removeEventListener( uno::Reference< document::XEventListener >( mpImpl->pLightClient ) );
- mpImpl->mxObjRef->setClientSite( NULL );
+ mpImpl->mxObjRef->setClientSite( nullptr );
GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
}
@@ -1390,15 +1390,15 @@ SdrObject* SdrOle2Obj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
}
}
- return 0;
+ return nullptr;
}
void SdrOle2Obj::SetModel(SdrModel* pNewModel)
{
- ::comphelper::IEmbeddedHelper* pDestPers = pNewModel ? pNewModel->GetPersist() : 0;
- ::comphelper::IEmbeddedHelper* pSrcPers = pModel ? pModel->GetPersist() : 0;
+ ::comphelper::IEmbeddedHelper* pDestPers = pNewModel ? pNewModel->GetPersist() : nullptr;
+ ::comphelper::IEmbeddedHelper* pSrcPers = pModel ? pModel->GetPersist() : nullptr;
if ( pNewModel == pModel )
{
@@ -1473,8 +1473,8 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel)
void SdrOle2Obj::SetPage(SdrPage* pNewPage)
{
- bool bRemove=pNewPage==NULL && pPage!=NULL;
- bool bInsert=pNewPage!=NULL && pPage==NULL;
+ bool bRemove=pNewPage==nullptr && pPage!=nullptr;
+ bool bInsert=pNewPage!=nullptr && pPage==nullptr;
if (bRemove && mpImpl->mbConnected )
Disconnect();
@@ -1579,7 +1579,7 @@ void SdrOle2Obj::AbandonObject()
{
mpImpl->aPersistName.clear();
mpImpl->mbLoadingOLEObjectFailed = false;
- SetObjRef(0);
+ SetObjRef(nullptr);
}
@@ -1654,7 +1654,7 @@ SdrOle2Obj* SdrOle2Obj::CloneWithShellIDs( const OUString& rSrcShellID, const OU
{
SdrOle2Obj* pObj =
dynamic_cast<SdrOle2Obj*>(
- SdrObjFactory::MakeNewObject(GetObjInventor(), GetObjIdentifier(), NULL));
+ SdrObjFactory::MakeNewObject(GetObjInventor(), GetObjIdentifier(), nullptr));
if (pObj)
pObj->assignFrom(*this, rSrcShellID, rDestShellID);
@@ -2072,7 +2072,7 @@ void SdrOle2Obj::GetObjRef_Impl()
// perhaps preview not valid anymore
// This line changes the modified state of the model
- SetGraphic_Impl( NULL );
+ SetGraphic_Impl( nullptr );
// if status was not set before, force it back
// to not set, so that SetGraphic(0L) above does not
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
index 568aa4ea7a10..33ea8b5839cd 100644
--- a/svx/source/svdraw/svdopage.cxx
+++ b/svx/source/svdraw/svdopage.cxx
@@ -60,7 +60,7 @@ void SdrPageObj::PageInDestruction(const SdrPage& rPage)
// lead to the construction of a view contact object for a page that
// is being destroyed.
- mpShownPage = 0L;
+ mpShownPage = nullptr;
}
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 3f047239b3be..0b41030f8f50 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -149,7 +149,7 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
const SdrMarkView& rMarkView = *rDrag.GetView();
const SdrHdlList& rHdlList = rMarkView.GetHdlList();
const size_t nHdlCount = rHdlList.GetHdlCount();
- const SdrObject* pInteractionObject(nHdlCount && rHdlList.GetHdl(0) ? rHdlList.GetHdl(0)->GetObj() : 0);
+ const SdrObject* pInteractionObject(nHdlCount && rHdlList.GetHdl(0) ? rHdlList.GetHdl(0)->GetObj() : nullptr);
for(size_t a = 0; a < nHdlCount; ++a)
{
@@ -343,7 +343,7 @@ bool ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi
aCircCenter.X()+=Round(nRad*cos((nTangAngle-9000)*nPi180));
aCircCenter.Y()-=Round(nRad*sin((nTangAngle-9000)*nPi180));
}
- bAngleSnap=pView!=NULL && pView->IsAngleSnapEnabled();
+ bAngleSnap=pView!=nullptr && pView->IsAngleSnapEnabled();
if (bAngleSnap) {
long nSA=pView->GetSnapAngle();
if (nSA!=0) { // angle snapping
@@ -402,7 +402,7 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr
long y2=BigMulDiv(x,nDirY,nDirX);
long l1=std::abs(x1)+std::abs(y1);
long l2=std::abs(x2)+std::abs(y2);
- if ((l1<=l2) != (pView!=NULL && pView->IsBigOrtho())) {
+ if ((l1<=l2) != (pView!=nullptr && pView->IsBigOrtho())) {
x=x1; y=y1;
} else {
x=x2; y=y2;
@@ -422,7 +422,7 @@ bool ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point
long nDirY=rDir.Y();
Point aP1(CalcLine(aTmpPt, nDirX, nDirY,pView)); aP1-=aTmpPt; long nQ1=std::abs(aP1.X())+std::abs(aP1.Y());
Point aP2(CalcLine(aTmpPt, nDirY,-nDirX,pView)); aP2-=aTmpPt; long nQ2=std::abs(aP2.X())+std::abs(aP2.Y());
- if (pView!=NULL && pView->IsOrtho()) nQ1=0; // Ortho turns off at right angle
+ if (pView!=nullptr && pView->IsOrtho()) nQ1=0; // Ortho turns off at right angle
bLine90=nQ1>2*nQ2;
if (!bLine90) { // smooth transition
aLineEnd+=aP1;
@@ -470,7 +470,7 @@ bool ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point
}
aRectP2.X()+=x;
aRectP2.Y()+=y;
- if (pView!=NULL && pView->IsOrtho()) {
+ if (pView!=nullptr && pView->IsOrtho()) {
long dx1=aRectP2.X()-aRectP1.X(); long dx1a=std::abs(dx1);
long dy1=aRectP2.Y()-aRectP1.Y(); long dy1a=std::abs(dy1);
long dx2=aRectP3.X()-aRectP2.X(); long dx2a=std::abs(dx2);
@@ -546,7 +546,7 @@ ImpPathForDragAndCreate::ImpPathForDragAndCreate(SdrPathObj& rSdrPathObject)
: mrSdrPathObject(rSdrPathObject),
aPathPolygon(rSdrPathObject.GetPathPoly()),
meObjectKind(mrSdrPathObject.meKind),
- mpSdrPathDragData(0),
+ mpSdrPathDragData(nullptr),
mbCreating(false)
{
}
@@ -575,7 +575,7 @@ bool ImpPathForDragAndCreate::beginPathDrag( SdrDragStat& rDrag ) const
const SdrMarkView& rMarkView = *rDrag.GetView();
const SdrHdlList& rHdlList = rMarkView.GetHdlList();
const size_t nHdlCount = rHdlList.GetHdlCount();
- const SdrObject* pInteractionObject(nHdlCount && rHdlList.GetHdl(0) ? rHdlList.GetHdl(0)->GetObj() : 0);
+ const SdrObject* pInteractionObject(nHdlCount && rHdlList.GetHdl(0) ? rHdlList.GetHdl(0)->GetObj() : nullptr);
sal_uInt32 nSelectedPoints(0);
for(size_t a = 0; a < nHdlCount; ++a)
@@ -598,7 +598,7 @@ bool ImpPathForDragAndCreate::beginPathDrag( SdrDragStat& rDrag ) const
{
OSL_FAIL("ImpPathForDragAndCreate::BegDrag(): ImpSdrPathDragData is invalid.");
delete mpSdrPathDragData;
- const_cast<ImpPathForDragAndCreate*>(this)->mpSdrPathDragData = 0;
+ const_cast<ImpPathForDragAndCreate*>(this)->mpSdrPathDragData = nullptr;
return false;
}
@@ -680,7 +680,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
bool bNextIsControl =mpSdrPathDragData->bNextIsControl; // if nPnt is a support point: there's a control point after
// Ortho for lines/polygons: keep angle
- if (!bControl && rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho()) {
+ if (!bControl && rDrag.GetView()!=nullptr && rDrag.GetView()->IsOrtho()) {
bool bBigOrtho=rDrag.GetView()->IsBigOrtho();
Point aPos(rDrag.GetNow()); // current position
Point aPnt(mpSdrPathDragData->aXP[nPnt]); // the dragged point
@@ -753,7 +753,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
rDrag.SetActionRect(Rectangle(rDrag.GetNow(),rDrag.GetNow()));
// specially for IBM: Eliminate points if both adjoining lines form near 180 degrees angle anyway
- if (!bControl && rDrag.GetView()!=NULL && rDrag.GetView()->IsEliminatePolyPoints() &&
+ if (!bControl && rDrag.GetView()!=nullptr && rDrag.GetView()->IsEliminatePolyPoints() &&
!bBegPnt && !bEndPnt && !bPrevIsControl && !bNextIsControl)
{
Point aPt(mpSdrPathDragData->aXP[nNextPnt]);
@@ -924,7 +924,7 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag)
}
delete mpSdrPathDragData;
- mpSdrPathDragData = 0;
+ mpSdrPathDragData = nullptr;
return true;
}
@@ -1278,7 +1278,7 @@ bool ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat)
mbCreating=true;
bool bMakeStartPoint = true;
SdrView* pView=rStat.GetView();
- if (pView!=NULL && pView->IsUseIncompatiblePathCreateInterface() &&
+ if (pView!=nullptr && pView->IsUseIncompatiblePathCreateInterface() &&
(meObjectKind==OBJ_POLY || meObjectKind==OBJ_PLIN || meObjectKind==OBJ_PATHLINE || meObjectKind==OBJ_PATHFILL)) {
bMakeStartPoint = false;
}
@@ -1299,7 +1299,7 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat)
ImpPathCreateUser* pU=static_cast<ImpPathCreateUser*>(rStat.GetUser());
SdrView* pView=rStat.GetView();
XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
- if (pView!=NULL && pView->IsCreateMode()) {
+ if (pView!=nullptr && pView->IsCreateMode()) {
// switch to different CreateTool, if appropriate
sal_uInt16 nIdent;
sal_uInt32 nInvent;
@@ -1338,20 +1338,20 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat)
rXPoly[nActPoint]=rStat.Now();
if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE && rXPoly.GetPointCount()>=1) {
Point aPt(rStat.Start());
- if (pView!=NULL && pView->IsCreate1stPointAsCenter()) {
+ if (pView!=nullptr && pView->IsCreate1stPointAsCenter()) {
aPt+=aPt;
aPt-=rStat.Now();
}
rXPoly[0]=aPt;
}
- OutputDevice* pOut=pView==NULL ? NULL : pView->GetFirstOutputDevice();
+ OutputDevice* pOut=pView==nullptr ? nullptr : pView->GetFirstOutputDevice();
if (bFreeHand) {
if (pU->nBezierStartPoint>nActPoint) pU->nBezierStartPoint=nActPoint;
if (rStat.IsMouseDown() && nActPoint>0) {
// don't allow two consecutive points to occupy too similar positions
long nMinDist=1;
- if (pView!=NULL) nMinDist=pView->GetFreeHandMinDistPix();
- if (pOut!=NULL) nMinDist=pOut->PixelToLogic(Size(nMinDist,0)).Width();
+ if (pView!=nullptr) nMinDist=pView->GetFreeHandMinDistPix();
+ if (pOut!=nullptr) nMinDist=pOut->PixelToLogic(Size(nMinDist,0)).Width();
if (nMinDist<1) nMinDist=1;
Point aPt0(rXPoly[nActPoint-1]);
@@ -1406,7 +1406,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
ImpPathCreateUser* pU=static_cast<ImpPathCreateUser*>(rStat.GetUser());
bool bRet = false;
SdrView* pView=rStat.GetView();
- bool bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface();
+ bool bIncomp=pView!=nullptr && pView->IsUseIncompatiblePathCreateInterface();
XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
sal_uInt16 nActPoint=rXPoly.GetPointCount()-1;
rXPoly[nActPoint]=rStat.Now();
@@ -1416,7 +1416,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
if (bRet) {
mbCreating = false;
delete pU;
- rStat.SetUser(NULL);
+ rStat.SetUser(nullptr);
}
return bRet;
}
@@ -1427,7 +1427,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
if (bRet) {
mbCreating=false;
delete pU;
- rStat.SetUser(NULL);
+ rStat.SetUser(nullptr);
}
return bRet;
}
@@ -1511,7 +1511,7 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
if (bRet) {
mbCreating=false;
delete pU;
- rStat.SetUser(NULL);
+ rStat.SetUser(nullptr);
}
return bRet;
}
@@ -1562,7 +1562,7 @@ void ImpPathForDragAndCreate::BrkCreate(SdrDragStat& rStat)
aPathPolygon.Clear();
mbCreating=false;
delete pU;
- rStat.SetUser(NULL);
+ rStat.SetUser(nullptr);
}
basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const SdrDragStat& rDrag) const
@@ -1668,7 +1668,7 @@ TYPEINIT1(SdrPathObj,SdrTextObj);
SdrPathObj::SdrPathObj(SdrObjKind eNewKind)
: meKind(eNewKind),
- mpDAC(0L),
+ mpDAC(nullptr),
mdBrightness(1.0)
{
bClosedObj = IsClosed();
@@ -1677,7 +1677,7 @@ SdrPathObj::SdrPathObj(SdrObjKind eNewKind)
SdrPathObj::SdrPathObj(SdrObjKind eNewKind, const basegfx::B2DPolyPolygon& rPathPoly, double dBrightness)
: maPathPolygon(rPathPoly),
meKind(eNewKind),
- mpDAC(0L),
+ mpDAC(nullptr),
mdBrightness(dBrightness)
{
bClosedObj = IsClosed();
@@ -2032,8 +2032,8 @@ SdrHdl* SdrPathObj::GetHdl(sal_uInt32 nHdlNum) const
OSL_FAIL("SdrPathObj::GetHdl(): ineffective, use AddToHdlList instead (!)");
// to have an alternative, get single handle using the ineffective way
- SdrHdl* pRetval = 0;
- SdrHdlList aLocalList(0);
+ SdrHdl* pRetval = nullptr;
+ SdrHdlList aLocalList(nullptr);
AddToHdlList(aLocalList);
const sal_uInt32 nHdlCount(aLocalList.GetHdlCount());
@@ -2110,7 +2110,7 @@ SdrHdl* SdrPathObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlusNum) const
{
// keep old stuff to be able to keep old SdrHdl stuff, too
const XPolyPolygon aOldPathPolygon(GetPathPoly());
- SdrHdl* pHdl = 0L;
+ SdrHdl* pHdl = nullptr;
sal_uInt16 nPnt = (sal_uInt16)rHdl.GetPointNum();
sal_uInt16 nPolyNum = (sal_uInt16)rHdl.GetPolyNum();
@@ -2688,7 +2688,7 @@ sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bo
SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index)
{
- SdrPathObj* pNewObj = 0L;
+ SdrPathObj* pNewObj = nullptr;
const basegfx::B2DPolyPolygon aLocalPolyPolygon(GetPathPoly());
sal_uInt32 nPoly, nPnt;
@@ -2741,7 +2741,7 @@ SdrObject* SdrPathObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
!aText.isDefault() && !aText.getSdrFormTextAttribute().isDefault() && aText.isHideContour());
SdrObject* pRet = bHideContour ?
- 0 :
+ nullptr :
ImpConvertMakeObj(GetPathPoly(), IsClosed(), bBezier);
SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pRet );
@@ -2810,7 +2810,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly)
{
if(GetPathPoly() != rPathPoly)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetPathPoly(rPathPoly);
SetChanged();
BroadcastObjectChange();
@@ -2821,7 +2821,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly)
void SdrPathObj::ToggleClosed()
{
Rectangle aBoundRect0;
- if(pUserCall != NULL)
+ if(pUserCall != nullptr)
aBoundRect0 = GetLastBoundRect();
ImpSetClosed(!IsClosed()); // set new ObjKind
ImpForceKind(); // because we want Line -> Poly -> PolyLine instead of Line -> Poly -> Line
@@ -2852,7 +2852,7 @@ void SdrPathObj::impDeleteDAC() const
if(mpDAC)
{
delete mpDAC;
- const_cast<SdrPathObj*>(this)->mpDAC = 0L;
+ const_cast<SdrPathObj*>(this)->mpDAC = nullptr;
}
}
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 97a69da772de..1750e0c647cc 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -66,21 +66,21 @@ sdr::contact::ViewContact* SdrRectObj::CreateObjectSpecificViewContact()
TYPEINIT1(SdrRectObj,SdrTextObj);
SdrRectObj::SdrRectObj()
-: mpXPoly(0L)
+: mpXPoly(nullptr)
{
bClosedObj=true;
}
SdrRectObj::SdrRectObj(const Rectangle& rRect)
: SdrTextObj(rRect),
- mpXPoly(NULL)
+ mpXPoly(nullptr)
{
bClosedObj=true;
}
SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind)
: SdrTextObj(eNewTextKind),
- mpXPoly(NULL)
+ mpXPoly(nullptr)
{
DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
@@ -90,7 +90,7 @@ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind)
SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect)
: SdrTextObj(eNewTextKind,rRect),
- mpXPoly(NULL)
+ mpXPoly(nullptr)
{
DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
@@ -115,7 +115,7 @@ SdrRectObj& SdrRectObj::operator=(const SdrRectObj& rCopy)
if ( rCopy.mpXPoly )
mpXPoly = new XPolygon( *rCopy.mpXPoly );
else
- mpXPoly = NULL;
+ mpXPoly = nullptr;
return *this;
}
@@ -123,7 +123,7 @@ SdrRectObj& SdrRectObj::operator=(const SdrRectObj& rCopy)
void SdrRectObj::SetXPolyDirty()
{
delete mpXPoly;
- mpXPoly = 0L;
+ mpXPoly = nullptr;
}
XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const
@@ -320,7 +320,7 @@ sal_uInt32 SdrRectObj::GetHdlCount() const
SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nHdlNum) const
{
- SdrHdl* pH = NULL;
+ SdrHdl* pH = nullptr;
Point aPnt;
SdrHdlKind eKind = HDL_MOVE;
@@ -594,7 +594,7 @@ SdrObject* SdrRectObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
basegfx::B2DPolyPolygon aPolyPolygon(aXP.getB2DPolygon());
aPolyPolygon.removeDoublePoints();
- SdrObject* pRet = 0L;
+ SdrObject* pRet = nullptr;
// small correction: Do not create something when no fill and no line. To
// be sure to not damage something with non-text frames, do this only
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 21663ee3a835..5a5796d7e63c 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -86,9 +86,9 @@ TYPEINIT1(SdrTextObj,SdrAttrObj);
SdrTextObj::SdrTextObj()
: SdrAttrObj(),
- mpText(NULL),
- pEdtOutl(NULL),
- pFormTextBoundRect(NULL),
+ mpText(nullptr),
+ pEdtOutl(nullptr),
+ pFormTextBoundRect(nullptr),
eTextKind(OBJ_TEXT)
{
bTextSizeDirty=false;
@@ -115,9 +115,9 @@ SdrTextObj::SdrTextObj()
SdrTextObj::SdrTextObj(const Rectangle& rNewRect)
: SdrAttrObj(),
maRect(rNewRect),
- mpText(NULL),
- pEdtOutl(NULL),
- pFormTextBoundRect(NULL),
+ mpText(nullptr),
+ pEdtOutl(nullptr),
+ pFormTextBoundRect(nullptr),
eTextKind(OBJ_TEXT)
{
bTextSizeDirty=false;
@@ -144,9 +144,9 @@ SdrTextObj::SdrTextObj(const Rectangle& rNewRect)
SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind)
: SdrAttrObj(),
- mpText(NULL),
- pEdtOutl(NULL),
- pFormTextBoundRect(NULL),
+ mpText(nullptr),
+ pEdtOutl(nullptr),
+ pFormTextBoundRect(nullptr),
eTextKind(eNewTextKind)
{
bTextSizeDirty=false;
@@ -173,9 +173,9 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind)
SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect)
: SdrAttrObj(),
maRect(rNewRect),
- mpText(NULL),
- pEdtOutl(NULL),
- pFormTextBoundRect(NULL),
+ mpText(nullptr),
+ pEdtOutl(nullptr),
+ pFormTextBoundRect(nullptr),
eTextKind(eNewTextKind)
{
bTextSizeDirty=false;
@@ -206,7 +206,7 @@ SdrTextObj::~SdrTextObj()
{
SdrOutliner& rOutl = pModel->GetHitTestOutliner();
if( rOutl.GetTextObj() == this )
- rOutl.SetTextObj( NULL );
+ rOutl.SetTextObj( nullptr );
}
delete mpText;
@@ -218,11 +218,11 @@ SdrTextObj::~SdrTextObj()
void SdrTextObj::FitFrameToTextSize()
{
- DBG_ASSERT(pModel!=NULL,"SdrTextObj::FitFrameToTextSize(): pModel=NULL!");
+ DBG_ASSERT(pModel!=nullptr,"SdrTextObj::FitFrameToTextSize(): pModel=NULL!");
ImpJustifyRect(maRect);
SdrText* pText = getActiveText();
- if( pText!=NULL && pText->GetOutlinerParaObject() && pModel!=NULL)
+ if( pText!=nullptr && pText->GetOutlinerParaObject() && pModel!=nullptr)
{
SdrOutliner& rOutliner=ImpGetDrawOutliner();
rOutliner.SetPaperSize(Size(maRect.Right()-maRect.Left(),maRect.Bottom()-maRect.Top()));
@@ -258,7 +258,7 @@ void SdrTextObj::NbcSetText(const OUString& rStr)
void SdrTextObj::SetText(const OUString& rStr)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetText(rStr);
SetChanged();
BroadcastObjectChange();
@@ -281,7 +281,7 @@ void SdrTextObj::NbcSetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt
void SdrTextObj::SetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcSetText(rInput,rBaseURL,eFormat);
SetChanged();
BroadcastObjectChange();
@@ -482,7 +482,7 @@ bool SdrTextObj::HasTextImpl( SdrOutliner* pOutliner )
{
Paragraph* p1stPara=pOutliner->GetParagraph( 0 );
sal_Int32 nParaCount=pOutliner->GetParagraphCount();
- if(p1stPara==NULL)
+ if(p1stPara==nullptr)
nParaCount=0;
if(nParaCount==1)
@@ -504,8 +504,8 @@ bool SdrTextObj::HasEditText() const
void SdrTextObj::SetPage(SdrPage* pNewPage)
{
- bool bRemove=pNewPage==NULL && pPage!=NULL;
- bool bInsert=pNewPage!=NULL && pPage==NULL;
+ bool bRemove=pNewPage==nullptr && pPage!=nullptr;
+ bool bInsert=pNewPage!=nullptr && pPage==nullptr;
bool bLinked=IsLinkedText();
if (bLinked && bRemove) {
@@ -534,7 +534,7 @@ void SdrTextObj::SetModel(SdrModel* pNewModel)
if( bChg )
{
- if( pNewModel != 0 && pOldModel != 0 )
+ if( pNewModel != nullptr && pOldModel != nullptr )
SetTextSizeDirty();
sal_Int32 nCount = getTextCount();
@@ -619,7 +619,7 @@ void SdrTextObj::AdaptTextMinSize()
void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, bool bLineWidth ) const
{
basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly());
- basegfx::B2DPolyPolygon* pContourPolyPolygon = 0L;
+ basegfx::B2DPolyPolygon* pContourPolyPolygon = nullptr;
basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix(
-rAnchorRect.Left(), -rAnchorRect.Top()));
@@ -792,7 +792,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
// put text into the outliner, if available from the edit outliner
SdrText* pText = getActiveText();
- OutlinerParaObject* pOutlinerParaObject = pText ? pText->GetOutlinerParaObject() : 0;
+ OutlinerParaObject* pOutlinerParaObject = pText ? pText->GetOutlinerParaObject() : nullptr;
OutlinerParaObject* pPara = (pEdtOutl && !bNoEditText) ? pEdtOutl->CreateParaObject() : pOutlinerParaObject;
if (pPara)
@@ -817,7 +817,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
}
else
{
- rOutliner.SetTextObj( NULL );
+ rOutliner.SetTextObj( nullptr );
}
if (pEdtOutl && !bNoEditText && pPara)
@@ -888,7 +888,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const
{
- OutlinerParaObject* pPara=NULL;
+ OutlinerParaObject* pPara=nullptr;
if( HasTextImpl( pEdtOutl ) )
{
sal_Int32 nParaCount = pEdtOutl->GetParagraphCount();
@@ -909,7 +909,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
OUString aTestString(static_cast<sal_Unicode>('J'));
if(pMtf && (!pMtf->IsRecord() || pMtf->IsPause()))
- pMtf = NULL;
+ pMtf = nullptr;
if(pMtf)
pMtf->Pause(true);
@@ -1117,14 +1117,14 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj)
bNoMirror = rObj.bNoMirror;
bDisableAutoWidthOnDragging = rObj.bDisableAutoWidthOnDragging;
- OutlinerParaObject* pNewOutlinerParaObject = 0;
+ OutlinerParaObject* pNewOutlinerParaObject = nullptr;
SdrText* pText = getActiveText();
if( pText && rObj.HasText() )
{
const Outliner* pEO=rObj.pEdtOutl;
- if (pEO!=NULL)
+ if (pEO!=nullptr)
{
pNewOutlinerParaObject = pEO->CreateParaObject();
}
@@ -1406,7 +1406,7 @@ OutlinerParaObject* SdrTextObj::GetOutlinerParaObject() const
if( pText )
return pText->GetOutlinerParaObject();
else
- return 0;
+ return nullptr;
}
void SdrTextObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
@@ -1479,7 +1479,7 @@ void SdrTextObj::ReformatText()
if(GetOutlinerParaObject())
{
Rectangle aBoundRect0;
- if (pUserCall!=NULL)
+ if (pUserCall!=nullptr)
aBoundRect0=GetLastBoundRect();
NbcReformatText();
@@ -1529,7 +1529,7 @@ const Rectangle& SdrTextObj::GetGeoRect() const
void SdrTextObj::ForceOutlinerParaObject()
{
SdrText* pText = getActiveText();
- if( pText && (pText->GetOutlinerParaObject() == 0) )
+ if( pText && (pText->GetOutlinerParaObject() == nullptr) )
{
sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
if( IsTextFrame() && eTextKind == OBJ_OUTLINETEXT )
@@ -1884,7 +1884,7 @@ SdrTextAniDirection SdrTextObj::GetTextAniDirection() const
GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
Rectangle& rScrollRectangle, Rectangle& rPaintRectangle)
{
- GDIMetaFile* pRetval = 0L;
+ GDIMetaFile* pRetval = nullptr;
SdrOutliner& rOutliner = ImpGetDrawOutliner();
Rectangle aTextRect;
Rectangle aAnchorRect;
@@ -1996,7 +1996,7 @@ SdrObject *ImpGetObjByName(SdrObjList *pObjList, OUString const& aObjName)
}
}
// not found
- return NULL;
+ return nullptr;
}
// XXX: Make it a (private) method of SdrTextObj
@@ -2006,7 +2006,7 @@ void ImpUpdateChainLinks(SdrTextObj *pTextObj, OUString const& aNextLinkName)
// No next link
if (aNextLinkName.isEmpty()) {
- pTextObj->SetNextLinkInChain(NULL);
+ pTextObj->SetNextLinkInChain(nullptr);
return;
}
@@ -2097,7 +2097,7 @@ void SdrTextObj::SetNextLinkInChain(SdrTextObj *pNextObj)
mpNextInChain = pNextObj;
// Deal with old next link's prev link
if (pOldNextObj) {
- pOldNextObj->mpPrevInChain = NULL;
+ pOldNextObj->mpPrevInChain = nullptr;
}
// Deal with new next link's prev link
@@ -2105,7 +2105,7 @@ void SdrTextObj::SetNextLinkInChain(SdrTextObj *pNextObj)
// If there is a prev already at all and this is not already the current object
if (mpNextInChain->mpPrevInChain &&
mpNextInChain->mpPrevInChain != this)
- mpNextInChain->mpPrevInChain->mpNextInChain = NULL;
+ mpNextInChain->mpPrevInChain->mpNextInChain = nullptr;
mpNextInChain->mpPrevInChain = this;
}
@@ -2140,7 +2140,7 @@ bool SdrTextObj::GetPreventChainable() const
{
SdrObject *pClone = SdrAttrObj::getFullDragClone();
SdrTextObj *pTextObjClone = dynamic_cast<SdrTextObj *>(pClone);
- if (pTextObjClone != NULL) {
+ if (pTextObjClone != nullptr) {
// Avoid transferring of text for chainable object during dragging
pTextObjClone->SetPreventChainable();
}
@@ -2164,13 +2164,13 @@ SdrText* SdrTextObj::getText( sal_Int32 nIndex ) const
{
if( nIndex == 0 )
{
- if( mpText == 0 )
+ if( mpText == nullptr )
const_cast< SdrTextObj* >(this)->mpText = new SdrText( *(const_cast< SdrTextObj* >(this)) );
return mpText;
}
else
{
- return 0;
+ return nullptr;
}
}
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 5e2c38069548..4630658bf8f1 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -273,7 +273,7 @@ namespace
const bool bWordLineMode(rInfo.mrFont.IsWordLineMode() && !rInfo.mbEndOfBullet);
// prepare new primitive
- drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = 0;
+ drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = nullptr;
const bool bDecoratedIsNeeded(
UNDERLINE_NONE != rInfo.mrFont.GetOverline()
|| UNDERLINE_NONE != rInfo.mrFont.GetUnderline()
@@ -715,7 +715,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
// cleanup outliner
rOutliner.Clear();
- rOutliner.setVisualizedPage(0);
+ rOutliner.setVisualizedPage(nullptr);
rTarget = aConverter.getPrimitive2DSequence();
}
@@ -848,7 +848,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
// cleanup outliner
rOutliner.Clear();
- rOutliner.setVisualizedPage(0);
+ rOutliner.setVisualizedPage(nullptr);
rOutliner.SetControlWord(nOriginalControlWord);
rTarget = aConverter.getPrimitive2DSequence();
@@ -1091,7 +1091,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// cleanup outliner
rOutliner.SetBackgroundColor(aOriginalBackColor);
rOutliner.Clear();
- rOutliner.setVisualizedPage(0);
+ rOutliner.setVisualizedPage(nullptr);
rTarget = aConverter.getPrimitive2DSequence();
}
@@ -1169,7 +1169,7 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
// cleanup outliner
rOutliner.SetControlWord(nOriginalControlWord);
rOutliner.Clear();
- rOutliner.setVisualizedPage(0);
+ rOutliner.setVisualizedPage(nullptr);
rTarget = aConverter.getPrimitive2DSequence();
}
@@ -1592,7 +1592,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
// cleanup outliner
rOutliner.Clear();
- rOutliner.setVisualizedPage(0);
+ rOutliner.setVisualizedPage(nullptr);
rOutliner.SetControlWord(nOriginalControlWord);
rTarget = aConverter.getPrimitive2DSequence();
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index a3b817106559..78fc7e796708 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -792,7 +792,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
// clean up outliner
rOutliner.SetDrawPortionHdl(Link<DrawPortionInfo*,void>());
rOutliner.Clear();
- rOutliner.setVisualizedPage(0);
+ rOutliner.setVisualizedPage(nullptr);
// concatenate all results
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aRetvalA);
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 62ea55429018..04c39c959932 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -279,7 +279,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
Rectangle aNeuRect(maRect);
bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt);
if (bRet) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
maRect = aNeuRect;
SetRectsDirty();
if (HAS_BASE(SdrRectObj,this)) { // this is a hack
@@ -297,12 +297,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt)
void SdrTextObj::ImpSetTextStyleSheetListeners()
{
- SfxStyleSheetBasePool* pStylePool=pModel!=NULL ? pModel->GetStyleSheetPool() : NULL;
- if (pStylePool!=NULL)
+ SfxStyleSheetBasePool* pStylePool=pModel!=nullptr ? pModel->GetStyleSheetPool() : nullptr;
+ if (pStylePool!=nullptr)
{
std::vector<OUString> aStyleNames;
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
- if (pOutlinerParaObject!=NULL)
+ if (pOutlinerParaObject!=nullptr)
{
// First, we collect all stylesheets contained in the ParaObject in
// the container aStyles. The Family is always appended to the name
@@ -348,7 +348,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
SfxStyleFamily eFam = ReadFamilyFromStyleName(aName);
SfxStyleSheetBase* pStyleBase = pStylePool->Find(aName,eFam);
SfxStyleSheet* pStyle = dynamic_cast<SfxStyleSheet*>( pStyleBase );
- if (pStyle!=NULL && pStyle!=GetStyleSheet()) {
+ if (pStyle!=nullptr && pStyle!=GetStyleSheet()) {
aStyleSheets.insert(pStyle);
}
}
@@ -358,7 +358,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
nNum--;
SfxBroadcaster* pBroadcast=GetBroadcasterJOE((sal_uInt16)nNum);
SfxStyleSheet* pStyle=dynamic_cast<SfxStyleSheet*>( pBroadcast );
- if (pStyle!=NULL && pStyle!=GetStyleSheet()) { // special case for stylesheet of the object
+ if (pStyle!=nullptr && pStyle!=GetStyleSheet()) { // special case for stylesheet of the object
if (aStyleSheets.find(pStyle)==aStyleSheets.end()) {
EndListening(*pStyle);
}
@@ -384,11 +384,11 @@ void SdrTextObj::RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>&
while( --nText >= 0 )
{
SdrText* pText = getText( nText );
- OutlinerParaObject* pOutlinerParaObject = pText ? pText->GetOutlinerParaObject() : 0;
+ OutlinerParaObject* pOutlinerParaObject = pText ? pText->GetOutlinerParaObject() : nullptr;
if(pOutlinerParaObject)
{
- Outliner* pOutliner = 0;
+ Outliner* pOutliner = nullptr;
if( pEdtOutl || (pText == getActiveText()) )
pOutliner = pEdtOutl;
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 954d36c8a430..95a419b36362 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -39,7 +39,7 @@ sal_uInt32 SdrTextObj::GetHdlCount() const
SdrHdl* SdrTextObj::GetHdl(sal_uInt32 nHdlNum) const
{
- SdrHdl* pH=NULL;
+ SdrHdl* pH=nullptr;
Point aPnt;
SdrHdlKind eKind=HDL_MOVE;
switch (nHdlNum) {
@@ -73,9 +73,9 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
{
Rectangle aTmpRect(maRect);
const SdrHdl* pHdl=rDrag.GetHdl();
- SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ SdrHdlKind eHdl=pHdl==nullptr ? HDL_MOVE : pHdl->GetKind();
bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT);
- bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho();
+ bool bOrtho=rDrag.GetView()!=nullptr && rDrag.GetView()->IsOrtho();
bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho();
Point aPos(rDrag.GetNow());
// Unrotate:
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index b2cc9d68eccd..9df962bed61e 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -40,7 +40,7 @@ bool SdrTextObj::HasTextEdit() const
bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
{
- if (pEdtOutl!=NULL) return false; // Textedit might already run in another View!
+ if (pEdtOutl!=nullptr) return false; // Textedit might already run in another View!
pEdtOutl=&rOutl;
mbInEditMode = true;
@@ -74,7 +74,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
- if(pOutlinerParaObject!=NULL)
+ if(pOutlinerParaObject!=nullptr)
{
rOutl.SetText(*GetOutlinerParaObject());
rOutl.SetFixedCellHeight(static_cast<const SdrTextFixedCellHeightItem&>(GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
@@ -135,7 +135,7 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj)
Size aPaperMin;
Size aPaperMax;
Rectangle aEditArea;
- pTextObj->TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL);
+ pTextObj->TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr);
pOutl->SetMinAutoPaperSize(aPaperMin);
pOutl->SetMaxAutoPaperSize(aPaperMax);
@@ -159,7 +159,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
Size aAnkSiz(aViewInit.GetSize());
aAnkSiz.Width()--; aAnkSiz.Height()--; // because GetSize() adds 1
Size aMaxSiz(1000000,1000000);
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
Size aTmpSiz(pModel->GetMaxObjSize());
if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
@@ -242,7 +242,7 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
aPaperMax=aMaxSiz;
}
- if (pViewMin!=NULL) {
+ if (pViewMin!=nullptr) {
*pViewMin=aViewInit;
long nXFree=aAnkSiz.Width()-aPaperMin.Width();
@@ -272,9 +272,9 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p
aPaperMin.Height() = 0;
}
- if (pPaperMin!=NULL) *pPaperMin=aPaperMin;
- if (pPaperMax!=NULL) *pPaperMax=aPaperMax;
- if (pViewInit!=NULL) *pViewInit=aViewInit;
+ if (pPaperMin!=nullptr) *pPaperMin=aPaperMin;
+ if (pPaperMax!=nullptr) *pPaperMax=aPaperMax;
+ if (pViewInit!=nullptr) *pViewInit=aViewInit;
}
void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
@@ -334,7 +334,7 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
}
/* End Chaining-related code */
- pEdtOutl = NULL;
+ pEdtOutl = nullptr;
rOutl.Clear();
EEControlBits nStat = rOutl.GetControlWord();
nStat &= ~EEControlBits::AUTOPAGESIZE;
@@ -379,13 +379,13 @@ sal_uInt16 SdrTextObj::GetOutlinerViewAnchorMode() const
void SdrTextObj::ImpSetTextEditParams() const
{
- if (pEdtOutl!=NULL) {
+ if (pEdtOutl!=nullptr) {
bool bUpdMerk=pEdtOutl->GetUpdateMode();
if (bUpdMerk) pEdtOutl->SetUpdateMode(false);
Size aPaperMin;
Size aPaperMax;
Rectangle aEditArea;
- TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL);
+ TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr);
bool bContourFrame=IsContourTextFrame();
pEdtOutl->SetMinAutoPaperSize(aPaperMin);
pEdtOutl->SetMaxAutoPaperSize(aPaperMax);
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index cf8777616325..840dbbe618a3 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -61,7 +61,7 @@ void ImpSdrObjTextLink::Closed()
{
// set pLink of the object to NULL, because we are destroying the link instance now
ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
- if (pData!=NULL) pData->pLink=NULL;
+ if (pData!=nullptr) pData->pLink=nullptr;
pSdrObj->ReleaseTextLink();
}
SvBaseLink::Closed();
@@ -72,8 +72,8 @@ void ImpSdrObjTextLink::Closed()
const OUString& /*rMimeType*/, const css::uno::Any & /*rValue */)
{
bool bForceReload = false;
- SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0;
- sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
+ SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : nullptr;
+ sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : nullptr;
if( pLinkManager )
{
ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
@@ -81,7 +81,7 @@ void ImpSdrObjTextLink::Closed()
{
OUString aFile;
OUString aFilter;
- sfx2::LinkManager::GetDisplayNames( this, 0,&aFile, 0, &aFilter );
+ sfx2::LinkManager::GetDisplayNames( this, nullptr,&aFile, nullptr, &aFilter );
if( pData->aFileName != aFile ||
pData->aFilterName != aFilter )
@@ -104,7 +104,7 @@ ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData(SdrTextObj* pObj1):
SdrObjUserData(SdrInventor,SDRUSERDATA_OBJTEXTLINK,0),
pObj(pObj1),
aFileDate0( DateTime::EMPTY ),
- pLink(NULL),
+ pLink(nullptr),
eCharSet(RTL_TEXTENCODING_DONTKNOW)
{
}
@@ -121,7 +121,7 @@ SdrObjUserData* ImpSdrObjTextLinkUserData::Clone(SdrObject* pObj1) const
pData->aFilterName=aFilterName;
pData->aFileDate0 =aFileDate0;
pData->eCharSet =eCharSet;
- pData->pLink=NULL;
+ pData->pLink=nullptr;
return pData;
}
@@ -132,7 +132,7 @@ void SdrTextObj::SetTextLink(const OUString& rFileName, const OUString& rFilterN
eCharSet = osl_getThreadTextEncoding();
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
- if (pData!=NULL) {
+ if (pData!=nullptr) {
ReleaseTextLink();
}
pData=new ImpSdrObjTextLinkUserData(this);
@@ -256,29 +256,29 @@ ImpSdrObjTextLinkUserData* SdrTextObj::GetLinkUserData() const
return static_cast<ImpSdrObjTextLinkUserData *>(pData);
}
}
- return 0;
+ return nullptr;
}
void SdrTextObj::ImpLinkAnmeldung()
{
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
- sfx2::LinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
- if (pLinkManager!=NULL && pData!=NULL && pData->pLink==NULL) { // don't register twice
+ sfx2::LinkManager* pLinkManager=pModel!=nullptr ? pModel->GetLinkManager() : nullptr;
+ if (pLinkManager!=nullptr && pData!=nullptr && pData->pLink==nullptr) { // don't register twice
pData->pLink = new ImpSdrObjTextLink(this);
pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,pData->aFileName,
!pData->aFilterName.isEmpty() ?
- &pData->aFilterName : NULL);
+ &pData->aFilterName : nullptr);
}
}
void SdrTextObj::ImpLinkAbmeldung()
{
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
- sfx2::LinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
- if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // don't register twice
+ sfx2::LinkManager* pLinkManager=pModel!=nullptr ? pModel->GetLinkManager() : nullptr;
+ if (pLinkManager!=nullptr && pData!=nullptr && pData->pLink!=nullptr) { // don't register twice
// when doing Remove, *pLink is deleted implicitly
pLinkManager->Remove( pData->pLink );
- pData->pLink=NULL;
+ pData->pLink=nullptr;
}
}
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index df967bb5ff4d..79dfcf938fe9 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -287,12 +287,12 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const
{
- SdrObject* pRetval = 0;
+ SdrObject* pRetval = nullptr;
if(!ImpCanConvTextToCurve())
{
// suppress HelpTexts from PresObj's
- return 0;
+ return nullptr;
}
// get primitives
@@ -343,7 +343,7 @@ SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const
// create ItemSet with object attributes
SfxItemSet aAttributeSet(GetObjectItemSet());
- SdrPathObj* pPathObj = 0;
+ SdrPathObj* pPathObj = nullptr;
// always clear objectshadow; this is included in the extraction
aAttributeSet.Put(makeSdrShadowItem(false));
@@ -415,7 +415,7 @@ SdrObject* SdrTextObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
return ImpConvertContainedTextToSdrPathObjs(!bBezier);
}
- return 0;
+ return nullptr;
}
bool SdrTextObj::ImpCanConvTextToCurve() const
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index e5c95130c9c8..b68a5574eb6b 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -88,7 +88,7 @@ void SAL_CALL SdrControlEventListenerImpl::disposing( const css::lang::EventObje
{
if (pObj)
{
- pObj->xUnoControlModel = NULL;
+ pObj->xUnoControlModel = nullptr;
}
}
@@ -118,7 +118,7 @@ namespace
{
OSL_PRECOND( _pObject, "lcl_ensureControlVisibility: no object -> no survival!" );
- SdrPageView* pPageView = _pView ? _pView->GetSdrPageView() : NULL;
+ SdrPageView* pPageView = _pView ? _pView->GetSdrPageView() : nullptr;
DBG_ASSERT( pPageView, "lcl_ensureControlVisibility: no view found!" );
if ( !pPageView )
return;
@@ -280,7 +280,7 @@ SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj)
SdrRectObj::operator= (rObj);
// release the reference to the current control model
- SetUnoControlModel( NULL );
+ SetUnoControlModel( nullptr );
aUnoControlModelTypeName = rObj.aUnoControlModelTypeName;
aUnoControlTypeName = rObj.aUnoControlTypeName;
@@ -359,7 +359,7 @@ bool SdrUnoObj::supportsFullDrag() const
SdrObject* SdrUnoObj::getFullDragClone() const
{
- SdrObject* pRetval = 0;
+ SdrObject* pRetval = nullptr;
static bool bHandleSpecial(false);
if(bHandleSpecial)
@@ -516,7 +516,7 @@ void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >&
}
// invalidate all ViewObject contacts
- ViewContactOfUnoControl* pVC = NULL;
+ ViewContactOfUnoControl* pVC = nullptr;
if ( impl_getViewContact( pVC ) )
{
// flushViewObjectContacts() removes all existing VOCs for the local DrawHierarchy. This
@@ -533,12 +533,12 @@ uno::Reference< awt::XControl > SdrUnoObj::GetUnoControl(const SdrView& _rView,
SdrPageView* pPageView = _rView.GetSdrPageView();
OSL_ENSURE( pPageView && GetPage() == pPageView->GetPage(), "SdrUnoObj::GetUnoControl: This object is not displayed in that particular view!" );
if ( !pPageView || GetPage() != pPageView->GetPage() )
- return NULL;
+ return nullptr;
SdrPageWindow* pPageWindow = pPageView->FindPageWindow( _rOut );
OSL_ENSURE( pPageWindow, "SdrUnoObj::GetUnoControl: did not find my SdrPageWindow!" );
if ( !pPageWindow )
- return NULL;
+ return nullptr;
ViewObjectContact& rViewObjectContact( GetViewContact().GetViewObjectContact( pPageWindow->GetObjectContact() ) );
ViewObjectContactOfUnoControl* pUnoContact = dynamic_cast< ViewObjectContactOfUnoControl* >( &rViewObjectContact );
@@ -555,7 +555,7 @@ uno::Reference< awt::XControl > SdrUnoObj::GetTemporaryControlForWindow(
{
uno::Reference< awt::XControl > xControl;
- ViewContactOfUnoControl* pVC = NULL;
+ ViewContactOfUnoControl* pVC = nullptr;
if ( impl_getViewContact( pVC ) )
xControl = pVC->getTemporaryControlForWindow( _rWindow, _inout_ControlContainer );
@@ -568,7 +568,7 @@ bool SdrUnoObj::impl_getViewContact( ViewContactOfUnoControl*& _out_rpContact )
ViewContact& rViewContact( GetViewContact() );
_out_rpContact = dynamic_cast< ViewContactOfUnoControl* >( &rViewContact );
DBG_ASSERT( _out_rpContact, "SdrUnoObj::impl_getViewContact: could not find my ViewContact!" );
- return ( _out_rpContact != NULL );
+ return ( _out_rpContact != nullptr );
}
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 63f1ef49fe98..998c520c800f 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -29,7 +29,7 @@
SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, sal_uInt16 nMode )
: Outliner( pItemPool, nMode ),
//mpPaintInfoRec( NULL )
- mpVisualizedPage(0)
+ mpVisualizedPage(nullptr)
{
}
@@ -91,7 +91,7 @@ const SdrTextObj* SdrOutliner::GetTextObj() const
if( mpTextObj.is() )
return static_cast< SdrTextObj* >( mpTextObj.get() );
else
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx
index d77babce8079..c9e9beeb699d 100644
--- a/svx/source/svdraw/svdoutlinercache.cxx
+++ b/svx/source/svdraw/svdoutlinercache.cxx
@@ -24,24 +24,24 @@
SdrOutlinerCache::SdrOutlinerCache( SdrModel* pModel )
: mpModel( pModel ),
- mpModeOutline( NULL ),
- mpModeText( NULL )
+ mpModeOutline( nullptr ),
+ mpModeText( nullptr )
{
}
SdrOutliner* SdrOutlinerCache::createOutliner( sal_uInt16 nOutlinerMode )
{
- SdrOutliner* pOutliner = NULL;
+ SdrOutliner* pOutliner = nullptr;
if( (OUTLINERMODE_OUTLINEOBJECT == nOutlinerMode) && mpModeOutline )
{
pOutliner = mpModeOutline;
- mpModeOutline = NULL;
+ mpModeOutline = nullptr;
}
else if( (OUTLINERMODE_TEXTOBJECT == nOutlinerMode) && mpModeText )
{
pOutliner = mpModeText;
- mpModeText = NULL;
+ mpModeText = nullptr;
}
else
{
@@ -59,13 +59,13 @@ SdrOutlinerCache::~SdrOutlinerCache()
if( mpModeOutline )
{
delete mpModeOutline;
- mpModeOutline = NULL;
+ mpModeOutline = nullptr;
}
if( mpModeText )
{
delete mpModeText;
- mpModeText = NULL;
+ mpModeText = nullptr;
}
}
@@ -75,7 +75,7 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
{
sal_uInt16 nOutlMode = pOutliner->GetOutlinerMode();
- if( (OUTLINERMODE_OUTLINEOBJECT == nOutlMode) && (NULL == mpModeOutline) )
+ if( (OUTLINERMODE_OUTLINEOBJECT == nOutlMode) && (nullptr == mpModeOutline) )
{
mpModeOutline = pOutliner;
pOutliner->Clear();
@@ -84,7 +84,7 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
// Deregister on outliner, might be reused from outliner cache
pOutliner->SetNotifyHdl( Link<EENotify&,void>() );
}
- else if( (OUTLINERMODE_TEXTOBJECT == nOutlMode) && (NULL == mpModeText) )
+ else if( (OUTLINERMODE_TEXTOBJECT == nOutlMode) && (nullptr == mpModeText) )
{
mpModeText = pOutliner;
pOutliner->Clear();
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 5cea7776090f..0ab775b068ea 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -233,7 +233,7 @@ void SdrVirtObj::AddToHdlList(SdrHdlList& rHdlList) const
// and may not be prepared to GetHdl returning NULL
// get handles using AddToHdlList from ref object
- SdrHdlList aLocalList(0);
+ SdrHdlList aLocalList(nullptr);
rRefObj.AddToHdlList(aLocalList);
const size_t nHdlCount(aLocalList.GetHdlCount());
@@ -274,7 +274,7 @@ bool SdrVirtObj::supportsFullDrag() const
SdrObject* SdrVirtObj::getFullDragClone() const
{
static bool bSpecialHandling(false);
- SdrObject* pRetval = 0;
+ SdrObject* pRetval = nullptr;
if(bSpecialHandling)
{
@@ -384,7 +384,7 @@ void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea
void SdrVirtObj::Move(const Size& rSiz)
{
if (rSiz.Width()!=0 || rSiz.Height()!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
NbcMove(rSiz);
SetChanged();
BroadcastObjectChange();
@@ -395,7 +395,7 @@ void SdrVirtObj::Move(const Size& rSiz)
void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
{
if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative);
SetRectsDirty();
SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
@@ -405,7 +405,7 @@ void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction
void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Rotate(rRef-aAnchor,nAngle,sn,cs);
SetRectsDirty();
SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
@@ -414,7 +414,7 @@ void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor);
SetRectsDirty();
SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
@@ -423,7 +423,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.Shear(rRef-aAnchor,nAngle,tn,bVShear);
SetRectsDirty();
SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
@@ -448,7 +448,7 @@ const Rectangle& SdrVirtObj::GetSnapRect() const
void SdrVirtObj::SetSnapRect(const Rectangle& rRect)
{
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
Rectangle aR(rRect);
aR-=aAnchor;
rRefObj.SetSnapRect(aR);
@@ -476,7 +476,7 @@ const Rectangle& SdrVirtObj::GetLogicRect() const
void SdrVirtObj::SetLogicRect(const Rectangle& rRect)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
Rectangle aR(rRect);
aR-=aAnchor;
rRefObj.SetLogicRect(aR);
@@ -568,7 +568,7 @@ SdrObjGeoData* SdrVirtObj::GetGeoData() const
void SdrVirtObj::SetGeoData(const SdrObjGeoData& rGeo)
{
- Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();
+ Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
rRefObj.SetGeoData(rGeo);
SetRectsDirty();
SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index d1e240e6dc79..91e6ad534024 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -84,7 +84,7 @@ SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewU
pUpList=pNewUpList;
bObjOrdNumsDirty=false;
bRectsDirty=false;
- pOwnerObj=NULL;
+ pOwnerObj=nullptr;
eListKind=SDROBJLIST_UNKNOWN;
}
@@ -94,12 +94,12 @@ SdrObjList::SdrObjList():
mbIsNavigationOrderDirty(false)
{
maList.reserve(InitialObjectContainerCapacity);
- pModel=NULL;
- pPage=NULL;
- pUpList=NULL;
+ pModel=nullptr;
+ pPage=nullptr;
+ pUpList=nullptr;
bObjOrdNumsDirty=false;
bRectsDirty=false;
- pOwnerObj=NULL;
+ pOwnerObj=nullptr;
eListKind=SDROBJLIST_UNKNOWN;
}
@@ -109,7 +109,7 @@ SdrObjList::~SdrObjList()
// To avoid that the Clear() method will broadcast changes when in destruction
// which would call virtual methos (not allowed in destructor), the model is set
// to NULL here.
- pModel = 0L;
+ pModel = nullptr;
Clear(); // delete contents of container
}
@@ -143,7 +143,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
SdrObject* pDO = pSO->Clone();
- if (pDO!=NULL) {
+ if (pDO!=nullptr) {
pDO->SetModel(pModel);
pDO->SetPage(pPage);
NbcInsertObject(pDO, SAL_MAX_SIZE, &aReason);
@@ -164,28 +164,28 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
for (size_t no=0; no<nCount; ++no) {
const SdrObject* pSrcOb=rSrcList.GetObj(no);
const SdrEdgeObj* pSrcEdge=dynamic_cast<const SdrEdgeObj*>( pSrcOb );
- if (pSrcEdge!=NULL) {
+ if (pSrcEdge!=nullptr) {
SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(true);
SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(false);
- if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // can't do this
- if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // across all lists (yet)
- if (pSrcNode1!=NULL || pSrcNode2!=NULL) {
+ if (pSrcNode1!=nullptr && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=nullptr; // can't do this
+ if (pSrcNode2!=nullptr && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=nullptr; // across all lists (yet)
+ if (pSrcNode1!=nullptr || pSrcNode2!=nullptr) {
SdrObject* pEdgeObjTmp=GetObj(no);
SdrEdgeObj* pDstEdge=dynamic_cast<SdrEdgeObj*>( pEdgeObjTmp );
- if (pDstEdge!=NULL) {
- if (pSrcNode1!=NULL) {
+ if (pDstEdge!=nullptr) {
+ if (pSrcNode1!=nullptr) {
sal_uIntPtr nDstNode1=pSrcNode1->GetOrdNum();
SdrObject* pDstNode1=GetObj(nDstNode1);
- if (pDstNode1!=NULL) { // else we get an error!
+ if (pDstNode1!=nullptr) { // else we get an error!
pDstEdge->ConnectToNode(true,pDstNode1);
} else {
OSL_FAIL("SdrObjList::operator=(): pDstNode1==NULL!");
}
}
- if (pSrcNode2!=NULL) {
+ if (pSrcNode2!=nullptr) {
sal_uIntPtr nDstNode2=pSrcNode2->GetOrdNum();
SdrObject* pDstNode2=GetObj(nDstNode2);
- if (pDstNode2!=NULL) { // else the node was probably not selected
+ if (pDstNode2!=nullptr) { // else the node was probably not selected
pDstEdge->ConnectToNode(false,pDstNode2);
} else {
OSL_FAIL("SdrObjList::operator=(): pDstNode2==NULL!");
@@ -317,7 +317,7 @@ void SdrObjList::RecalcRects()
void SdrObjList::SetRectsDirty()
{
bRectsDirty=true;
- if (pUpList!=NULL) pUpList->SetRectsDirty();
+ if (pUpList!=nullptr) pUpList->SetRectsDirty();
}
void SdrObjList::impChildInserted(SdrObject& rChild)
@@ -332,8 +332,8 @@ void SdrObjList::impChildInserted(SdrObject& rChild)
void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* /*pReason*/)
{
- DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcInsertObject(NULL)");
- if (pObj!=NULL) {
+ DBG_ASSERT(pObj!=nullptr,"SdrObjList::NbcInsertObject(NULL)");
+ if (pObj!=nullptr) {
DBG_ASSERT(!pObj->IsInserted(),"ZObjekt already has the status Inserted.");
const size_t nCount = GetObjCount();
if (nPos>nCount) nPos=nCount;
@@ -358,7 +358,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertRe
void SdrObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason)
{
- DBG_ASSERT(pObj!=NULL,"SdrObjList::InsertObject(NULL)");
+ DBG_ASSERT(pObj!=nullptr,"SdrObjList::InsertObject(NULL)");
if(pObj)
{
@@ -403,22 +403,22 @@ SdrObject* SdrObjList::NbcRemoveObject(size_t nObjNum)
if (nObjNum >= maList.size())
{
OSL_ASSERT(nObjNum<maList.size());
- return NULL;
+ return nullptr;
}
const size_t nCount = GetObjCount();
SdrObject* pObj=maList[nObjNum];
RemoveObjectFromContainer(nObjNum);
- DBG_ASSERT(pObj!=NULL,"Could not find object to remove.");
- if (pObj!=NULL) {
+ DBG_ASSERT(pObj!=nullptr,"Could not find object to remove.");
+ if (pObj!=nullptr) {
// flushViewObjectContacts() clears the VOC's and those invalidate
pObj->GetViewContact().flushViewObjectContacts();
DBG_ASSERT(pObj->IsInserted(),"ZObjekt does not have the status Inserted.");
pObj->SetInserted(false); // Ruft u.a. den UserCall
- pObj->SetObjList(NULL);
- pObj->SetPage(NULL);
+ pObj->SetObjList(nullptr);
+ pObj->SetPage(nullptr);
if (!bObjOrdNumsDirty) { // optimizing for the case that the last object has to be removed
if (nObjNum+1!=nCount) {
bObjOrdNumsDirty=true;
@@ -434,23 +434,23 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum)
if (nObjNum >= maList.size())
{
OSL_ASSERT(nObjNum<maList.size());
- return NULL;
+ return nullptr;
}
const size_t nCount = GetObjCount();
SdrObject* pObj=maList[nObjNum];
RemoveObjectFromContainer(nObjNum);
- DBG_ASSERT(pObj!=NULL,"Object to remove not found.");
+ DBG_ASSERT(pObj!=nullptr,"Object to remove not found.");
if(pObj)
{
// flushViewObjectContacts() clears the VOC's and those invalidate
pObj->GetViewContact().flushViewObjectContacts();
DBG_ASSERT(pObj->IsInserted(),"ZObjekt does not have the status Inserted.");
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
// TODO: We need a different broadcast here.
- if (pObj->GetPage()!=NULL) {
+ if (pObj->GetPage()!=nullptr) {
SdrHint aHint(*pObj);
aHint.SetKind(HINT_OBJREMOVED);
pModel->Broadcast(aHint);
@@ -458,8 +458,8 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum)
pModel->SetChanged();
}
pObj->SetInserted(false); // calls, among other things, the UserCall
- pObj->SetObjList(NULL);
- pObj->SetPage(NULL);
+ pObj->SetObjList(nullptr);
+ pObj->SetPage(nullptr);
if (!bObjOrdNumsDirty) { // optimization for the case that the last object is removed
if (nObjNum+1!=nCount) {
bObjOrdNumsDirty=true;
@@ -479,20 +479,20 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum)
SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum)
{
- if (nObjNum >= maList.size() || pNewObj == NULL)
+ if (nObjNum >= maList.size() || pNewObj == nullptr)
{
OSL_ASSERT(nObjNum<maList.size());
- OSL_ASSERT(pNewObj!=NULL);
- return NULL;
+ OSL_ASSERT(pNewObj!=nullptr);
+ return nullptr;
}
SdrObject* pObj=maList[nObjNum];
- DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Could not find object to remove.");
- if (pObj!=NULL) {
+ DBG_ASSERT(pObj!=nullptr,"SdrObjList::ReplaceObject: Could not find object to remove.");
+ if (pObj!=nullptr) {
DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt does not have status Inserted.");
pObj->SetInserted(false);
- pObj->SetObjList(NULL);
- pObj->SetPage(NULL);
+ pObj->SetObjList(nullptr);
+ pObj->SetPage(nullptr);
ReplaceObjectInContainer(*pNewObj,nObjNum);
// flushViewObjectContacts() clears the VOC's and those invalidate
@@ -517,29 +517,29 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum)
if (nObjNum >= maList.size())
{
OSL_ASSERT(nObjNum<maList.size());
- return NULL;
+ return nullptr;
}
- if (pNewObj == NULL)
+ if (pNewObj == nullptr)
{
- OSL_ASSERT(pNewObj!=NULL);
- return NULL;
+ OSL_ASSERT(pNewObj!=nullptr);
+ return nullptr;
}
SdrObject* pObj=maList[nObjNum];
- DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Could not find object to remove.");
- if (pObj!=NULL) {
+ DBG_ASSERT(pObj!=nullptr,"SdrObjList::ReplaceObject: Could not find object to remove.");
+ if (pObj!=nullptr) {
DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt does not have status Inserted.");
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
// TODO: We need a different broadcast here.
- if (pObj->GetPage()!=NULL) {
+ if (pObj->GetPage()!=nullptr) {
SdrHint aHint(*pObj);
aHint.SetKind(HINT_OBJREMOVED);
pModel->Broadcast(aHint);
}
}
pObj->SetInserted(false);
- pObj->SetObjList(NULL);
- pObj->SetPage(NULL);
+ pObj->SetObjList(nullptr);
+ pObj->SetPage(nullptr);
ReplaceObjectInContainer(*pNewObj,nObjNum);
// flushViewObjectContacts() clears the VOC's and those invalidate
@@ -554,9 +554,9 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum)
impChildInserted(*pNewObj);
pNewObj->SetInserted(true);
- if (pModel!=NULL) {
+ if (pModel!=nullptr) {
// TODO: We need a different broadcast here.
- if (pNewObj->GetPage()!=NULL) {
+ if (pNewObj->GetPage()!=nullptr) {
SdrHint aHint(*pNewObj);
aHint.SetKind(HINT_OBJINSERTED);
pModel->Broadcast(aHint);
@@ -574,13 +574,13 @@ SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
{
OSL_ASSERT(nOldObjNum<maList.size());
OSL_ASSERT(nNewObjNum<maList.size());
- return NULL;
+ return nullptr;
}
SdrObject* pObj=maList[nOldObjNum];
if (nOldObjNum==nNewObjNum) return pObj;
- DBG_ASSERT(pObj!=NULL,"SdrObjList::SetObjectOrdNum: Object not found.");
- if (pObj!=NULL) {
+ DBG_ASSERT(pObj!=nullptr,"SdrObjList::SetObjectOrdNum: Object not found.");
+ if (pObj!=nullptr) {
DBG_ASSERT(pObj->IsInserted(),"SdrObjList::SetObjectOrdNum: ZObjekt does not have status Inserted.");
RemoveObjectFromContainer(nOldObjNum);
InsertObjectIntoContainer(*pObj,nNewObjNum);
@@ -591,10 +591,10 @@ SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
pObj->SetOrdNum(nNewObjNum);
bObjOrdNumsDirty=true;
- if (pModel!=NULL)
+ if (pModel!=nullptr)
{
// TODO: We need a different broadcast here.
- if (pObj->GetPage()!=NULL) pModel->Broadcast(SdrHint(*pObj));
+ if (pObj->GetPage()!=nullptr) pModel->Broadcast(SdrHint(*pObj));
pModel->SetChanged();
}
}
@@ -687,7 +687,7 @@ SdrObject* SdrObjList::GetObj(size_t nNum) const
if (nNum >= maList.size())
{
OSL_ASSERT(nNum<maList.size());
- return NULL;
+ return nullptr;
}
else
return maList[nNum];
@@ -699,7 +699,7 @@ SdrObject* SdrObjList::GetObj(size_t nNum) const
bool SdrObjList::IsReadOnly() const
{
bool bRet = false;
- if (pPage!=NULL && pPage!=this) bRet=pPage->IsReadOnly();
+ if (pPage!=nullptr && pPage!=this) bRet=pPage->IsReadOnly();
return bRet;
}
@@ -709,7 +709,7 @@ size_t SdrObjList::CountAllObjects() const
size_t nCnt=nCount;
for (size_t nNum=0; nNum<nCount; nNum++) {
SdrObjList* pSubOL=GetObj(nNum)->GetSubList();
- if (pSubOL!=NULL) {
+ if (pSubOL!=nullptr) {
nCnt+=pSubOL->CountAllObjects();
}
}
@@ -765,7 +765,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum )
bool SdrObjList::HasObjectNavigationOrder() const
{
- return mxNavigationOrder.get() != NULL;
+ return mxNavigationOrder.get() != nullptr;
}
@@ -778,7 +778,7 @@ void SdrObjList::SetObjectNavigationPosition (
// When the navigation order container has not yet been created then
// create one now. It is initialized with the z-order taken from
// maList.
- if (mxNavigationOrder.get() == NULL)
+ if (mxNavigationOrder.get() == nullptr)
{
mxNavigationOrder.reset(new WeakSdrObjectContainerType(maList.size()));
::std::copy(
@@ -786,7 +786,7 @@ void SdrObjList::SetObjectNavigationPosition (
maList.end(),
mxNavigationOrder->begin());
}
- OSL_ASSERT(mxNavigationOrder.get()!=NULL);
+ OSL_ASSERT(mxNavigationOrder.get()!=nullptr);
OSL_ASSERT( mxNavigationOrder->size() == maList.size());
SdrObjectWeakRef aReference (&rObject);
@@ -819,7 +819,7 @@ void SdrObjList::SetObjectNavigationPosition (
mbIsNavigationOrderDirty = true;
// The navigation order is written out to file so mark the model as modified.
- if (pModel != NULL)
+ if (pModel != nullptr)
pModel->SetChanged();
}
}
@@ -851,7 +851,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat
else
return maList[nNavigationPosition];
}
- return NULL;
+ return nullptr;
}
@@ -870,7 +870,7 @@ bool SdrObjList::RecalcNavigationPositions()
{
if (mbIsNavigationOrderDirty)
{
- if (mxNavigationOrder.get() != NULL)
+ if (mxNavigationOrder.get() != nullptr)
{
mbIsNavigationOrderDirty = false;
@@ -882,7 +882,7 @@ bool SdrObjList::RecalcNavigationPositions()
}
}
- return mxNavigationOrder.get() != NULL;
+ return mxNavigationOrder.get() != nullptr;
}
@@ -896,14 +896,14 @@ void SdrObjList::SetNavigationOrder (const uno::Reference<container::XIndexAcces
if ((sal_uInt32)nCount != maList.size())
return;
- if (mxNavigationOrder.get() == NULL)
+ if (mxNavigationOrder.get() == nullptr)
mxNavigationOrder.reset(new WeakSdrObjectContainerType(nCount));
for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
{
uno::Reference<uno::XInterface> xShape (rxOrder->getByIndex(nIndex), uno::UNO_QUERY);
SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xShape);
- if (pObject == NULL)
+ if (pObject == nullptr)
break;
(*mxNavigationOrder)[nIndex] = pObject;
}
@@ -1080,8 +1080,8 @@ void SdrPageProperties::ImpRemoveStyleSheet()
if(mpStyleSheet)
{
EndListening(*mpStyleSheet);
- mpProperties->SetParent(0);
- mpStyleSheet = 0;
+ mpProperties->SetParent(nullptr);
+ mpStyleSheet = nullptr;
}
}
@@ -1112,7 +1112,7 @@ void ImpPageChange(SdrPage& rSdrPage)
SdrPageProperties::SdrPageProperties(SdrPage& rSdrPage)
: SfxListener(),
mpSdrPage(&rSdrPage),
- mpStyleSheet(0),
+ mpStyleSheet(nullptr),
mpProperties(new SfxItemSet(mpSdrPage->GetModel()->GetItemPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST))
{
if(!rSdrPage.IsMasterPage())
@@ -1198,7 +1198,7 @@ void SdrPageProperties::SetStyleSheet(SfxStyleSheet* pStyleSheet)
TYPEINIT1(SdrPage,SdrObjList);
SdrPage::SdrPage(SdrModel& rNewModel, bool bMasterPage)
: SdrObjList(&rNewModel, this),
- mpViewContact(0L),
+ mpViewContact(nullptr),
nWdt(10L),
nHgt(10L),
nBordLft(0L),
@@ -1206,8 +1206,8 @@ SdrPage::SdrPage(SdrModel& rNewModel, bool bMasterPage)
nBordRgt(0L),
nBordLwr(0L),
pLayerAdmin(new SdrLayerAdmin(&rNewModel.GetLayerAdmin())),
- mpSdrPageProperties(0),
- mpMasterPageDescriptor(0L),
+ mpSdrPageProperties(nullptr),
+ mpMasterPageDescriptor(nullptr),
nPageNum(0L),
mbMaster(bMasterPage),
mbInserted(false),
@@ -1223,7 +1223,7 @@ SdrPage::SdrPage(SdrModel& rNewModel, bool bMasterPage)
SdrPage::SdrPage(const SdrPage& rSrcPage)
: SdrObjList(rSrcPage.pModel, this),
tools::WeakBase< SdrPage >(),
- mpViewContact(0L),
+ mpViewContact(nullptr),
nWdt(rSrcPage.nWdt),
nHgt(rSrcPage.nHgt),
nBordLft(rSrcPage.nBordLft),
@@ -1231,8 +1231,8 @@ SdrPage::SdrPage(const SdrPage& rSrcPage)
nBordRgt(rSrcPage.nBordRgt),
nBordLwr(rSrcPage.nBordLwr),
pLayerAdmin(new SdrLayerAdmin(rSrcPage.pModel->GetLayerAdmin())),
- mpSdrPageProperties(0),
- mpMasterPageDescriptor(0L),
+ mpSdrPageProperties(nullptr),
+ mpMasterPageDescriptor(nullptr),
nPageNum(rSrcPage.nPageNum),
mbMaster(rSrcPage.mbMaster),
mbInserted(false),
@@ -1278,12 +1278,12 @@ SdrPage::~SdrPage()
if(mpViewContact)
{
delete mpViewContact;
- mpViewContact = 0L;
+ mpViewContact = nullptr;
}
{
delete mpSdrPageProperties;
- mpSdrPageProperties = 0;
+ mpSdrPageProperties = nullptr;
}
}
@@ -1347,12 +1347,12 @@ void SdrPage::lateInit(const SdrPage& rSrcPage, SdrModel* const pNewModel)
SdrPage* SdrPage::Clone() const
{
- return Clone(NULL);
+ return Clone(nullptr);
}
SdrPage* SdrPage::Clone(SdrModel* pNewModel) const
{
- if (pNewModel==NULL) pNewModel=pModel;
+ if (pNewModel==nullptr) pNewModel=pModel;
SdrPage* pPage2=new SdrPage(*pNewModel);
pPage2->lateInit(*this);
return pPage2;
@@ -1507,10 +1507,10 @@ sal_Int32 SdrPage::GetLwrBorder() const
void SdrPage::impl_setModelForLayerAdmin(SdrModel* const pNewModel)
{
- if (pNewModel!=NULL) {
+ if (pNewModel!=nullptr) {
pLayerAdmin->SetParent(&pNewModel->GetLayerAdmin());
} else {
- pLayerAdmin->SetParent(NULL);
+ pLayerAdmin->SetParent(nullptr);
}
pLayerAdmin->SetModel(pNewModel);
}
@@ -1618,31 +1618,31 @@ void SdrPage::TRG_ClearMasterPage()
mpMasterPageDescriptor->GetUsedPage().GetViewContact().flushViewObjectContacts();
delete mpMasterPageDescriptor;
- mpMasterPageDescriptor = 0L;
+ mpMasterPageDescriptor = nullptr;
}
}
SdrPage& SdrPage::TRG_GetMasterPage() const
{
- DBG_ASSERT(mpMasterPageDescriptor != 0L, "TRG_GetMasterPage(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
+ DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_GetMasterPage(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
return mpMasterPageDescriptor->GetUsedPage();
}
const SetOfByte& SdrPage::TRG_GetMasterPageVisibleLayers() const
{
- DBG_ASSERT(mpMasterPageDescriptor != 0L, "TRG_GetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
+ DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_GetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
return mpMasterPageDescriptor->GetVisibleLayers();
}
void SdrPage::TRG_SetMasterPageVisibleLayers(const SetOfByte& rNew)
{
- DBG_ASSERT(mpMasterPageDescriptor != 0L, "TRG_SetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
+ DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_SetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
mpMasterPageDescriptor->SetVisibleLayers(rNew);
}
sdr::contact::ViewContact& SdrPage::TRG_GetMasterPageDescriptorViewContact() const
{
- DBG_ASSERT(mpMasterPageDescriptor != 0L, "TRG_GetMasterPageDescriptorViewContact(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
+ DBG_ASSERT(mpMasterPageDescriptor != nullptr, "TRG_GetMasterPageDescriptorViewContact(): No MasterPage available. Use TRG_HasMasterPage() before access (!)");
return mpMasterPageDescriptor->GetViewContact();
}
@@ -1660,7 +1660,7 @@ void SdrPage::TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage)
const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const Rectangle* /*pRect*/) const
{
- return NULL;
+ return nullptr;
}
OUString SdrPage::GetLayoutName() const
@@ -1754,7 +1754,7 @@ Color SdrPage::GetPageBackgroundColor( SdrPageView* pView, bool bScreenDisplay )
Color SdrPage::GetPageBackgroundColor() const
// #i75566# GetBackgroundColor -> GetPageBackgroundColor
{
- return GetPageBackgroundColor( NULL );
+ return GetPageBackgroundColor( nullptr );
}
/** this method returns true if the object from the ViewObjectContact should
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 0564bc8cd8c5..4d38c950c858 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -60,7 +60,7 @@ SdrPageWindow* SdrPageView::FindPageWindow(SdrPaintWindow& rPaintWindow) const
}
}
- return 0L;
+ return nullptr;
}
const SdrPageWindow* SdrPageView::FindPatchedPageWindow( const OutputDevice& _rOutDev ) const
@@ -78,7 +78,7 @@ const SdrPageWindow* SdrPageView::FindPatchedPageWindow( const OutputDevice& _rO
}
}
- return NULL;
+ return nullptr;
}
SdrPageWindow* SdrPageView::FindPageWindow(const OutputDevice& rOutDev) const
@@ -91,7 +91,7 @@ SdrPageWindow* SdrPageView::FindPageWindow(const OutputDevice& rOutDev) const
}
}
- return 0L;
+ return nullptr;
}
SdrPageWindow* SdrPageView::GetPageWindow(sal_uInt32 nIndex) const
@@ -101,7 +101,7 @@ SdrPageWindow* SdrPageView::GetPageWindow(sal_uInt32 nIndex) const
return maPageWindows[nIndex];
}
- return 0L;
+ return nullptr;
}
void SdrPageView::ClearPageWindows()
@@ -131,7 +131,7 @@ SdrPageWindow* SdrPageView::RemovePageWindow(SdrPageWindow& rOld)
return pSdrPageWindow;
}
- return 0L;
+ return nullptr;
}
@@ -141,7 +141,7 @@ SdrPageView::SdrPageView(SdrPage* pPage1, SdrView& rNewView)
// col_auto color lets the view takes the default SvxColorConfig entry
maDocumentColor( COL_AUTO ),
maBackgroundColor(COL_AUTO ), // #i48367# also react on autocolor
- mpPreparedPageWindow(0) // #i72752#
+ mpPreparedPageWindow(nullptr) // #i72752#
{
mpPage = pPage1;
@@ -155,9 +155,9 @@ SdrPageView::SdrPageView(SdrPage* pPage1, SdrView& rNewView)
aLayerPrn.SetAll();
mbVisible = false;
- pAktList = NULL;
- pAktGroup = NULL;
- SetAktGroupAndList(NULL, mpPage);
+ pAktList = nullptr;
+ pAktGroup = nullptr;
+ SetAktGroupAndList(nullptr, mpPage);
for(sal_uInt32 a(0L); a < rNewView.PaintWindowCount(); a++)
{
@@ -216,12 +216,12 @@ css::uno::Reference< css::awt::XControlContainer > SdrPageView::GetControlContai
void SdrPageView::ModelHasChanged()
{
- if (GetAktGroup()!=NULL) CheckAktGroup();
+ if (GetAktGroup()!=nullptr) CheckAktGroup();
}
bool SdrPageView::IsReadOnly() const
{
- return (0L == GetPage() || GetView().GetModel()->IsReadOnly() || GetPage()->IsReadOnly() || GetObjList()->IsReadOnly());
+ return (nullptr == GetPage() || GetView().GetModel()->IsReadOnly() || GetPage()->IsReadOnly() || GetObjList()->IsReadOnly());
}
void SdrPageView::Show()
@@ -252,7 +252,7 @@ void SdrPageView::Hide()
Rectangle SdrPageView::GetPageRect() const
{
- if (GetPage()==NULL) return Rectangle();
+ if (GetPage()==nullptr) return Rectangle();
return Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1));
}
@@ -306,7 +306,7 @@ void SdrPageView::CompleteRedraw(
if(bIsTempTarget)
{
delete pPageWindow;
- pPageWindow = 0L;
+ pPageWindow = nullptr;
}
}
}
@@ -421,7 +421,7 @@ void SdrPageView::SetDesignMode( bool _bDesignMode ) const
void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor)
{
- if (GetPage()==NULL)
+ if (GetPage()==nullptr)
return;
long nx1=GetView().maGridBig.Width();
@@ -515,12 +515,12 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C
long x2=GetPage()->GetWdt()-GetPage()->GetRgtBorder()-1+nWrY;
long y1=GetPage()->GetUppBorder()+1+nWrX;
long y2=GetPage()->GetHgt()-GetPage()->GetLwrBorder()-1+nWrY;
- const SdrPageGridFrameList* pFrames=GetPage()->GetGridFrameList(this,NULL);
+ const SdrPageGridFrameList* pFrames=GetPage()->GetGridFrameList(this,nullptr);
sal_uInt16 nGridPaintAnz=1;
- if (pFrames!=NULL) nGridPaintAnz=pFrames->GetCount();
+ if (pFrames!=nullptr) nGridPaintAnz=pFrames->GetCount();
for (sal_uInt16 nGridPaintNum=0; nGridPaintNum<nGridPaintAnz; nGridPaintNum++) {
- if (pFrames!=NULL) {
+ if (pFrames!=nullptr) {
const SdrPageGridFrame& rGF=(*pFrames)[nGridPaintNum];
nWrX=rGF.GetPaperRect().Left();
nWrY=rGF.GetPaperRect().Top();
@@ -899,7 +899,7 @@ void SdrPageView::LeaveAllGroup()
GetView().UnmarkAll();
// allocations, pAktGroup and pAktList always need to be set
- SetAktGroupAndList(NULL, GetPage());
+ SetAktGroupAndList(nullptr, GetPage());
// find and select uppermost group
if(pLastGroup)
@@ -926,7 +926,7 @@ sal_uInt16 SdrPageView::GetEnteredLevel() const
{
sal_uInt16 nCount=0;
SdrObject* pGrp=GetAktGroup();
- while (pGrp!=NULL) {
+ while (pGrp!=nullptr) {
nCount++;
pGrp=pGrp->GetUpGroup();
}
@@ -936,13 +936,13 @@ sal_uInt16 SdrPageView::GetEnteredLevel() const
void SdrPageView::CheckAktGroup()
{
SdrObject* pGrp=GetAktGroup();
- while (pGrp!=NULL &&
- (!pGrp->IsInserted() || pGrp->GetObjList()==NULL ||
- pGrp->GetPage()==NULL || pGrp->GetModel()==NULL)) { // anything outside of the borders?
+ while (pGrp!=nullptr &&
+ (!pGrp->IsInserted() || pGrp->GetObjList()==nullptr ||
+ pGrp->GetPage()==nullptr || pGrp->GetModel()==nullptr)) { // anything outside of the borders?
pGrp=pGrp->GetUpGroup();
}
if (pGrp!=GetAktGroup()) {
- if (pGrp!=NULL) EnterGroup(pGrp);
+ if (pGrp!=nullptr) EnterGroup(pGrp);
else LeaveAllGroup();
}
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 86ff0db48d85..8580edeca204 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -75,7 +75,7 @@ SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const
}
}
- return 0L;
+ return nullptr;
}
SdrPaintWindow* SdrPaintView::GetPaintWindow(sal_uInt32 nIndex) const
@@ -85,7 +85,7 @@ SdrPaintWindow* SdrPaintView::GetPaintWindow(sal_uInt32 nIndex) const
return maPaintWindows[nIndex];
}
- return 0L;
+ return nullptr;
}
void SdrPaintView::AppendPaintWindow(SdrPaintWindow& rNew)
@@ -95,7 +95,7 @@ void SdrPaintView::AppendPaintWindow(SdrPaintWindow& rNew)
SdrPaintWindow* SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld)
{
- SdrPaintWindow* pRetval = 0L;
+ SdrPaintWindow* pRetval = nullptr;
const SdrPaintWindowVector::iterator aFindResult = ::std::find(maPaintWindows.begin(), maPaintWindows.end(), &rOld);
if(aFindResult != maPaintWindows.end())
@@ -115,7 +115,7 @@ OutputDevice* SdrPaintView::GetFirstOutputDevice() const
return &(GetPaintWindow(0)->GetOutputDevice());
}
- return 0L;
+ return nullptr;
}
@@ -161,7 +161,7 @@ TYPEINIT2(SdrPaintView,SfxListener,SfxRepeatTarget);
void SdrPaintView::ImpClearVars()
{
#ifdef DBG_UTIL
- mpItemBrowser=NULL;
+ mpItemBrowser=nullptr;
#endif
mbPageVisible=true;
mbPageBorderVisible=true;
@@ -185,10 +185,10 @@ void SdrPaintView::ImpClearVars()
mnMinMovPix=3;
mnHitTolLog=0;
mnMinMovLog=0;
- mpActualOutDev=NULL;
- mpDragWin=NULL;
+ mpActualOutDev=nullptr;
+ mpDragWin=nullptr;
mbRestoreColors=true;
- mpDefaultStyleSheet=NULL;
+ mpDefaultStyleSheet=nullptr;
mbSomeObjChgdFlag=false;
mnGraphicManagerDrawMode = GraphicManagerDrawFlags::STANDARD;
maComeBackIdle.SetPriority(SchedulerPriority::REPAINT);
@@ -201,7 +201,7 @@ void SdrPaintView::ImpClearVars()
}
SdrPaintView::SdrPaintView(SdrModel* pModel, OutputDevice* pOut)
-: mpPageView(NULL),
+: mpPageView(nullptr),
maDefaultAttr(pModel->GetItemPool()),
mbBufferedOutputAllowed(false),
mbBufferedOverlayAllowed(false),
@@ -216,7 +216,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel, OutputDevice* pOut)
if(pOut)
{
- AddWindowToPaintView(pOut, 0);
+ AddWindowToPaintView(pOut, nullptr);
}
// flag to visualize groups
@@ -255,7 +255,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING)
- mpDefaultStyleSheet = NULL;
+ mpDefaultStyleSheet = nullptr;
return;
}
@@ -369,7 +369,7 @@ bool SdrPaintView::IsTextEdit() const
// info about TextEditPageView. Default is 0L.
SdrPageView* SdrPaintView::GetTextEditPageView() const
{
- return 0L;
+ return nullptr;
}
@@ -377,11 +377,11 @@ SdrPageView* SdrPaintView::GetTextEditPageView() const
sal_uInt16 SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const
{
if (nMinMov>=0) return sal_uInt16(nMinMov);
- if (pOut==NULL)
+ if (pOut==nullptr)
{
pOut = GetFirstOutputDevice();
}
- if (pOut!=NULL) {
+ if (pOut!=nullptr) {
return short(-pOut->PixelToLogic(Size(nMinMov,0)).Width());
} else {
return 0;
@@ -391,11 +391,11 @@ sal_uInt16 SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pO
sal_uInt16 SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const
{
if (nHitTol>=0) return sal_uInt16(nHitTol);
- if (pOut==NULL)
+ if (pOut==nullptr)
{
pOut = GetFirstOutputDevice();
}
- if (pOut!=NULL) {
+ if (pOut!=nullptr) {
return short(-pOut->PixelToLogic(Size(nHitTol,0)).Width());
} else {
return 0;
@@ -426,7 +426,7 @@ void SdrPaintView::ClearPageView()
{
InvalidateAllWin();
delete mpPageView;
- mpPageView = 0L;
+ mpPageView = nullptr;
}
}
@@ -453,7 +453,7 @@ void SdrPaintView::HideSdrPage()
{
mpPageView->Hide();
delete mpPageView;
- mpPageView = 0L;
+ mpPageView = nullptr;
}
}
@@ -803,7 +803,7 @@ void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLa
if(mpPageView)
{
// forget prepared SdrPageWindow
- mpPageView->setPreparedPageWindow(0);
+ mpPageView->setPreparedPageWindow(nullptr);
}
}
@@ -870,7 +870,7 @@ void SdrPaintView::ImpFormLayerDrawing( SdrPaintWindow& rPaintWindow )
// need to set PreparedPageWindow to make DrawLayer use the correct ObjectContact
mpPageView->setPreparedPageWindow(pKnownTarget);
mpPageView->DrawLayer(nControlLayerId, &rPaintWindow.GetTargetOutputDevice());
- mpPageView->setPreparedPageWindow(0);
+ mpPageView->setPreparedPageWindow(nullptr);
}
}
}
@@ -901,7 +901,7 @@ void SdrPaintView::GlueInvalidate() const
for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
const SdrObject* pObj=pOL->GetObj(nObjNum);
const SdrGluePointList* pGPL=pObj->GetGluePointList();
- if (pGPL!=NULL && pGPL->GetCount()!=0) {
+ if (pGPL!=nullptr && pGPL->GetCount()!=0) {
pGPL->Invalidate(static_cast<vcl::Window&>(rOutDev), pObj);
}
}
@@ -1003,11 +1003,11 @@ void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, bool /*bRep
{
// bReplaceAll has no effect here at all.
bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<SdrView*>(this)->IsMeasureTool();
- const SfxPoolItem *pPoolItem=NULL;
+ const SfxPoolItem *pPoolItem=nullptr;
if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) {
SdrLayerID nLayerId=static_cast<const SdrLayerIdItem*>(pPoolItem)->GetValue();
const SdrLayer* pLayer=mpModel->GetLayerAdmin().GetLayerPerID(nLayerId);
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
if (bMeasure) maMeasureLayer=pLayer->GetName();
else maActualLayer=pLayer->GetName();
}
@@ -1037,7 +1037,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll)
bool bHasEEFeatureItems=false;
SfxItemIter aIter(rAttr);
const SfxPoolItem* pItem=aIter.FirstItem();
- while (!bHasEEFeatureItems && pItem!=NULL) {
+ while (!bHasEEFeatureItems && pItem!=nullptr) {
if (!IsInvalidItem(pItem)) {
sal_uInt16 nW=pItem->Which();
if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=true;
@@ -1068,7 +1068,7 @@ void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRe
if (mpDefaultStyleSheet)
StartListening(*mpDefaultStyleSheet);
- if (pStyleSheet!=NULL && !bDontRemoveHardAttr) {
+ if (pStyleSheet!=nullptr && !bDontRemoveHardAttr) {
SfxWhichIter aIter(pStyleSheet->GetItemSet());
sal_uInt16 nWhich=aIter.FirstWhich();
while (nWhich!=0) {
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index e7bc02ccec3c..da20cab33767 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -548,9 +548,9 @@ void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void*
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedPoints();
- sal_uIntPtr nPointCount=pPts==NULL ? 0 : pPts->size();
+ sal_uIntPtr nPointCount=pPts==nullptr ? 0 : pPts->size();
SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pObj );
- if (nPointCount!=0 && pPath!=NULL)
+ if (nPointCount!=0 && pPath!=nullptr)
{
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
@@ -616,8 +616,8 @@ void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void*
static void ImpMove(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* /*p2*/, const void* /*p3*/, const void* /*p4*/, const void* /*p5*/)
{
MovePoint(rPt,*static_cast<const Size*>(p1));
- if (pC1!=NULL) MovePoint(*pC1,*static_cast<const Size*>(p1));
- if (pC2!=NULL) MovePoint(*pC2,*static_cast<const Size*>(p1));
+ if (pC1!=nullptr) MovePoint(*pC1,*static_cast<const Size*>(p1));
+ if (pC2!=nullptr) MovePoint(*pC2,*static_cast<const Size*>(p1));
}
void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz)
@@ -633,8 +633,8 @@ void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz)
static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* /*p4*/, const void* /*p5*/)
{
ResizePoint(rPt,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
- if (pC1!=NULL) ResizePoint(*pC1,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
- if (pC2!=NULL) ResizePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
+ if (pC1!=nullptr) ResizePoint(*pC1,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
+ if (pC2!=nullptr) ResizePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const Fraction*>(p2),*static_cast<const Fraction*>(p3));
}
void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
@@ -650,8 +650,8 @@ void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFac
static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* /*p2*/, const void* p3, const void* p4, const void* /*p5*/)
{
RotatePoint(rPt,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
- if (pC1!=NULL) RotatePoint(*pC1,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
- if (pC2!=NULL) RotatePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
+ if (pC1!=nullptr) RotatePoint(*pC1,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
+ if (pC2!=nullptr) RotatePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
}
void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nAngle)
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 2dc72aeb6db1..2a97790136cc 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -176,8 +176,8 @@ void ImplHelpLineOverlay::SetPosition(const basegfx::B2DPoint& rNewPosition)
SdrSnapView::SdrSnapView(SdrModel* pModel1, OutputDevice* pOut)
: SdrPaintView(pModel1,pOut)
- , mpPageOriginOverlay(0L)
- , mpHelpLineOverlay(0L)
+ , mpPageOriginOverlay(nullptr)
+ , mpHelpLineOverlay(nullptr)
, nMagnSizPix(4)
, nSnapAngle(1500)
, nEliminatePolyPointLimitAngle(0)
@@ -279,9 +279,9 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
if (!bSnapEnab) return SdrSnap::NOTSNAPPED;
long x=rPnt.X();
long y=rPnt.Y();
- if (pPV==NULL) {
+ if (pPV==nullptr) {
pPV=GetSdrPageView();
- if (pPV==NULL) return SdrSnap::NOTSNAPPED;
+ if (pPV==nullptr) return SdrSnap::NOTSNAPPED;
}
long dx=NOT_SNAPPED;
@@ -457,10 +457,10 @@ bool SdrSnapView::BegSetPageOrg(const Point& rPnt)
{
BrkAction();
- DBG_ASSERT(0L == mpPageOriginOverlay, "SdrSnapView::BegSetPageOrg: There exists a ImplPageOriginOverlay (!)");
+ DBG_ASSERT(nullptr == mpPageOriginOverlay, "SdrSnapView::BegSetPageOrg: There exists a ImplPageOriginOverlay (!)");
basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
mpPageOriginOverlay = new ImplPageOriginOverlay(*this, aStartPos);
- maDragStat.Reset(GetSnapPos(rPnt,NULL));
+ maDragStat.Reset(GetSnapPos(rPnt,nullptr));
return true;
}
@@ -469,7 +469,7 @@ void SdrSnapView::MovSetPageOrg(const Point& rPnt)
{
if(IsSetPageOrg())
{
- maDragStat.NextMove(GetSnapPos(rPnt,NULL));
+ maDragStat.NextMove(GetSnapPos(rPnt,nullptr));
DBG_ASSERT(mpPageOriginOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
basegfx::B2DPoint aNewPos(maDragStat.GetNow().X(), maDragStat.GetNow().Y());
mpPageOriginOverlay->SetPosition(aNewPos);
@@ -504,7 +504,7 @@ void SdrSnapView::BrkSetPageOrg()
{
DBG_ASSERT(mpPageOriginOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)");
delete mpPageOriginOverlay;
- mpPageOriginOverlay = 0L;
+ mpPageOriginOverlay = nullptr;
}
}
@@ -512,7 +512,7 @@ void SdrSnapView::BrkSetPageOrg()
bool SdrSnapView::PickHelpLine(const Point& rPnt, short nTol, const OutputDevice& rOut, sal_uInt16& rnHelpLineNum, SdrPageView*& rpPV) const
{
- rpPV=NULL;
+ rpPV=nullptr;
nTol=ImpGetHitTolLogic(nTol,&rOut);
SdrPageView* pPV = GetSdrPageView();
@@ -545,11 +545,11 @@ bool SdrSnapView::BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView* pPV)
Point aHelpLinePos = rHelpLine.GetPos();
basegfx::B2DPoint aStartPos(aHelpLinePos.X(), aHelpLinePos.Y());
- DBG_ASSERT(0L == mpHelpLineOverlay, "SdrSnapView::BegDragHelpLine: There exists a ImplHelpLineOverlay (!)");
+ DBG_ASSERT(nullptr == mpHelpLineOverlay, "SdrSnapView::BegDragHelpLine: There exists a ImplHelpLineOverlay (!)");
mpHelpLineOverlay = new ImplHelpLineOverlay(*this, aStartPos, pPV, nHelpLineNum, rHelpLine.GetKind());
maDragStat.Reset(GetSnapPos(aHelpLinePos, pPV));
- maDragStat.SetMinMove(ImpGetMinMovLogic(-3, 0L));
+ maDragStat.SetMinMove(ImpGetMinMovLogic(-3, nullptr));
bRet = true;
}
@@ -567,10 +567,10 @@ bool SdrSnapView::BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind)
if(GetSdrPageView())
{
- DBG_ASSERT(0L == mpHelpLineOverlay, "SdrSnapView::BegDragHelpLine: There exists a ImplHelpLineOverlay (!)");
+ DBG_ASSERT(nullptr == mpHelpLineOverlay, "SdrSnapView::BegDragHelpLine: There exists a ImplHelpLineOverlay (!)");
basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y());
- mpHelpLineOverlay = new ImplHelpLineOverlay(*this, aStartPos, 0L, 0, eNewKind);
- maDragStat.Reset(GetSnapPos(rPnt, 0L));
+ mpHelpLineOverlay = new ImplHelpLineOverlay(*this, aStartPos, nullptr, 0, eNewKind);
+ maDragStat.Reset(GetSnapPos(rPnt, nullptr));
bRet = true;
}
@@ -596,7 +596,7 @@ void SdrSnapView::MovDragHelpLine(const Point& rPnt)
{
if(IsDragHelpLine() && maDragStat.CheckMinMoved(rPnt))
{
- Point aPnt(GetSnapPos(rPnt, 0L));
+ Point aPnt(GetSnapPos(rPnt, nullptr));
if(aPnt != maDragStat.GetNow())
{
@@ -658,7 +658,7 @@ void SdrSnapView::BrkDragHelpLine()
{
DBG_ASSERT(mpHelpLineOverlay, "SdrSnapView::EndDragHelpLine: no ImplHelpLineOverlay (!)");
delete mpHelpLineOverlay;
- mpHelpLineOverlay = 0L;
+ mpHelpLineOverlay = nullptr;
}
}
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 303d5f711628..8e804d864d4d 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -53,7 +53,7 @@ void SdrText::CheckPortionInfo( SdrOutliner& rOutliner )
// TODO: optimization: we could create a BigTextObject
mbPortionInfoChecked=true;
- if(mpOutlinerParaObject!=NULL && rOutliner.ShouldCreateBigTextObject())
+ if(mpOutlinerParaObject!=nullptr && rOutliner.ShouldCreateBigTextObject())
{
// #i102062# MemoryLeak closed
delete mpOutlinerParaObject;
@@ -82,7 +82,7 @@ void SdrText::SetOutlinerParaObject( OutlinerParaObject* pTextObject )
// Update HitTestOutliner
const SdrTextObj* pTestObj = mpModel->GetHitTestOutliner().GetTextObj();
if( pTestObj && pTestObj->GetOutlinerParaObject() == mpOutlinerParaObject )
- mpModel->GetHitTestOutliner().SetTextObj( 0 );
+ mpModel->GetHitTestOutliner().SetTextObj( nullptr );
}
delete mpOutlinerParaObject;
@@ -106,12 +106,12 @@ OutlinerParaObject* SdrText::RemoveOutlinerParaObject()
// Update HitTestOutliner
const SdrTextObj* pTestObj = mpModel->GetHitTestOutliner().GetTextObj();
if( pTestObj && pTestObj->GetOutlinerParaObject() == mpOutlinerParaObject )
- mpModel->GetHitTestOutliner().SetTextObj( 0 );
+ mpModel->GetHitTestOutliner().SetTextObj( nullptr );
}
OutlinerParaObject* pOPO = mpOutlinerParaObject;
- mpOutlinerParaObject = 0;
+ mpOutlinerParaObject = nullptr;
mbPortionInfoChecked = false;
return pOPO;
@@ -125,7 +125,7 @@ void SdrText::SetModel( SdrModel* pNewModel )
SdrModel* pOldModel = mpModel;
mpModel = pNewModel;
- if( mpOutlinerParaObject && pOldModel!=NULL && pNewModel!=NULL)
+ if( mpOutlinerParaObject && pOldModel!=nullptr && pNewModel!=nullptr)
{
bool bHgtSet = GetObjectItemSet().GetItemState(EE_CHAR_FONTHEIGHT) == SfxItemState::SET;
@@ -150,7 +150,7 @@ void SdrText::SetModel( SdrModel* pNewModel )
SdrOutliner& rOutliner = mrObject.ImpGetDrawOutliner();
rOutliner.SetText(*mpOutlinerParaObject);
delete mpOutlinerParaObject;
- mpOutlinerParaObject=0;
+ mpOutlinerParaObject=nullptr;
if (bScaleUnitChanged)
{
Fraction aMetricFactor=GetMapFactor(aOldUnit,aNewUnit).X();
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 46264b3037d7..a942fda7b82a 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -160,8 +160,8 @@ void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, bool bVShear)
double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
const Point& rRad, double& rSin, double& rCos, bool bVert)
{
- bool bC1=pC1!=NULL;
- bool bC2=pC2!=NULL;
+ bool bC1=pC1!=nullptr;
+ bool bC2=pC2!=nullptr;
long x0=rPnt.X();
long y0=rPnt.Y();
long cx=rCenter.X();
@@ -214,8 +214,8 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
const Point& rRad, double& rSin, double& rCos, bool bVert)
{
- bool bC1=pC1!=NULL;
- bool bC2=pC2!=NULL;
+ bool bC1=pC1!=nullptr;
+ bool bC2=pC2!=nullptr;
long x0=rPnt.X();
long y0=rPnt.Y();
long dx1=0,dy1=0;
@@ -293,8 +293,8 @@ void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, b
sal_uInt16 i=0;
while (i<nPointAnz) {
Point* pPnt=&rPoly[i];
- Point* pC1=NULL;
- Point* pC2=NULL;
+ Point* pC1=nullptr;
+ Point* pC2=nullptr;
if (i+1<nPointAnz && rPoly.IsControl(i)) { // control point to the left
pC1=pPnt;
i++;
@@ -316,8 +316,8 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bo
sal_uInt16 i=0;
while (i<nPointAnz) {
Point* pPnt=&rPoly[i];
- Point* pC1=NULL;
- Point* pC2=NULL;
+ Point* pC1=nullptr;
+ Point* pC2=nullptr;
if (i+1<nPointAnz && rPoly.IsControl(i)) { // control point to the left
pC1=pPnt;
i++;
@@ -339,8 +339,8 @@ void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad,
sal_uInt16 i=0;
while (i<nPointAnz) {
Point* pPnt=&rPoly[i];
- Point* pC1=NULL;
- Point* pC2=NULL;
+ Point* pC1=nullptr;
+ Point* pC2=nullptr;
if (i+1<nPointAnz && rPoly.IsControl(i)) { // control point to the left
pC1=pPnt;
i++;
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 5c8599385caa..34dc6f961738 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -64,21 +64,21 @@ SdrUndoAction::~SdrUndoAction() {}
bool SdrUndoAction::CanRepeat(SfxRepeatTarget& rView) const
{
SdrView* pV=dynamic_cast<SdrView*>( &rView );
- if (pV!=NULL) return CanSdrRepeat(*pV);
+ if (pV!=nullptr) return CanSdrRepeat(*pV);
return false;
}
void SdrUndoAction::Repeat(SfxRepeatTarget& rView)
{
SdrView* pV=dynamic_cast<SdrView*>( &rView );
- if (pV!=NULL) SdrRepeat(*pV);
- DBG_ASSERT(pV!=NULL,"Repeat: SfxRepeatTarget that was handed over is not a SdrView");
+ if (pV!=nullptr) SdrRepeat(*pV);
+ DBG_ASSERT(pV!=nullptr,"Repeat: SfxRepeatTarget that was handed over is not a SdrView");
}
OUString SdrUndoAction::GetRepeatComment(SfxRepeatTarget& rView) const
{
SdrView* pV=dynamic_cast<SdrView*>( &rView );
- if (pV!=NULL) return GetSdrRepeatComment(*pV);
+ if (pV!=nullptr) return GetSdrRepeatComment(*pV);
return OUString();
}
@@ -265,20 +265,20 @@ void SdrUndoAttrObj::ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& rSt
SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSaveText)
: SdrUndoObj(rNewObj)
- , pUndoSet(NULL)
- , pRedoSet(NULL)
- , pRepeatSet(NULL)
+ , pUndoSet(nullptr)
+ , pRedoSet(nullptr)
+ , pRepeatSet(nullptr)
, mxUndoStyleSheet()
, mxRedoStyleSheet()
, bHaveToTakeRedoSet(true)
- , pTextUndo(NULL)
- , pTextRedo(NULL)
- , pUndoGroup(NULL)
+ , pTextUndo(nullptr)
+ , pTextRedo(nullptr)
+ , pUndoGroup(nullptr)
{
bStyleSheet = bStyleSheet1;
SdrObjList* pOL = rNewObj.GetSubList();
- bool bIsGroup(pOL!=NULL && pOL->GetObjCount());
+ bool bIsGroup(pOL!=nullptr && pOL->GetObjCount());
bool bIs3DScene(bIsGroup && dynamic_cast< E3dScene* >(pObj) != nullptr);
if(bIsGroup)
@@ -534,7 +534,7 @@ void SdrUndoAttrObj::SdrRepeat(SdrView& rView)
bool SdrUndoAttrObj::CanSdrRepeat(SdrView& rView) const
{
- return (pRepeatSet!=0L && rView.AreObjectsMarked());
+ return (pRepeatSet!=nullptr && rView.AreObjectsMarked());
}
OUString SdrUndoAttrObj::GetSdrRepeatComment(SdrView& /*rView*/) const
@@ -601,12 +601,12 @@ OUString SdrUndoMoveObj::GetSdrRepeatComment(SdrView& /*rView*/) const
SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj)
: SdrUndoObj(rNewObj)
- , pUndoGeo(NULL)
- , pRedoGeo(NULL)
- , pUndoGroup(NULL)
+ , pUndoGeo(nullptr)
+ , pRedoGeo(nullptr)
+ , pUndoGroup(nullptr)
{
SdrObjList* pOL=rNewObj.GetSubList();
- if (pOL!=NULL && pOL->GetObjCount() && dynamic_cast<const E3dScene* >( &rNewObj) == nullptr)
+ if (pOL!=nullptr && pOL->GetObjCount() && dynamic_cast<const E3dScene* >( &rNewObj) == nullptr)
{
// this is a group object!
// If this were 3D scene, we'd only add an Undo for the scene itself
@@ -682,8 +682,8 @@ OUString SdrUndoGeoObj::GetComment() const
SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect)
: SdrUndoObj(rNewObj)
, bOwner(false)
- , pView(NULL)
- , pPageView(NULL)
+ , pView(nullptr)
+ , pPageView(nullptr)
{
pObjList=pObj->GetObjList();
if (bOrdNumDirect)
@@ -700,7 +700,7 @@ SdrUndoObjList::~SdrUndoObjList()
{
SolarMutexGuard aGuard;
- if (pObj!=NULL && IsOwner())
+ if (pObj!=nullptr && IsOwner())
{
// Attribute have to go back to the regular Pool
SetOwner(false);
@@ -902,7 +902,7 @@ SdrUndoReplaceObj::SdrUndoReplaceObj(SdrObject& rOldObj1, SdrObject& rNewObj1, b
SdrUndoReplaceObj::~SdrUndoReplaceObj()
{
- if (pObj!=NULL && IsOldOwner())
+ if (pObj!=nullptr && IsOldOwner())
{
// Attribute have to go back into the Pool
SetOldOwner(false);
@@ -910,7 +910,7 @@ SdrUndoReplaceObj::~SdrUndoReplaceObj()
// now delete
SdrObject::Free( pObj );
}
- if (pNewObj!=NULL && IsNewOwner())
+ if (pNewObj!=nullptr && IsNewOwner())
{
// Attribute have to go back into the Pool
SetNewOwner(false);
@@ -1019,7 +1019,7 @@ void SdrUndoObjOrdNum::Undo()
ImpShowPageOfThisObject();
SdrObjList* pOL=pObj->GetObjList();
- if (pOL==NULL)
+ if (pOL==nullptr)
{
OSL_FAIL("UndoObjOrdNum: pObj does not have an ObjList.");
return;
@@ -1030,7 +1030,7 @@ void SdrUndoObjOrdNum::Undo()
void SdrUndoObjOrdNum::Redo()
{
SdrObjList* pOL=pObj->GetObjList();
- if (pOL==NULL)
+ if (pOL==nullptr)
{
OSL_FAIL("RedoObjOrdNum: pObj does not have an ObjList.");
return;
@@ -1052,8 +1052,8 @@ OUString SdrUndoObjOrdNum::GetComment() const
SdrUndoObjSetText::SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText)
: SdrUndoObj(rNewObj)
- , pOldText(NULL)
- , pNewText(NULL)
+ , pOldText(nullptr)
+ , pNewText(nullptr)
, bNewTextAvailable(false)
, bEmptyPresObj(false)
, mnText(nText)
@@ -1106,7 +1106,7 @@ void SdrUndoObjSetText::Undo()
if (pText)
{
// copy text for Undo, because the original now belongs to SetOutlinerParaObject()
- OutlinerParaObject* pText1 = pOldText ? new OutlinerParaObject(*pOldText) : NULL;
+ OutlinerParaObject* pText1 = pOldText ? new OutlinerParaObject(*pOldText) : nullptr;
pText->SetOutlinerParaObject(pText1);
pTarget->NbcSetOutlinerParaObjectForText(pText1, pText);
}
@@ -1141,7 +1141,7 @@ void SdrUndoObjSetText::Redo()
if (pText)
{
// copy text for Undo, because the original now belongs to SetOutlinerParaObject()
- OutlinerParaObject* pText1 = pNewText ? new OutlinerParaObject(*pNewText) : NULL;
+ OutlinerParaObject* pText1 = pNewText ? new OutlinerParaObject(*pNewText) : nullptr;
pTarget->NbcSetOutlinerParaObjectForText( pText1, pText );
}
@@ -1195,13 +1195,13 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
{
SdrObject* pObj2=rML.GetMark(nm)->GetMarkedSdrObj();
SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( pObj2 );
- if (pTextObj!=NULL)
+ if (pTextObj!=nullptr)
{
if( bUndo )
rView.AddUndo(new SdrUndoObjSetText(*pTextObj,0));
OutlinerParaObject* pText1=pNewText;
- if (pText1!=NULL)
+ if (pText1!=nullptr)
pText1 = new OutlinerParaObject(*pText1);
pTextObj->SetOutlinerParaObject(pText1);
}
@@ -1400,7 +1400,7 @@ void SdrUndoPage::ImpRemovePage(sal_uInt16 nNum)
DBG_ASSERT(mrPage.IsInserted(),"SdrUndoPage::ImpRemovePage(): mrPage is not inserted.");
if (mrPage.IsInserted())
{
- SdrPage* pChkPg=NULL;
+ SdrPage* pChkPg=nullptr;
if (mrPage.IsMasterPage())
{
pChkPg=rMod.RemoveMasterPage(nNum);
@@ -1456,7 +1456,7 @@ SdrUndoPageList::~SdrUndoPageList()
SdrUndoDelPage::SdrUndoDelPage(SdrPage& rNewPg)
: SdrUndoPageList(rNewPg)
- , pUndoGroup(NULL)
+ , pUndoGroup(nullptr)
{
bItsMine = true;
@@ -1495,7 +1495,7 @@ SdrUndoDelPage::~SdrUndoDelPage()
void SdrUndoDelPage::Undo()
{
ImpInsertPage(nPageNum);
- if (pUndoGroup!=NULL)
+ if (pUndoGroup!=nullptr)
{
// recover master page relationships
pUndoGroup->Undo();
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index c007a337d4e9..1bac9f79fa7a 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -53,11 +53,11 @@
SdrViewEvent::SdrViewEvent()
-: pHdl(NULL),
- pObj(NULL),
- pRootObj(NULL),
- pPV(NULL),
- pURLField(NULL),
+: pHdl(nullptr),
+ pObj(nullptr),
+ pRootObj(nullptr),
+ pPV(nullptr),
+ pURLField(nullptr),
eHit(SDRHIT_NONE),
eEvent(SDREVENT_NONE),
eHdlKind(HDL_MOVE),
@@ -194,7 +194,7 @@ bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
case KEY_ESCAPE: {
if (IsTextEdit()) SdrEndTextEdit();
if (IsAction()) BrkAction();
- if (pWin!=NULL) pWin->ReleaseMouse();
+ if (pWin!=nullptr) pWin->ReleaseMouse();
} break;
case KEY_DELETE: DeleteMarked(); break;
case KEY_CUT: case KEY_DELETE+KEY_SHIFT: Cut(); break;
@@ -208,7 +208,7 @@ bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
} // switch
}
} // switch
- if (bRet && pWin!=NULL) {
+ if (bRet && pWin!=nullptr) {
pWin->SetPointer(GetPreferredPointer(
pWin->PixelToLogic(pWin->ScreenToOutputPixel( pWin->GetPointerPosPixel() ) ),
pWin,
@@ -284,12 +284,12 @@ SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nEve
rVEvt.nMouseMode=rMEvt.GetMode();
rVEvt.nMouseCode=rMEvt.GetButtons() | rMEvt.GetModifier();
const OutputDevice* pOut=mpActualOutDev;
- if (pOut==NULL)
+ if (pOut==nullptr)
{
pOut = GetFirstOutputDevice();
}
Point aPnt(rMEvt.GetPosPixel());
- if (pOut!=NULL) aPnt=pOut->PixelToLogic(aPnt);
+ if (pOut!=nullptr) aPnt=pOut->PixelToLogic(aPnt);
rVEvt.aLogicPos=aPnt;
return PickAnything(aPnt,rVEvt);
}
@@ -320,7 +320,7 @@ SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nEve
SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const
{
const OutputDevice* pOut=mpActualOutDev;
- if (pOut==NULL)
+ if (pOut==nullptr)
{
pOut = GetFirstOutputDevice();
}
@@ -340,10 +340,10 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
SdrHitKind eHit=SDRHIT_NONE;
- SdrHdl* pHdl=pOut!=NULL && !bTextEditSel ? PickHandle(aLocalLogicPosition) : NULL;
- SdrPageView* pPV=NULL;
- SdrObject* pObj=NULL;
- SdrObject* pHitObj=NULL;
+ SdrHdl* pHdl=pOut!=nullptr && !bTextEditSel ? PickHandle(aLocalLogicPosition) : nullptr;
+ SdrPageView* pPV=nullptr;
+ SdrObject* pObj=nullptr;
+ SdrObject* pHitObj=nullptr;
bool bHitPassDirect=true;
sal_uInt16 nHlplIdx=0;
sal_uInt16 nGlueId=0;
@@ -352,11 +352,11 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
eHit=SDRHIT_TEXTEDIT;
bTextEditHit=true;
}
- else if (pHdl!=NULL)
+ else if (pHdl!=nullptr)
{
eHit=SDRHIT_HANDLE; // handle is hit: highest priority
}
- else if (bEditMode && IsHlplVisible() && IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,mnHitTolLog,*pOut,nHlplIdx,pPV))
+ else if (bEditMode && IsHlplVisible() && IsHlplFront() && pOut!=nullptr && PickHelpLine(aLocalLogicPosition,mnHitTolLog,*pOut,nHlplIdx,pPV))
{
eHit=SDRHIT_HELPLINE; // help line in the foreground hit: can be moved now
}
@@ -405,7 +405,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
}
}
- else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,mnHitTolLog,*pOut,nHlplIdx,pPV))
+ else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=nullptr && PickHelpLine(aLocalLogicPosition,mnHitTolLog,*pOut,nHlplIdx,pPV))
{
eHit=SDRHIT_HELPLINE; // help line in foreground hit: can be moved now
}
@@ -414,13 +414,13 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
bool bRoot=pObj->HasMacro();
bool bDeep=pObj!=pHitObj && pHitObj->HasMacro();
bool bMid=false; // Have we hit upon a grouped group with a macro?
- SdrObject* pMidObj=NULL;
+ SdrObject* pMidObj=nullptr;
if (pObj!=pHitObj)
{
- SdrObject* pObjTmp=NULL;
+ SdrObject* pObjTmp=nullptr;
pObjTmp=pHitObj->GetUpGroup();
- if (pObjTmp==pObj) pObjTmp=NULL;
- while (pObjTmp!=NULL)
+ if (pObjTmp==pObj) pObjTmp=nullptr;
+ while (pObjTmp!=nullptr)
{
if (pObjTmp->HasMacro())
{
@@ -428,7 +428,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
pMidObj=pObjTmp;
}
pObjTmp=pObjTmp->GetUpGroup();
- if (pObjTmp==pObj) pObjTmp=NULL;
+ if (pObjTmp==pObj) pObjTmp=nullptr;
}
}
@@ -457,7 +457,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT)
{
SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( pHitObj );
- if (pTextObj!=NULL && pTextObj->HasText())
+ if (pTextObj!=nullptr && pTextObj->HasText())
{
bool bTEHit(pPV &&
SdrObjectPrimitiveHit(*pTextObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
@@ -491,10 +491,10 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
OutlinerView aOLV(pOutliner, const_cast<vcl::Window*>(static_cast<const vcl::Window*>(mpActualOutDev.get())));
const EditView& aEV=aOLV.GetEditView();
const SvxFieldItem* pItem=aEV.GetField(aTemporaryTextRelativePosition);
- if (pItem!=NULL) {
+ if (pItem!=nullptr) {
const SvxFieldData* pFld=pItem->GetField();
const SvxURLField* pURL=dynamic_cast<const SvxURLField*>( pFld );
- if (pURL!=NULL) {
+ if (pURL!=nullptr) {
eHit=SDRHIT_URLFIELD;
rVEvt.pURLField=pURL;
}
@@ -554,8 +554,8 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
if (!bHitPassDirect && eHit==SDRHIT_UNMARKEDOBJECT) {
eHit=SDRHIT_NONE;
- pObj=NULL;
- pPV=NULL;
+ pObj=nullptr;
+ pPV=nullptr;
}
bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
bool bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0;
@@ -609,7 +609,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
else if (bMouseDown && bMouseLeft)
{
- if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=NULL && pHitObj!=NULL && pHitObj->HasTextEdit() && eHit==SDRHIT_MARKEDOBJECT)
+ if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=nullptr && pHitObj!=nullptr && pHitObj->HasTextEdit() && eHit==SDRHIT_MARKEDOBJECT)
{
rVEvt.pRootObj=pObj;
pObj=pHitObj;
@@ -732,7 +732,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
rVEvt.aLogicPos=aLocalLogicPosition;
rVEvt.pHdl=pHdl;
rVEvt.pObj=pObj;
- if(rVEvt.pRootObj==NULL)
+ if(rVEvt.pRootObj==nullptr)
rVEvt.pRootObj=pObj;
rVEvt.pPV=pPV;
rVEvt.nHlplIdx=nHlplIdx;
@@ -830,7 +830,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
OutlinerView* pOLV=GetTextEditOutlinerView();
- if (pOLV!=NULL) {
+ if (pOLV!=nullptr) {
pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
pOLV->MouseButtonUp(aMEvt); // event for the Outliner, but without double-click
}
@@ -858,7 +858,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
bUnmark=nCount1<nCount0;
}
if (!bUnmark) {
- BegDragObj(aLogicPos,NULL,nullptr,mnMinMovLog);
+ BegDragObj(aLogicPos,nullptr,nullptr,mnMinMovLog);
bRet=true;
}
} break;
@@ -870,7 +870,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark);
}
if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
- BegDragObj(aLogicPos,NULL,rVEvt.pHdl,mnMinMovLog);
+ BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog);
bRet=true;
}
} break;
@@ -883,7 +883,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
}
if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
SdrHdl* pHdl=GetGluePointHdl(rVEvt.pObj,rVEvt.nGlueId);
- BegDragObj(aLogicPos,NULL,pHdl,mnMinMovLog);
+ BegDragObj(aLogicPos,nullptr,pHdl,mnMinMovLog);
bRet=true;
}
} break;
@@ -898,7 +898,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
} break;
case SDREVENT_BEGINSGLUEPOINT: bRet=BegInsGluePoint(aLogicPos); break;
case SDREVENT_BEGDRAGHELPLINE: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break;
- case SDREVENT_BEGDRAGOBJ: bRet=BegDragObj(aLogicPos,NULL,rVEvt.pHdl,mnMinMovLog); break;
+ case SDREVENT_BEGDRAGOBJ: bRet=BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); break;
case SDREVENT_BEGCREATEOBJ: {
if (nAktInvent==SdrInventor && nAktIdent==OBJ_CAPTION) {
long nHgt=SdrEngineDefaults::GetFontHeight();
@@ -922,7 +922,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos),
1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
OutlinerView* pOLV=GetTextEditOutlinerView();
- if (pOLV!=NULL) pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
+ if (pOLV!=nullptr) pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click
}
} break;
default: break;
@@ -1002,7 +1002,7 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice*
aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // to see what would happen on MouseLeftDown
aVEvt.bMouseDown=!bLeftDown; // What if ..?
aVEvt.bMouseUp=bLeftDown; // What if ..?
- if (pOut!=NULL)
+ if (pOut!=nullptr)
const_cast<SdrView*>(this)->SetActualWin(pOut);
SdrHitKind eHit=PickAnything(rMousePos,aVEvt);
SdrEventKind eEvent=aVEvt.eEvent;
@@ -1062,10 +1062,10 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice*
bool bMarkHit=eHit==SDRHIT_MARKEDOBJECT;
SdrHdl* pHdl=aVEvt.pHdl;
// now check the pointers for dragging
- if (pHdl!=NULL || bMarkHit) {
- SdrHdlKind eHdl= pHdl!=NULL ? pHdl->GetKind() : HDL_MOVE;
- bool bCorner=pHdl!=NULL && pHdl->IsCornerHdl();
- bool bVertex=pHdl!=NULL && pHdl->IsVertexHdl();
+ if (pHdl!=nullptr || bMarkHit) {
+ SdrHdlKind eHdl= pHdl!=nullptr ? pHdl->GetKind() : HDL_MOVE;
+ bool bCorner=pHdl!=nullptr && pHdl->IsCornerHdl();
+ bool bVertex=pHdl!=nullptr && pHdl->IsVertexHdl();
bool bMov=eHdl==HDL_MOVE;
if (bMov && (meDragMode==SDRDRAG_MOVE || meDragMode==SDRDRAG_RESIZE || mbMarkedHitMovesAlways)) {
if (!IsMoveAllowed()) return Pointer(PointerStyle::Arrow); // because double click or drag & drop is possible
@@ -1108,7 +1108,7 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice*
bool b90=false;
bool b45=false;
Point aDif;
- if (pH1!=NULL && pH2!=NULL) {
+ if (pH1!=nullptr && pH2!=nullptr) {
aDif=pH2->GetPos()-pH1->GetPos();
b90=(aDif.X()==0) || aDif.Y()==0;
b45=b90 || (std::abs(aDif.X())==std::abs(aDif.Y()));
@@ -1157,7 +1157,7 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice*
if ((bCorner || bVertex) && !IsResizeAllowed(true)) return Pointer(PointerStyle::NotAllowed);
}
}
- if (pHdl!=NULL) return pHdl->GetPointer();
+ if (pHdl!=nullptr) return pHdl->GetPointer();
if (bMov) {
if (!IsMoveAllowed()) return Pointer(PointerStyle::Arrow); // because double click or drag & drop is possible
return Pointer(PointerStyle::Move);
@@ -1175,7 +1175,7 @@ OUString SdrView::GetStatusText()
aStr += STR_NOTHING;
- if (pAktCreate!=NULL)
+ if (pAktCreate!=nullptr)
{
aStr=pAktCreate->getSpecialDragComment(maDragStat);
@@ -1234,7 +1234,7 @@ OUString SdrView::GetStatusText()
aStr = ImpGetResStr(STR_ViewMarkGluePoints);
}
}
- else if (IsTextEdit() && pTextEditOutlinerView!=NULL) {
+ else if (IsTextEdit() && pTextEditOutlinerView!=nullptr) {
aStr=ImpGetResStr(STR_ViewTextEdit); // "TextEdit - Row y, Column x";
ESelection aSel(pTextEditOutlinerView->GetSelection());
long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx
index bfa66c5c839b..3cdfc2c1b57f 100644
--- a/svx/source/svdraw/svdviter.cxx
+++ b/svx/source/svdraw/svdviter.cxx
@@ -34,7 +34,7 @@ void SdrViewIter::ImpInitVars()
mnListenerNum = 0L;
mnPageViewNum = 0L;
mnOutDevNum = 0L;
- mpAktView = 0L;
+ mpAktView = nullptr;
}
@@ -42,8 +42,8 @@ void SdrViewIter::ImpInitVars()
SdrViewIter::SdrViewIter(const SdrPage* pPage, bool bNoMasterPage)
{
mpPage = pPage;
- mpModel = (pPage) ? pPage->GetModel() : 0L;
- mpObject = 0L;
+ mpModel = (pPage) ? pPage->GetModel() : nullptr;
+ mpObject = nullptr;
mbNoMasterPage = bNoMasterPage;
ImpInitVars();
}
@@ -53,14 +53,14 @@ SdrViewIter::SdrViewIter(const SdrPage* pPage, bool bNoMasterPage)
SdrViewIter::SdrViewIter(const SdrObject* pObject, bool bNoMasterPage)
{
mpObject = pObject;
- mpModel = (pObject) ? pObject->GetModel() : 0L;
- mpPage = (pObject) ? pObject->GetPage() : 0L;
+ mpModel = (pObject) ? pObject->GetModel() : nullptr;
+ mpPage = (pObject) ? pObject->GetPage() : nullptr;
mbNoMasterPage = bNoMasterPage;
if(!mpModel || !mpPage)
{
- mpModel = 0L;
- mpPage = 0L;
+ mpModel = nullptr;
+ mpPage = nullptr;
}
ImpInitVars();
@@ -162,7 +162,7 @@ SdrView* SdrViewIter::ImpFindView()
}
}
- mpAktView = 0L;
+ mpAktView = nullptr;
return mpAktView;
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 0f65e951c19f..ab6c8a4c8d2b 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -97,11 +97,11 @@ bool SdrExchangeView::ImpLimitToWorkArea(Point& rPt) const
void SdrExchangeView::ImpGetPasteObjList(Point& /*rPos*/, SdrObjList*& rpLst)
{
- if (rpLst==NULL)
+ if (rpLst==nullptr)
{
SdrPageView* pPV = GetSdrPageView();
- if (pPV!=NULL) {
+ if (pPV!=nullptr) {
rpLst=pPV->GetObjList();
}
}
@@ -111,13 +111,13 @@ bool SdrExchangeView::ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& r
{
bool bRet=false;
rLayer=0;
- if (pObjList!=NULL) {
+ if (pObjList!=nullptr) {
const SdrPage* pPg=pObjList->GetPage();
- if (pPg!=NULL) {
+ if (pPg!=nullptr) {
rLayer=pPg->GetLayerAdmin().GetLayerID(maActualLayer,true);
if (rLayer==SDRLAYER_NOTFOUND) rLayer=0;
SdrPageView* pPV = GetSdrPageView();
- if (pPV!=NULL) {
+ if (pPV!=nullptr) {
bRet=!pPV->GetLockedLayers().IsSet(rLayer) && pPV->GetVisibleLayers().IsSet(rLayer);
}
}
@@ -133,21 +133,21 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList*
Point aPos(rPos);
ImpGetPasteObjList(aPos,pLst);
ImpLimitToWorkArea( aPos );
- if (pLst==NULL) return false;
+ if (pLst==nullptr) return false;
SdrLayerID nLayer;
if (!ImpGetPasteLayer(pLst,nLayer)) return false;
bool bUnmark = (nOptions & (SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit();
if (bUnmark) UnmarkAllObj();
Rectangle aTextRect(0,0,500,500);
SdrPage* pPage=pLst->GetPage();
- if (pPage!=NULL) {
+ if (pPage!=nullptr) {
aTextRect.SetSize(pPage->GetSize());
}
SdrRectObj* pObj=new SdrRectObj(OBJ_TEXT,aTextRect);
pObj->SetModel(mpModel);
pObj->SetLayer(nLayer);
pObj->NbcSetText(rStr); // SetText before SetAttr, else SetAttr doesn't work!
- if (mpDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
+ if (mpDefaultStyleSheet!=nullptr) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
pObj->SetMergedItemSet(maDefaultAttr);
@@ -170,20 +170,20 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt
Point aPos(rPos);
ImpGetPasteObjList(aPos,pLst);
ImpLimitToWorkArea( aPos );
- if (pLst==NULL) return false;
+ if (pLst==nullptr) return false;
SdrLayerID nLayer;
if (!ImpGetPasteLayer(pLst,nLayer)) return false;
bool bUnmark=(nOptions&(SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit();
if (bUnmark) UnmarkAllObj();
Rectangle aTextRect(0,0,500,500);
SdrPage* pPage=pLst->GetPage();
- if (pPage!=NULL) {
+ if (pPage!=nullptr) {
aTextRect.SetSize(pPage->GetSize());
}
SdrRectObj* pObj=new SdrRectObj(OBJ_TEXT,aTextRect);
pObj->SetModel(mpModel);
pObj->SetLayer(nLayer);
- if (mpDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
+ if (mpDefaultStyleSheet!=nullptr) pObj->NbcSetStyleSheet(mpDefaultStyleSheet, false);
pObj->SetMergedItemSet(maDefaultAttr);
@@ -245,7 +245,7 @@ bool SdrExchangeView::Paste(
Point aPos(rPos);
ImpGetPasteObjList(aPos,pLst);
- SdrPageView* pMarkPV=NULL;
+ SdrPageView* pMarkPV=nullptr;
SdrPageView* pPV = GetSdrPageView();
if(pPV)
@@ -255,7 +255,7 @@ bool SdrExchangeView::Paste(
}
ImpLimitToWorkArea( aPos );
- if (pLst==NULL)
+ if (pLst==nullptr)
return false;
bool bUnmark=(nOptions&(SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit();
@@ -290,7 +290,7 @@ bool SdrExchangeView::Paste(
Size aSiz(aDist.X(),aDist.Y());
size_t nCloneErrCnt = 0;
const size_t nObjCount = pSrcPg->GetObjCount();
- bool bMark = pMarkPV!=NULL && !IsTextEdit() && (nOptions&SdrInsertFlags::DONTMARK)==SdrInsertFlags::NONE;
+ bool bMark = pMarkPV!=nullptr && !IsTextEdit() && (nOptions&SdrInsertFlags::DONTMARK)==SdrInsertFlags::NONE;
// #i13033#
// New mechanism to re-create the connections of cloned connectors
@@ -302,7 +302,7 @@ bool SdrExchangeView::Paste(
SdrObject* pNeuObj = pSrcOb->CloneWithShellIDs(rSrcShellID, rDestShellID);
- if (pNeuObj!=NULL)
+ if (pNeuObj!=nullptr)
{
if(bResize)
{
@@ -427,7 +427,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
if( IsUndoEnabled() )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
- SdrPageView* pMarkPV=NULL;
+ SdrPageView* pMarkPV=nullptr;
SdrPageView* pPV = GetSdrPageView();
if(pPV)
@@ -436,7 +436,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
pMarkPV=pPV;
}
- bool bMark = pMarkPV!=NULL && !IsTextEdit() && (nOptions&SdrInsertFlags::DONTMARK)==SdrInsertFlags::NONE;
+ bool bMark = pMarkPV!=nullptr && !IsTextEdit() && (nOptions&SdrInsertFlags::DONTMARK)==SdrInsertFlags::NONE;
if (bMark)
{ // select object the first PageView we found
MarkObj(pObj,pMarkPV);
@@ -539,7 +539,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co
if( bNoVDevIfOneMtfMarked )
{
SdrObject* pGrafObjTmp = GetMarkedObjectByIndex( 0 );
- SdrGrafObj* pGrafObj = ( GetMarkedObjectCount() ==1 ) ? dynamic_cast<SdrGrafObj*>( pGrafObjTmp ) : NULL;
+ SdrGrafObj* pGrafObj = ( GetMarkedObjectCount() ==1 ) ? dynamic_cast<SdrGrafObj*>( pGrafObjTmp ) : nullptr;
if( pGrafObj )
{
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 7ef3c006afb4..7d58612b60e8 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -38,8 +38,8 @@ TextChainFlow::TextChainFlow(SdrTextObj *pChainTarget)
mbOFisUFinduced = false;
- mpOverflChText = NULL;
- mpUnderflChText = NULL;
+ mpOverflChText = nullptr;
+ mpUnderflChText = nullptr;
maCursorEvent = CursorChainingEvent::NULL_EVENT;
mbPossiblyCursorOut = false;
@@ -72,7 +72,7 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
bool bOldUpdateMode = pFlowOutl->GetUpdateMode();
// XXX: This could be reorganized moving most of this stuff inside EditingTextChainFlow
- if (pParamOutl != NULL)
+ if (pParamOutl != nullptr)
{
// We need this since it's required to check overflow
pFlowOutl->SetUpdateMode(true);
@@ -101,12 +101,12 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
mpOverflChText = bOverflow ?
new OFlowChainedText(pFlowOutl, bMustMergeParaOF) :
- NULL;
+ nullptr;
// Set current underflowing text (if any)
mpUnderflChText = bUnderflow ?
new UFlowChainedText(pFlowOutl, bMustMergeParaAmongLinks) :
- NULL;
+ nullptr;
// Reset update mode // Reset it here because we use WriteRTF (needing updatemode = true) in the two constructors above
if (!bOldUpdateMode) // Reset only if the old value was false
@@ -140,7 +140,7 @@ void TextChainFlow::impUpdateCursorInfo()
void TextChainFlow::CheckForFlowEvents(SdrOutliner *pFlowOutl)
{
- impCheckForFlowEvents(pFlowOutl, NULL);
+ impCheckForFlowEvents(pFlowOutl, nullptr);
}
@@ -275,7 +275,7 @@ void EditingTextChainFlow::CheckForFlowEvents(SdrOutliner *pFlowOutl)
{
// if this is editing outliner no need to set parameters
if (pFlowOutl == GetLinkTarget()->pEdtOutl)
- impCheckForFlowEvents(pFlowOutl, NULL);
+ impCheckForFlowEvents(pFlowOutl, nullptr);
else
impCheckForFlowEvents(pFlowOutl, GetLinkTarget()->pEdtOutl);