summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:23:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:39 +0100
commitb6fe760beb512cafdb5e6fa5b03b3ed8746b612c (patch)
treed837c6d2b02f756c977168c019ad6c21a087d55e /slideshow
parent7a8d48f57d106005be80e37ac74e8e2544ad83fe (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ief4dd31d68bd7c8e45070eea689d07057449ce77
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx2
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx6
-rw-r--r--slideshow/source/engine/animationfactory.cxx2
-rw-r--r--slideshow/source/engine/animationnodes/basenode.cxx6
-rw-r--r--slideshow/source/engine/effectrewinder.cxx2
-rw-r--r--slideshow/source/engine/eventmultiplexer.cxx10
-rw-r--r--slideshow/source/engine/eventqueue.cxx4
-rw-r--r--slideshow/source/engine/shapes/drawinglayeranimation.cxx2
-rw-r--r--slideshow/source/engine/shapes/drawshape.cxx4
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx2
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx2
-rw-r--r--slideshow/source/engine/shapes/viewshape.cxx6
-rw-r--r--slideshow/source/engine/sp_debug.cxx4
-rw-r--r--slideshow/source/engine/transitions/shapetransitionfactory.cxx4
-rw-r--r--slideshow/source/engine/transitions/slidetransitionfactory.cxx6
-rw-r--r--slideshow/source/engine/transitions/transitionfactorytab.cxx2
16 files changed, 32 insertions, 32 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index f3897e7974b6..cf79ead9ad27 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -1689,7 +1689,7 @@ void VortexTransition::prepare( double, double, double, double, double )
CHECK_GL_ERROR();
glEnableVertexAttribArray(mnTileInfoLocation);
CHECK_GL_ERROR();
- glVertexAttribPointer(mnTileInfoLocation, 1, GL_FLOAT, GL_FALSE, 0, 0);
+ glVertexAttribPointer(mnTileInfoLocation, 1, GL_FLOAT, GL_FALSE, 0, nullptr);
CHECK_GL_ERROR();
glBindBuffer(GL_ARRAY_BUFFER, 0);
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 3c970e961bfe..be0686c82325 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -580,7 +580,7 @@ void OGLTransitionerImpl::createTexture( GLuint* texID,
if( usePixmap ) {
if( mbGenerateMipmap )
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, True);
- glXBindTexImageEXT (mpContext->getOpenGLWindow().dpy, pixmap, GLX_FRONT_LEFT_EXT, NULL);
+ glXBindTexImageEXT (mpContext->getOpenGLWindow().dpy, pixmap, GLX_FRONT_LEFT_EXT, nullptr);
if( mbGenerateMipmap && useMipmap ) {
SAL_INFO("slideshow.opengl", "use mipmaps");
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -1050,7 +1050,7 @@ void OGLTransitionerImpl::prepareEnvironment()
const OGLFormat* OGLTransitionerImpl::chooseFormats()
{
- const OGLFormat* pDetectedFormat=NULL;
+ const OGLFormat* pDetectedFormat=nullptr;
uno::Reference<rendering::XIntegerBitmapColorSpace> xIntColorSpace(
maSlideBitmapLayout.ColorSpace);
@@ -1184,7 +1184,7 @@ void OGLTransitionerImpl::GLInitSlides()
mpContext->makeCurrent();
prepareEnvironment();
- const OGLFormat* pFormat = NULL;
+ const OGLFormat* pFormat = nullptr;
if( !mbUseLeavingPixmap || !mbUseEnteringPixmap )
pFormat = chooseFormats();
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx
index 55f3f2f52f2e..8ef5f60e3ed5 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -225,7 +225,7 @@ namespace slideshow
::basegfx::B2DPolyPolygon aPolyPoly;
- ENSURE_OR_THROW( ::basegfx::tools::importFromSvgD( aPolyPoly, rSVGDPath, false, 0 ),
+ ENSURE_OR_THROW( ::basegfx::tools::importFromSvgD( aPolyPoly, rSVGDPath, false, nullptr ),
"PathAnimation::PathAnimation(): failed to parse SVG:d path" );
ENSURE_OR_THROW( aPolyPoly.count() == 1,
"PathAnimation::PathAnimation(): motion path consists of multiple/zero polygon(s)" );
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index 778a2088bf20..5e0b3fb868a0 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -318,7 +318,7 @@ BaseNode::BaseNode( const uno::Reference< animations::XAnimationNode >& xNode,
mxAnimationNode( xNode ),
mpParent( rParent ),
mpSelf(),
- mpStateTransitionTable( NULL ),
+ mpStateTransitionTable( nullptr ),
mnStartDelay( rContext.mnStartDelay ),
meCurrState( UNRESOLVED ),
meCurrentStateTransition( 0 ),
@@ -386,7 +386,7 @@ sal_Int16 BaseNode::getFillDefaultMode() const
{
sal_Int16 nFillDefault = mxAnimationNode->getFillDefault();
if (nFillDefault == animations::AnimationFill::DEFAULT) {
- nFillDefault = (mpParent != 0
+ nFillDefault = (mpParent != nullptr
? mpParent->getFillDefaultMode()
: animations::AnimationFill::AUTO);
}
@@ -397,7 +397,7 @@ sal_Int16 BaseNode::getRestartDefaultMode() const
{
sal_Int16 nRestartDefaultMode = mxAnimationNode->getRestartDefault();
if (nRestartDefaultMode == animations::AnimationRestart::DEFAULT) {
- nRestartDefaultMode = (mpParent != 0
+ nRestartDefaultMode = (mpParent != nullptr
? mpParent->getRestartDefaultMode()
: animations::AnimationRestart::ALWAYS);
}
diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx
index a84b6fd38df4..6c55a1178253 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -221,7 +221,7 @@ bool EffectRewinder::rewind (
if (mpAsynchronousRewindEvent)
mrEventQueue.addEvent(mpAsynchronousRewindEvent);
- return mpAsynchronousRewindEvent.get()!=NULL;
+ return mpAsynchronousRewindEvent.get()!=nullptr;
}
diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx
index fbdc88a71a66..95eb58d5e25c 100644
--- a/slideshow/source/engine/eventmultiplexer.cxx
+++ b/slideshow/source/engine/eventmultiplexer.cxx
@@ -318,8 +318,8 @@ struct EventMultiplexerImpl
void SAL_CALL EventMultiplexerListener::disposing()
{
osl::MutexGuard const guard( m_aMutex );
- mpEventQueue = NULL;
- mpEventMultiplexer = NULL;
+ mpEventQueue = nullptr;
+ mpEventMultiplexer = nullptr;
}
void SAL_CALL EventMultiplexerListener::disposing(
@@ -902,7 +902,7 @@ void EventMultiplexer::addClickHandler(
rHandler,
nPriority,
mpImpl->isMouseListenerRegistered()
- ? NULL
+ ? nullptr
: &presentation::XSlideShowView::addMouseListener );
}
@@ -927,7 +927,7 @@ void EventMultiplexer::addDoubleClickHandler(
rHandler,
nPriority,
mpImpl->isMouseListenerRegistered()
- ? NULL
+ ? nullptr
: &presentation::XSlideShowView::addMouseListener );
}
@@ -953,7 +953,7 @@ void EventMultiplexer::addMouseMoveHandler(
nPriority,
mpImpl->maMouseMoveHandlers.isEmpty()
? &presentation::XSlideShowView::addMouseMotionListener
- : NULL );
+ : nullptr );
}
void EventMultiplexer::removeMouseMoveHandler(
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index b69f0d8d2183..d83fdc2f2194 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -120,7 +120,7 @@ namespace slideshow
<< " with delay " << rEvent->getActivationTime(0.0)
);
- ENSURE_OR_RETURN_FALSE( rEvent.get() != NULL,
+ ENSURE_OR_RETURN_FALSE( rEvent.get() != nullptr,
"EventQueue::addEvent: event ptr NULL" );
maNextEvents.push_back(
EventEntry( rEvent, rEvent->getActivationTime(
@@ -139,7 +139,7 @@ namespace slideshow
);
ENSURE_OR_RETURN_FALSE(
- rpEvent.get() != NULL,
+ rpEvent.get() != nullptr,
"EventQueue::addEvent: event ptr NULL");
maNextNextEvents.push(
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index e0fd273de977..5804f7e03c87 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -542,7 +542,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
ScrollTextAnimNode* ActivityImpl::ImpGetScrollTextAnimNode(
sal_uInt32 nTime, sal_uInt32& rRelativeTime )
{
- ScrollTextAnimNode* pRetval = 0L;
+ ScrollTextAnimNode* pRetval = nullptr;
ImpForceScrollTextAnimNodes();
if(!maVector.empty())
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index e5329c1ba278..16b157951e50 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -862,7 +862,7 @@ namespace slideshow
sal_Int32 nIndex = 0;
for ( MetaAction * pCurrAct = mpCurrMtf->FirstAction();
- pCurrAct != 0; pCurrAct = mpCurrMtf->NextAction() )
+ pCurrAct != nullptr; pCurrAct = mpCurrMtf->NextAction() )
{
if (pCurrAct->GetType() == MetaActionType::COMMENT) {
MetaCommentAction * pAct =
@@ -872,7 +872,7 @@ namespace slideshow
// e.g. date field doesn't have data!
// currently assuming that only url field, this is
// somehow fragile! xxx todo if possible
- pAct->GetData() != 0 &&
+ pAct->GetData() != nullptr &&
pAct->GetDataSize() > 0)
{
if (!maHyperlinkIndices.empty() &&
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 5d3498ffdc89..684c07a57617 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -439,7 +439,7 @@ bool getRectanglesFromScrollMtf( ::basegfx::B2DRectangle& o_rScrollRect,
bool bPaintRectSet(false);
for ( MetaAction * pCurrAct = rMtf->FirstAction();
- pCurrAct != 0; pCurrAct = rMtf->NextAction() )
+ pCurrAct != nullptr; pCurrAct = rMtf->NextAction() )
{
if (pCurrAct->GetType() == MetaActionType::COMMENT)
{
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 291d65216003..e3674d9867f8 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -73,7 +73,7 @@ namespace slideshow
const uno::Reference< drawing::XShape >& rxShape,
const uno::Reference< uno::XComponentContext >& rxContext ) :
mpViewLayer( rViewLayer ),
- mpEventHandlerParent(0),
+ mpEventHandlerParent(nullptr),
maWindowOffset( 0, 0 ),
maBounds(),
mxShape( rxShape ),
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index ed2ac3c2ea98..e9180a774701 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -495,7 +495,7 @@ namespace slideshow
rMtf,
pAttr,
aShapeTransformation,
- NULL, // clipping is done via Sprite::clip()
+ nullptr, // clipping is done via Sprite::clip()
rSubsets );
}
@@ -663,7 +663,7 @@ namespace slideshow
rMtf,
pAttr,
aTransform,
- !aClip ? NULL : &(*aClip),
+ !aClip ? nullptr : &(*aClip),
rSubsets ) )
{
return false;
@@ -707,7 +707,7 @@ namespace slideshow
rMtf,
pAttr,
aTransform,
- !aClip ? NULL : &(*aClip),
+ !aClip ? nullptr : &(*aClip),
rSubsets );
}
diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx
index 38d507a43ab6..e0ecd32c7821 100644
--- a/slideshow/source/engine/sp_debug.cxx
+++ b/slideshow/source/engine/sp_debug.cxx
@@ -88,7 +88,7 @@ static void scan_and_count(void const * area, size_t size, map_type const & m, m
{
shared_ptr_layout const * q = reinterpret_cast<shared_ptr_layout const *>(p);
- if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != 0 && m.count(q->pn.pi) != 0)
+ if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != nullptr && m.count(q->pn.pi) != 0)
{
++m2[q->pn.pi];
}
@@ -105,7 +105,7 @@ static void scan_and_mark(void const * area, size_t size, map2_type & m2, open_t
{
shared_ptr_layout const * q = reinterpret_cast<shared_ptr_layout const *>(p);
- if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != 0 && m2.count(q->pn.pi) != 0)
+ if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != nullptr && m2.count(q->pn.pi) != 0)
{
open.push_back(q->pn.pi);
m2.erase(q->pn.pi);
diff --git a/slideshow/source/engine/transitions/shapetransitionfactory.cxx b/slideshow/source/engine/transitions/shapetransitionfactory.cxx
index 68e5e234aa45..8837ec8e7862 100644
--- a/slideshow/source/engine/transitions/shapetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/shapetransitionfactory.cxx
@@ -208,7 +208,7 @@ AnimationActivitySharedPtr createShapeTransitionByType(
getTransitionInfo( nType, nSubType ) );
AnimationActivitySharedPtr pGeneratedActivity;
- if( pTransitionInfo != NULL )
+ if( pTransitionInfo != nullptr )
{
switch( pTransitionInfo->meTransitionClass )
{
@@ -251,7 +251,7 @@ AnimationActivitySharedPtr createShapeTransitionByType(
const TransitionInfo* pRandomTransitionInfo( getRandomTransitionInfo() );
- ENSURE_OR_THROW( pRandomTransitionInfo != NULL,
+ ENSURE_OR_THROW( pRandomTransitionInfo != nullptr,
"createShapeTransitionByType(): Got invalid random transition info" );
ENSURE_OR_THROW( pRandomTransitionInfo->mnTransitionType != animations::TransitionType::RANDOM,
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index e71592f5d862..e40cd310354f 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -687,7 +687,7 @@ NumberAnimationSharedPtr createPushWipeTransition(
const SoundPlayerSharedPtr& pSoundPlayer )
{
boost::optional<SlideSharedPtr> leavingSlide; // no bitmap
- if (leavingSlide_ && (*leavingSlide_).get() != 0)
+ if (leavingSlide_ && (*leavingSlide_).get() != nullptr)
{
// opt: only page, if we've an
// actual slide to move out here. We
@@ -957,7 +957,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
const TransitionInfo* pTransitionInfo(
getTransitionInfo( nTransitionType, nTransitionSubType ) );
- if( pTransitionInfo != NULL )
+ if( pTransitionInfo != nullptr )
{
switch( pTransitionInfo->meTransitionClass )
{
@@ -1010,7 +1010,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
getRandomTransitionInfo() );
ENSURE_OR_THROW(
- pRandomTransitionInfo != NULL,
+ pRandomTransitionInfo != nullptr,
"TransitionFactory::createSlideTransition(): "
"Got invalid random transition info" );
diff --git a/slideshow/source/engine/transitions/transitionfactorytab.cxx b/slideshow/source/engine/transitions/transitionfactorytab.cxx
index a3d814534255..b17cd6626aa5 100644
--- a/slideshow/source/engine/transitions/transitionfactorytab.cxx
+++ b/slideshow/source/engine/transitions/transitionfactorytab.cxx
@@ -2122,7 +2122,7 @@ const TransitionInfo* getTransitionInfo(
if (pRes != pTableEnd)
return pRes;
else
- return NULL;
+ return nullptr;
}
const TransitionInfo* getRandomTransitionInfo()