diff options
Diffstat (limited to 'toolkit/inc/toolkit')
42 files changed, 1274 insertions, 452 deletions
diff --git a/toolkit/inc/toolkit/awt/animatedimagespeer.hxx b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx new file mode 100755 index 000000000000..b9bdecdf0e47 --- /dev/null +++ b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx @@ -0,0 +1,106 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_ANIMATEDIMAGEPEER_HXX +#define TOOLKIT_ANIMATEDIMAGEPEER_HXX + +#include "toolkit/awt/vclxwindow.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/awt/XAnimation.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/implbase3.hxx> + +#include <boost/scoped_ptr.hpp> +#include <boost/noncopyable.hpp> + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= AnimatedImagesPeer + //================================================================================================================== + struct AnimatedImagesPeer_Data; + typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow + , ::com::sun::star::awt::XAnimation + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::util::XModifyListener + > AnimatedImagesPeer_Base; + + class AnimatedImagesPeer :public AnimatedImagesPeer_Base + ,public ::boost::noncopyable + { + public: + AnimatedImagesPeer(); + + protected: + ~AnimatedImagesPeer(); + + public: + // XAnimation + virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException); + + // VclWindowPeer + virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + + // XContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + + // XModifyListener + virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + + // XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + + protected: + void ProcessWindowEvent( const VclWindowEvent& i_windowEvent ); + + private: + /** updates our images with the ones from the givem XAnimatedImages component + */ + void impl_updateImages_nolck( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_animatedImages ); + + private: + ::boost::scoped_ptr< AnimatedImagesPeer_Data > m_pData; + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_ANIMATEDIMAGEPEER_HXX diff --git a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx index 24eae01f8e9d..0b88ee59bb56 100644 --- a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx @@ -75,8 +75,8 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> mxWindow; VCLXWindow* mpVCLXindow; - ULONG nDummy1; - ULONG nDummy2; + sal_uLong nDummy1; + sal_uLong nDummy2; void* pDummy1; VCLExternalSolarLock* m_pSolarLock; diff --git a/toolkit/inc/toolkit/awt/vclxcontainer.hxx b/toolkit/inc/toolkit/awt/vclxcontainer.hxx index 3e95d8f9811f..fa66ba43af99 100644 --- a/toolkit/inc/toolkit/awt/vclxcontainer.hxx +++ b/toolkit/inc/toolkit/awt/vclxcontainer.hxx @@ -43,7 +43,7 @@ // class VCLXContainer // ---------------------------------------------------- -class VCLXContainer : public ::com::sun::star::awt::XVclContainer, +class TOOLKIT_DLLPUBLIC VCLXContainer : public ::com::sun::star::awt::XVclContainer, public ::com::sun::star::awt::XVclContainerPeer, public VCLXWindow { diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx index d7d144edff98..fba5ec764a86 100644 --- a/toolkit/inc/toolkit/awt/vclxdevice.hxx +++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx @@ -45,7 +45,7 @@ class VirtualDevice; // class VCLXDevice // ---------------------------------------------------- -// For using nDummy, no incompatible update, add a BOOL bCreatedWithToolkitMember later... +// For using nDummy, no incompatible update, add a sal_Bool bCreatedWithToolkitMember later... #define FLAGS_CREATEDWITHTOOLKIT 0x00000001 class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice, diff --git a/toolkit/inc/toolkit/awt/vclxfont.hxx b/toolkit/inc/toolkit/awt/vclxfont.hxx index 3aa432071251..a35ec3aa1875 100644 --- a/toolkit/inc/toolkit/awt/vclxfont.hxx +++ b/toolkit/inc/toolkit/awt/vclxfont.hxx @@ -54,7 +54,7 @@ private: FontMetric* mpFontMetric; protected: - BOOL ImplAssertValidFontMetric(); + sal_Bool ImplAssertValidFontMetric(); ::osl::Mutex& GetMutex() { return maMutex; } public: diff --git a/toolkit/inc/toolkit/awt/vclxmenu.hxx b/toolkit/inc/toolkit/awt/vclxmenu.hxx index ad41e04033f9..74bdeeefa4d3 100644 --- a/toolkit/inc/toolkit/awt/vclxmenu.hxx +++ b/toolkit/inc/toolkit/awt/vclxmenu.hxx @@ -83,7 +83,7 @@ public: Menu* GetMenu() const { return mpMenu; } - BOOL IsPopupMenu() const; + sal_Bool IsPopupMenu() const; // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx new file mode 100644 index 000000000000..d4fe2a727b43 --- /dev/null +++ b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx @@ -0,0 +1,90 @@ +// ---------------------------------------------------- +// class VCLXDialog +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX_ +#define _TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX_ + +#include <toolkit/dllapi.h> +#include <com/sun/star/beans/PropertyValues.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/PropertyState.hpp> +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include <com/sun/star/container/XContainerListener.hpp> +#include "toolkit/awt/vclxwindow.hxx" +//#include <com/sun/star/awt/tab/XTabPageModel.hpp> +#include <com/sun/star/awt/tab/XTabPageContainer.hpp> +#include <toolkit/helper/listenermultiplexer.hxx> +#include <cppuhelper/implbase2.hxx> +#include <toolkit/awt/vclxcontainer.hxx> + +// ---------------------------------------------------- +typedef ::cppu::ImplInheritanceHelper2 < VCLXContainer + , ::com::sun::star::awt::tab::XTabPageContainer + , ::com::sun::star::container::XContainerListener + > VCLXTabPageContainer_Base; +class VCLXTabPageContainer : public VCLXTabPageContainer_Base +{ +public: + VCLXTabPageContainer(); + ~VCLXTabPageContainer(); + + // ::com::sun::star::awt::XView + void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XDevice, + ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::grid::XTabPageContainer + virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException); + + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); + virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } + + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); +protected: + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); +private: + sal_Int16 m_nActiveTabPageId; + TabPageListenerMultiplexer m_aTabPageListeners; + ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > > m_aTabPages; +}; +#endif // _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_ diff --git a/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx new file mode 100644 index 000000000000..670ed25c0f2d --- /dev/null +++ b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx @@ -0,0 +1,82 @@ +// ---------------------------------------------------- +// class VCLXDialog +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_ +#define _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_ + +#include <toolkit/dllapi.h> +#include <com/sun/star/beans/PropertyValues.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/PropertyState.hpp> +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include "toolkit/awt/vclxwindow.hxx" +#include <toolkit/controls/unocontrolmodel.hxx> +#include <com/sun/star/awt/tab/XTabPageModel.hpp> +#include <com/sun/star/awt/tab/XTabPage.hpp> +#include "forward.hxx" +#include <cppuhelper/implbase1.hxx> +// ---------------------------------------------------- +typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel, + ::com::sun::star::awt::tab::XTabPageModel + > VCLXTabPageModel_Base; +class VCLXTabPageModel : public VCLXTabPageModel_Base +{ +public: + VCLXTabPageModel(); + VCLXTabPageModel( const VCLXTabPageModel& rModel ) : VCLXTabPageModel_Base( rModel ) {;} + ~VCLXTabPageModel(); + + // ::com::sun::star::awt::XView + void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XDevice, + ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException); + + // virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } + UnoControlModel* Clone() const { return new VCLXTabPageModel( *this ); } + + // ::com::sun::star::beans::XMultiPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + // ::com::sun::star::awt::XVclWindowPeer + void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::tab::XTabPageModel + virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException); +protected: + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); +}; +#endif // _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_ diff --git a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx index 314168738d93..e706d9cc4a81 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -42,7 +42,7 @@ #include <osl/mutex.hxx> #include <osl/module.h> #include <tools/link.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <toolkit/dllapi.h> diff --git a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx index 76bdf0b8dceb..16f9910391d0 100644 --- a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx @@ -91,7 +91,7 @@ public: // class VCLXTopWindow // ---------------------------------------------------- -class VCLXTopWindow: public VCLXTopWindow_Base, +class TOOLKIT_DLLPUBLIC VCLXTopWindow: public VCLXTopWindow_Base, public VCLXContainer { protected: diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx index fb3ca32b590a..e5c60349a2f7 100644 --- a/toolkit/inc/toolkit/awt/vclxwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx @@ -101,7 +101,7 @@ protected: CreateAccessibleContext(); void SetSynthesizingVCLEvent( sal_Bool b ); - BOOL IsSynthesizingVCLEvent() const; + sal_Bool IsSynthesizingVCLEvent() const; void SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ); diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index a487c9080ec0..89de37a048fd 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -124,7 +124,7 @@ private: Image maImage; protected: - BitmapEx GetBitmap() const { return maImage.GetBitmapEx(); } + const Image& GetImage() const { return maImage; } protected: // ::com::sun::star::awt::XWindow @@ -295,7 +295,7 @@ private: ::rtl::OUString maActionCommand; protected: - void ImplClickedOrToggled( BOOL bToggled ); + void ImplClickedOrToggled( sal_Bool bToggled ); void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); @@ -414,7 +414,7 @@ public: // ---------------------------------------------------- // class VCLXDialog // ---------------------------------------------------- -class VCLXDialog : public ::com::sun::star::awt::XDialog2, +class TOOLKIT_DLLPUBLIC VCLXDialog : public ::com::sun::star::awt::XDialog2, public ::com::sun::star::document::XVbaMethodParameter, //liuchen 2009-6-22, add the support of input/output parameters to VBA UserForm_QueryClose event public VCLXTopWindow { @@ -433,7 +433,7 @@ public: // ::com::sun::star::awt::XDialog2 virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setHelpId( const rtl::OUString& Id ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::XDialog void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx index 74ae6f619d24..e00c01082045 100644 --- a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx +++ b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx @@ -34,40 +34,28 @@ #include <comphelper/uno3.hxx> #include <com/sun/star/awt/XSimpleAnimation.hpp> +#include <boost/scoped_ptr.hpp> + //........................................................................ namespace toolkit { - class Throbber_Impl; //........................................................................ //==================================================================== //= XSimpleAnimation //==================================================================== - typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleAnimation - > XSimpleAnimation_Base; + typedef ::cppu::ImplInheritanceHelper1 < VCLXWindow + , ::com::sun::star::awt::XSimpleAnimation + > XSimpleAnimation_Base; - class XSimpleAnimation :public VCLXWindow - ,public XSimpleAnimation_Base + class XSimpleAnimation : public XSimpleAnimation_Base { - private: - //::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList; - sal_Bool mbRepeat; - sal_Int32 mnStepTime; - - Throbber_Impl *mpThrobber; - public: XSimpleAnimation(); protected: ~XSimpleAnimation(); - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XSimpleAnimation virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException); @@ -77,9 +65,6 @@ namespace toolkit virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - private: XSimpleAnimation( const XSimpleAnimation& ); // never implemented XSimpleAnimation& operator=( const XSimpleAnimation& ); // never implemented diff --git a/toolkit/inc/toolkit/awt/xthrobber.hxx b/toolkit/inc/toolkit/awt/xthrobber.hxx index 8b87fec352cc..1ea916c56072 100644 --- a/toolkit/inc/toolkit/awt/xthrobber.hxx +++ b/toolkit/inc/toolkit/awt/xthrobber.hxx @@ -34,23 +34,25 @@ #include <comphelper/uno3.hxx> #include <com/sun/star/awt/XThrobber.hpp> +#include <boost/scoped_ptr.hpp> +#include <boost/noncopyable.hpp> + //........................................................................ namespace toolkit { //........................................................................ - class Throbber_Impl; //==================================================================== //= XThrobber //==================================================================== - typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XThrobber - > XThrobber_Base; + typedef ::cppu::ImplInheritanceHelper1 < VCLXWindow + , ::com::sun::star::awt::XThrobber + > XThrobber_Base; - class XThrobber :public VCLXWindow - ,public XThrobber_Base + class XThrobber :public XThrobber_Base + ,public ::boost::noncopyable { private: - Throbber_Impl *mpThrobber; void SAL_CALL InitImageList() throw(::com::sun::star::uno::RuntimeException); public: @@ -59,22 +61,12 @@ namespace toolkit protected: ~XThrobber(); - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XThrobber virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException); - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); + virtual void SetWindow( Window* pWindow ); private: XThrobber( const XThrobber& ); // never implemented diff --git a/toolkit/inc/toolkit/controls/animatedimages.hxx b/toolkit/inc/toolkit/controls/animatedimages.hxx new file mode 100755 index 000000000000..c19ed5e5451c --- /dev/null +++ b/toolkit/inc/toolkit/controls/animatedimages.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_ANIMATEDIMAGES_HXX +#define TOOLKIT_ANIMATEDIMAGES_HXX + +#include "toolkit/controls/unocontrolbase.hxx" +#include "toolkit/controls/unocontrolmodel.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/awt/XAnimation.hpp> +#include <com/sun/star/awt/XAnimatedImages.hpp> +#include <com/sun/star/container/XContainerListener.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase2.hxx> + +#include <boost/scoped_ptr.hpp> + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= + //================================================================================================================== + typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase + , ::com::sun::star::awt::XAnimation + , ::com::sun::star::container::XContainerListener + > AnimatedImagesControl_Base; + + class AnimatedImagesControl : public AnimatedImagesControl_Base + { + public: + AnimatedImagesControl( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory ); + ::rtl::OUString GetComponentServiceName(); + + // XAnimation + virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XControl + sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& i_rModel ) throw ( ::com::sun::star::uno::RuntimeException ); + void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& i_toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& i_parentPeer ) throw(::com::sun::star::uno::RuntimeException); + + + // XContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException); + }; + + //================================================================================================================== + //= AnimatedImagesControlModel + //================================================================================================================== + struct AnimatedImagesControlModel_Data; + typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel + , ::com::sun::star::awt::XAnimatedImages + > AnimatedImagesControlModel_Base; + class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base + { + public: + AnimatedImagesControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory ); + AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource ); + + virtual UnoControlModel* Clone() const; + + // XPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + + // XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XAnimatedImages + virtual ::sal_Int32 SAL_CALL getStepTime() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL getAutoRepeat() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setAutoRepeat( ::sal_Bool _autorepeat ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getScaleMode() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getImageSetCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XAnimatedImages::XContainer + virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); + + protected: + ~AnimatedImagesControlModel(); + + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); + + private: + ::boost::scoped_ptr< AnimatedImagesControlModel_Data > + m_pData; + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_ANIMATEDIMAGES_HXX diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx new file mode 100644 index 000000000000..3090eba68749 --- /dev/null +++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx @@ -0,0 +1,265 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_CONTROL_MODEL_CONTAINERBASE_HXX +#define TOOLKIT_CONTROL_MODEL_CONTAINERBASE_HXX + +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/container/XContainer.hpp> +#include <com/sun/star/awt/XTabControllerModel.hpp> +#include <com/sun/star/util/XChangesNotifier.hpp> +#include <com/sun/star/util/XChangesListener.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/beans/XPropertyChangeListener.hpp> +#include <com/sun/star/resource/XStringResourceResolver.hpp> +#include <cppuhelper/implbase8.hxx> +#include <cppuhelper/implbase2.hxx> +#include <toolkit/helper/listenermultiplexer.hxx> +#include <toolkit/controls/unocontrolmodel.hxx> +#include <toolkit/controls/unocontrolcontainer.hxx> +#include <cppuhelper/propshlp.hxx> +#include <cppuhelper/basemutex.hxx> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/awt/tab/XTabPageModel.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +// ---------------------------------------------------- +// class ControlModelContainerBase +// ---------------------------------------------------- +typedef UnoControlModel ControlModel_Base; +typedef ::cppu::AggImplInheritanceHelper8 < ControlModel_Base + , ::com::sun::star::lang::XMultiServiceFactory + , ::com::sun::star::container::XContainer + , ::com::sun::star::container::XNameContainer + , ::com::sun::star::awt::XTabControllerModel + , ::com::sun::star::util::XChangesNotifier + , ::com::sun::star::beans::XPropertyChangeListener + , ::com::sun::star::awt::tab::XTabPageModel + , ::com::sun::star::lang::XInitialization + > ControlModelContainer_IBase; + +class ControlModelContainerBase : public ControlModelContainer_IBase +{ +public: + // would like to make this typedef private, too, but the Forte 7 compiler does have + // problems with this ..... + typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >, ::rtl::OUString > + UnoControlModelHolder; +private: + typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList; + + // for grouping control models (XTabControllerModel::getGroupXXX) + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > + ModelGroup; + typedef ::std::vector< ModelGroup > AllGroups; + + friend struct CloneControlModel; + friend struct FindControlModel; + friend struct CompareControlModel; + +protected: + ContainerListenerMultiplexer maContainerListeners; + ::cppu::OInterfaceContainerHelper maChangeListeners; + UnoControlModelHolderList maModels; + + AllGroups maGroups; + sal_Bool mbGroupsUpToDate; + + bool m_bEnabled; + ::rtl::OUString m_sTitle; + ::rtl::OUString m_sImageURL; + ::rtl::OUString m_sTooltip; + sal_Int16 m_nTabPageId; + + void Clone_Impl(ControlModelContainerBase& _rClone) const; + +protected: + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + + UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName ); + +public: + ControlModelContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ControlModelContainerBase( const ControlModelContainerBase& rModel ); + ~ControlModelContainerBase(); + + UnoControlModel* Clone() const; + + // ::com::sun::star::container::XContainer + void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XElementAcces + ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess + void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XMultiPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XMultiServiceFactory + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + + // XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + + // XTabControllerModel + virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setGroupControl( sal_Bool GroupControl ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setControlModels( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, const ::rtl::OUString& GroupName ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getGroupCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL getGroup( sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL getGroupByName( const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group ) throw (::com::sun::star::uno::RuntimeException); + + // XChangesNotifier + virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + + // XPropertyChangeListener + virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + using cppu::OPropertySetHelper::disposing; + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED(ControlModelContainerBase, ControlModel_Base, "toolkit.ControlModelContainerBase" ) + + // XInitialization + virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments) + throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::tab::XTabPageModel + virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException); + +protected: + void startControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel ); + void stopControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel ); + + void implNotifyTabModelChange( const ::rtl::OUString& _rAccessor ); + + void implUpdateGroupStructure(); +}; + +class ResourceListener :public ::com::sun::star::util::XModifyListener, + public ::cppu::OWeakObject, + public ::cppu::BaseMutex +{ + public: + ResourceListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& xListener ); + virtual ~ResourceListener(); + + void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver >& rResource ); + void stopListening(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XModifyListener + virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > m_xResource; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xListener; + bool m_bListening; +}; + +typedef ::cppu::AggImplInheritanceHelper2 < UnoControlContainer + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::util::XChangesListener + > ContainerControl_IBase; + +class ControlContainerBase : public ContainerControl_IBase +{ +protected: + bool mbSizeModified; + bool mbPosModified; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener; + + void ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName ); + void ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel ); + virtual void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl ); + void ImplUpdateResourceResolver(); + void ImplStartListingForResourceEvents(); + ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > Impl_getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL ); + + ControlContainerBase(); + +public: + ControlContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~ControlContainerBase(); + + DECLIMPL_SERVICEINFO_DERIVED( ControlContainerBase, UnoControlBase, "toolkit.ControlContainerBase" ) + + void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + + void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XContainerListener + void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); + + // XChangesListener + virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XControl + sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException); +protected: + virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException); + virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); + virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); +}; +#endif diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx index 6adec8eeae4f..aa223d8c65df 100644 --- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx +++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx @@ -29,28 +29,17 @@ #ifndef TOOLKIT_DIALOG_CONTROL_HXX #define TOOLKIT_DIALOG_CONTROL_HXX -#include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/container/XContainer.hpp> -#include <com/sun/star/awt/XTabControllerModel.hpp> +#include <toolkit/controls/controlmodelcontainerbase.hxx> #include <com/sun/star/awt/XTopWindow.hpp> -#include <com/sun/star/util/XChangesNotifier.hpp> -#include <com/sun/star/util/XChangesListener.hpp> +#include <com/sun/star/awt/XDialog.hpp> #include <com/sun/star/awt/XTabListener.hpp> #include <com/sun/star/awt/XSimpleTabController.hpp> -#include <com/sun/star/util/XModifyListener.hpp> -#include <com/sun/star/beans/XPropertyChangeListener.hpp> -#include <com/sun/star/awt/XDialog2.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> #include <com/sun/star/graphic/XGraphicObject.hpp> -#include <cppuhelper/implbase6.hxx> -#include <cppuhelper/implbase5.hxx> #include <cppuhelper/implbase2.hxx> -#include <toolkit/helper/listenermultiplexer.hxx> -#include <toolkit/controls/unocontrolmodel.hxx> #include "toolkit/helper/servicenames.hxx" #include "toolkit/helper/macros.hxx" #include <toolkit/controls/unocontrolcontainer.hxx> -#include <cppuhelper/propshlp.hxx> #include <cppuhelper/basemutex.hxx> #include <list> #include <map> @@ -59,139 +48,38 @@ // ---------------------------------------------------- // class UnoControlDialogModel // ---------------------------------------------------- -typedef UnoControlModel UnoControlDialogModel_Base; -typedef ::cppu::ImplHelper6 < ::com::sun::star::lang::XMultiServiceFactory - , ::com::sun::star::container::XContainer - , ::com::sun::star::container::XNameContainer - , ::com::sun::star::awt::XTabControllerModel - , ::com::sun::star::util::XChangesNotifier - , ::com::sun::star::beans::XPropertyChangeListener - > UnoControlDialogModel_IBase; - -class UnoControlDialogModel : public UnoControlDialogModel_IBase - , public UnoControlDialogModel_Base + +class UnoControlDialogModel : public ControlModelContainerBase { -public: enum ChildOperation { Insert = 0, Remove }; - // would like to make this typedef private, too, but the Forte 7 compiler does have - // problems with this ..... - typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >, ::rtl::OUString > - UnoControlModelHolder; protected: void updateUserFormChildren( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xAllChildren, const rtl::OUString& aName, ChildOperation Operation, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xTarget ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList; - - // for grouping control models (XTabControllerModel::getGroupXXX) - typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > - ModelGroup; - typedef ::std::vector< ModelGroup > AllGroups; - - friend struct CloneControlModel; - friend struct FindControlModel; - friend struct CompareControlModel; - - ContainerListenerMultiplexer maContainerListeners; - ::cppu::OInterfaceContainerHelper maChangeListeners; - UnoControlModelHolderList maModels; - - AllGroups maGroups; - sal_Bool mbGroupsUpToDate; - ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj; bool mbAdjustingGraphic; ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - - UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName ); - public: - // bRegProps = false => subclass will register its own props + UnoControlDialogModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlDialogModel( bool bRegProps = true ); UnoControlDialogModel( const UnoControlDialogModel& rModel ); ~UnoControlDialogModel(); UnoControlModel* Clone() const; - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlModel::queryInterface(rType); } - ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } - void SAL_CALL release() throw() { OWeakAggObject::release(); } - - // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::container::XContainer - void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::container::XElementAcces - ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::container::XIndexContainer, XIndexReplace, XIndexAcces - // void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; - // sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException) = 0; - // ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; - // void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; - // void SAL_CALL removeByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; - - // ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess - void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // ::com::sun::star::beans::XMultiPropertySet ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::lang::XMultiServiceFactory - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::io::XPersistObject ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); - // XComponent - void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - - // XTabControllerModel - virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setGroupControl( sal_Bool GroupControl ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setControlModels( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, const ::rtl::OUString& GroupName ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getGroupCount( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL getGroup( sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL getGroupByName( const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group ) throw (::com::sun::star::uno::RuntimeException); - - // XChangesNotifier - virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - - // XPropertyChangeListener - virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException); - - // XEventListener - using cppu::OPropertySetHelper::disposing; - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException); - // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel,UnoControlDialogModel_Base, szServiceName2_UnoControlDialogModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, szServiceName2_UnoControlDialogModel ) -protected: - void startControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel ); - void stopControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel ); // ::cppu::OPropertySetHelper void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); - - void implNotifyTabModelChange( const ::rtl::OUString& _rAccessor ); - - void implUpdateGroupStructure(); private: void AddRadioButtonToGroup ( const ::com::sun::star::uno::Reference< XControlModel >& rControlModel, @@ -200,70 +88,25 @@ private: ModelGroup*& rpCurrentGroup ); void AddRadioButtonGroup ( ::std::map< ::rtl::OUString, ModelGroup >& pNamedGroups ); -}; - -// ---------------------------------------------------- -// class UnoDialogControl -// ---------------------------------------------------- -typedef ::cppu::ImplHelper6 < ::com::sun::star::container::XContainerListener - , ::com::sun::star::awt::XTopWindow - , ::com::sun::star::awt::XDialog2 - , ::com::sun::star::util::XChangesListener - , ::com::sun::star::util::XModifyListener - , ::com::sun::star::awt::XWindowListener - > UnoDialogControl_IBase; - -class ResourceListener :public ::com::sun::star::util::XModifyListener, - public ::cppu::OWeakObject, - public ::cppu::BaseMutex -{ - public: - ResourceListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& xListener ); - virtual ~ResourceListener(); - - void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver >& rResource ); - void stopListening(); - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw (); - virtual void SAL_CALL release() throw (); - // XModifyListener - virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); - - private: - ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > m_xResource; - ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xListener; - bool m_bListening; }; -class UnoDialogControl :public UnoControlContainer - ,public UnoDialogControl_IBase +class UnoDialogControl :public ControlContainerBase, + public ::com::sun::star::awt::XTopWindow, + public ::com::sun::star::awt::XDialog, + public ::com::sun::star::awt::XWindowListener { private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar > mxMenuBar; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController; - ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener; TopWindowListenerMultiplexer maTopWindowListeners; bool mbWindowListener; - bool mbSizeModified; - bool mbPosModified; - -protected: - void ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName ); - void ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel ); - void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl ); - void ImplUpdateResourceResolver(); - void ImplStartListingForResourceEvents(); public: - UnoDialogControl(); + UnoDialogControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoDialogControl(); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::queryInterface(rType); } @@ -288,14 +131,6 @@ public: virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - // ::com::sun::star::container::XContainerListener - void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XDialog2 - virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::awt::XDialog void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException); @@ -309,10 +144,6 @@ public: // ::com::sun::star::awt::XControl sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException); - - // XChangesListener - virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XModifyListener virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); @@ -321,9 +152,8 @@ public: DECLIMPL_SERVICEINFO( UnoDialogControl, szServiceName2_UnoControlDialog ) protected: - virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException); + // virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException); virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc ); - protected: virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl ); diff --git a/toolkit/inc/toolkit/controls/formattedcontrol.hxx b/toolkit/inc/toolkit/controls/formattedcontrol.hxx index 40ba795487cc..525e67dc6027 100644 --- a/toolkit/inc/toolkit/controls/formattedcontrol.hxx +++ b/toolkit/inc/toolkit/controls/formattedcontrol.hxx @@ -68,8 +68,11 @@ namespace toolkit ) throw (::com::sun::star::uno::Exception); public: - UnoControlFormattedFieldModel(); - UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel ) : UnoControlModel( rModel ) {;} + UnoControlFormattedFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel ) + :UnoControlModel( rModel ) + { + } UnoControlModel* Clone() const { return new UnoControlFormattedFieldModel( *this ); } @@ -111,7 +114,7 @@ namespace toolkit class UnoFormattedFieldControl : public UnoSpinFieldControl { public: - UnoFormattedFieldControl(); + UnoFormattedFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::awt::XTextListener diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx index fe57638c43ad..3bb3e0f3be49 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx @@ -186,7 +186,7 @@ FORWARD_DECLARE_INTERFACE( script, XNameContainer ) ,public ::comphelper::OAggregationArrayUsageHelper< OTemplateInstanceDisambiguation< CONTROLMODEL > > { public: - OGeometryControlModel(); + OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); private: OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance); diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx index 725b6998ec01..7eb5d0966282 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx @@ -33,11 +33,17 @@ //==================================================================== //-------------------------------------------------------------------- template <class CONTROLMODEL> -OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel() - :OGeometryControlModel_Base(new CONTROLMODEL) +OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :OGeometryControlModel_Base(new CONTROLMODEL( i_factory ) ) { } +//template <class CONTROLMODEL> +//OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & i_xCompContext) +// :OGeometryControlModel_Base(new CONTROLMODEL(i_xCompContext)) +//{ +//} +// //-------------------------------------------------------------------- template <class CONTROLMODEL> OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance) diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx index 3669e7b795ba..d570216fbccd 100644 --- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx +++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx @@ -46,37 +46,37 @@ #include <cppuhelper/implbase4.hxx> - #include <comphelper/uno3.hxx> -typedef GraphicControlModel UnoControlRoadmapModel_Base; +//........................................................................ +namespace toolkit +{ +//........................................................................ + typedef GraphicControlModel UnoControlRoadmapModel_Base; -typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory - , ::com::sun::star::container::XContainer - , ::com::sun::star::container::XIndexContainer - > UnoControlRoadmapModel_IBase; + typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory + , ::com::sun::star::container::XContainer + , ::com::sun::star::container::XIndexContainer + > UnoControlRoadmapModel_IBase; -typedef UnoControlBase UnoControlRoadmap_Base; -typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster - , ::com::sun::star::container::XContainerListener - , ::com::sun::star::awt::XItemListener - , ::com::sun::star::beans::XPropertyChangeListener - > UnoControlRoadmap_IBase; + typedef UnoControlBase UnoControlRoadmap_Base; + typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::awt::XItemListener + , ::com::sun::star::beans::XPropertyChangeListener + > UnoControlRoadmap_IBase; -typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener, - ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base; + typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener, + ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base; -//........................................................................ -namespace toolkit{ -//........................................................................ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::lang; @@ -111,7 +111,7 @@ namespace toolkit{ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlRoadmapModel(); + UnoControlRoadmapModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlRoadmapModel( const UnoControlRoadmapModel& rModel ) : UnoControlRoadmapModel_Base( rModel ), UnoControlRoadmapModel_IBase( rModel ), @@ -168,7 +168,7 @@ namespace toolkit{ private: ItemListenerMultiplexer maItemListeners; public: - UnoRoadmapControl(); + UnoRoadmapControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } diff --git a/toolkit/inc/toolkit/controls/spinningprogress.hxx b/toolkit/inc/toolkit/controls/spinningprogress.hxx new file mode 100755 index 000000000000..e0a676b2aa86 --- /dev/null +++ b/toolkit/inc/toolkit/controls/spinningprogress.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_SPINNINGPROGRESS_HXX +#define TOOLKIT_SPINNINGPROGRESS_HXX + +#include "toolkit/controls/animatedimages.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace toolkit +{ +//...................................................................................................................... + + //================================================================================================================== + //= SpinningProgressControlModel + //================================================================================================================== + typedef AnimatedImagesControlModel SpinningProgressControlModel_Base; + class SpinningProgressControlModel : public SpinningProgressControlModel_Base + { + public: + SpinningProgressControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory ); + SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource ); + + virtual UnoControlModel* Clone() const; + + // XPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + + // XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + protected: + ~SpinningProgressControlModel(); + }; + +//...................................................................................................................... +} // namespace toolkit +//...................................................................................................................... + +#endif // TOOLKIT_SPINNINGPROGRESS_HXX diff --git a/toolkit/inc/toolkit/controls/tabpagecontainer.hxx b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx new file mode 100644 index 000000000000..c7a2e3b8ef90 --- /dev/null +++ b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx @@ -0,0 +1,147 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_TABPAGE_CONTAINER_HXX +#define TOOLKIT_TABPAGE_CONTAINER_HXX + +#include <com/sun/star/awt/tab/XTabPageContainer.hpp> +#include <com/sun/star/awt/tab/XTabPageContainerModel.hpp> +#include <com/sun/star/awt/tab/XTabPageContainerListener.hpp> +#include <com/sun/star/awt/tab/XTabPage.hpp> +#include <com/sun/star/awt/tab/XTabPageModel.hpp> +#include <toolkit/controls/unocontrolbase.hxx> +#include <toolkit/controls/unocontrolmodel.hxx> +#include <toolkit/helper/servicenames.hxx> +#include <cppuhelper/implbase1.hxx> +#include <comphelper/sequence.hxx> +#include <toolkit/controls/controlmodelcontainerbase.hxx> +#include <toolkit/controls/unocontrolmodel.hxx> +#include <toolkit/helper/listenermultiplexer.hxx> + +using namespace ::com::sun::star::uno; +//using namespace ::com::sun::star::awt; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; + +// ------------------------------------------------------------------ +// class ::com::sun::star::awt::tab::UnoControlTabPageContainerModel +// ------------------------------------------------------------------ +typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel + , ::com::sun::star::awt::tab::XTabPageContainerModel + > UnoControlTabPageContainerModel_Base; +class UnoControlTabPageContainerModel : public UnoControlTabPageContainerModel_Base +{ +private: + std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageModel > > m_aTabPageVector; + ContainerListenerMultiplexer maContainerListeners; +protected: + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + // ::com::sun::star::beans::XMultiPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + +public: + UnoControlTabPageContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + UnoControlTabPageContainerModel( const UnoControlTabPageContainerModel& rModel ) : UnoControlTabPageContainerModel_Base( rModel ),maContainerListeners( *this ) {;} + + UnoControlModel* Clone() const { return new UnoControlTabPageContainerModel( *this ); } + + // ::com::sun::star::io::XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainerModel, UnoControlModel, szServiceName_UnoControlTabPageContainerModel ) + // XIndexContainer + virtual void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) + throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeByIndex( sal_Int32 Index ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XIndexReplace + virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) + throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException); + //{ + //return ::getCppuType((com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >*)0); + //} + + virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XContainer + void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); +}; +// =================================================================== +// = UnoControlTabPageContainer +// =================================================================== +typedef ::cppu::AggImplInheritanceHelper1 < ControlContainerBase + , ::com::sun::star::awt::tab::XTabPageContainer + > UnoControlTabPageContainer_Base; +class UnoControlTabPageContainer : public UnoControlTabPageContainer_Base +{ +public: + UnoControlTabPageContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ::rtl::OUString GetComponentServiceName(); + + // ::com::sun::star::lang::XComponent + void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XControl + void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::tab::XTabPageContainer + virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL addControl( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw (::com::sun::star::uno::RuntimeException); + // ::com::sun::star::lang::XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainer, UnoControlBase, szServiceName_UnoControlTabPageContainer ) + +// using UnoControl::getPeer; +protected: + virtual void updateFromModel(); +private: + TabPageListenerMultiplexer m_aTabPageListeners; + sal_Int16 m_nActiveTabPageId; +}; + +#endif // _TOOLKIT_TABPAGE_CONTAINER_HXX diff --git a/toolkit/inc/toolkit/controls/tabpagemodel.hxx b/toolkit/inc/toolkit/controls/tabpagemodel.hxx new file mode 100644 index 000000000000..08938669fa58 --- /dev/null +++ b/toolkit/inc/toolkit/controls/tabpagemodel.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TOOLKIT_TABPAGE_MODEL_HXX +#define TOOLKIT_TABPAGE_MODEL_HXX + +#include <toolkit/controls/controlmodelcontainerbase.hxx> +#include <com/sun/star/awt/tab/XTabPageModel.hpp> +#include <com/sun/star/awt/tab/XTabPage.hpp> +#include <com/sun/star/resource/XStringResourceResolver.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include "toolkit/helper/servicenames.hxx" +#include "toolkit/helper/macros.hxx" +#include <toolkit/controls/unocontrolcontainer.hxx> +#include <cppuhelper/basemutex.hxx> +#include <list> +#include <cppuhelper/implbase2.hxx> + +// ---------------------------------------------------- +// class TabPageModel +// ---------------------------------------------------- +//typedef ::cppu::ImplHelper2< ::com::sun::star::awt::tab::XTabPageModel, +// ::com::sun::star::lang::XInitialization +// > TabPageAccess_BASE; +// +//class TabPageModel : public TabPageAccess_BASE +//{ +// +//private: +// bool m_bEnabled; +// ::rtl::OUString m_sTitle; +// ::rtl::OUString m_sImageURL; +// ::rtl::OUString m_sTooltip; +// sal_Int16 m_nTabPageId; +// +//public: +// TabPageModel(); +// explicit TabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xCompContext); +// ~TabPageModel(); +// +// // XInitialization +// virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments) +// throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException); +// +// ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); +// void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } +// void SAL_CALL release() throw() { OWeakAggObject::release(); } +// +// // ::com::sun::star::lang::XTypeProvider +// //::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); +// //::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); +// +// // ::com::sun::star::awt::tab::XTabPageModel +// virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException); +// virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException); +// virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException); +// virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException); +// virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException); +// virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException); +//}; +// ---------------------------------------------------- +// class UnoControlTabPageModel +// ---------------------------------------------------- + +class UnoControlTabPageModel : public ControlModelContainerBase + //public TabPageModel +{ +protected: + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); +public: + UnoControlTabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory); + + // ::com::sun::star::io::XPersistObject + ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XMultiPropertySet + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + // XInitialization + virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments) + throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException); + + // XServiceInfo + DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageModel, ControlModelContainerBase, szServiceName_UnoControlTabPageModel ) + +}; + +// ---------------------------------------------------- +// class UnoTabPageControl +// ---------------------------------------------------- +typedef ::cppu::AggImplInheritanceHelper2 < ControlContainerBase + , ::com::sun::star::awt::tab::XTabPage + , ::com::sun::star::awt::XWindowListener + > UnoControlTabPage_Base; +class UnoControlTabPage : public UnoControlTabPage_Base +{ +private: + bool m_bWindowListener; +public: + + UnoControlTabPage( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + ~UnoControlTabPage(); + ::rtl::OUString GetComponentServiceName(); + + void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::awt::XWindowListener + virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); + // ::com::sun::star::lang::XServiceInfo + DECLIMPL_SERVICEINFO( UnoControlTabPage, szServiceName_UnoControlTabPage) +}; + +#endif // TOOLKIT_TABPAGE_MODEL_HXX diff --git a/toolkit/inc/toolkit/controls/tkscrollbar.hxx b/toolkit/inc/toolkit/controls/tkscrollbar.hxx index 3cd3427345b4..d51dceef32c2 100644 --- a/toolkit/inc/toolkit/controls/tkscrollbar.hxx +++ b/toolkit/inc/toolkit/controls/tkscrollbar.hxx @@ -51,7 +51,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlScrollBarModel(); + UnoControlScrollBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlScrollBarModel( const UnoControlScrollBarModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlScrollBarModel( *this ); } @@ -77,7 +77,7 @@ namespace toolkit AdjustmentListenerMultiplexer maAdjustmentListeners; public: - UnoScrollBarControl(); + UnoScrollBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } diff --git a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx index cddaffb01e6f..944d9cfcb1fe 100644 --- a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx +++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx @@ -52,7 +52,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoSimpleAnimationControlModel(); + UnoSimpleAnimationControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoSimpleAnimationControlModel( const UnoSimpleAnimationControlModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoSimpleAnimationControlModel( *this ); } @@ -72,28 +72,18 @@ namespace toolkit //= UnoSimpleAnimationControl //==================================================================== - typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleAnimation - > UnoSimpleAnimationControl_Base; + typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase + , ::com::sun::star::awt::XSimpleAnimation + > UnoSimpleAnimationControl_Base; - class UnoSimpleAnimationControl :public UnoControlBase - ,public UnoSimpleAnimationControl_Base + class UnoSimpleAnimationControl : public UnoSimpleAnimationControl_Base { private: public: - UnoSimpleAnimationControl(); + UnoSimpleAnimationControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); - DECLARE_UNO3_AGG_DEFAULTS( UnoSimpleAnimationControl, UnoControlBase ); - ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - - void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } - void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XSimpleAnimation virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/controls/tkspinbutton.hxx b/toolkit/inc/toolkit/controls/tkspinbutton.hxx index 645540be002c..6be8c21e0d0d 100644 --- a/toolkit/inc/toolkit/controls/tkspinbutton.hxx +++ b/toolkit/inc/toolkit/controls/tkspinbutton.hxx @@ -52,7 +52,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoSpinButtonModel(); + UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoSpinButtonModel( const UnoSpinButtonModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoSpinButtonModel( *this ); } @@ -83,7 +83,7 @@ namespace toolkit AdjustmentListenerMultiplexer maAdjustmentListeners; public: - UnoSpinButtonControl(); + UnoSpinButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); DECLARE_UNO3_AGG_DEFAULTS( UnoSpinButtonControl, UnoControlBase ); diff --git a/toolkit/inc/toolkit/controls/tkthrobber.hxx b/toolkit/inc/toolkit/controls/tkthrobber.hxx index 9e9b25914bda..0add98c51b85 100644 --- a/toolkit/inc/toolkit/controls/tkthrobber.hxx +++ b/toolkit/inc/toolkit/controls/tkthrobber.hxx @@ -52,7 +52,7 @@ namespace toolkit ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoThrobberControlModel(); + UnoThrobberControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoThrobberControlModel( const UnoThrobberControlModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoThrobberControlModel( *this ); } @@ -81,7 +81,7 @@ namespace toolkit private: public: - UnoThrobberControl(); + UnoThrobberControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); DECLARE_UNO3_AGG_DEFAULTS( UnoThrobberControl, UnoControlBase ); diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx index 5b2f9a894b94..d7d141148771 100644 --- a/toolkit/inc/toolkit/controls/unocontrol.hxx +++ b/toolkit/inc/toolkit/controls/unocontrol.hxx @@ -48,6 +48,7 @@ #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weakref.hxx> #include <cppuhelper/implbase9.hxx> +#include <comphelper/componentcontext.hxx> #include <com/sun/star/util/XModeChangeBroadcaster.hpp> #include <com/sun/star/awt/XVclWindowPeer.hpp> @@ -94,6 +95,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > mxVclWindowPeer; // just to avoid the query_interface thing protected: + const ::comphelper::ComponentContext maContext; EventListenerMultiplexer maDisposeListeners; WindowListenerMultiplexer maWindowListeners; FocusListenerMultiplexer maFocusListeners; @@ -143,8 +145,11 @@ protected: virtual sal_Bool requiresNewPeer( const ::rtl::OUString& _rPropertyName ) const; -public: +protected: UnoControl(); + +public: + UnoControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ~UnoControl(); UnoControlComponentInfos& GetComponentInfos() { return maComponentInfos; } diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx index 2d21f3f82c84..aa2036935344 100644 --- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx @@ -40,6 +40,14 @@ class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl { protected: + UnoControlBase(); + +protected: + UnoControlBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControl( i_factory ) + { + } + sal_Bool ImplHasProperty( sal_uInt16 nProp ); sal_Bool ImplHasProperty( const ::rtl::OUString& aPropertyName ); void ImplSetPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Bool bUpdateThis ); diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx index d2b225d23411..e29fab5b8350 100644 --- a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx @@ -65,8 +65,9 @@ protected: void ImplActivateTabControllers(); public: - UnoControlContainer(); - UnoControlContainer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer ); + UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); + UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory, + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xPeer ); ~UnoControlContainer(); diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx index 21a338a0f2a7..8d4d97836989 100644 --- a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx @@ -46,7 +46,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlContainerModel(); + UnoControlContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlContainerModel( const UnoControlContainerModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlContainerModel( *this ); } diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx index e46780b3b052..7aba0ec710ee 100644 --- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx @@ -45,6 +45,9 @@ #include <cppuhelper/propshlp.hxx> #include <cppuhelper/interfacecontainer.hxx> +#include <cppuhelper/implbase7.hxx> +#include <comphelper/componentcontext.hxx> +#include <comphelper/uno3.hxx> #include <list> @@ -54,21 +57,25 @@ class ImplPropertyTable; // class UnoControlModel // ---------------------------------------------------- -class TOOLKIT_DLLPUBLIC UnoControlModel : public ::com::sun::star::awt::XControlModel, - public ::com::sun::star::beans::XPropertyState, - public ::com::sun::star::io::XPersistObject, - public ::com::sun::star::lang::XComponent, - public ::com::sun::star::lang::XServiceInfo, - public ::com::sun::star::lang::XTypeProvider, - public ::com::sun::star::lang::XUnoTunnel, - public ::com::sun::star::util::XCloneable, - public MutexAndBroadcastHelper, - public ::cppu::OPropertySetHelper, - public ::cppu::OWeakAggObject +typedef ::cppu::WeakAggImplHelper7 < ::com::sun::star::awt::XControlModel + , ::com::sun::star::beans::XPropertyState + , ::com::sun::star::io::XPersistObject + , ::com::sun::star::lang::XComponent + , ::com::sun::star::lang::XServiceInfo + , ::com::sun::star::lang::XUnoTunnel + , ::com::sun::star::util::XCloneable + > UnoControlModel_Base; + +class TOOLKIT_DLLPUBLIC UnoControlModel :public UnoControlModel_Base + ,public MutexAndBroadcastHelper + ,public ::cppu::OPropertySetHelper { private: - ImplPropertyTable* mpData; - EventListenerMultiplexer maDisposeListeners; + ImplPropertyTable* mpData; + EventListenerMultiplexer maDisposeListeners; + +protected: + const ::comphelper::ComponentContext maContext; protected: void ImplRegisterProperty( sal_uInt16 nPropType ); @@ -100,18 +107,21 @@ protected: sal_Int32 _nSecondHandle /// second handle, which should supersede _nFirstHandle in the sequence ) const; -public: +protected: UnoControlModel(); +public: + UnoControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlModel( const UnoControlModel& rModel ); ~UnoControlModel(); virtual UnoControlModel* Clone() const = 0; - // ::com::sun::star::uno::XAggregation + // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return OWeakAggObject::queryInterface(rType); } - void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } - void SAL_CALL release() throw() { OWeakAggObject::release(); } + void SAL_CALL acquire() throw(); + void SAL_CALL release() throw(); + // ::com::sun::star::uno::XAggregation ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XUnoTunnel @@ -123,10 +133,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XControlModel + DECLARE_XTYPEPROVIDER() // ::com::sun::star::lang::XComponent void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 531467f359be..7c928ded5485 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -93,7 +93,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlEditModel(); + UnoControlEditModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlEditModel( *this ); } @@ -127,7 +127,7 @@ private: // They only support XTextComponent, so keep the text // here, maybe there is no Peer when calling setText()... ::rtl::OUString maText; - USHORT mnMaxTextLen; + sal_uInt16 mnMaxTextLen; sal_Bool mbSetTextInPeer; sal_Bool mbSetMaxTextLenInPeer; @@ -135,7 +135,7 @@ private: public: - UnoEditControl(); + UnoEditControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); TextListenerMultiplexer& GetTextListeners() { return maTextListeners; } @@ -196,7 +196,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFileControlModel(); + UnoControlFileControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFileControlModel( *this ); } @@ -217,7 +217,7 @@ public: class UnoFileControl : public UnoEditControl { public: - UnoFileControl(); + UnoFileControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); // ::com::sun::star::lang::XServiceInfo @@ -236,7 +236,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj; protected: - GraphicControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } + GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) + :UnoControlModel( i_factory ) + ,mbAdjustingImagePosition( false ) + ,mbAdjustingGraphic( false ) + { + } GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } // ::cppu::OPropertySetHelper @@ -252,14 +257,14 @@ private: // ---------------------------------------------------- // class UnoControlButtonModel // ---------------------------------------------------- -class UnoControlButtonModel : public GraphicControlModel +class UnoControlButtonModel : public GraphicControlModel { protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlButtonModel(); + UnoControlButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlButtonModel( *this ); } @@ -292,7 +297,7 @@ private: public: - UnoButtonControl(); + UnoButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -337,7 +342,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlImageControlModel(); + UnoControlImageControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { } UnoControlModel* Clone() const { return new UnoControlImageControlModel( *this ); } @@ -369,7 +374,7 @@ private: public: - UnoImageControlControl(); + UnoImageControlControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); @@ -397,7 +402,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlRadioButtonModel(); + UnoControlRadioButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlRadioButtonModel( *this ); } @@ -431,7 +436,7 @@ private: public: - UnoRadioButtonControl(); + UnoRadioButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -476,7 +481,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlCheckBoxModel(); + UnoControlCheckBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlCheckBoxModel( *this ); } @@ -509,7 +514,7 @@ private: public: - UnoCheckBoxControl(); + UnoCheckBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ~UnoCheckBoxControl(){;} ::rtl::OUString GetComponentServiceName(); @@ -557,7 +562,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedHyperlinkModel(); + UnoControlFixedHyperlinkModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFixedHyperlinkModel( *this ); } @@ -583,7 +588,7 @@ private: ActionListenerMultiplexer maActionListeners; public: - UnoFixedHyperlinkControl(); + UnoFixedHyperlinkControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); @@ -631,7 +636,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedTextModel(); + UnoControlFixedTextModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFixedTextModel( *this ); } @@ -655,7 +660,7 @@ class UnoFixedTextControl : public UnoControlBase, public ::com::sun::star::awt::XLayoutConstrains { public: - UnoFixedTextControl(); + UnoFixedTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } @@ -696,7 +701,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlGroupBoxModel(); + UnoControlGroupBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlGroupBoxModel( *this ); } @@ -718,7 +723,7 @@ public: class UnoGroupBoxControl : public UnoControlBase { public: - UnoGroupBoxControl(); + UnoGroupBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException); @@ -735,12 +740,20 @@ struct UnoControlListBoxModel_Data; typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel , ::com::sun::star::awt::XItemList > UnoControlListBoxModel_Base; -class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base +class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base { protected: - UnoControlListBoxModel(bool asComboBox); + enum ConstructorMode + { + ConstructDefault, + ConstructWithoutProperties + }; + public: - UnoControlListBoxModel(); + UnoControlListBoxModel( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory, + ConstructorMode const i_mode = ConstructDefault + ); UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ); ~UnoControlListBoxModel(); @@ -838,7 +851,7 @@ typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base { public: - UnoListBoxControl(); + UnoListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -918,7 +931,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlComboBoxModel(); + UnoControlComboBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlComboBoxModel( *this ); } @@ -952,7 +965,7 @@ private: public: - UnoComboBoxControl(); + UnoComboBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); @@ -1016,10 +1029,10 @@ class UnoSpinFieldControl : public UnoEditControl, { private: SpinListenerMultiplexer maSpinListeners; - BOOL mbRepeat; + sal_Bool mbRepeat; public: - UnoSpinFieldControl(); + UnoSpinFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); } ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); @@ -1057,7 +1070,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlDateFieldModel(); + UnoControlDateFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlDateFieldModel( *this ); } @@ -1084,7 +1097,7 @@ private: sal_Int32 mnLast; sal_Bool mbLongFormat; public: - UnoDateFieldControl(); + UnoDateFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1133,7 +1146,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlTimeFieldModel(); + UnoControlTimeFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlTimeFieldModel( *this ); } @@ -1160,7 +1173,7 @@ private: sal_Int32 mnLast; public: - UnoTimeFieldControl(); + UnoTimeFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1208,7 +1221,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlNumericFieldModel(); + UnoControlNumericFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlNumericFieldModel( *this ); } @@ -1235,7 +1248,7 @@ private: double mnLast; public: - UnoNumericFieldControl(); + UnoNumericFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1285,7 +1298,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlCurrencyFieldModel(); + UnoControlCurrencyFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlCurrencyFieldModel( *this ); } @@ -1312,7 +1325,7 @@ private: double mnLast; public: - UnoCurrencyFieldControl(); + UnoCurrencyFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1361,7 +1374,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlPatternFieldModel(); + UnoControlPatternFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlPatternFieldModel( *this ); } @@ -1387,7 +1400,7 @@ protected: void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); public: - UnoPatternFieldControl(); + UnoPatternFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); } @@ -1422,7 +1435,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlProgressBarModel(); + UnoControlProgressBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlProgressBarModel( *this ); } @@ -1444,7 +1457,7 @@ class UnoProgressBarControl : public UnoControlBase, public ::com::sun::star::awt::XProgressBar { public: - UnoProgressBarControl(); + UnoProgressBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } @@ -1478,7 +1491,7 @@ protected: ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); public: - UnoControlFixedLineModel(); + UnoControlFixedLineModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlFixedLineModel( *this ); } @@ -1500,7 +1513,7 @@ public: class UnoFixedLineControl : public UnoControlBase { public: - UnoFixedLineControl(); + UnoFixedLineControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ); ::rtl::OUString GetComponentServiceName(); sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException); @@ -1511,6 +1524,7 @@ public: }; + #endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx index ac38197bc5f1..46de6c4ad8d5 100644 --- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx +++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx @@ -57,6 +57,7 @@ #include <toolkit/helper/mutexhelper.hxx> #include <toolkit/helper/macros.hxx> #include <com/sun/star/awt/grid/XGridSelectionListener.hpp> +#include <com/sun/star/awt/tab/XTabPageContainerListener.hpp> // ---------------------------------------------------- // class ListenerMultiplexerBase // ---------------------------------------------------- @@ -264,6 +265,13 @@ DECL_LISTENERMULTIPLEXER_START_DLLPUB( SelectionListenerMultiplexer, ::com::sun: void SAL_CALL selectionChanged( const ::com::sun::star::awt::grid::GridSelectionEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException); DECL_LISTENERMULTIPLEXER_END +// ---------------------------------------------------- +// class TabPageListenerMultiplexer +// ---------------------------------------------------- +DECL_LISTENERMULTIPLEXER_START_DLLPUB( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener ) + void SAL_CALL tabPageActivated( const ::com::sun::star::awt::tab::TabPageActivatedEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException); +DECL_LISTENERMULTIPLEXER_END + #endif // _TOOLKIT_HELPER_LISTENERMULTIPLEXER_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx index f9d5eec31a2b..4bc4d4d59825 100644 --- a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx +++ b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx @@ -40,19 +40,13 @@ class MutexAndBroadcastHelper public: MutexAndBroadcastHelper() : BrdcstHelper( Mutex ) {} - ::osl::Mutex Mutex; ::cppu::OBroadcastHelper BrdcstHelper; ::osl::Mutex& GetMutex() { return Mutex; } - + ::cppu::OBroadcastHelper& GetBroadcastHelper() { return BrdcstHelper; } }; - - - - - #endif // _TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index 9b077cab2709..dd4bdd1f7d40 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -178,7 +178,7 @@ namespace rtl { #define BASEPROPERTY_TREE_ROOTDISPLAYED 127 #define BASEPROPERTY_TREE_SHOWSHANDLES 128 #define BASEPROPERTY_TREE_SHOWSROOTHANDLES 129 -#define BASEPROPERTY_TREE_ROWHEIGHT 130 +#define BASEPROPERTY_ROW_HEIGHT 130 #define BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING 131 #define BASEPROPERTY_TREE_END 131 #define BASEPROPERTY_DIALOGSOURCEURL 132 @@ -198,15 +198,19 @@ namespace rtl { #define BASEPROPERTY_REFERENCE_DEVICE 146 #define BASEPROPERTY_HIGHCONTRASTMODE 147 -#define BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND 148 -#define BASEPROPERTY_GRID_HEADER_BACKGROUND 149 -#define BASEPROPERTY_GRID_LINE_COLOR 150 -#define BASEPROPERTY_GRID_ROW_BACKGROUND 151 +#define BASEPROPERTY_GRID_HEADER_BACKGROUND 148 +#define BASEPROPERTY_GRID_HEADER_TEXT_COLOR 149 +#define BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS 150 +#define BASEPROPERTY_GRID_LINE_COLOR 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 #define BASEPROPERTY_ITEM_SEPARATOR_POS 153 #define BASEPROPERTY_GROUPNAME 154 // ::rtl::OUString #define BASEPROPERTY_MULTIPAGEVALUE 155 // sal_Int32 #define BASEPROPERTY_USERFORMCONTAINEES 156 // css::container::XNameContainer +#define BASEPROPERTY_AUTO_REPEAT 157 +#define BASEPROPERTY_ROW_HEADER_WIDTH 158 +#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 159 +#define BASEPROPERTY_USE_GRID_LINES 160 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 0a98bdf4bb25..b0ce59b05d02 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -104,13 +104,24 @@ extern const sal_Char szServiceName_GridControlModel[]; extern const sal_Char szServiceName_DefaultGridDataModel[]; extern const sal_Char szServiceName_DefaultGridColumnModel[]; extern const sal_Char szServiceName_GridColumn[]; +extern const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[]; extern const sal_Char szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[]; extern const sal_Char szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; extern const sal_Char szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[]; extern const sal_Char szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; +extern const sal_Char szServiceName_AnimatedImagesControl[]; +extern const sal_Char szServiceName_AnimatedImagesControlModel[]; +extern const sal_Char szServiceName_SpinningProgressControlModel[]; extern const sal_Char szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; +extern const sal_Char szServiceName_UnoControlTabPageModel[], szServiceName2_UnoControlTabPageModel[]; +extern const sal_Char szServiceName_UnoControlTabPage[]; +extern const sal_Char szServiceName_UnoControlTabPageContainerModel[]; +extern const sal_Char szServiceName_UnoControlTabPageContainer[]; + +// ExtUnoWrapper: +extern const char szServiceName_ImageProducer[], szServiceName2_ImageProducer[]; #endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx deleted file mode 100644 index b2c7a5771f78..000000000000 --- a/toolkit/inc/toolkit/helper/throbberimpl.hxx +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _TOOLKIT_HELPER_THROBBERIMPL_HXX_ -#define _TOOLKIT_HELPER_THROBBERIMPL_HXX_ - -#include <toolkit/awt/vclxwindow.hxx> -#include <com/sun/star/uno/Reference.hxx> - -#include <com/sun/star/graphic/XGraphic.hpp> -#include <vcl/timer.hxx> -#include <osl/mutex.hxx> - -//........................................................................ -namespace toolkit -//........................................................................ -{ -#define CSS_UNO ::com::sun::star::uno -#define CSS_GRAPHIC ::com::sun::star::graphic - - class Throbber_Impl - { - private: - CSS_UNO::Sequence< CSS_UNO::Reference< CSS_GRAPHIC::XGraphic > > maImageList; - CSS_UNO::Reference< VCLXWindow > mxParent; - - sal_Bool mbRepeat; - sal_Int32 mnStepTime; - sal_Int32 mnCurStep; - sal_Int32 mnStepCount; - AutoTimer maWaitTimer; - - DECL_LINK( TimeOutHdl, Throbber_Impl* ); - - public: - Throbber_Impl( CSS_UNO::Reference< VCLXWindow > xParent, - sal_Int32 nStepTime, - sal_Bool bRepeat ); - ~Throbber_Impl(); - - // Properties - void setStepTime( sal_Int32 nStepTime ) { mnStepTime = nStepTime; } - void setRepeat( sal_Bool bRepeat ) { mbRepeat = bRepeat; } - - // XSimpleAnimation - void start() throw ( CSS_UNO::RuntimeException ); - void stop() throw ( CSS_UNO::RuntimeException ); - void setImageList( const CSS_UNO::Sequence< CSS_UNO::Reference< CSS_GRAPHIC::XGraphic > >& ImageList ) - throw ( CSS_UNO::RuntimeException ); - // Helpers - void initImage() throw ( CSS_UNO::RuntimeException ); - }; -//........................................................................ -#undef CSS_UNO -#undef CSS_GRAPHIC - -} // namespacetoolkit -//........................................................................ - -#endif //_TOOLKIT_HELPER_THROBBERIMPL_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/inc/toolkit/helper/tkresmgr.hxx b/toolkit/inc/toolkit/helper/tkresmgr.hxx index 9d04fab909b4..17c65919bdc0 100644 --- a/toolkit/inc/toolkit/helper/tkresmgr.hxx +++ b/toolkit/inc/toolkit/helper/tkresmgr.hxx @@ -71,6 +71,7 @@ public: // loads the image with the specified resource id static Image loadImage( sal_uInt16 nResId ); + static Image getImageFromURL( const ::rtl::OUString& i_rImageURL ); }; diff --git a/toolkit/inc/toolkit/helper/unowrapper.hxx b/toolkit/inc/toolkit/helper/unowrapper.hxx index 75bb4b6dcab9..0518768bf952 100644 --- a/toolkit/inc/toolkit/helper/unowrapper.hxx +++ b/toolkit/inc/toolkit/helper/unowrapper.hxx @@ -67,11 +67,11 @@ public: void WindowDestroyed( Window* pWindow ); void WindowEvent_Move( Window* pWindow ); void WindowEvent_Resize( Window* pWindow ); - void WindowEvent_Show( Window* pWindow, BOOL bShow ); + void WindowEvent_Show( Window* pWindow, sal_Bool bShow ); void WindowEvent_Close( Window* pWindow ); void WindowEvent_Minimize( Window* pWindow ); void WindowEvent_Normalize( Window* pWindow ); - void WindowEvent_Activate( Window* pWindow, BOOL bActivated ); + void WindowEvent_Activate( Window* pWindow, sal_Bool bActivated ); void WindowEvent_MouseButtonUp( Window* pWindow, const MouseEvent& rEvt ); void WindowEvent_MouseButtonDown( Window* pWindow, const MouseEvent& rEvt ); void WindowEvent_MouseMove( Window* pWindow, const MouseEvent& rEvt ); diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx index fafff3fc07dc..ba8844eb277c 100644 --- a/toolkit/inc/toolkit/helper/vclunohelper.hxx +++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx @@ -65,8 +65,8 @@ namespace com { namespace sun { namespace star { namespace awt { #include <vcl/bitmapex.hxx> #include <vcl/region.hxx> #include <vcl/metric.hxx> -#include <vcl/mapunit.hxx> -#include <vcl/fldunit.hxx> +#include <tools/mapunit.hxx> +#include <tools/fldunit.hxx> #include <tools/poly.hxx> class Window; |