diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-11 11:19:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-11 11:01:31 +0000 |
commit | c504477e7c3c7109fc4439988d8f3eb11a267c74 (patch) | |
tree | 4861f226eec9110b6a4bcdc4a520c904e5bfde54 /UnoControls/inc | |
parent | 44daaebf835bb60fb7e442e928cd30191f15af52 (diff) |
com::sun::star->css in UnoControls/
and remove some noise comments
Change-Id: I290ec365b58fa1b21838a6faf84006434c3e7bbd
Reviewed-on: https://gerrit.libreoffice.org/19904
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'UnoControls/inc')
-rw-r--r-- | UnoControls/inc/basecontainercontrol.hxx | 177 | ||||
-rw-r--r-- | UnoControls/inc/basecontrol.hxx | 404 | ||||
-rw-r--r-- | UnoControls/inc/multiplexer.hxx | 223 |
3 files changed, 215 insertions, 589 deletions
diff --git a/UnoControls/inc/basecontainercontrol.hxx b/UnoControls/inc/basecontainercontrol.hxx index c4f2295cc476..e62b9af8b0ad 100644 --- a/UnoControls/inc/basecontainercontrol.hxx +++ b/UnoControls/inc/basecontainercontrol.hxx @@ -42,28 +42,18 @@ namespace unocontrols{ struct IMPL_ControlInfo { - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl; - OUString sName; + css::uno::Reference< css::awt::XControl > xControl; + OUString sName; }; -class BaseContainerControl : public ::com::sun::star::awt::XControlModel - , public ::com::sun::star::awt::XControlContainer +class BaseContainerControl : public css::awt::XControlModel + , public css::awt::XControlContainer , public BaseControl { -// public methods - public: - // construct/destruct - - /**_______________________________________________________________________________________________________ - */ - - BaseContainerControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); - - /**_______________________________________________________________________________________________________ - */ + BaseContainerControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); virtual ~BaseContainerControl(); @@ -82,9 +72,9 @@ public: @onerror A RuntimeException is thrown. */ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type& aType - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL queryInterface( + const css::uno::Type& aType + ) throw( css::uno::RuntimeException, std::exception ) override; // XTypeProvider @@ -96,181 +86,88 @@ public: @onerror A RuntimeException is thrown. */ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() + throw( css::uno::RuntimeException, std::exception ) override; // XAggregation - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( - const ::com::sun::star::uno::Type& aType - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL queryAggregation( + const css::uno::Type& aType + ) throw( css::uno::RuntimeException, std::exception ) override; // XControl - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL createPeer( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& xToolkit , - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XToolkit >& xToolkit , + const css::uno::Reference< css::awt::XWindowPeer >& xParent + ) throw( css::uno::RuntimeException, std::exception ) override; virtual sal_Bool SAL_CALL setModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xModel - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + const css::uno::Reference< css::awt::XControlModel >& xModel + ) throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() + throw( css::uno::RuntimeException, std::exception ) override; // XComponent - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception ) override; // XEventListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL disposing( const css::lang::EventObject& rEvent ) throw( css::uno::RuntimeException, std::exception ) override; // XControlContainer - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL addControl( - const OUString& sName , - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const OUString& sName , + const css::uno::Reference< css::awt::XControl >& xControl + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeControl( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XControl >& xControl + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL setStatusText( const OUString& sStatusText - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + ) throw( css::uno::RuntimeException, std::exception ) override; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getControl( + virtual css::uno::Reference< css::awt::XControl > SAL_CALL getControl( const OUString& sName - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + ) throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > > SAL_CALL getControls() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< css::uno::Reference< css::awt::XControl > > SAL_CALL getControls() + throw( css::uno::RuntimeException, std::exception ) override; // XWindow - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - -// protected methods + virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( css::uno::RuntimeException, std::exception ) override; protected: using OComponentHelper::disposing; - /**_______________________________________________________________________________________________________ - @short - @descr - - @seealso - @param - - @return - - @onerror - */ - - virtual ::com::sun::star::awt::WindowDescriptor* impl_getWindowDescriptor( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentPeer + virtual css::awt::WindowDescriptor* impl_getWindowDescriptor( + const css::uno::Reference< css::awt::XWindowPeer >& xParentPeer ) override; - /**_______________________________________________________________________________________________________ - @short - @descr - - @seealso - - @param - - @return - - @onerror - */ virtual void impl_paint( sal_Int32 nX , sal_Int32 nY , - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics + const css::uno::Reference< css::awt::XGraphics >& xGraphics ) override; -// private methods - private: - /**_______________________________________________________________________________________________________ - @short - @descr - - @seealso - - @param - - @return - - @onerror - */ - void impl_activateTabControllers(); - /**_______________________________________________________________________________________________________ - @short - @descr - - @seealso - - @param - - @return - - @onerror - */ - void impl_cleanMemory(); -// private variables - -private: // list of pointer of "struct IMPL_ControlInfo" to hold child-controls ::std::vector< IMPL_ControlInfo* > maControlInfoList; // list of references of XTabController to hold tab-order in this container - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > > m_xTabControllerList; + css::uno::Sequence< css::uno::Reference< css::awt::XTabController > > m_xTabControllerList; ::cppu::OMultiTypeInterfaceContainerHelper m_aListeners; diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx index 4ccf0359514f..81ec49195151 100644 --- a/UnoControls/inc/basecontrol.hxx +++ b/UnoControls/inc/basecontrol.hxx @@ -109,29 +109,19 @@ struct IMPL_MutexContainer ::osl::Mutex m_aMutex; }; -class BaseControl : public ::com::sun::star::lang::XServiceInfo - , public ::com::sun::star::awt::XPaintListener - , public ::com::sun::star::awt::XWindowListener - , public ::com::sun::star::awt::XView - , public ::com::sun::star::awt::XWindow - , public ::com::sun::star::awt::XControl +class BaseControl : public css::lang::XServiceInfo + , public css::awt::XPaintListener + , public css::awt::XWindowListener + , public css::awt::XView + , public css::awt::XWindow + , public css::awt::XControl , public IMPL_MutexContainer , public ::cppu::OComponentHelper { -// public methods - public: - // construct/destruct - - /**_______________________________________________________________________________________________________ - */ - - BaseControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); - - /**_______________________________________________________________________________________________________ - */ + BaseControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); virtual ~BaseControl(); @@ -150,9 +140,9 @@ public: @onerror A RuntimeException is thrown. */ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type& aType - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL queryInterface( + const css::uno::Type& aType + ) throw( css::uno::RuntimeException, std::exception ) override; /**_______________________________________________________________________________________________________ @short increment refcount @@ -182,8 +172,8 @@ public: @onerror A RuntimeException is thrown. */ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() + throw( css::uno::RuntimeException, std::exception ) override; /**_______________________________________________________________________________________________________ @short get implementation id @@ -196,398 +186,222 @@ public: @onerror A RuntimeException is thrown. */ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw( css::uno::RuntimeException, std::exception ) override; // XAggregation - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL setDelegator( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xDelegator - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + const css::uno::Reference< css::uno::XInterface >& xDelegator + ) throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( - const ::com::sun::star::uno::Type& aType - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL queryAggregation( + const css::uno::Type& aType + ) throw( css::uno::RuntimeException, std::exception ) override; // XServiceInfo - /**_______________________________________________________________________________________________________ - */ - virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + ) throw( css::uno::RuntimeException, std::exception ) override; virtual OUString SAL_CALL getImplementationName() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + throw( css::uno::RuntimeException, std::exception ) override; - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) override; // XComponent - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::lang::XEventListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + const css::uno::Reference< css::lang::XEventListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; // XControl - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL createPeer( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& xToolkit, - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XToolkit >& xToolkit, + const css::uno::Reference< css::awt::XWindowPeer >& xParent + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL setContext( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xContext - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::uno::XInterface >& xContext + ) throw( css::uno::RuntimeException, std::exception ) override; virtual sal_Bool SAL_CALL setModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xModel - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override = 0; + const css::uno::Reference< css::awt::XControlModel >& xModel + ) throw( css::uno::RuntimeException, std::exception ) override = 0; - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ + virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() + throw( css::uno::RuntimeException, std::exception ) override = 0; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override = 0; - - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual sal_Bool SAL_CALL isDesignMode() throw( css::uno::RuntimeException, std::exception ) override; - virtual sal_Bool SAL_CALL isDesignMode() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual sal_Bool SAL_CALL isTransparent() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL isTransparent() throw( css::uno::RuntimeException, std::exception ) override; // XWindow - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL setPosSize( sal_Int32 nX , sal_Int32 nY , sal_Int32 nWidth , sal_Int32 nHeight , - sal_Int16 nFlags ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + sal_Int16 nFlags ) throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL setFocus() throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL setFocus() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual css::awt::Rectangle SAL_CALL getPosSize() throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addWindowListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XWindowListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addFocusListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XFocusListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addKeyListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XKeyListener >& xListener ) + throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addMouseListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XMouseListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addMouseMotionListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XMouseMotionListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL addPaintListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XPaintListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeWindowListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XWindowListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeFocusListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XFocusListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeKeyListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XKeyListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeMouseListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XMouseListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removeMouseMotionListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XMouseMotionListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL removePaintListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + const css::uno::Reference< css::awt::XPaintListener >& xListener + ) throw( css::uno::RuntimeException, std::exception ) override; // XView - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL draw( sal_Int32 nX , - sal_Int32 nY ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + sal_Int32 nY ) throw( css::uno::RuntimeException, std::exception ) override; virtual sal_Bool SAL_CALL setGraphics( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xDevice - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XGraphics >& xDevice + ) throw( css::uno::RuntimeException, std::exception ) override; virtual void SAL_CALL setZoom( float fZoomX , - float fZoomY ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + float fZoomY ) throw( css::uno::RuntimeException, std::exception ) override; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > SAL_CALL getGraphics() - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics() + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::awt::Size SAL_CALL getSize() throw( css::uno::RuntimeException, std::exception ) override; - // ::com::sun::star::lang::XEventListener - - /**_______________________________________________________________________________________________________ - */ + // css::lang::XEventListener virtual void SAL_CALL disposing( - const ::com::sun::star::lang::EventObject& rSource - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + const css::lang::EventObject& rSource + ) throw( css::uno::RuntimeException, std::exception ) override; // XPaintListener - /**_______________________________________________________________________________________________________ - */ - virtual void SAL_CALL windowPaint( - const ::com::sun::star::awt::PaintEvent& rEvent - ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + const css::awt::PaintEvent& rEvent + ) throw( css::uno::RuntimeException, std::exception ) override; // XWindowListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowResized( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowMoved( const css::awt::WindowEvent& aEvent ) throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowShown( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException, std::exception ) override; // impl but public method to register service - /**_______________________________________________________________________________________________________ - */ - - static const ::com::sun::star::uno::Sequence< OUString > impl_getStaticSupportedServiceNames(); - - /**_______________________________________________________________________________________________________ - */ + static const css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames(); static const OUString impl_getStaticImplementationName(); -// protected methods - protected: using OComponentHelper::disposing; - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::uno::XComponentContext > impl_getComponentContext() { return m_xComponentContext;} - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > impl_getComponentContext() { return m_xComponentContext;} + const css::uno::Reference< css::awt::XWindow > impl_getPeerWindow() { return m_xPeerWindow;} - /**_______________________________________________________________________________________________________ - */ - - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > impl_getPeerWindow() { return m_xPeerWindow;} - - /**_______________________________________________________________________________________________________ - */ - - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > impl_getGraphicsPeer() { return m_xGraphicsPeer;} - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XGraphics > impl_getGraphicsPeer() { return m_xGraphicsPeer;} const sal_Int32& impl_getWidth() { return m_nWidth;} - /**_______________________________________________________________________________________________________ - */ - const sal_Int32& impl_getHeight() { return m_nHeight;} - /**_______________________________________________________________________________________________________ - */ - - virtual ::com::sun::star::awt::WindowDescriptor* impl_getWindowDescriptor( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentPeer + virtual css::awt::WindowDescriptor* impl_getWindowDescriptor( + const css::uno::Reference< css::awt::XWindowPeer >& xParentPeer ); - /**_______________________________________________________________________________________________________ - */ - virtual void impl_paint( sal_Int32 nX , sal_Int32 nY , - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics ); - - /**_______________________________________________________________________________________________________ - */ - - virtual void impl_recalcLayout( const ::com::sun::star::awt::WindowEvent& aEvent ); - - /**_______________________________________________________________________________________________________ - */ + const css::uno::Reference< css::awt::XGraphics >& xGraphics ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > impl_getDelegator() { return m_xDelegator;} + virtual void impl_recalcLayout( const css::awt::WindowEvent& aEvent ); -// private methods + css::uno::Reference< css::uno::XInterface > impl_getDelegator() { return m_xDelegator;} private: - /**_______________________________________________________________________________________________________ - */ - void impl_releasePeer(); - /**_______________________________________________________________________________________________________ - */ - OMRCListenerMultiplexerHelper* impl_getMultiplexer(); -// private variables - -private: - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xComponentContext; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xDelegator; - OMRCListenerMultiplexerHelper* m_pMultiplexer; // multiplex events - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xMultiplexer; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xContext; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > m_xPeer; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xPeerWindow; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > m_xGraphicsView; // graphics for ::com::sun::star::awt::XView-operations - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > m_xGraphicsPeer; // graphics for painting on a peer + css::uno::Reference< css::uno::XComponentContext > m_xComponentContext; + css::uno::Reference< css::uno::XInterface > m_xDelegator; + OMRCListenerMultiplexerHelper* m_pMultiplexer; // multiplex events + css::uno::Reference< css::uno::XInterface > m_xMultiplexer; + css::uno::Reference< css::uno::XInterface > m_xContext; + css::uno::Reference< css::awt::XWindowPeer > m_xPeer; + css::uno::Reference< css::awt::XWindow > m_xPeerWindow; + css::uno::Reference< css::awt::XGraphics > m_xGraphicsView; // graphics for css::awt::XView-operations + css::uno::Reference< css::awt::XGraphics > m_xGraphicsPeer; // graphics for painting on a peer sal_Int32 m_nX; // Position ... sal_Int32 m_nY; sal_Int32 m_nWidth; // ... and size of window diff --git a/UnoControls/inc/multiplexer.hxx b/UnoControls/inc/multiplexer.hxx index 3c068ecedd41..b148b9cdbe78 100644 --- a/UnoControls/inc/multiplexer.hxx +++ b/UnoControls/inc/multiplexer.hxx @@ -53,22 +53,18 @@ namespace unocontrols{ // class -class OMRCListenerMultiplexerHelper : public ::com::sun::star::awt::XFocusListener - , public ::com::sun::star::awt::XWindowListener - , public ::com::sun::star::awt::XKeyListener - , public ::com::sun::star::awt::XMouseListener - , public ::com::sun::star::awt::XMouseMotionListener - , public ::com::sun::star::awt::XPaintListener - , public ::com::sun::star::awt::XTopWindowListener +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 { -// public methods - public: - // construct/destruct - /**_______________________________________________________________________________________________________ @short constructor @descr Create a Multiplexer of XWindowEvents. @@ -76,8 +72,8 @@ public: @param rPeer The peer from which the original events are dispatched. Null is allowed. */ - OMRCListenerMultiplexerHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xControl , - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xPeer ); + OMRCListenerMultiplexerHelper( const css::uno::Reference< css::awt::XWindow >& xControl , + const css::uno::Reference< css::awt::XWindow >& xPeer ); /**_______________________________________________________________________________________________________ @short copy-constructor @@ -87,10 +83,6 @@ public: OMRCListenerMultiplexerHelper( const OMRCListenerMultiplexerHelper& aCopyInstance ); - /**_______________________________________________________________________________________________________ - @short destructor - */ - virtual ~OMRCListenerMultiplexerHelper(); // XInterface @@ -108,8 +100,8 @@ public: @onerror A RuntimeException is thrown. */ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) + throw( css::uno::RuntimeException, std::exception ) override; /**_______________________________________________________________________________________________________ @short increment refcount @@ -129,15 +121,7 @@ public: virtual void SAL_CALL release() throw() override; - // operator - - /**_______________________________________________________________________________________________________ - */ - - operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() const { return (static_cast<OWeakObject*>(const_cast<OMRCListenerMultiplexerHelper *>(this)));} - - /**_______________________________________________________________________________________________________ - */ + operator css::uno::Reference< css::uno::XInterface >() const { return (static_cast<OWeakObject*>(const_cast<OMRCListenerMultiplexerHelper *>(this)));} OMRCListenerMultiplexerHelper& operator= ( const OMRCListenerMultiplexerHelper& aCopyInstance ); @@ -148,7 +132,7 @@ public: @param rPeer The peer from which the original events are dispatched. Null is allowed. */ - void setPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xPeer ); + void setPeer( const css::uno::Reference< css::awt::XWindow >& xPeer ); /**_______________________________________________________________________________________________________ @short Remove all listeners and send a disposing message. @@ -160,169 +144,100 @@ public: @short Add the specified listener to the source. */ - void advise( const ::com::sun::star::uno::Type& aType , - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::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. */ - void unadvise( const ::com::sun::star::uno::Type& aType , - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xListener ); + void unadvise( const css::uno::Type& aType , + const css::uno::Reference< css::uno::XInterface >& xListener ); // XEventListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& aSource) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL disposing(const css::lang::EventObject& aSource) + throw( css::uno::RuntimeException, std::exception ) override; // XFocusListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL focusGained(const css::awt::FocusEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL focusLost(const css::awt::FocusEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // XWindowListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowResized(const ::com::sun::star::awt::WindowEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowMoved(const ::com::sun::star::awt::WindowEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL windowResized(const css::awt::WindowEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowShown(const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowMoved(const css::awt::WindowEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL windowShown(const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowHidden(const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowHidden(const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // XKeyListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL keyPressed( const css::awt::KeyEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL keyReleased( const css::awt::KeyEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // XMouseListener - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL mousePressed(const css::awt::MouseEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL mousePressed(const ::com::sun::star::awt::MouseEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL mouseReleased(const css::awt::MouseEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL mouseReleased(const ::com::sun::star::awt::MouseEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL mouseEntered(const ::com::sun::star::awt::MouseEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL mouseEntered(const css::awt::MouseEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL mouseExited(const ::com::sun::star::awt::MouseEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL mouseExited(const css::awt::MouseEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // XMouseMotionListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL mouseDragged(const ::com::sun::star::awt::MouseEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL mouseDragged(const css::awt::MouseEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL mouseMoved(const ::com::sun::star::awt::MouseEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL mouseMoved(const css::awt::MouseEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // XPaintListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowPaint(const ::com::sun::star::awt::PaintEvent& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // XTopWindowListener - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowOpened( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ - - virtual void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; - - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL windowClosing( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowClosed( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL windowMinimized( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowNormalized( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - /**_______________________________________________________________________________________________________ - */ + virtual void SAL_CALL windowActivated( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& aEvent ) - throw( ::com::sun::star::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL windowDeactivated( const css::lang::EventObject& aEvent ) + throw( css::uno::RuntimeException, std::exception ) override; // protected methods @@ -334,8 +249,8 @@ protected: @param rType The listener type, which specify the type of the listener. */ - void impl_adviseToPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xPeer , - const ::com::sun::star::uno::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. @@ -343,16 +258,16 @@ protected: @param rType The listener type, which specify the type of the listener. */ - void impl_unadviseFromPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xPeer , - const ::com::sun::star::uno::Type& aType ); + void impl_unadviseFromPeer( const css::uno::Reference< css::awt::XWindow >& xPeer , + const css::uno::Type& aType ); // private variables private: ::osl::Mutex m_aMutex; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xPeer; /// The source of the events. Normally this is the peer object. - ::com::sun::star::uno::WeakReference< ::com::sun::star::awt::XWindow > m_xControl; + 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 |