loplugin:virtualdead unused params in ShapeListenerEventHandler

Change-Id: Ied95fd01912737ba1ae73fb1fea6ddd57eb8a14d
Reviewed-on: https://gerrit.libreoffice.org/81070
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2019-10-17 14:39:06 +02:00
parent 888ac516aa
commit c66e8c7f94
7 changed files with 15 additions and 34 deletions

View File

@ -295,12 +295,6 @@ slideshow/source/engine/opengl/TransitionImpl.hxx:180
slideshow/source/inc/animation.hxx:61
void slideshow::internal::Animation::prefetch(const class std::shared_ptr<class slideshow::internal::AnimatableShape> &,const class std::shared_ptr<class slideshow::internal::ShapeAttributeLayer> &,)
00
slideshow/source/inc/shapelistenereventhandler.hxx:51
_Bool slideshow::internal::ShapeListenerEventHandler::listenerAdded(const class com::sun::star::uno::Reference<class com::sun::star::presentation::XShapeEventListener> &,const class com::sun::star::uno::Reference<class com::sun::star::drawing::XShape> &,)
01
slideshow/source/inc/shapelistenereventhandler.hxx:54
_Bool slideshow::internal::ShapeListenerEventHandler::listenerRemoved(const class com::sun::star::uno::Reference<class com::sun::star::presentation::XShapeEventListener> &,const class com::sun::star::uno::Reference<class com::sun::star::drawing::XShape> &,)
01
starmath/source/wordexportbase.hxx:37
void SmWordExportBase::HandleText(const class SmNode *,int,)
10

View File

@ -1027,21 +1027,19 @@ void EventMultiplexer::removeHyperlinkHandler( const HyperlinkHandlerSharedPtr&
}
void EventMultiplexer::notifyShapeListenerAdded(
const uno::Reference<presentation::XShapeEventListener>& xListener,
const uno::Reference<drawing::XShape>& xShape )
{
mpImpl->maShapeListenerHandlers.applyAll(
[&xListener, &xShape]( const ShapeListenerEventHandlerSharedPtr& pHandler )
{ return pHandler->listenerAdded( xListener, xShape ); } );
[&xShape]( const ShapeListenerEventHandlerSharedPtr& pHandler )
{ return pHandler->listenerAdded( xShape ); } );
}
void EventMultiplexer::notifyShapeListenerRemoved(
const uno::Reference<presentation::XShapeEventListener>& xListener,
const uno::Reference<drawing::XShape>& xShape )
{
mpImpl->maShapeListenerHandlers.applyAll(
[&xListener, &xShape]( const ShapeListenerEventHandlerSharedPtr& pHandler )
{ return pHandler->listenerRemoved( xListener, xShape ); } );
[&xShape]( const ShapeListenerEventHandlerSharedPtr& pHandler )
{ return pHandler->listenerRemoved( xShape ); } );
}
void EventMultiplexer::notifyUserPaintColor( RGBColor const& rUserColor )

View File

@ -76,7 +76,7 @@ void ShapeManagerImpl::activate()
// clone listener map
uno::Reference<presentation::XShapeEventListener> xDummyListener;
for( const auto& rListener : mrGlobalListenersMap )
listenerAdded( xDummyListener, rListener.first );
listenerAdded( rListener.first );
// clone cursor map
for( const auto& rListener : mrGlobalCursorMap )
@ -291,8 +291,7 @@ void ShapeManagerImpl::revokeSubset( const AttributableShapeSharedPtr& rOrigShap
}
bool ShapeManagerImpl::listenerAdded(
const uno::Reference<presentation::XShapeEventListener>& /*xListener*/,
const uno::Reference<drawing::XShape>& xShape )
const uno::Reference<drawing::XShape>& xShape )
{
ShapeEventListenerMap::const_iterator aIter;
if( (aIter = mrGlobalListenersMap.find( xShape )) ==
@ -313,9 +312,7 @@ bool ShapeManagerImpl::listenerAdded(
return true;
}
bool ShapeManagerImpl::listenerRemoved(
const uno::Reference<presentation::XShapeEventListener>& /*xListener*/,
const uno::Reference<drawing::XShape>& xShape )
bool ShapeManagerImpl::listenerRemoved( const uno::Reference<drawing::XShape>& xShape )
{
// shape really erased from map? maybe there are other listeners
// for the same shape pending...

View File

@ -146,11 +146,9 @@ private:
// ShapeListenerEventHandler
virtual bool listenerAdded( const css::uno::Reference< css::presentation::XShapeEventListener>& xListener,
const css::uno::Reference< css::drawing::XShape>& xShape ) override;
virtual bool listenerAdded( const css::uno::Reference< css::drawing::XShape>& xShape ) override;
virtual bool listenerRemoved( const css::uno::Reference< css::presentation::XShapeEventListener>& xListener,
const css::uno::Reference< css::drawing::XShape>& xShape ) override;
virtual bool listenerRemoved( const css::uno::Reference< css::drawing::XShape>& xShape ) override;
void cursorChanged( const css::uno::Reference< css::drawing::XShape>& xShape,
sal_Int16 nCursor );

View File

@ -1830,8 +1830,7 @@ void SlideShowImpl::addShapeEventListener(
if( aIter->second.get() )
aIter->second->addInterface( xListener );
maEventMultiplexer.notifyShapeListenerAdded(xListener,
xShape);
maEventMultiplexer.notifyShapeListenerAdded(xShape);
}
void SlideShowImpl::removeShapeEventListener(
@ -1857,8 +1856,7 @@ void SlideShowImpl::removeShapeEventListener(
aIter->second->removeInterface( xListener );
}
maEventMultiplexer.notifyShapeListenerRemoved(xListener,
xShape);
maEventMultiplexer.notifyShapeListenerRemoved(xShape);
}
void SlideShowImpl::setShapeCursor(

View File

@ -496,16 +496,14 @@ public:
This method announces that the given listener was added for
the specified shape.
*/
void notifyShapeListenerAdded( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener,
const css::uno::Reference<css::drawing::XShape>& xShape );
void notifyShapeListenerAdded( const css::uno::Reference<css::drawing::XShape>& xShape );
/** A shape event listener was removed
This method announces that the given listener was removed for
the specified shape.
*/
void notifyShapeListenerRemoved( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener,
const css::uno::Reference<css::drawing::XShape>& xShape );
void notifyShapeListenerRemoved( const css::uno::Reference<css::drawing::XShape>& xShape );
/** Notify a new user paint color

View File

@ -48,11 +48,9 @@ namespace slideshow
public:
virtual ~ShapeListenerEventHandler() {}
virtual bool listenerAdded( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener,
const css::uno::Reference<css::drawing::XShape>& xShape ) = 0;
virtual bool listenerAdded( const css::uno::Reference<css::drawing::XShape>& xShape ) = 0;
virtual bool listenerRemoved( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener,
const css::uno::Reference<css::drawing::XShape>& xShape ) = 0;
virtual bool listenerRemoved( const css::uno::Reference<css::drawing::XShape>& xShape ) = 0;
};
typedef ::std::shared_ptr< ShapeListenerEventHandler > ShapeListenerEventHandlerSharedPtr;