diff options
Diffstat (limited to 'toolkit/inc')
32 files changed, 1129 insertions, 351 deletions
diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx index 5d013e8a74c4..c434347b38e2 100644 --- a/toolkit/inc/layout/layout.hxx +++ b/toolkit/inc/layout/layout.hxx @@ -38,9 +38,9 @@ #include <tools/string.hxx> #include <vcl/bitmap.hxx> #include <vcl/combobox.h> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <vcl/lstbox.h> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> class Button; class ComboBox; @@ -795,7 +795,7 @@ public: operator String(); String getString (); rtl::OUString getOUString (); - String GetToken (USHORT i, sal_Char c); + String GetToken (sal_uInt16 i, sal_Char c); }; class InPlugImpl; diff --git a/toolkit/inc/pch/precompiled_toolkit.hxx b/toolkit/inc/pch/precompiled_toolkit.hxx index d0baff3b8343..77be02429484 100644 --- a/toolkit/inc/pch/precompiled_toolkit.hxx +++ b/toolkit/inc/pch/precompiled_toolkit.hxx @@ -327,7 +327,7 @@ #include "vcl/gradient.hxx" #include "vcl/image.hxx" #include "vcl/jobset.hxx" -#include "vcl/mapunit.hxx" +#include "tools/mapunit.hxx" #include "vcl/menu.hxx" #include "vcl/metric.hxx" #include "vcl/outdev.hxx" 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 12e7b10d8330..2c3744a2eefe 100644 --- a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx @@ -74,8 +74,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/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx index bb1c35078055..ca0b20a3f4bc 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 e912f2d13114..352dae82c853 100644 --- a/toolkit/inc/toolkit/awt/vclxfont.hxx +++ b/toolkit/inc/toolkit/awt/vclxfont.hxx @@ -53,7 +53,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 c675ad1d4bd9..7eee1bfea7c4 100644 --- a/toolkit/inc/toolkit/awt/vclxmenu.hxx +++ b/toolkit/inc/toolkit/awt/vclxmenu.hxx @@ -70,7 +70,7 @@ protected: DECL_LINK( MenuEventListener, VclSimpleEvent* ); - void ImplCreateMenu( BOOL bPopup ); + void ImplCreateMenu( sal_Bool bPopup ); public: VCLXMenu(); @@ -79,7 +79,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 3f37ac58200f..31de39bf1fc3 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -41,7 +41,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/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx index 565691b97f09..81419fcafa0f 100644 --- a/toolkit/inc/toolkit/awt/vclxwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx @@ -100,7 +100,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 10cc22d55c7d..8dcf05c9f8db 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -121,7 +121,7 @@ private: Image maImage; protected: - BitmapEx GetBitmap() const { return maImage.GetBitmapEx(); } + const Image& GetImage() const { return maImage; } protected: // ::com::sun::star::awt::XWindow @@ -292,7 +292,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(); diff --git a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx index dc8fbe4506ed..9e6043b7d9ef 100644 --- a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx +++ b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx @@ -33,40 +33,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); @@ -76,9 +64,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 511f3f76ecf6..67015e049a48 100644 --- a/toolkit/inc/toolkit/awt/xthrobber.hxx +++ b/toolkit/inc/toolkit/awt/xthrobber.hxx @@ -33,23 +33,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: @@ -58,22 +60,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..96791c252b0b --- /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(); + ::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(); + 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..2246ec0204b4 --- /dev/null +++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx @@ -0,0 +1,262 @@ +/************************************************************************* + * + * 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(); + 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 ); +public: + ControlContainerBase(); + ~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 f6a0f768bc10..1ab0120ec470 100644 --- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx +++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx @@ -28,221 +28,56 @@ #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/util/XModifyListener.hpp> -#include <com/sun/star/beans/XPropertyChangeListener.hpp> -#include <com/sun/star/awt/XDialog2.hpp> +#include <com/sun/star/awt/XDialog.hpp> #include <com/sun/star/resource/XStringResourceResolver.hpp> -#include <cppuhelper/implbase6.hxx> -#include <cppuhelper/implbase5.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> // ---------------------------------------------------- // 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: - // 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; - -private: - ContainerListenerMultiplexer maContainerListeners; - ::cppu::OInterfaceContainerHelper maChangeListeners; - UnoControlModelHolderList maModels; - - AllGroups maGroups; - sal_Bool mbGroupsUpToDate; - protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - - UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName ); - public: UnoControlDialogModel(); 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 ) - -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 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(); + DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, szServiceName2_UnoControlDialogModel ) - // 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(); + ~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); } @@ -267,15 +102,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( 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); ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException); @@ -288,10 +114,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); @@ -300,13 +122,10 @@ 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 ); - + virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException); 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 ); }; - #endif // TOOLKIT_DIALOG_CONTROL_HXX diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx index 05b3016e690a..558d145f3d14 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx @@ -186,6 +186,7 @@ FORWARD_DECLARE_INTERFACE( script, XNameContainer ) { public: OGeometryControlModel(); + OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & i_xCompContext); 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 d6491877c7ad..3b784251b65e 100644 --- a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx +++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx @@ -37,6 +37,12 @@ OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel() { } +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/spinningprogress.hxx b/toolkit/inc/toolkit/controls/spinningprogress.hxx new file mode 100755 index 000000000000..b2e8204ca999 --- /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(); + 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..6861f4bc01bb --- /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(); + 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(); + ::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..76edc2e68026 --- /dev/null +++ b/toolkit/inc/toolkit/controls/tabpagemodel.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_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 +{ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xCompContext; +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::uno::XComponentContext > const & i_xCompContext); + + // ::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(); + ~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/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx index 697d1679af45..1d059c749902 100644 --- a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx +++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx @@ -71,11 +71,11 @@ 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: @@ -83,16 +83,6 @@ namespace toolkit UnoSimpleAnimationControl(); ::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/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 01ff047ee3de..21af6d2b45e6 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -116,7 +116,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; @@ -1006,7 +1006,7 @@ class UnoSpinFieldControl : public UnoEditControl, { private: SpinListenerMultiplexer maSpinListeners; - BOOL mbRepeat; + sal_Bool mbRepeat; public: UnoSpinFieldControl(); @@ -1501,5 +1501,6 @@ public: }; + #endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_ diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx index b4151fe0f35e..408dd4cbe385 100644 --- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx +++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx @@ -55,6 +55,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 // ---------------------------------------------------- @@ -251,5 +252,12 @@ 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_ diff --git a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx index c84a6e54d73b..45e0bdf93dc4 100644 --- a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx +++ b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx @@ -44,7 +44,7 @@ public: ::cppu::OBroadcastHelper BrdcstHelper; ::osl::Mutex& GetMutex() { return Mutex; } - + ::cppu::OBroadcastHelper& GetBroadcastHelper() { return BrdcstHelper; } }; diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index 837d283f4e8c..082ac75bafae 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -202,6 +202,7 @@ namespace rtl { #define BASEPROPERTY_GRID_ROW_BACKGROUND 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 #define BASEPROPERTY_ITEM_SEPARATOR_POS 153 +#define BASEPROPERTY_AUTO_REPEAT 154 // 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 2d1df79b733b..1e5d394fb660 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -102,7 +102,17 @@ extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szSe extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[]; extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_AnimatedImagesControl[]; +extern const sal_Char __FAR_DATA szServiceName_AnimatedImagesControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_SpinningProgressControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageModel[], szServiceName2_UnoControlTabPageModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPage[]; +extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainerModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainer[]; + +// ExtUnoWrapper: +extern const char __FAR_DATA szServiceName_ImageProducer[], szServiceName2_ImageProducer[]; #endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_ diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx deleted file mode 100644 index b944a74b65d2..000000000000 --- a/toolkit/inc/toolkit/helper/throbberimpl.hxx +++ /dev/null @@ -1,84 +0,0 @@ -/************************************************************************* - * - * 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 <vos/mutex.hxx> - -//........................................................................ -namespace toolkit -//........................................................................ -{ - - class Throbber_Impl - { - private: - vos::IMutex& mrMutex; // Reference to SolarMutex - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList; - ::com::sun::star::uno::Reference< VCLXWindow > mxParent; - - sal_Bool mbRepeat; - sal_Int32 mnStepTime; - sal_Int32 mnCurStep; - sal_Int32 mnStepCount; - AutoTimer maWaitTimer; - - DECL_LINK( TimeOutHdl, Throbber_Impl* ); - - vos::IMutex& GetMutex() { return mrMutex; } - - public: - Throbber_Impl( ::com::sun::star::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 ( ::com::sun::star::uno::RuntimeException ); - void stop() throw ( ::com::sun::star::uno::RuntimeException ); - void setImageList( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& ImageList ) - throw ( ::com::sun::star::uno::RuntimeException ); - // Helpers - void initImage() throw ( ::com::sun::star::uno::RuntimeException ); - sal_Bool isHCMode() throw ( ::com::sun::star::uno::RuntimeException ); - }; -//........................................................................ -} // namespacetoolkit -//........................................................................ - -#endif //_TOOLKIT_HELPER_THROBBERIMPL_HXX_ - diff --git a/toolkit/inc/toolkit/helper/tkresmgr.hxx b/toolkit/inc/toolkit/helper/tkresmgr.hxx index d7a1c42ea13c..ea62cd3db361 100644 --- a/toolkit/inc/toolkit/helper/tkresmgr.hxx +++ b/toolkit/inc/toolkit/helper/tkresmgr.hxx @@ -70,6 +70,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 31cc259b7fd0..562d78f34c83 100644 --- a/toolkit/inc/toolkit/helper/unowrapper.hxx +++ b/toolkit/inc/toolkit/helper/unowrapper.hxx @@ -60,17 +60,17 @@ public: virtual void ReleaseAllGraphics( OutputDevice* pOutDev ); // Window - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> GetWindowInterface( Window* pWindow, BOOL bCreate ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> GetWindowInterface( Window* pWindow, sal_Bool bCreate ); virtual void SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> xIFace ); 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 cc11f3a586bb..fc35c480d854 100644 --- a/toolkit/inc/toolkit/helper/vclunohelper.hxx +++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx @@ -64,8 +64,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; |