summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:10:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:16 +0100
commita17cde058213f962b8de880de6f5b1e4f2061b37 (patch)
tree1dadb981b6581df51ba383dd49f54a736b9dc091 /basegfx/source
parentc2ff1b9622a1c67612719c87af593b59b9534119 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ib64fc63905cf44a0d32393d52ee587d0aa2d9dfa
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/color/bcolormodifier.cxx6
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx6
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx6
-rw-r--r--basegfx/source/polygon/b2dpolygontriangulator.cxx8
-rw-r--r--basegfx/source/polygon/b2dpolypolygon.cxx8
-rw-r--r--basegfx/source/polygon/b2dpolypolygontools.cxx4
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx4
-rw-r--r--basegfx/source/polygon/b3dpolygon.cxx52
-rw-r--r--basegfx/source/polygon/b3dpolypolygon.cxx8
-rw-r--r--basegfx/source/range/b2drangeclipper.cxx8
-rw-r--r--basegfx/source/raster/rasterconvert3d.cxx2
-rw-r--r--basegfx/source/tools/numbertools.cxx2
12 files changed, 57 insertions, 57 deletions
diff --git a/basegfx/source/color/bcolormodifier.cxx b/basegfx/source/color/bcolormodifier.cxx
index 7727efdb034c..0beaa40c2e33 100644
--- a/basegfx/source/color/bcolormodifier.cxx
+++ b/basegfx/source/color/bcolormodifier.cxx
@@ -36,7 +36,7 @@ namespace basegfx
bool BColorModifier_gray::operator==(const BColorModifier& rCompare) const
{
- return 0 != dynamic_cast< const BColorModifier_gray* >(&rCompare);
+ return nullptr != dynamic_cast< const BColorModifier_gray* >(&rCompare);
}
::basegfx::BColor BColorModifier_gray::getModifiedColor(const ::basegfx::BColor& aSourceColor) const
@@ -55,7 +55,7 @@ namespace basegfx
bool BColorModifier_invert::operator==(const BColorModifier& rCompare) const
{
- return 0 != dynamic_cast< const BColorModifier_invert* >(&rCompare);
+ return nullptr != dynamic_cast< const BColorModifier_invert* >(&rCompare);
}
::basegfx::BColor BColorModifier_invert::getModifiedColor(const ::basegfx::BColor& aSourceColor) const
@@ -72,7 +72,7 @@ namespace basegfx
bool BColorModifier_luminance_to_alpha::operator==(const BColorModifier& rCompare) const
{
- return 0 != dynamic_cast< const BColorModifier_luminance_to_alpha* >(&rCompare);
+ return nullptr != dynamic_cast< const BColorModifier_luminance_to_alpha* >(&rCompare);
}
::basegfx::BColor BColorModifier_luminance_to_alpha::getModifiedColor(const ::basegfx::BColor& aSourceColor) const
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index ee87cbe7256b..852114546021 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -613,7 +613,7 @@ namespace basegfx
{
// t is in ]0.0 .. 1.0[. Split and extract
B2DCubicBezier aRight;
- split(t, 0, &aRight);
+ split(t, nullptr, &aRight);
return aRight.getControlPointA() - aRight.getStartPoint();
}
@@ -871,7 +871,7 @@ namespace basegfx
if(!bEndIsOne)
{
- aRetval.split(fEnd, &aRetval, 0);
+ aRetval.split(fEnd, &aRetval, nullptr);
if(!bStartIsZero)
{
@@ -881,7 +881,7 @@ namespace basegfx
if(!bStartIsZero)
{
- aRetval.split(fStart, 0, &aRetval);
+ aRetval.split(fStart, nullptr, &aRetval);
}
}
else
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 54f85214dab1..2ad4cd05b7f4 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -838,7 +838,7 @@ namespace basegfx
const double fBezierDistance(aBezierSegmentHelper.distanceToRelative(fFrom - fPositionOfStart));
B2DCubicBezier aRight;
- aBezierSegment.split(fBezierDistance, 0, &aRight);
+ aBezierSegment.split(fBezierDistance, nullptr, &aRight);
aRetval.append(aRight.getStartPoint());
aRetval.setNextControlPoint(aRetval.count() - 1, aRight.getControlPointA());
bDone = true;
@@ -896,7 +896,7 @@ namespace basegfx
const double fBezierDistance(aBezierSegmentHelper.distanceToRelative(fTo - fPositionOfStart));
B2DCubicBezier aLeft;
- aBezierSegment.split(fBezierDistance, &aLeft, 0);
+ aBezierSegment.split(fBezierDistance, &aLeft, nullptr);
aRetval.append(aLeft.getEndPoint());
aRetval.setPrevControlPoint(aRetval.count() - 1, aLeft.getControlPointB());
bDone = true;
@@ -1290,7 +1290,7 @@ namespace basegfx
B2DCubicBezier aRight;
const double fBezierSplit(aCubicBezierHelper.distanceToRelative(fLastDotDashMovingLength));
- aCurrentEdge.split(fBezierSplit, 0, &aRight);
+ aCurrentEdge.split(fBezierSplit, nullptr, &aRight);
if(!aSnippet.count())
{
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index f27ad9bc7af9..479d06ebdb34 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -42,7 +42,7 @@ namespace basegfx
public:
EdgeEntry(const B2DPoint& rStart, const B2DPoint& rEnd)
- : mpNext(0L),
+ : mpNext(nullptr),
maStart(rStart),
maEnd(rEnd),
mfAtan2(0.0)
@@ -134,7 +134,7 @@ namespace basegfx
// create an entry, else the comparison might use the wrong edges
EdgeEntry aNew(rStart, rEnd);
EdgeEntry* pCurr = mpList;
- EdgeEntry* pPrev = 0L;
+ EdgeEntry* pPrev = nullptr;
while(pCurr
&& pCurr->getStart().getY() <= aNew.getStart().getY()
@@ -162,7 +162,7 @@ namespace basegfx
EdgeEntry* pNew = new EdgeEntry(aNew);
maNewEdgeEntries.push_back(pNew);
pCurr = mpList;
- pPrev = 0L;
+ pPrev = nullptr;
while(pCurr && *pCurr < *pNew)
{
@@ -217,7 +217,7 @@ namespace basegfx
// consume as long as there are edges
Triangulator::Triangulator(const B2DPolyPolygon& rCandidate)
- : mpList(0L)
+ : mpList(nullptr)
{
// add all available edges to the single linked local list which will be sorted
// by Y,X,atan2 when adding nodes
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx
index d640c5383538..535f7b457684 100644
--- a/basegfx/source/polygon/b2dpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dpolypolygon.cxx
@@ -138,7 +138,7 @@ public:
const basegfx::B2DPolygon* begin() const
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return &maPolygons.front();
}
@@ -146,7 +146,7 @@ public:
const basegfx::B2DPolygon* end() const
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return (&maPolygons.back())+1;
}
@@ -154,7 +154,7 @@ public:
basegfx::B2DPolygon* begin()
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return &maPolygons.front();
}
@@ -162,7 +162,7 @@ public:
basegfx::B2DPolygon* end()
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return &(maPolygons.back())+1;
}
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index b473367ce6cb..b1507768220f 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -279,8 +279,8 @@ namespace basegfx
applyLineDashing(
aCandidate,
rDotDashArray,
- pLineTarget ? &aLineTarget : 0,
- pGapTarget ? &aGapTarget : 0,
+ pLineTarget ? &aLineTarget : nullptr,
+ pGapTarget ? &aGapTarget : nullptr,
fFullDashDotLen);
if(pLineTarget)
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 18e4e63189f5..c9ded97ee412 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -115,7 +115,7 @@ namespace basegfx
// data write access to StartPoint
void setStart( const B2DPoint* pNewStart)
{
- OSL_ENSURE(0 != pNewStart, "No null pointer allowed here (!)");
+ OSL_ENSURE(nullptr != pNewStart, "No null pointer allowed here (!)");
if(mpStart != pNewStart)
{
@@ -129,7 +129,7 @@ namespace basegfx
// data write access to EndPoint
void setEnd( const B2DPoint* pNewEnd)
{
- OSL_ENSURE(0 != pNewEnd, "No null pointer allowed here (!)");
+ OSL_ENSURE(nullptr != pNewEnd, "No null pointer allowed here (!)");
if(mpEnd != pNewEnd)
{
diff --git a/basegfx/source/polygon/b3dpolygon.cxx b/basegfx/source/polygon/b3dpolygon.cxx
index 020b6c62772a..97efdc25f65d 100644
--- a/basegfx/source/polygon/b3dpolygon.cxx
+++ b/basegfx/source/polygon/b3dpolygon.cxx
@@ -101,8 +101,8 @@ public:
sal_uInt32 nISmallest(0);
sal_uInt32 a(0);
const basegfx::B3DPoint* pSmallest(&maVector[0].getCoordinate());
- const basegfx::B3DPoint* pNext(0);
- const basegfx::B3DPoint* pPrev(0);
+ const basegfx::B3DPoint* pNext(nullptr);
+ const basegfx::B3DPoint* pPrev(nullptr);
// To guarantee a correctly oriented point, choose an outmost one
// which then cannot be concave
@@ -779,9 +779,9 @@ public:
// the RefCount is set to 1 to never 'delete' this static incarnation.
ImplB3DPolygon()
: maPoints(0L),
- mpBColors(0L),
- mpNormals(0L),
- mpTextureCoordinates(0L),
+ mpBColors(nullptr),
+ mpNormals(nullptr),
+ mpTextureCoordinates(nullptr),
maPlaneNormal(::basegfx::B3DVector::getEmptyVector()),
mbIsClosed(false),
mbPlaneNormalValid(true)
@@ -791,9 +791,9 @@ public:
ImplB3DPolygon(const ImplB3DPolygon& rToBeCopied)
: maPoints(rToBeCopied.maPoints),
- mpBColors(0L),
- mpNormals(0L),
- mpTextureCoordinates(0L),
+ mpBColors(nullptr),
+ mpNormals(nullptr),
+ mpTextureCoordinates(nullptr),
maPlaneNormal(rToBeCopied.maPlaneNormal),
mbIsClosed(rToBeCopied.mbIsClosed),
mbPlaneNormalValid(rToBeCopied.mbPlaneNormalValid)
@@ -817,9 +817,9 @@ public:
ImplB3DPolygon(const ImplB3DPolygon& rToBeCopied, sal_uInt32 nIndex, sal_uInt32 nCount)
: maPoints(rToBeCopied.maPoints, nIndex, nCount),
- mpBColors(0L),
- mpNormals(0L),
- mpTextureCoordinates(0L),
+ mpBColors(nullptr),
+ mpNormals(nullptr),
+ mpTextureCoordinates(nullptr),
maPlaneNormal(::basegfx::B3DVector::getEmptyVector()),
mbIsClosed(rToBeCopied.mbIsClosed),
mbPlaneNormalValid(false)
@@ -832,7 +832,7 @@ public:
if(!mpBColors->isUsed())
{
delete mpBColors;
- mpBColors = 0L;
+ mpBColors = nullptr;
}
}
@@ -843,7 +843,7 @@ public:
if(!mpNormals->isUsed())
{
delete mpNormals;
- mpNormals = 0L;
+ mpNormals = nullptr;
}
}
@@ -854,7 +854,7 @@ public:
if(!mpTextureCoordinates->isUsed())
{
delete mpTextureCoordinates;
- mpTextureCoordinates = 0L;
+ mpTextureCoordinates = nullptr;
}
}
}
@@ -864,19 +864,19 @@ public:
if(mpBColors)
{
delete mpBColors;
- mpBColors = 0L;
+ mpBColors = nullptr;
}
if(mpNormals)
{
delete mpNormals;
- mpNormals = 0L;
+ mpNormals = nullptr;
}
if(mpTextureCoordinates)
{
delete mpTextureCoordinates;
- mpTextureCoordinates = 0L;
+ mpTextureCoordinates = nullptr;
}
}
@@ -1069,7 +1069,7 @@ public:
if(!mpBColors->isUsed())
{
delete mpBColors;
- mpBColors = 0L;
+ mpBColors = nullptr;
}
}
}
@@ -1084,7 +1084,7 @@ public:
if(mpBColors)
{
delete mpBColors;
- mpBColors = 0L;
+ mpBColors = nullptr;
}
}
@@ -1128,7 +1128,7 @@ public:
if(!mpNormals->isUsed())
{
delete mpNormals;
- mpNormals = 0L;
+ mpNormals = nullptr;
}
}
}
@@ -1151,7 +1151,7 @@ public:
if(mpNormals)
{
delete mpNormals;
- mpNormals = 0L;
+ mpNormals = nullptr;
}
}
@@ -1184,7 +1184,7 @@ public:
if(!mpTextureCoordinates->isUsed())
{
delete mpTextureCoordinates;
- mpTextureCoordinates = 0L;
+ mpTextureCoordinates = nullptr;
}
}
}
@@ -1199,7 +1199,7 @@ public:
if(mpTextureCoordinates)
{
delete mpTextureCoordinates;
- mpTextureCoordinates = 0L;
+ mpTextureCoordinates = nullptr;
}
}
@@ -1287,7 +1287,7 @@ public:
if(!mpBColors->isUsed())
{
delete mpBColors;
- mpBColors = 0L;
+ mpBColors = nullptr;
}
}
@@ -1298,7 +1298,7 @@ public:
if(!mpNormals->isUsed())
{
delete mpNormals;
- mpNormals = 0L;
+ mpNormals = nullptr;
}
}
@@ -1309,7 +1309,7 @@ public:
if(!mpTextureCoordinates->isUsed())
{
delete mpTextureCoordinates;
- mpTextureCoordinates = 0L;
+ mpTextureCoordinates = nullptr;
}
}
}
diff --git a/basegfx/source/polygon/b3dpolypolygon.cxx b/basegfx/source/polygon/b3dpolypolygon.cxx
index 98bc7ca2959d..feb2a0587c1b 100644
--- a/basegfx/source/polygon/b3dpolypolygon.cxx
+++ b/basegfx/source/polygon/b3dpolypolygon.cxx
@@ -156,7 +156,7 @@ public:
const basegfx::B3DPolygon* begin() const
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return &maPolygons.front();
}
@@ -164,7 +164,7 @@ public:
const basegfx::B3DPolygon* end() const
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return (&maPolygons.back())+1;
}
@@ -172,7 +172,7 @@ public:
basegfx::B3DPolygon* begin()
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return &maPolygons.front();
}
@@ -180,7 +180,7 @@ public:
basegfx::B3DPolygon* end()
{
if(maPolygons.empty())
- return 0;
+ return nullptr;
else
return &(maPolygons.back())+1;
}
diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx
index 254912e50443..1e4bb4f4d6b7 100644
--- a/basegfx/source/range/b2drangeclipper.cxx
+++ b/basegfx/source/range/b2drangeclipper.cxx
@@ -244,7 +244,7 @@ namespace basegfx
/** Create polygon
*/
ImplPolygon() :
- mpLeadingRightEdge(NULL),
+ mpLeadingRightEdge(nullptr),
mnIdx(-1),
maPoints(),
mbIsFinished(false)
@@ -454,7 +454,7 @@ namespace basegfx
ActiveEdge* const pFarEdge=rTmp.mpLeadingRightEdge;
ActiveEdge* const pNearEdge=&rActiveEdge;
- rTmp.mpLeadingRightEdge = NULL;
+ rTmp.mpLeadingRightEdge = nullptr;
pNearEdge->setTargetPolygonIndex(nTmpIdx);
mpLeadingRightEdge = pFarEdge;
@@ -476,7 +476,7 @@ namespace basegfx
rActiveEdge.setTargetPolygonIndex(mnIdx);
mpLeadingRightEdge = &rActiveEdge;
- rTmp.mpLeadingRightEdge = NULL;
+ rTmp.mpLeadingRightEdge = nullptr;
return nTmpIdx;
}
@@ -509,7 +509,7 @@ namespace basegfx
"ImplPolygon::finish(): first and last point violate 90 degree line angle constraint!" );
mbIsFinished = true;
- mpLeadingRightEdge = NULL;
+ mpLeadingRightEdge = nullptr;
rRes.append(getPolygon());
}
diff --git a/basegfx/source/raster/rasterconvert3d.cxx b/basegfx/source/raster/rasterconvert3d.cxx
index bbce06fb971e..9b278268e3ed 100644
--- a/basegfx/source/raster/rasterconvert3d.cxx
+++ b/basegfx/source/raster/rasterconvert3d.cxx
@@ -238,7 +238,7 @@ namespace basegfx
aPolygon.append(B3DPoint(aStart.getX() - aPerpend.getX(), aStart.getY() - aPerpend.getY(), fZStartWithAdd));
aPolygon.setClosed(true);
- addArea(aPolygon, 0);
+ addArea(aPolygon, nullptr);
}
}
else
diff --git a/basegfx/source/tools/numbertools.cxx b/basegfx/source/tools/numbertools.cxx
index 6b8543a8eff0..d30a8371ab2b 100644
--- a/basegfx/source/tools/numbertools.cxx
+++ b/basegfx/source/tools/numbertools.cxx
@@ -32,7 +32,7 @@ namespace basegfx { namespace tools
fValue,
rtl_math_StringFormat_F,
nDecPlaces, '.',
- 0, ',');
+ nullptr, ',');
B2DPolyPolygon aRes;
B2DHomMatrix aMat;