summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-16 15:23:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 08:25:47 +0200
commitccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch)
tree2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /sd/source/ui/slideshow
parentda5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff)
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/slideshow')
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx5
-rw-r--r--sd/source/ui/slideshow/slideshowviewimpl.cxx42
3 files changed, 27 insertions, 22 deletions
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index abe81bd05ae3..edbd197f4342 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -948,7 +948,7 @@ void SlideShow::activate( ViewShellBase& rBase )
if( (mpFullScreenViewShellBase == &rBase) && !mxController.is() )
{
::std::shared_ptr<PresentationViewShell> pShell = std::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell());
- if(pShell.get() != nullptr)
+ if (pShell != nullptr)
{
pShell->FinishInitialization( mpFullScreenFrameView );
mpFullScreenFrameView = nullptr;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index eef3ea1f6251..32b271647157 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1923,7 +1923,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void)
{
mnContextMenuEvent = nullptr;
- if( mpSlideController.get() == nullptr )
+ if (mpSlideController == nullptr)
return;
mbWasPaused = mbIsPaused;
@@ -2568,7 +2568,8 @@ sal_Int32 SAL_CALL SlideshowImpl::getCurrentSlideIndex()
Reference< XDrawPage > SAL_CALL SlideshowImpl::getSlideByIndex(::sal_Int32 Index)
{
- if( (mpSlideController.get() == nullptr ) || (Index < 0) || (Index >= mpSlideController->getSlideIndexCount() ) )
+ if ((mpSlideController == nullptr) || (Index < 0)
+ || (Index >= mpSlideController->getSlideIndexCount()))
throw IndexOutOfBoundsException();
return mpSlideController->getSlideByNumber( mpSlideController->getSlideNumber( Index ) );
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index 07dcbda5be92..c2fc2fb8f498 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -237,19 +237,23 @@ void SAL_CALL SlideShowView::disposing( const lang::EventObject& )
// notify all listeners that _we_ are going down (send a disposing()),
// then delete listener containers:
lang::EventObject const evt( static_cast<OWeakObject *>(this) );
- if (mpViewListeners.get() != nullptr) {
+ if (mpViewListeners != nullptr)
+ {
mpViewListeners->disposing( evt );
mpViewListeners.reset();
}
- if (mpPaintListeners.get() != nullptr) {
+ if (mpPaintListeners != nullptr)
+ {
mpPaintListeners->disposing( evt );
mpPaintListeners.reset();
}
- if (mpMouseListeners.get() != nullptr) {
+ if (mpMouseListeners != nullptr)
+ {
mpMouseListeners->disposing( evt );
mpMouseListeners.reset();
}
- if (mpMouseMotionListeners.get() != nullptr) {
+ if (mpMouseMotionListeners != nullptr)
+ {
mpMouseMotionListeners->disposing( evt );
mpMouseMotionListeners.reset();
}
@@ -380,7 +384,7 @@ void SAL_CALL SlideShowView::addTransformationChangedListener( const Reference<
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpViewListeners.get() )
+ if (mpViewListeners)
mpViewListeners->addListener( xListener );
}
@@ -388,7 +392,7 @@ void SAL_CALL SlideShowView::removeTransformationChangedListener( const Referenc
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpViewListeners.get() )
+ if (mpViewListeners)
mpViewListeners->removeListener( xListener );
}
@@ -396,7 +400,7 @@ void SAL_CALL SlideShowView::addPaintListener( const Reference< awt::XPaintListe
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpPaintListeners.get() )
+ if (mpPaintListeners)
mpPaintListeners->addTypedListener( xListener );
}
@@ -404,7 +408,7 @@ void SAL_CALL SlideShowView::removePaintListener( const Reference< awt::XPaintLi
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpPaintListeners.get() )
+ if (mpPaintListeners)
mpPaintListeners->removeTypedListener( xListener );
}
@@ -412,7 +416,7 @@ void SAL_CALL SlideShowView::addMouseListener( const Reference< awt::XMouseListe
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpMouseListeners.get() )
+ if (mpMouseListeners)
mpMouseListeners->addTypedListener( xListener );
}
@@ -420,7 +424,7 @@ void SAL_CALL SlideShowView::removeMouseListener( const Reference< awt::XMouseLi
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpMouseListeners.get() )
+ if (mpMouseListeners)
mpMouseListeners->removeTypedListener( xListener );
}
@@ -436,7 +440,7 @@ void SAL_CALL SlideShowView::addMouseMotionListener( const Reference< awt::XMous
mxWindow->addMouseMotionListener( this );
}
- if( mpMouseMotionListeners.get() )
+ if (mpMouseMotionListeners)
mpMouseMotionListeners->addTypedListener( xListener );
}
@@ -444,7 +448,7 @@ void SAL_CALL SlideShowView::removeMouseMotionListener( const Reference< awt::XM
{
::osl::MutexGuard aGuard( m_aMutex );
- if( mpMouseMotionListeners.get() )
+ if (mpMouseMotionListeners)
mpMouseMotionListeners->removeTypedListener( xListener );
// TODO(P1): Might be nice to deregister for mouse motion
@@ -500,7 +504,7 @@ void SAL_CALL SlideShowView::windowResized( const awt::WindowEvent& e )
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
- if( mpViewListeners.get() )
+ if (mpViewListeners)
{
// Change event source, to enable listeners to match event
// with view
@@ -546,7 +550,7 @@ void SAL_CALL SlideShowView::mousePressed( const awt::MouseEvent& e )
aEvent.maEvent = e;
aEvent.maEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- if( mpMouseListeners.get() )
+ if (mpMouseListeners)
mpMouseListeners->notify( aEvent );
updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
}
@@ -569,7 +573,7 @@ void SAL_CALL SlideShowView::mouseReleased( const awt::MouseEvent& e )
aEvent.maEvent = e;
aEvent.maEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- if( mpMouseListeners.get() )
+ if (mpMouseListeners)
mpMouseListeners->notify( aEvent );
updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
}
@@ -586,7 +590,7 @@ void SAL_CALL SlideShowView::mouseEntered( const awt::MouseEvent& e )
aEvent.maEvent = e;
aEvent.maEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- if( mpMouseListeners.get() )
+ if (mpMouseListeners)
mpMouseListeners->notify( aEvent );
updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
}
@@ -602,7 +606,7 @@ void SAL_CALL SlideShowView::mouseExited( const awt::MouseEvent& e )
aEvent.maEvent = e;
aEvent.maEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- if( mpMouseListeners.get() )
+ if (mpMouseListeners)
mpMouseListeners->notify( aEvent );
updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
}
@@ -619,7 +623,7 @@ void SAL_CALL SlideShowView::mouseDragged( const awt::MouseEvent& e )
aEvent.maEvent = e;
aEvent.maEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- if( mpMouseMotionListeners.get() )
+ if (mpMouseMotionListeners)
mpMouseMotionListeners->notify( aEvent );
updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
}
@@ -635,7 +639,7 @@ void SAL_CALL SlideShowView::mouseMoved( const awt::MouseEvent& e )
aEvent.maEvent = e;
aEvent.maEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- if( mpMouseMotionListeners.get() )
+ if (mpMouseMotionListeners)
mpMouseMotionListeners->notify( aEvent );
updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
}