diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:54:22 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:54:22 +0200 |
commit | e2682561337c521f10fa2c87594c86c01b3c662a (patch) | |
tree | a8cb220cf9888183c2de5edd3644597c63b67b9a /UnoControls/inc/multiplexer.hxx | |
parent | 68f53efa2572acc661c8a75ee2ec09f87348aa65 (diff) | |
parent | f9c2beb2cdb4ae448d22ae390c63159b88df9e9e (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
lingucomponent/source/spellcheck/spell/sspellimp.cxx
setup_native/prj/build.lst
setup_native/prj/d.lst
wizards/Jar_query.mk
wizards/Module_wizards.mk
wizards/Zip_launcher.mk
wizards/com/sun/star/wizards/report/makefile.mk
wizards/prj/build.lst
wizards/prj/d.lst
wizards/util/target.pmk
Diffstat (limited to 'UnoControls/inc/multiplexer.hxx')
-rw-r--r-- | UnoControls/inc/multiplexer.hxx | 155 |
1 files changed, 84 insertions, 71 deletions
diff --git a/UnoControls/inc/multiplexer.hxx b/UnoControls/inc/multiplexer.hxx index b22513e5f16c..b9a90c5a33f1 100644 --- a/UnoControls/inc/multiplexer.hxx +++ b/UnoControls/inc/multiplexer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,42 +68,22 @@ namespace unocontrols{ -#define UNO3_OWEAKOBJECT ::cppu::OWeakObject -#define UNO3_XWINDOW ::com::sun::star::awt::XWindow -#define UNO3_REFERENCE ::com::sun::star::uno::Reference -#define UNO3_WEAKREFERENCE ::com::sun::star::uno::WeakReference -#define UNO3_MUTEX ::osl::Mutex -#define UNO3_XWINDOWLISTENER ::com::sun::star::awt::XWindowListener -#define UNO3_XKEYLISTENER ::com::sun::star::awt::XKeyListener -#define UNO3_XMOUSELISTENER ::com::sun::star::awt::XMouseListener -#define UNO3_XMOUSEMOTIONLISTENER ::com::sun::star::awt::XMouseMotionListener -#define UNO3_XPAINTLISTENER ::com::sun::star::awt::XPaintListener -#define UNO3_XTOPWINDOWLISTENER ::com::sun::star::awt::XTopWindowListener -#define UNO3_XFOCUSLISTENER ::com::sun::star::awt::XFocusListener -#define UNO3_ANY ::com::sun::star::uno::Any -#define UNO3_TYPE ::com::sun::star::uno::Type -#define UNO3_RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException -#define UNO3_XINTERFACE ::com::sun::star::uno::XInterface -#define UNO3_EVENTOBJECT ::com::sun::star::lang::EventObject -#define UNO3_FOCUSEVENT ::com::sun::star::awt::FocusEvent -#define UNO3_WINDOWEVENT ::com::sun::star::awt::WindowEvent -#define UNO3_KEYEVENT ::com::sun::star::awt::KeyEvent -#define UNO3_MOUSEEVENT ::com::sun::star::awt::MouseEvent -#define UNO3_PAINTEVENT ::com::sun::star::awt::PaintEvent -#define UNO3_OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper +#define CSS_UNO ::com::sun::star::uno +#define CSS_AWT ::com::sun::star::awt +#define CSS_LANG ::com::sun::star::lang //____________________________________________________________________________________________________________ // class //____________________________________________________________________________________________________________ -class OMRCListenerMultiplexerHelper : public UNO3_XFOCUSLISTENER - , public UNO3_XWINDOWLISTENER - , public UNO3_XKEYLISTENER - , public UNO3_XMOUSELISTENER - , public UNO3_XMOUSEMOTIONLISTENER - , public UNO3_XPAINTLISTENER - , public UNO3_XTOPWINDOWLISTENER - , public UNO3_OWEAKOBJECT +class OMRCListenerMultiplexerHelper : public CSS_AWT::XFocusListener + , public CSS_AWT::XWindowListener + , public CSS_AWT::XKeyListener + , public CSS_AWT::XMouseListener + , public CSS_AWT::XMouseMotionListener + , public CSS_AWT::XPaintListener + , public CSS_AWT::XTopWindowListener + , public ::cppu::OWeakObject { //____________________________________________________________________________________________________________ @@ -129,8 +110,8 @@ public: @onerror - */ - OMRCListenerMultiplexerHelper( const UNO3_REFERENCE< UNO3_XWINDOW >& xControl , - const UNO3_REFERENCE< UNO3_XWINDOW >& xPeer ); + OMRCListenerMultiplexerHelper( const CSS_UNO::Reference< CSS_AWT::XWindow >& xControl , + const CSS_UNO::Reference< CSS_AWT::XWindow >& xPeer ); /**_______________________________________________________________________________________________________ @short copy-constructor @@ -179,7 +160,8 @@ public: @onerror A RuntimeException is thrown. */ - virtual UNO3_ANY SAL_CALL queryInterface( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType ) + throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short increment refcount @@ -230,7 +212,7 @@ public: @onerror - */ - operator UNO3_REFERENCE< UNO3_XINTERFACE >() const; + operator CSS_UNO::Reference< CSS_UNO::XInterface >() const; /**_______________________________________________________________________________________________________ @short - @@ -264,7 +246,7 @@ public: @onerror - */ - void setPeer( const UNO3_REFERENCE< UNO3_XWINDOW >& xPeer ); + void setPeer( const CSS_UNO::Reference< CSS_AWT::XWindow >& xPeer ); /**_______________________________________________________________________________________________________ @short Remove all listeners and send a disposing message. @@ -294,8 +276,8 @@ public: @onerror - */ - void advise( const UNO3_TYPE& aType , - const UNO3_REFERENCE< UNO3_XINTERFACE >& xListener ); + void advise( const CSS_UNO::Type& aType , + const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener ); /**_______________________________________________________________________________________________________ @short Remove the specified listener from the source. @@ -310,8 +292,8 @@ public: @onerror - */ - void unadvise( const UNO3_TYPE& aType , - const UNO3_REFERENCE< UNO3_XINTERFACE >& xListener ); + void unadvise( const CSS_UNO::Type& aType , + const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener ); //________________________________________________________________________________________________________ // XEventListener @@ -331,7 +313,8 @@ public: @onerror - */ - virtual void SAL_CALL disposing(const UNO3_EVENTOBJECT& aSource) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL disposing(const CSS_LANG::EventObject& aSource) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XFocusListener @@ -351,7 +334,8 @@ public: @onerror - */ - virtual void SAL_CALL focusGained(const UNO3_FOCUSEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL focusGained(const CSS_AWT::FocusEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -367,7 +351,8 @@ public: @onerror - */ - virtual void SAL_CALL focusLost(const UNO3_FOCUSEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL focusLost(const CSS_AWT::FocusEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XWindowListener @@ -387,7 +372,8 @@ public: @onerror - */ - virtual void SAL_CALL windowResized(const UNO3_WINDOWEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowResized(const CSS_AWT::WindowEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -403,7 +389,8 @@ public: @onerror - */ - virtual void SAL_CALL windowMoved(const UNO3_WINDOWEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowMoved(const CSS_AWT::WindowEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -419,7 +406,8 @@ public: @onerror - */ - virtual void SAL_CALL windowShown(const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowShown(const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -435,7 +423,8 @@ public: @onerror - */ - virtual void SAL_CALL windowHidden(const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowHidden(const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XKeyListener @@ -455,7 +444,8 @@ public: @onerror - */ - virtual void SAL_CALL keyPressed( const UNO3_KEYEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL keyPressed( const CSS_AWT::KeyEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -471,7 +461,8 @@ public: @onerror - */ - virtual void SAL_CALL keyReleased( const UNO3_KEYEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL keyReleased( const CSS_AWT::KeyEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XMouseListener @@ -491,7 +482,8 @@ public: @onerror - */ - virtual void SAL_CALL mousePressed(const UNO3_MOUSEEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL mousePressed(const CSS_AWT::MouseEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -507,7 +499,8 @@ public: @onerror - */ - virtual void SAL_CALL mouseReleased(const UNO3_MOUSEEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL mouseReleased(const CSS_AWT::MouseEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -523,7 +516,8 @@ public: @onerror - */ - virtual void SAL_CALL mouseEntered(const UNO3_MOUSEEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL mouseEntered(const CSS_AWT::MouseEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -539,7 +533,8 @@ public: @onerror - */ - virtual void SAL_CALL mouseExited(const UNO3_MOUSEEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL mouseExited(const CSS_AWT::MouseEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XMouseMotionListener @@ -559,7 +554,8 @@ public: @onerror - */ - virtual void SAL_CALL mouseDragged(const UNO3_MOUSEEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL mouseDragged(const CSS_AWT::MouseEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -575,7 +571,8 @@ public: @onerror - */ - virtual void SAL_CALL mouseMoved(const UNO3_MOUSEEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL mouseMoved(const CSS_AWT::MouseEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XPaintListener @@ -595,7 +592,8 @@ public: @onerror - */ - virtual void SAL_CALL windowPaint(const UNO3_PAINTEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowPaint(const CSS_AWT::PaintEvent& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //________________________________________________________________________________________________________ // XTopWindowListener @@ -615,7 +613,8 @@ public: @onerror - */ - virtual void SAL_CALL windowOpened( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowOpened( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -631,7 +630,8 @@ public: @onerror - */ - virtual void SAL_CALL windowClosing( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowClosing( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -647,7 +647,8 @@ public: @onerror - */ - virtual void SAL_CALL windowClosed( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowClosed( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -663,7 +664,8 @@ public: @onerror - */ - virtual void SAL_CALL windowMinimized( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowMinimized( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -679,7 +681,8 @@ public: @onerror - */ - virtual void SAL_CALL windowNormalized( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowNormalized( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -695,7 +698,8 @@ public: @onerror - */ - virtual void SAL_CALL windowActivated( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowActivated( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; /**_______________________________________________________________________________________________________ @short - @@ -711,7 +715,8 @@ public: @onerror - */ - virtual void SAL_CALL windowDeactivated( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION ) ; + virtual void SAL_CALL windowDeactivated( const CSS_LANG::EventObject& aEvent ) + throw( CSS_UNO::RuntimeException ) ; //____________________________________________________________________________________________________________ // protected methods @@ -733,8 +738,8 @@ protected: @onerror - */ - void impl_adviseToPeer( const UNO3_REFERENCE< UNO3_XWINDOW >& xPeer , - const UNO3_TYPE& aType ); + void impl_adviseToPeer( const CSS_UNO::Reference< CSS_AWT::XWindow >& xPeer , + const CSS_UNO::Type& aType ); /**_______________________________________________________________________________________________________ @short Add the listener to the peer. @@ -750,8 +755,8 @@ protected: @onerror - */ - void impl_unadviseFromPeer( const UNO3_REFERENCE< UNO3_XWINDOW >& xPeer , - const UNO3_TYPE& aType ); + void impl_unadviseFromPeer( const CSS_UNO::Reference< CSS_AWT::XWindow >& xPeer , + const CSS_UNO::Type& aType ); //____________________________________________________________________________________________________________ // private variables @@ -759,13 +764,21 @@ protected: private: - UNO3_MUTEX m_aMutex ; - UNO3_REFERENCE< UNO3_XWINDOW > m_xPeer ; /// The source of the events. Normally this is the peer object. - UNO3_WEAKREFERENCE< UNO3_XWINDOW > m_xControl ; - UNO3_OMULTITYPEINTERFACECONTAINERHELPER m_aListenerHolder ; + ::osl::Mutex m_aMutex ; + CSS_UNO::Reference< CSS_AWT::XWindow > m_xPeer ; /// The source of the events. Normally this is the peer object. + CSS_UNO::WeakReference< CSS_AWT::XWindow > m_xControl ; + ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerHolder ; }; // class OMRCListenerMultiplexerHelper +// The namespace aliases are only used in this header +#undef CSS_UNO +#undef CSS_AWT +#undef CSS_LANG + + } // namespace unocontrols #endif // ifndef _UNOCONTROLS_MULTIPLEXER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |