diff options
Diffstat (limited to 'UnoControls/inc/basecontainercontrol.hxx')
-rw-r--r-- | UnoControls/inc/basecontainercontrol.hxx | 143 |
1 files changed, 85 insertions, 58 deletions
diff --git a/UnoControls/inc/basecontainercontrol.hxx b/UnoControls/inc/basecontainercontrol.hxx index 34563ec3441d..6d32b9d5bd3a 100644 --- a/UnoControls/inc/basecontainercontrol.hxx +++ b/UnoControls/inc/basecontainercontrol.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. @@ -42,7 +43,7 @@ #include <com/sun/star/container/ContainerEvent.hpp> #include <com/sun/star/container/XIndexReplace.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <tools/list.hxx> +#include <vector> //____________________________________________________________________________________________________________ // includes of my own project @@ -55,25 +56,10 @@ namespace unocontrols{ -#define UNO3_REFERENCE ::com::sun::star::uno::Reference -#define UNO3_XCONTROL ::com::sun::star::awt::XControl -#define UNO3_OUSTRING ::rtl::OUString -#define UNO3_XCONTROLMODEL ::com::sun::star::awt::XControlModel -#define UNO3_XCONTROLCONTAINER ::com::sun::star::awt::XControlContainer -#define UNO3_XMULTISERVICEFACTORY ::com::sun::star::lang::XMultiServiceFactory -#define UNO3_TYPE ::com::sun::star::uno::Type -#define UNO3_RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException -#define UNO3_XTOOLKIT ::com::sun::star::awt::XToolkit -#define UNO3_XWINDOWPEER ::com::sun::star::awt::XWindowPeer -#define UNO3_EVENTOBJECT ::com::sun::star::lang::EventObject -#define UNO3_SEQUENCE ::com::sun::star::uno::Sequence -#define UNO3_XCONTAINERLISTENER ::com::sun::star::container::XContainerListener -#define UNO3_ANY ::com::sun::star::uno::Any -#define UNO3_XTABCONTROLLER ::com::sun::star::awt::XTabController -#define UNO3_WINDOWDESCRIPTOR ::com::sun::star::awt::WindowDescriptor -#define UNO3_XGRAPHICS ::com::sun::star::awt::XGraphics -#define UNO3_OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper -#define UNO3_ILLEGALARGUMENTEXCEPTION ::com::sun::star::lang::IllegalArgumentException +#define CSS_UNO ::com::sun::star::uno +#define CSS_AWT ::com::sun::star::awt +#define CSS_LANG ::com::sun::star::lang +#define CSS_CONTAINER ::com::sun::star::container //____________________________________________________________________________________________________________ // structs, types, forwards @@ -81,20 +67,16 @@ namespace unocontrols{ struct IMPL_ControlInfo { - UNO3_REFERENCE< UNO3_XCONTROL > xControl ; - UNO3_OUSTRING sName ; + CSS_UNO::Reference< CSS_AWT::XControl > xControl ; + ::rtl::OUString sName ; }; -// makro define a list-class for struct IMPL_ControlInfo! -class IMPL_ControlInfoList ; -DECLARE_LIST( IMPL_ControlInfoList, IMPL_ControlInfo* ) - //____________________________________________________________________________________________________________ // classes //____________________________________________________________________________________________________________ -class BaseContainerControl : public UNO3_XCONTROLMODEL - , public UNO3_XCONTROLCONTAINER +class BaseContainerControl : public CSS_AWT::XControlModel + , public CSS_AWT::XControlContainer , public BaseControl { @@ -121,7 +103,7 @@ public: @onerror - */ - BaseContainerControl( const UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY >& xFactory ); + BaseContainerControl( const CSS_UNO::Reference< CSS_LANG::XMultiServiceFactory >& xFactory ); /**_______________________________________________________________________________________________________ @short - @@ -155,7 +137,9 @@ 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 ); //________________________________________________________________________________________________________ // XTypeProvider @@ -174,7 +158,8 @@ public: @onerror A RuntimeException is thrown. */ - virtual UNO3_SEQUENCE< UNO3_TYPE > SAL_CALL getTypes() throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Sequence< CSS_UNO::Type > SAL_CALL getTypes() + throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XAggregation @@ -193,7 +178,9 @@ public: @onerror - */ - virtual UNO3_ANY SAL_CALL queryAggregation( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Any SAL_CALL queryAggregation( + const CSS_UNO::Type& aType + ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XControl @@ -212,8 +199,10 @@ public: @onerror - */ - virtual void SAL_CALL createPeer( const UNO3_REFERENCE< UNO3_XTOOLKIT >& xToolkit , - const UNO3_REFERENCE< UNO3_XWINDOWPEER >& xParent ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL createPeer( + const CSS_UNO::Reference< CSS_AWT::XToolkit >& xToolkit , + const CSS_UNO::Reference< CSS_AWT::XWindowPeer >& xParent + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -228,7 +217,9 @@ public: @onerror - */ - virtual sal_Bool SAL_CALL setModel( const UNO3_REFERENCE< UNO3_XCONTROLMODEL >& xModel ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual sal_Bool SAL_CALL setModel( + const CSS_UNO::Reference< CSS_AWT::XControlModel >& xModel + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -243,7 +234,8 @@ public: @onerror - */ - virtual UNO3_REFERENCE< UNO3_XCONTROLMODEL > SAL_CALL getModel() throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Reference< CSS_AWT::XControlModel > SAL_CALL getModel() + throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XComponent @@ -262,7 +254,7 @@ public: @onerror - */ - virtual void SAL_CALL dispose() throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL dispose() throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XEventListener @@ -281,7 +273,7 @@ public: @onerror - */ - virtual void SAL_CALL disposing( const UNO3_EVENTOBJECT& rEvent ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL disposing( const CSS_LANG::EventObject& rEvent ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XControlContainer @@ -300,8 +292,10 @@ public: @onerror - */ - virtual void SAL_CALL addControl( const UNO3_OUSTRING& sName , - const UNO3_REFERENCE< UNO3_XCONTROL >& xControl ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL addControl( + const ::rtl::OUString& sName , + const CSS_UNO::Reference< CSS_AWT::XControl >& xControl + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -316,7 +310,9 @@ public: @onerror - */ - virtual void SAL_CALL addContainerListener( const UNO3_REFERENCE< UNO3_XCONTAINERLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL addContainerListener( + const CSS_UNO::Reference< CSS_CONTAINER::XContainerListener >& xListener + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -331,7 +327,9 @@ public: @onerror - */ - virtual void SAL_CALL removeControl( const UNO3_REFERENCE< UNO3_XCONTROL >& xControl ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL removeControl( + const CSS_UNO::Reference< CSS_AWT::XControl >& xControl + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -346,7 +344,9 @@ public: @onerror - */ - virtual void SAL_CALL removeContainerListener( const UNO3_REFERENCE< UNO3_XCONTAINERLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL removeContainerListener( + const CSS_UNO::Reference< CSS_CONTAINER::XContainerListener >& xListener + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -361,7 +361,9 @@ public: @onerror - */ - virtual void SAL_CALL setStatusText( const UNO3_OUSTRING& sStatusText ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL setStatusText( + const ::rtl::OUString& sStatusText + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -376,7 +378,9 @@ public: @onerror - */ - virtual UNO3_REFERENCE< UNO3_XCONTROL > SAL_CALL getControl( const UNO3_OUSTRING& sName) throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Reference< CSS_AWT::XControl > SAL_CALL getControl( + const ::rtl::OUString& sName + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -391,7 +395,8 @@ public: @onerror - */ - virtual UNO3_SEQUENCE< UNO3_REFERENCE< UNO3_XCONTROL > > SAL_CALL getControls() throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Sequence< CSS_UNO::Reference< CSS_AWT::XControl > > SAL_CALL getControls() + throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XUnoControlContainer @@ -410,7 +415,9 @@ public: @onerror - */ - virtual void SAL_CALL addTabController( const UNO3_REFERENCE< UNO3_XTABCONTROLLER >& xTabController ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL addTabController( + const CSS_UNO::Reference< CSS_AWT::XTabController >& xTabController + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -425,7 +432,9 @@ public: @onerror - */ - virtual void SAL_CALL removeTabController( const UNO3_REFERENCE< UNO3_XTABCONTROLLER >& xTabController ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL removeTabController( + const CSS_UNO::Reference< CSS_AWT::XTabController >& xTabController + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -440,7 +449,9 @@ public: @onerror - */ - virtual void SAL_CALL setTabControllers( const UNO3_SEQUENCE< UNO3_REFERENCE< UNO3_XTABCONTROLLER > >& xTabControllers ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL setTabControllers( + const CSS_UNO::Sequence< CSS_UNO::Reference< CSS_AWT::XTabController > >& xTabControllers + ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @@ -455,7 +466,8 @@ public: @onerror - */ - virtual UNO3_SEQUENCE< UNO3_REFERENCE< UNO3_XTABCONTROLLER > > SAL_CALL getTabControllers() throw( UNO3_RUNTIMEEXCEPTION ); + virtual CSS_UNO::Sequence< CSS_UNO::Reference< CSS_AWT::XTabController > > SAL_CALL getTabControllers() + throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ // XWindow @@ -474,7 +486,7 @@ public: @onerror - */ - virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( UNO3_RUNTIMEEXCEPTION ); + virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( CSS_UNO::RuntimeException ); //____________________________________________________________________________________________________________ // protected methods @@ -495,7 +507,9 @@ protected: @onerror */ - virtual UNO3_WINDOWDESCRIPTOR* impl_getWindowDescriptor( const UNO3_REFERENCE< UNO3_XWINDOWPEER >& xParentPeer ); + virtual CSS_AWT::WindowDescriptor* impl_getWindowDescriptor( + const CSS_UNO::Reference< CSS_AWT::XWindowPeer >& xParentPeer + ); /**_______________________________________________________________________________________________________ @short @@ -510,9 +524,11 @@ protected: @onerror */ - virtual void impl_paint( sal_Int32 nX , - sal_Int32 nY , - const UNO3_REFERENCE< UNO3_XGRAPHICS >& xGraphics ); + virtual void impl_paint( + sal_Int32 nX , + sal_Int32 nY , + const CSS_UNO::Reference< CSS_AWT::XGraphics >& xGraphics + ); //____________________________________________________________________________________________________________ // private methods @@ -555,13 +571,24 @@ private: //____________________________________________________________________________________________________________ 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 + CSS_UNO::Sequence< CSS_UNO::Reference< CSS_AWT::XTabController > > m_xTabControllerList ; - IMPL_ControlInfoList* m_pControlInfoList ; /// list of pointer of "struct IMPL_ControlInfo" to hold child-controls - UNO3_SEQUENCE< UNO3_REFERENCE< UNO3_XTABCONTROLLER > > m_xTabControllerList ; /// list of references of XTabController to hold tab-order in this container - UNO3_OMULTITYPEINTERFACECONTAINERHELPER m_aListeners ; + ::cppu::OMultiTypeInterfaceContainerHelper m_aListeners ; }; // class BaseContainerControl +// The namespace aliases are only used in this header +#undef CSS_UNO +#undef CSS_AWT +#undef CSS_LANG +#undef CSS_CONTAINER + } // namespace unocontrols #endif // ifndef _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |