Kaydet (Commit) b6fe760b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite)

Change-Id: Ief4dd31d68bd7c8e45070eea689d07057449ce77
üst 7a8d48f5
......@@ -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);
......
......@@ -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();
......
......@@ -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)" );
......
......@@ -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);
}
......
......@@ -221,7 +221,7 @@ bool EffectRewinder::rewind (
if (mpAsynchronousRewindEvent)
mrEventQueue.addEvent(mpAsynchronousRewindEvent);
return mpAsynchronousRewindEvent.get()!=NULL;
return mpAsynchronousRewindEvent.get()!=nullptr;
}
......
......@@ -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(
......
......@@ -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(
......
......@@ -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())
......
......@@ -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() &&
......
......@@ -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)
{
......
......@@ -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 ),
......
......@@ -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 );
}
......
......@@ -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);
......
......@@ -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,
......
......@@ -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" );
......
......@@ -2122,7 +2122,7 @@ const TransitionInfo* getTransitionInfo(
if (pRes != pTableEnd)
return pRes;
else
return NULL;
return nullptr;
}
const TransitionInfo* getRandomTransitionInfo()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment