diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-12 12:18:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-12 16:06:44 +0100 |
commit | 96ccb9f0689ce9740cf3c0a76a3a1e2c07f53b77 (patch) | |
tree | 52a271d806421112f6707d4fbccc219978c7ffde /slideshow/source/engine/transitions | |
parent | 8dd533aa2c71e80f50a292b07660fb5021716f38 (diff) |
loplugin:reftotemp in slideshow
Change-Id: If01cb31a8dd9a81d62bb7100731d28d33591f76a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176475
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'slideshow/source/engine/transitions')
-rw-r--r-- | slideshow/source/engine/transitions/combtransition.cxx | 24 | ||||
-rw-r--r-- | slideshow/source/engine/transitions/slidechangebase.cxx | 6 |
2 files changed, 15 insertions, 15 deletions
diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx index 88e5c167e4a0..b5685194e4aa 100644 --- a/slideshow/source/engine/transitions/combtransition.cxx +++ b/slideshow/source/engine/transitions/combtransition.cxx @@ -84,10 +84,10 @@ CombTransition::CombTransition( void CombTransition::renderComb( double t, const ViewEntry& rViewEntry ) const { - const SlideBitmapSharedPtr& pEnteringBitmap = getEnteringBitmap(rViewEntry); + const SlideBitmapSharedPtr xEnteringBitmap = getEnteringBitmap(rViewEntry); const cppcanvas::CanvasSharedPtr pCanvas_ = rViewEntry.mpView->getCanvas(); - if( !pEnteringBitmap || !pCanvas_ ) + if( !xEnteringBitmap || !pCanvas_ ) return; // calc bitmap offsets. The enter/leaving bitmaps are only @@ -124,40 +124,40 @@ void CombTransition::renderComb( double t, basegfx::B2DSize(enteringSizePixel.getX(), enteringSizePixel.getY()), mnNumStripes, 1 ); - SlideBitmapSharedPtr const & pLeavingBitmap = getLeavingBitmap(rViewEntry); - if( pLeavingBitmap ) + SlideBitmapSharedPtr const xLeavingBitmap = getLeavingBitmap(rViewEntry); + if( xLeavingBitmap ) { // render odd strips: - pLeavingBitmap->clip( aClipPolygon1 ); + xLeavingBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + (t * aPushDirection) ); pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); - pLeavingBitmap->draw( pCanvas ); + xLeavingBitmap->draw( pCanvas ); // render even strips: - pLeavingBitmap->clip( aClipPolygon2 ); + xLeavingBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin - (t * aPushDirection) ); pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); - pLeavingBitmap->draw( pCanvas ); + xLeavingBitmap->draw( pCanvas ); } // TODO(Q2): Use basegfx bitmaps here // TODO(F1): SlideBitmap is not fully portable between different canvases! // render odd strips: - pEnteringBitmap->clip( aClipPolygon1 ); + xEnteringBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + ((t - 1.0) * aPushDirection) ); pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); - pEnteringBitmap->draw( pCanvas ); + xEnteringBitmap->draw( pCanvas ); // render even strips: - pEnteringBitmap->clip( aClipPolygon2 ); + xEnteringBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + ((1.0 - t) * aPushDirection) ); pCanvas->setTransformation(basegfx::utils::createTranslateB2DHomMatrix(p.getX(), p.getY())); - pEnteringBitmap->draw( pCanvas ); + xEnteringBitmap->draw( pCanvas ); } bool CombTransition::operator()( double t ) diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index 2fcadf10b647..a04c7bb418bf 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -270,7 +270,7 @@ bool SlideChangeBase::operator()( double nValue ) // (i.e. pixel). ViewEntry& rViewEntry( maViewData[i] ); - const ::cppcanvas::CanvasSharedPtr& rCanvas( rViewEntry.mpView->getCanvas() ); + const ::cppcanvas::CanvasSharedPtr xCanvas( rViewEntry.mpView->getCanvas() ); ::cppcanvas::CustomSpriteSharedPtr& rInSprite( rViewEntry.mpInSprite ); ::cppcanvas::CustomSpriteSharedPtr& rOutSprite( rViewEntry.mpOutSprite ); @@ -331,9 +331,9 @@ bool SlideChangeBase::operator()( double nValue ) } if( rOutSprite ) - performOut( rOutSprite, rViewEntry, rCanvas, nValue ); + performOut( rOutSprite, rViewEntry, xCanvas, nValue ); if( rInSprite ) - performIn( rInSprite, rViewEntry, rCanvas, nValue ); + performIn( rInSprite, rViewEntry, xCanvas, nValue ); // finishing deeds for first run. if( !mbSpritesVisible) |