XTopWindowListener is unused here
Change-Id: Ib4c1464d709c41f019d1910000e71075c9f5e037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176310 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -24,8 +24,6 @@
|
|||||||
#include <com/sun/star/awt/XMouseMotionListener.hpp>
|
#include <com/sun/star/awt/XMouseMotionListener.hpp>
|
||||||
#include <com/sun/star/awt/XWindow.hpp>
|
#include <com/sun/star/awt/XWindow.hpp>
|
||||||
#include <com/sun/star/awt/XWindowListener.hpp>
|
#include <com/sun/star/awt/XWindowListener.hpp>
|
||||||
#include <com/sun/star/awt/XTopWindow.hpp>
|
|
||||||
#include <com/sun/star/awt/XTopWindowListener.hpp>
|
|
||||||
#include <com/sun/star/awt/XMouseListener.hpp>
|
#include <com/sun/star/awt/XMouseListener.hpp>
|
||||||
#include <com/sun/star/awt/XFocusListener.hpp>
|
#include <com/sun/star/awt/XFocusListener.hpp>
|
||||||
#include <comphelper/compbase.hxx>
|
#include <comphelper/compbase.hxx>
|
||||||
@@ -57,9 +55,6 @@ template <> constexpr inline auto Remove<css::awt::XMouseMotionListener> = &css:
|
|||||||
template <> constexpr inline auto Add<css::awt::XPaintListener> = &css::awt::XWindow::addPaintListener;
|
template <> constexpr inline auto Add<css::awt::XPaintListener> = &css::awt::XWindow::addPaintListener;
|
||||||
template <> constexpr inline auto Remove<css::awt::XPaintListener> = &css::awt::XWindow::removePaintListener;
|
template <> constexpr inline auto Remove<css::awt::XPaintListener> = &css::awt::XWindow::removePaintListener;
|
||||||
|
|
||||||
template <> constexpr inline auto Add<css::awt::XTopWindowListener> = &css::awt::XTopWindow::addTopWindowListener;
|
|
||||||
template <> constexpr inline auto Remove<css::awt::XTopWindowListener> = &css::awt::XTopWindow::removeTopWindowListener;
|
|
||||||
|
|
||||||
template <class Ifc> class Listeners
|
template <class Ifc> class Listeners
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@@ -72,17 +67,12 @@ class ContainersHolder : public comphelper::WeakImplHelper<Ifc...>, public Liste
|
|||||||
protected:
|
protected:
|
||||||
template <typename F> void for_each_container(F f) { (..., f(Listeners<Ifc>::list)); }
|
template <typename F> void for_each_container(F f) { (..., f(Listeners<Ifc>::list)); }
|
||||||
|
|
||||||
template <class WinIfc, class Ifc1>
|
template <class Ifc1>
|
||||||
void notifyPeer(const css::uno::Reference<css::awt::XWindow>& peer,
|
void notifyPeer(const css::uno::Reference<css::awt::XWindow>& peer,
|
||||||
void (SAL_CALL WinIfc::*func)(const css::uno::Reference<Ifc1>&))
|
void (SAL_CALL css::awt::XWindow::*func)(const css::uno::Reference<Ifc1>&))
|
||||||
{
|
{
|
||||||
if constexpr (std::is_same_v<WinIfc, css::awt::XWindow>)
|
if (peer)
|
||||||
{
|
(peer.get()->*func)(this);
|
||||||
if (peer)
|
|
||||||
(peer.get()->*func)(this);
|
|
||||||
}
|
|
||||||
else if (auto cast_peer = peer.query<WinIfc>())
|
|
||||||
(cast_peer.get()->*func)(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Ifc1>
|
template <class Ifc1>
|
||||||
@@ -114,8 +104,7 @@ class OMRCListenerMultiplexerHelper final : public ContainersHolder< css::awt::X
|
|||||||
, css::awt::XKeyListener
|
, css::awt::XKeyListener
|
||||||
, css::awt::XMouseListener
|
, css::awt::XMouseListener
|
||||||
, css::awt::XMouseMotionListener
|
, css::awt::XMouseMotionListener
|
||||||
, css::awt::XPaintListener
|
, css::awt::XPaintListener >
|
||||||
, css::awt::XTopWindowListener >
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -214,22 +203,6 @@ public:
|
|||||||
|
|
||||||
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& aEvent ) override;
|
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& aEvent ) override;
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowOpened( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowClosing( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowClosed( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowMinimized( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowNormalized( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowActivated( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
virtual void SAL_CALL windowDeactivated( const css::lang::EventObject& aEvent ) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <class Interface, typename Event>
|
template <class Interface, typename Event>
|
||||||
void Multiplex(void (SAL_CALL Interface::*method)(const Event&), const Event& event);
|
void Multiplex(void (SAL_CALL Interface::*method)(const Event&), const Event& event);
|
||||||
|
@@ -211,55 +211,6 @@ void OMRCListenerMultiplexerHelper::windowPaint(const PaintEvent& aEvent)
|
|||||||
Multiplex(&XPaintListener::windowPaint, aEvent);
|
Multiplex(&XPaintListener::windowPaint, aEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowOpened(const EventObject& aEvent)
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowOpened, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowClosing( const EventObject& aEvent )
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowClosing, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowClosed( const EventObject& aEvent )
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowClosed, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowMinimized( const EventObject& aEvent )
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowMinimized, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowNormalized( const EventObject& aEvent )
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowNormalized, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowActivated( const EventObject& aEvent )
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowActivated, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XTopWindowListener
|
|
||||||
|
|
||||||
void OMRCListenerMultiplexerHelper::windowDeactivated( const EventObject& aEvent )
|
|
||||||
{
|
|
||||||
Multiplex(&XTopWindowListener::windowDeactivated, aEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace unocontrols
|
} // namespace unocontrols
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Reference in New Issue
Block a user