summaryrefslogtreecommitdiff
path: root/cppcanvas/source/mtfrenderer
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 /cppcanvas/source/mtfrenderer
parentc0bd59c15b4a6e8523693c8a354456b9fadb8832 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I68f6c78d1a539a960efbcf81be1e5b2bd26c2bc5
Diffstat (limited to 'cppcanvas/source/mtfrenderer')
-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
5 files changed, 44 insertions, 44 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;