summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:12:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:20 +0100
commit311fd06af4e297fa748684a61edd3ee38845c485 (patch)
tree6d161a26bd958bf86971d322a7c70d8e9b5e5fdb
parentc0bd59c15b4a6e8523693c8a354456b9fadb8832 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I68f6c78d1a539a960efbcf81be1e5b2bd26c2bc5
-rw-r--r--cppcanvas/source/mtfrenderer/bitmapaction.cxx6
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx58
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx14
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx6
-rw-r--r--cppcanvas/source/mtfrenderer/transparencygroupaction.cxx4
-rw-r--r--cppcanvas/source/tools/canvasgraphichelper.cxx4
-rw-r--r--cppcanvas/source/uno/uno_mtfrenderer.cxx2
-rw-r--r--cppcanvas/source/wrapper/basegfxfactory.cxx12
-rw-r--r--cppcanvas/source/wrapper/implbitmap.cxx8
-rw-r--r--cppcanvas/source/wrapper/implcanvas.cxx2
-rw-r--r--cppcanvas/source/wrapper/implcustomsprite.cxx2
-rw-r--r--cppcanvas/source/wrapper/implfont.cxx2
-rw-r--r--cppcanvas/source/wrapper/implpolypolygon.cxx4
-rw-r--r--cppcanvas/source/wrapper/vclfactory.cxx4
14 files changed, 64 insertions, 64 deletions
diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
index b233d43328e1..941690c03069 100644
--- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx
+++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx
@@ -103,8 +103,8 @@ namespace cppcanvas
rState,
rCanvas,
rDstPoint,
- NULL,
- NULL );
+ nullptr,
+ nullptr );
}
BitmapAction::BitmapAction( const ::BitmapEx& rBmpEx,
@@ -137,7 +137,7 @@ namespace cppcanvas
rCanvas,
rDstPoint,
&aScale,
- NULL );
+ nullptr );
}
bool BitmapAction::renderPrimitive( uno::Reference< rendering::XCachedPrimitive >& rCachedPrimitive,
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index e26e8f9d6587..1438c18c50ed 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -252,7 +252,7 @@ namespace cppcanvas
if (!bLines)
pPointTypes = new sal_uInt8 [_nPoints];
else
- pPointTypes = NULL;
+ pPointTypes = nullptr;
}
virtual ~EMFPPath ()
@@ -393,9 +393,9 @@ namespace cppcanvas
EMFPRegion ()
: parts(0)
- , combineMode(NULL)
+ , combineMode(nullptr)
, initialState(0)
- , initialPath(NULL)
+ , initialPath(nullptr)
, ix(0.0)
, iy(0.0)
, iw(0.0)
@@ -407,11 +407,11 @@ namespace cppcanvas
{
if (combineMode) {
delete [] combineMode;
- combineMode = NULL;
+ combineMode = nullptr;
}
if (initialPath) {
delete initialPath;
- initialPath = NULL;
+ initialPath = nullptr;
}
}
@@ -475,39 +475,39 @@ namespace cppcanvas
, areaHeight(0.0)
, hasTransformation(false)
, blendPoints(0)
- , blendPositions(NULL)
- , blendFactors(NULL)
+ , blendPositions(nullptr)
+ , blendFactors(nullptr)
, colorblendPoints(0)
- , colorblendPositions(NULL)
- , colorblendColors(NULL)
+ , colorblendPositions(nullptr)
+ , colorblendColors(nullptr)
, surroundColorsNumber(0)
- , surroundColors(NULL)
- , path(NULL)
+ , surroundColors(nullptr)
+ , path(nullptr)
, hatchStyle(HatchStyleHorizontal)
{
}
virtual ~EMFPBrush ()
{
- if (blendPositions != NULL) {
+ if (blendPositions != nullptr) {
delete[] blendPositions;
- blendPositions = NULL;
+ blendPositions = nullptr;
}
- if (colorblendPositions != NULL) {
+ if (colorblendPositions != nullptr) {
delete[] colorblendPositions;
- colorblendPositions = NULL;
+ colorblendPositions = nullptr;
}
- if (colorblendColors != NULL) {
+ if (colorblendColors != nullptr) {
delete[] colorblendColors;
- colorblendColors = NULL;
+ colorblendColors = nullptr;
}
- if (surroundColors != NULL) {
+ if (surroundColors != nullptr) {
delete[] surroundColors;
- surroundColors = NULL;
+ surroundColors = nullptr;
}
if (path) {
delete path;
- path = NULL;
+ path = nullptr;
}
}
@@ -912,14 +912,14 @@ namespace cppcanvas
, dashCap(0)
, dashOffset(0.0)
, dashPatternLen(0)
- , dashPattern(NULL)
+ , dashPattern(nullptr)
, alignment(0)
, compoundArrayLen(0)
- , compoundArray(NULL)
+ , compoundArray(nullptr)
, customStartCapLen(0)
- , customStartCap(NULL)
+ , customStartCap(nullptr)
, customEndCapLen(0)
- , customEndCap(NULL)
+ , customEndCap(nullptr)
{
}
@@ -953,7 +953,7 @@ namespace cppcanvas
const float dashdotdot[] = {3, 3, 1, 3, 1, 3};
sal_Int32 nLen = 0;
- const float *pPattern = NULL;
+ const float *pPattern = nullptr;
switch (dashStyle)
{
case EmfPlusLineStyleDash: nLen = SAL_N_ELEMENTS(dash); pPattern = dash; break;
@@ -1675,9 +1675,9 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "EMF+ Object slot: " << (flags & 0xff) << " flags: " << (flags & 0xff00));
index = flags & 0xff;
- if (aObjects [index] != NULL) {
+ if (aObjects [index] != nullptr) {
delete aObjects [index];
- aObjects [index] = NULL;
+ aObjects [index] = nullptr;
}
switch (flags & 0x7f00) {
@@ -2189,7 +2189,7 @@ namespace cppcanvas
text,
0,
stringLength,
- NULL,
+ nullptr,
rFactoryParms.mrVDev,
rFactoryParms.mrCanvas,
rState,
@@ -2446,7 +2446,7 @@ namespace cppcanvas
text,
0,
glyphsCount,
- NULL,
+ nullptr,
rFactoryParms.mrVDev,
rFactoryParms.mrCanvas,
rState,
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index c536b7f4731e..c9871bd9fba9 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -423,7 +423,7 @@ namespace cppcanvas
"ImplRenderer::skipContent(): NULL string given" );
MetaAction* pCurrAct;
- while( (pCurrAct=rMtf.NextAction()) != NULL )
+ while( (pCurrAct=rMtf.NextAction()) != nullptr )
{
// increment action index, we've skipped an action.
++io_rCurrActionIndex;
@@ -455,7 +455,7 @@ namespace cppcanvas
sal_uIntPtr nPos( 1 );
MetaAction* pCurrAct;
- while( (pCurrAct=rMtf.NextAction()) != NULL )
+ while( (pCurrAct=rMtf.NextAction()) != nullptr )
{
if( pCurrAct->GetType() == nType )
{
@@ -1619,10 +1619,10 @@ namespace cppcanvas
// Handle gradients
if (pAct->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN"))
{
- MetaGradientExAction* pGradAction = NULL;
+ MetaGradientExAction* pGradAction = nullptr;
bool bDone( false );
while( !bDone &&
- (pCurrAct=rMtf.NextAction()) != NULL )
+ (pCurrAct=rMtf.NextAction()) != nullptr )
{
switch( pCurrAct->GetType() )
{
@@ -2488,7 +2488,7 @@ namespace cppcanvas
sText,
pAct->GetIndex(),
nLen,
- NULL,
+ nullptr,
rFactoryParms,
bSubsettableActions );
}
@@ -2890,14 +2890,14 @@ namespace cppcanvas
SAL_INFO( "cppcanvas.emf", "::cppcanvas::internal::ImplRenderer::ImplRenderer(mtf)" );
- OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas.get() != nullptr && rCanvas->getUNOCanvas().is(),
"ImplRenderer::ImplRenderer(): Invalid canvas" );
OSL_ENSURE( rCanvas->getUNOCanvas()->getDevice().is(),
"ImplRenderer::ImplRenderer(): Invalid graphic device" );
// make sure canvas and graphic device are valid; action
// creation don't check that every time
- if( rCanvas.get() == NULL ||
+ if( rCanvas.get() == nullptr ||
!rCanvas->getUNOCanvas().is() ||
!rCanvas->getUNOCanvas()->getDevice().is() )
{
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 01dc843b2834..79e05cec23d7 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -73,7 +73,7 @@ namespace cppcanvas
rState,
rCanvas,
rStartPoint,
- NULL,
+ nullptr,
&rState.fontRotation );
basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createRotateB2DHomMatrix(rState.fontRotation));
@@ -1064,7 +1064,7 @@ namespace cppcanvas
nLen,
rOffsets,
rCanvas,
- rState, NULL );
+ rState, nullptr );
}
TextArrayAction::TextArrayAction( const ::basegfx::B2DPoint& rStartPoint,
@@ -1282,7 +1282,7 @@ namespace cppcanvas
nLen,
rOffsets,
rCanvas,
- rState, NULL );
+ rState, nullptr );
}
EffectTextArrayAction::EffectTextArrayAction( const ::basegfx::B2DPoint& rStartPoint,
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index f516ee8ff419..11885b00dea0 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -167,8 +167,8 @@ namespace cppcanvas
rState,
rCanvas,
rDstPoint,
- NULL,
- NULL );
+ nullptr,
+ nullptr );
maLastSubset.mnSubsetBegin = 0;
maLastSubset.mnSubsetEnd = -1;
diff --git a/cppcanvas/source/tools/canvasgraphichelper.cxx b/cppcanvas/source/tools/canvasgraphichelper.cxx
index e766cc451d65..795d4a2056a4 100644
--- a/cppcanvas/source/tools/canvasgraphichelper.cxx
+++ b/cppcanvas/source/tools/canvasgraphichelper.cxx
@@ -46,11 +46,11 @@ namespace cppcanvas
mpCanvas( rParentCanvas ),
mxGraphicDevice()
{
- OSL_ENSURE( mpCanvas.get() != NULL &&
+ OSL_ENSURE( mpCanvas.get() != nullptr &&
mpCanvas->getUNOCanvas().is(),
"CanvasGraphicHelper::CanvasGraphicHelper: no valid canvas" );
- if( mpCanvas.get() != NULL &&
+ if( mpCanvas.get() != nullptr &&
mpCanvas->getUNOCanvas().is() )
{
mxGraphicDevice = mpCanvas->getUNOCanvas()->getDevice();
diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx
index 5360c618a2c9..576a22f4f612 100644
--- a/cppcanvas/source/uno/uno_mtfrenderer.cxx
+++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx
@@ -38,7 +38,7 @@ void MtfRenderer::setFastPropertyValue( sal_Int32 nHandle, const uno::Any& aAny)
}
}
-MtfRenderer::MtfRenderer (uno::Sequence<uno::Any> const& aArgs, uno::Reference<uno::XComponentContext> const&) : MtfRendererBase (m_aMutex), mpMetafile (NULL)
+MtfRenderer::MtfRenderer (uno::Sequence<uno::Any> const& aArgs, uno::Reference<uno::XComponentContext> const&) : MtfRendererBase (m_aMutex), mpMetafile (nullptr)
{
if( aArgs.getLength() == 1 ) {
aArgs[0] >>= mxCanvas;
diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx
index f72394be8252..04be736c272a 100644
--- a/cppcanvas/source/wrapper/basegfxfactory.cxx
+++ b/cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -47,11 +47,11 @@ namespace cppcanvas
PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2DPolygon& rPoly )
{
- OSL_ENSURE( rCanvas.get() != NULL &&
+ OSL_ENSURE( rCanvas.get() != nullptr &&
rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createPolyPolygon(): Invalid canvas" );
- if( rCanvas.get() == NULL )
+ if( rCanvas.get() == nullptr )
return PolyPolygonSharedPtr();
uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() );
@@ -68,11 +68,11 @@ namespace cppcanvas
BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize )
{
- OSL_ENSURE( rCanvas.get() != NULL &&
+ OSL_ENSURE( rCanvas.get() != nullptr &&
rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createBitmap(): Invalid canvas" );
- if( rCanvas.get() == NULL )
+ if( rCanvas.get() == nullptr )
return BitmapSharedPtr();
uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() );
@@ -88,11 +88,11 @@ namespace cppcanvas
BitmapSharedPtr BaseGfxFactory::createAlphaBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize )
{
- OSL_ENSURE( rCanvas.get() != NULL &&
+ OSL_ENSURE( rCanvas.get() != nullptr &&
rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createBitmap(): Invalid canvas" );
- if( rCanvas.get() == NULL )
+ if( rCanvas.get() == nullptr )
return BitmapSharedPtr();
uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() );
diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx
index a95a36f250ea..281a76bdc998 100644
--- a/cppcanvas/source/wrapper/implbitmap.cxx
+++ b/cppcanvas/source/wrapper/implbitmap.cxx
@@ -57,11 +57,11 @@ namespace cppcanvas
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != NULL &&
+ OSL_ENSURE( pCanvas.get() != nullptr &&
pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
- if( pCanvas.get() == NULL ||
+ if( pCanvas.get() == nullptr ||
!pCanvas->getUNOCanvas().is() )
{
return false;
@@ -79,11 +79,11 @@ namespace cppcanvas
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != NULL &&
+ OSL_ENSURE( pCanvas.get() != nullptr &&
pCanvas->getUNOCanvas().is(),
"ImplBitmap::drawAlphaModulated(): invalid canvas" );
- if( pCanvas.get() == NULL ||
+ if( pCanvas.get() == nullptr ||
!pCanvas->getUNOCanvas().is() )
{
return false;
diff --git a/cppcanvas/source/wrapper/implcanvas.cxx b/cppcanvas/source/wrapper/implcanvas.cxx
index a4f902bbcbf3..f3e5f49e8980 100644
--- a/cppcanvas/source/wrapper/implcanvas.cxx
+++ b/cppcanvas/source/wrapper/implcanvas.cxx
@@ -81,7 +81,7 @@ namespace cppcanvas
::basegfx::B2DPolyPolygon const* ImplCanvas::getClip() const
{
- return !maClipPolyPolygon ? NULL : &(*maClipPolyPolygon);
+ return !maClipPolyPolygon ? nullptr : &(*maClipPolyPolygon);
}
ColorSharedPtr ImplCanvas::createColor() const
diff --git a/cppcanvas/source/wrapper/implcustomsprite.cxx b/cppcanvas/source/wrapper/implcustomsprite.cxx
index 24aa95a47621..17ce28b61942 100644
--- a/cppcanvas/source/wrapper/implcustomsprite.cxx
+++ b/cppcanvas/source/wrapper/implcustomsprite.cxx
@@ -60,7 +60,7 @@ namespace cppcanvas
return CanvasSharedPtr();
// cache content canvas C++ wrapper
- if( mpLastCanvas.get() == NULL ||
+ if( mpLastCanvas.get() == nullptr ||
mpLastCanvas->getUNOCanvas() != xCanvas )
{
mpLastCanvas = CanvasSharedPtr( new ImplCanvas( xCanvas ) );
diff --git a/cppcanvas/source/wrapper/implfont.cxx b/cppcanvas/source/wrapper/implfont.cxx
index 50b851063f6f..3fe7aaee4623 100644
--- a/cppcanvas/source/wrapper/implfont.cxx
+++ b/cppcanvas/source/wrapper/implfont.cxx
@@ -35,7 +35,7 @@ namespace cppcanvas
const OUString& rFontName,
const double& rCellSize ) :
mxCanvas( rCanvas ),
- mxFont( NULL )
+ mxFont( nullptr )
{
OSL_ENSURE( mxCanvas.is(), "ImplFont::ImplFont(): Invalid Canvas" );
diff --git a/cppcanvas/source/wrapper/implpolypolygon.cxx b/cppcanvas/source/wrapper/implpolypolygon.cxx
index ed0c4dbd5a89..ddd3be37fddc 100644
--- a/cppcanvas/source/wrapper/implpolypolygon.cxx
+++ b/cppcanvas/source/wrapper/implpolypolygon.cxx
@@ -96,11 +96,11 @@ namespace cppcanvas
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != NULL &&
+ OSL_ENSURE( pCanvas.get() != nullptr &&
pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
- if( pCanvas.get() == NULL ||
+ if( pCanvas.get() == nullptr ||
!pCanvas->getUNOCanvas().is() )
return false;
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index 338daa4ba731..4715e790d83e 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -69,11 +69,11 @@ namespace cppcanvas
BitmapSharedPtr VCLFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::BitmapEx& rBmpEx )
{
- OSL_ENSURE( rCanvas.get() != NULL &&
+ OSL_ENSURE( rCanvas.get() != nullptr &&
rCanvas->getUNOCanvas().is(),
"VCLFactory::createBitmap(): Invalid canvas" );
- if( rCanvas.get() == NULL )
+ if( rCanvas.get() == nullptr )
return BitmapSharedPtr();
uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() );