From a17cde058213f962b8de880de6f5b1e4f2061b37 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 10 Nov 2015 10:10:29 +0100 Subject: loplugin:nullptr (automatic rewrite) Change-Id: Ib64fc63905cf44a0d32393d52ee587d0aa2d9dfa --- basegfx/source/color/bcolormodifier.cxx | 6 +-- basegfx/source/curve/b2dcubicbezier.cxx | 6 +-- basegfx/source/polygon/b2dpolygontools.cxx | 6 +-- basegfx/source/polygon/b2dpolygontriangulator.cxx | 8 ++-- basegfx/source/polygon/b2dpolypolygon.cxx | 8 ++-- basegfx/source/polygon/b2dpolypolygontools.cxx | 4 +- basegfx/source/polygon/b2dtrapezoid.cxx | 4 +- basegfx/source/polygon/b3dpolygon.cxx | 52 +++++++++++------------ basegfx/source/polygon/b3dpolypolygon.cxx | 8 ++-- basegfx/source/range/b2drangeclipper.cxx | 8 ++-- basegfx/source/raster/rasterconvert3d.cxx | 2 +- basegfx/source/tools/numbertools.cxx | 2 +- basegfx/test/basegfx2d.cxx | 18 ++++---- basegfx/test/boxclipper.cxx | 6 +-- basegfx/test/clipstate.cxx | 6 +-- basegfx/test/genericclipper.cxx | 4 +- include/basegfx/polygon/b2dlinegeometry.hxx | 2 +- include/basegfx/polygon/b2dpolygontools.hxx | 6 +-- include/basegfx/polygon/b2dpolypolygontools.hxx | 2 +- include/basegfx/polygon/b3dpolygontools.hxx | 2 +- 20 files changed, 80 insertions(+), 80 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; diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index ec95f8efd2ec..cfcc4e7e4e67 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -142,19 +142,19 @@ public: OUString aExport; CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D", - tools::importFromSvgD( aPoly, aPath0, false, 0 )); + tools::importFromSvgD( aPoly, aPath0, false, nullptr )); aExport = tools::exportToSvgD( aPoly, true, true, false ); const char* sExportString = "m10 10h-20v-20h20z"; CPPUNIT_ASSERT_MESSAGE("exporting rectangle to SVG-D", aExport.equalsAscii(sExportString) ); CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip", - tools::importFromSvgD( aPoly, aExport, false, 0 )); + tools::importFromSvgD( aPoly, aExport, false, nullptr )); aExport = tools::exportToSvgD( aPoly, true, true, false ); CPPUNIT_ASSERT_MESSAGE("exporting rectangle to SVG-D (round-trip)", aExport.equalsAscii(sExportString)); CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D", - tools::importFromSvgD( aPoly, aPath1, false, 0 )); + tools::importFromSvgD( aPoly, aPath1, false, nullptr )); aExport = tools::exportToSvgD( aPoly, true, true, false ); // Adaptions for B2DPolygon bezier change (see #i77162#): @@ -182,10 +182,10 @@ public: // a 2nd good test is that re-importing of aExport has to create the same // B2DPolPolygon again: B2DPolyPolygon aReImport; - CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D", tools::importFromSvgD( aReImport, aExport, false, 0)); + CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D", tools::importFromSvgD( aReImport, aExport, false, nullptr)); CPPUNIT_ASSERT_MESSAGE("re-imported polygon needs to be identical", aReImport == aPoly); - CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D", tools::importFromSvgD( aPoly, aPath2, false, NULL)); + CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D", tools::importFromSvgD( aPoly, aPath2, false, nullptr)); aExport = tools::exportToSvgD( aPoly, true, true, false ); // Adaptions for B2DPolygon bezier change (see #i77162#): @@ -202,18 +202,18 @@ public: "8 752-224 1128-21 101-31 183-31 245 0 39 9 70 26 93 17 24 39 36 67 36 145 0 279-80 400-240s182-365 182-615c0-2" "88-107-533-322-734s-487-301-816-301c-395 0-715 124-960 373s-368 569-368 958q0 577.5 357 900c237 216 557 324 95" "8 325 189-1 389-27 600-77 211-52 378-110 503-174q40.5 105 81 210z"; - CPPUNIT_ASSERT_MESSAGE("re-importing '@' from SVG-D", tools::importFromSvgD( aReImport, aExport, false, 0)); + CPPUNIT_ASSERT_MESSAGE("re-importing '@' from SVG-D", tools::importFromSvgD( aReImport, aExport, false, nullptr)); CPPUNIT_ASSERT_MESSAGE("re-imported '@' needs to be identical", aReImport == aPoly); CPPUNIT_ASSERT_MESSAGE("exporting '@' to SVG-D", aExport.equalsAscii(sExportString1)); CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D (round-trip", - tools::importFromSvgD( aPoly, aExport, false, 0 )); + tools::importFromSvgD( aPoly, aExport, false, nullptr )); aExport = tools::exportToSvgD( aPoly, true, true, false ); CPPUNIT_ASSERT_MESSAGE("exporting '@' to SVG-D (round-trip)", aExport.equalsAscii(sExportString1)); CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D", - tools::importFromSvgD( aPoly, aPath3, false, 0 )); + tools::importFromSvgD( aPoly, aPath3, false, nullptr )); aExport = tools::exportToSvgD( aPoly, true, true, false ); const char* sExportString2 = "m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293" @@ -239,7 +239,7 @@ public: CPPUNIT_ASSERT_MESSAGE("exporting complex polygon to SVG-D", aExport.equalsAscii(sExportString2)); CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D (round-trip", - tools::importFromSvgD( aPoly, aExport, false, 0 )); + tools::importFromSvgD( aPoly, aExport, false, nullptr )); aExport = tools::exportToSvgD( aPoly, true, true, false ); CPPUNIT_ASSERT_MESSAGE("exporting complex polygon to SVG-D (round-trip)", aExport.equalsAscii(sExportString2)); diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx index 406f6b23737e..d1104682f910 100644 --- a/basegfx/test/boxclipper.cxx +++ b/basegfx/test/boxclipper.cxx @@ -163,7 +163,7 @@ public: B2DPolyPolygon randomPoly; tools::importFromSvgD( randomPoly, - OUString::createFromAscii(randomSvg), false, 0); + OUString::createFromAscii(randomSvg), false, nullptr); for (auto const& aPolygon : randomPoly) aRandomIntersections.appendElement(aPolygon.getB2DRange(), B2VectorOrientation::Negative); #endif @@ -225,14 +225,14 @@ public: B2DPolyPolygon aTmp1; CPPUNIT_ASSERT_MESSAGE(sName, tools::importFromSvgD( - aTmp1, OUString::createFromAscii(sSvg), false, 0)); + aTmp1, OUString::createFromAscii(sSvg), false, nullptr)); const OUString aSvg= tools::exportToSvgD(toTest.solveCrossovers(), true, true, false); B2DPolyPolygon aTmp2; CPPUNIT_ASSERT_MESSAGE(sName, tools::importFromSvgD( - aTmp2, aSvg, false, 0)); + aTmp2, aSvg, false, nullptr)); CPPUNIT_ASSERT_MESSAGE( sName, diff --git a/basegfx/test/clipstate.cxx b/basegfx/test/clipstate.cxx index 3a9fcc696782..1414a86aac25 100644 --- a/basegfx/test/clipstate.cxx +++ b/basegfx/test/clipstate.cxx @@ -101,14 +101,14 @@ public: B2DPolyPolygon aTmp1; CPPUNIT_ASSERT_MESSAGE(sName, tools::importFromSvgD( - aTmp1, OUString::createFromAscii(sSvg), false, 0)); + aTmp1, OUString::createFromAscii(sSvg), false, nullptr)); const OUString aSvg= tools::exportToSvgD(toTest.getClipPoly(), true, true, false); B2DPolyPolygon aTmp2; CPPUNIT_ASSERT_MESSAGE(sName, tools::importFromSvgD( - aTmp2, aSvg, false, 0)); + aTmp2, aSvg, false, nullptr)); CPPUNIT_ASSERT_MESSAGE( sName, @@ -139,7 +139,7 @@ public: B2DPolyPolygon aTmp1; tools::importFromSvgD( - aTmp1, OUString::createFromAscii(unionSvg), false, 0); + aTmp1, OUString::createFromAscii(unionSvg), false, nullptr); aMixedClip.intersectPolyPolygon(aTmp1); aMixedClip.subtractRange(B2DRange(-20,-150,20,0)); diff --git a/basegfx/test/genericclipper.cxx b/basegfx/test/genericclipper.cxx index f91ec98dd7f9..4a7020e37f44 100644 --- a/basegfx/test/genericclipper.cxx +++ b/basegfx/test/genericclipper.cxx @@ -135,8 +135,8 @@ public: OUString aValid=OUString::createFromAscii(pValidSvgD); B2DPolyPolygon aInputPoly, aValidPoly; - tools::importFromSvgD(aInputPoly, aInput, false, NULL); - tools::importFromSvgD(aValidPoly, aValid, false, NULL); + tools::importFromSvgD(aInputPoly, aInput, false, nullptr); + tools::importFromSvgD(aValidPoly, aValid, false, nullptr); CPPUNIT_ASSERT_MESSAGE( pName, diff --git a/include/basegfx/polygon/b2dlinegeometry.hxx b/include/basegfx/polygon/b2dlinegeometry.hxx index 5002dfc83d5f..a3de97c62968 100644 --- a/include/basegfx/polygon/b2dlinegeometry.hxx +++ b/include/basegfx/polygon/b2dlinegeometry.hxx @@ -77,7 +77,7 @@ namespace basegfx double fWidth, double fCandidateLength = 0.0, // 0.0 -> calculate self double fDockingPosition = 0.5, // 0->top, 1->bottom - double* pConsumedLength = 0L, + double* pConsumedLength = nullptr, double fShift = 0.0); /** create filled polygon geometry for lines with a line width diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx index 3edf22e1a100..70853afa137e 100644 --- a/include/basegfx/polygon/b2dpolygontools.hxx +++ b/include/basegfx/polygon/b2dpolygontools.hxx @@ -147,7 +147,7 @@ namespace basegfx const B2DPoint& rEdge1Start, const B2DVector& rEdge1Delta, const B2DPoint& rEdge2Start, const B2DVector& rEdge2Delta, CutFlagValue aCutFlags = CutFlagValue::DEFAULT, - double* pCut1 = 0L, double* pCut2 = 0L); + double* pCut1 = nullptr, double* pCut2 = nullptr); // test if point is on the given edge in range ]0.0..1.0[ without // the start/end points. If so, return true and put the parameter @@ -156,7 +156,7 @@ namespace basegfx const B2DPoint& rPoint, const B2DPoint& rEdgeStart, const B2DVector& rEdgeDelta, - double* pCut = 0L); + double* pCut = nullptr); /** Apply given LineDashing to given polygon @@ -195,7 +195,7 @@ namespace basegfx const B2DPolygon& rCandidate, const ::std::vector& rDotDashArray, B2DPolyPolygon* pLineTarget, - B2DPolyPolygon* pGapTarget = 0, + B2DPolyPolygon* pGapTarget = nullptr, double fFullDashDotLen = 0.0); // test if point is inside epsilon-range around an edge defined diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx index 4059e22e35bb..8d5d50f9afda 100644 --- a/include/basegfx/polygon/b2dpolypolygontools.hxx +++ b/include/basegfx/polygon/b2dpolypolygontools.hxx @@ -95,7 +95,7 @@ namespace basegfx const B2DPolyPolygon& rCandidate, const ::std::vector& rDotDashArray, B2DPolyPolygon* pLineTarget, - B2DPolyPolygon* pGapTarget = 0, + B2DPolyPolygon* pGapTarget = nullptr, double fFullDashDotLen = 0.0); // test if point is inside epsilon-range around the given PolyPolygon. Can be used diff --git a/include/basegfx/polygon/b3dpolygontools.hxx b/include/basegfx/polygon/b3dpolygontools.hxx index 49ba730555e1..d6e01ef05e7e 100644 --- a/include/basegfx/polygon/b3dpolygontools.hxx +++ b/include/basegfx/polygon/b3dpolygontools.hxx @@ -66,7 +66,7 @@ namespace basegfx const B3DPolygon& rCandidate, const ::std::vector& rDotDashArray, B3DPolyPolygon* pLineTarget, - B3DPolyPolygon* pGapTarget = 0, + B3DPolyPolygon* pGapTarget = nullptr, double fFullDashDotLen = 0.0); /** Create/replace normals for given 3d geometry with default normals from given center to outside. -- cgit