diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-07-21 15:32:50 +0200 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-07-21 15:32:50 +0200 |
commit | a6fb87b1093328f9cf6eeb2a4d829c90cc0b4fd6 (patch) | |
tree | 12f32db0e506c5c09ef39d65f343efbb5d2a6113 /toolkit/inc | |
parent | a1e6cecc361c2f6e26ee6738231184022f6b18dd (diff) | |
parent | 722441b99292269a42db1c0de6bce9351e8de933 (diff) |
CWS-TOOLING: integrate CWS unoawt2
Diffstat (limited to 'toolkit/inc')
-rw-r--r-- | toolkit/inc/pch/precompiled_toolkit.hxx | 3 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxwindow.hxx | 9 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxwindows.hxx | 31 | ||||
-rw-r--r-- | toolkit/inc/toolkit/controls/roadmapcontrol.hxx | 31 | ||||
-rw-r--r-- | toolkit/inc/toolkit/controls/unocontrol.hxx | 9 | ||||
-rw-r--r-- | toolkit/inc/toolkit/controls/unocontrolbase.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/controls/unocontrolmodel.hxx | 20 | ||||
-rw-r--r-- | toolkit/inc/toolkit/controls/unocontrols.hxx | 99 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/listenermultiplexer.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/property.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/servicenames.hxx | 5 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx | 1 |
12 files changed, 77 insertions, 137 deletions
diff --git a/toolkit/inc/pch/precompiled_toolkit.hxx b/toolkit/inc/pch/precompiled_toolkit.hxx index 386bd6803ca4..d0baff3b8343 100644 --- a/toolkit/inc/pch/precompiled_toolkit.hxx +++ b/toolkit/inc/pch/precompiled_toolkit.hxx @@ -107,8 +107,6 @@ #include "com/sun/star/awt/XFont.hpp" #include "com/sun/star/awt/XGraphics.hpp" #include "com/sun/star/awt/XImageButton.hpp" -#include "com/sun/star/awt/XImageConsumer.hpp" -#include "com/sun/star/awt/XImageProducer.hpp" #include "com/sun/star/awt/XInfoPrinter.hpp" #include "com/sun/star/awt/XItemEventBroadcaster.hpp" #include "com/sun/star/awt/XItemListener.hpp" @@ -328,7 +326,6 @@ #include "vcl/font.hxx" #include "vcl/gradient.hxx" #include "vcl/image.hxx" -#include "vcl/imgcons.hxx" #include "vcl/jobset.hxx" #include "vcl/mapunit.hxx" #include "vcl/menu.hxx" diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx index 6ad3c3ab6076..565691b97f09 100644 --- a/toolkit/inc/toolkit/awt/vclxwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx @@ -41,9 +41,10 @@ #include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/accessibility/XAccessibleContext.hpp> #include <com/sun/star/awt/XDockableWindow.hpp> +#include <com/sun/star/awt/XStyleSettingsSupplier.hpp> #include <cppuhelper/weak.hxx> -#include <cppuhelper/implbase8.hxx> +#include <cppuhelper/implbase9.hxx> #include <osl/mutex.hxx> #include <tools/gen.hxx> // Size @@ -71,7 +72,7 @@ namespace toolkit class UnoPropertyArrayHelper; class VCLXWindowImpl; -typedef ::cppu::ImplInheritanceHelper8 < VCLXDevice +typedef ::cppu::ImplInheritanceHelper9 < VCLXDevice , ::com::sun::star::awt::XWindow2 , ::com::sun::star::awt::XVclWindowPeer , ::com::sun::star::awt::XLayoutConstrains @@ -80,6 +81,7 @@ typedef ::cppu::ImplInheritanceHelper8 < VCLXDevice , ::com::sun::star::accessibility::XAccessible , ::com::sun::star::lang::XEventListener , ::com::sun::star::beans::XPropertySetInfo + , ::com::sun::star::awt::XStyleSettingsSupplier > VCLXWindow_Base; class TOOLKIT_DLLPUBLIC VCLXWindow : public VCLXWindow_Base @@ -232,6 +234,9 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties( ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); ::sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException); + + // XStyleSettingsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleSettings > SAL_CALL getStyleSettings() throw (::com::sun::star::uno::RuntimeException); }; #endif // _TOOLKIT_AWT_VCLXWINDOW_HXX_ diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index ca3267bffb5e..80e3a37279d3 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -82,7 +82,6 @@ #include <com/sun/star/awt/XDateField.hpp> #include <com/sun/star/awt/XComboBox.hpp> #include <com/sun/star/awt/XCheckBox.hpp> -#include <com/sun/star/awt/XImageConsumer.hpp> #include <com/sun/star/awt/XItemListListener.hpp> #include <cppuhelper/weak.hxx> #include <cppuhelper/implbase3.hxx> @@ -93,7 +92,6 @@ #include <cppuhelper/implbase1.hxx> #include <vcl/pointr.hxx> -#include <vcl/imgcons.hxx> #include <vcl/image.hxx> class Button; @@ -111,17 +109,14 @@ class VclSimpleEvent; class VclMenuEvent; // ---------------------------------------------------- -// class VCLXImageConsumer -// deriving from VCLXWindow and XImageConsumer +// class VCLXGraphicControl +// deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model // ---------------------------------------------------- -typedef ::cppu::ImplInheritanceHelper1< VCLXWindow, ::com::sun::star::awt::XImageConsumer > VCLXImageConsumer_Base; -class TOOLKIT_DLLPUBLIC VCLXImageConsumer : public VCLXImageConsumer_Base +class TOOLKIT_DLLPUBLIC VCLXGraphicControl : public VCLXWindow { private: - /// implements our XImageConsumer functionality - ImageConsumer maImageConsumer; /// the image we currently display Image maImage; @@ -132,21 +127,11 @@ protected: // ::com::sun::star::awt::XWindow void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::awt::XImageConsumer - void SAL_CALL init( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setColorModel( sal_Int16 BitCount, const ::com::sun::star::uno::Sequence< sal_Int32 >& RGBAPal, sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask, sal_Int32 AlphaMask ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setPixelsByBytes( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int8 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setPixelsByLongs( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int32 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL complete( sal_Int32 Status, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer >& xProducer ) throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::awt::VclWindowPeer void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); protected: - void ImplUpdateImage( sal_Bool bGetNewImage ); - -protected: /** forward our bitmap to our window @precond our mutex is locked @@ -155,6 +140,7 @@ protected: @see GetBitmap */ virtual void ImplSetNewImage(); + public: static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } @@ -164,7 +150,7 @@ public: // ---------------------------------------------------- // class VCLXButton // ---------------------------------------------------- -typedef ::cppu::ImplInheritanceHelper2 < VCLXImageConsumer +typedef ::cppu::ImplInheritanceHelper2 < VCLXGraphicControl , ::com::sun::star::awt::XButton , ::com::sun::star::awt::XToggleButton > VCLXButton_Base; @@ -213,7 +199,7 @@ public: // ---------------------------------------------------- // class VCLXImageControl // ---------------------------------------------------- -class VCLXImageControl : public VCLXImageConsumer +class VCLXImageControl : public VCLXGraphicControl { public: VCLXImageControl(); @@ -230,6 +216,7 @@ public: static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } + protected: virtual void ImplSetNewImage(); }; @@ -239,7 +226,7 @@ protected: // ---------------------------------------------------- class VCLXCheckBox : public ::com::sun::star::awt::XCheckBox, public ::com::sun::star::awt::XButton, - public VCLXImageConsumer + public VCLXGraphicControl { private: ActionListenerMultiplexer maActionListeners; @@ -297,7 +284,7 @@ public: // ---------------------------------------------------- class VCLXRadioButton : public ::com::sun::star::awt::XRadioButton, public ::com::sun::star::awt::XButton, - public VCLXImageConsumer + public VCLXGraphicControl { private: ItemListenerMultiplexer maItemListeners; diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx index 46f31947b276..1b86d277fde2 100644 --- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx +++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx @@ -40,25 +40,20 @@ #include <com/sun/star/container/XContainerListener.hpp> #include <com/sun/star/awt/XItemListener.hpp> #include <com/sun/star/awt/XItemEventBroadcaster.hpp> -#include <com/sun/star/awt/XImageConsumer.hpp> -#include <com/sun/star/awt/XImageProducer.hpp> #include <cppuhelper/implbase2.hxx> - -#ifndef _CPPUHELPER_IMPLBASE5_HXX_ +#include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase4.hxx> -#endif #include <comphelper/uno3.hxx> -typedef UnoControlModel UnoControlRoadmapModel_Base; +typedef GraphicControlModel UnoControlRoadmapModel_Base; -typedef ::cppu::ImplHelper4 < ::com::sun::star::lang::XSingleServiceFactory +typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory , ::com::sun::star::container::XContainer , ::com::sun::star::container::XIndexContainer - , ::com::sun::star::awt::XImageProducer > UnoControlRoadmapModel_IBase; @@ -100,8 +95,6 @@ namespace toolkit{ typedef ::std::vector< Reference< XInterface > > RoadmapItemHolderList; - std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > maImageListeners; - ContainerListenerMultiplexer maContainerListeners; RoadmapItemHolderList maRoadmapItems; @@ -133,7 +126,7 @@ namespace toolkit{ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlModel, szServiceName2_UnoControlRoadmapModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlRoadmapModel_Base, szServiceName2_UnoControlRoadmapModel ) sal_Int32 SAL_CALL getCount() throw (RuntimeException); virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException ); @@ -145,16 +138,10 @@ namespace toolkit{ virtual void SAL_CALL addContainerListener( const Reference< XContainerListener >& xListener ) throw (RuntimeException); virtual void SAL_CALL removeContainerListener( const Reference< XContainerListener >& xListener ) throw (RuntimeException); - ::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 queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlRoadmapModel_Base::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() { UnoControlModel::acquire(); } - void SAL_CALL release() throw() { UnoControlModel::release(); } - - - // ::com::sun::star::awt::XImageProducer - void SAL_CALL addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL startProduction( ) throw (::com::sun::star::uno::RuntimeException); + void SAL_CALL acquire() throw() { UnoControlRoadmapModel_Base::acquire(); } + void SAL_CALL release() throw() { UnoControlRoadmapModel_Base::release(); } // ::com::sun::star::beans::XPropertySet @@ -190,8 +177,6 @@ namespace toolkit{ 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 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 elementInserted( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException); void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException); void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& rEvent )throw(::com::sun::star::uno::RuntimeException); @@ -204,8 +189,6 @@ namespace toolkit{ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException); - void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); - // XTypeProvider DECLARE_XTYPEPROVIDER( ) DECLARE_XINTERFACE() diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx index 0515abe27128..6bcfa519ed3d 100644 --- a/toolkit/inc/toolkit/controls/unocontrol.hxx +++ b/toolkit/inc/toolkit/controls/unocontrol.hxx @@ -39,6 +39,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/awt/XUnitConversion.hpp> +#include <com/sun/star/awt/XStyleSettingsSupplier.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> #include <cppuhelper/weakagg.hxx> #include <osl/mutex.hxx> @@ -47,7 +48,7 @@ #include <cppuhelper/propshlp.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weakref.hxx> -#include <cppuhelper/implbase8.hxx> +#include <cppuhelper/implbase9.hxx> #include <com/sun/star/util/XModeChangeBroadcaster.hpp> #include <com/sun/star/awt/XVclWindowPeer.hpp> @@ -74,7 +75,7 @@ struct UnoControl_Data; // ---------------------------------------------------- // class UnoControl // ---------------------------------------------------- -typedef ::cppu::WeakAggImplHelper8 < ::com::sun::star::awt::XControl +typedef ::cppu::WeakAggImplHelper9 < ::com::sun::star::awt::XControl , ::com::sun::star::awt::XWindow2 , ::com::sun::star::awt::XView , ::com::sun::star::beans::XPropertiesChangeListener @@ -82,6 +83,7 @@ typedef ::cppu::WeakAggImplHelper8 < ::com::sun::star::awt::XControl , ::com::sun::star::accessibility::XAccessible , ::com::sun::star::util::XModeChangeBroadcaster , ::com::sun::star::awt::XUnitConversion + , ::com::sun::star::awt::XStyleSettingsSupplier > UnoControl_Base; class TOOLKIT_DLLPUBLIC UnoControl : public UnoControl_Base @@ -228,6 +230,9 @@ public: virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + // XStyleSettingsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XStyleSettings > SAL_CALL getStyleSettings() throw (::com::sun::star::uno::RuntimeException); + private: // ::com::sun::star::beans::XPropertiesChangeListener void SAL_CALL propertiesChange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& evt ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx index 60dcc040e0e7..f12dd23a5c67 100644 --- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx @@ -36,7 +36,7 @@ // class UnoControlBase // ---------------------------------------------------- -class UnoControlBase : public UnoControl +class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl { protected: sal_Bool ImplHasProperty( sal_uInt16 nProp ); diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx index 71decdfcb2c9..5ac3c33aa1c9 100644 --- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx @@ -54,16 +54,16 @@ class ImplPropertyTable; // ---------------------------------------------------- class TOOLKIT_DLLPUBLIC UnoControlModel : public ::com::sun::star::awt::XControlModel, - public ::com::sun::star::beans::XPropertyState, - public ::com::sun::star::io::XPersistObject, - public ::com::sun::star::lang::XComponent, - public ::com::sun::star::lang::XServiceInfo, - public ::com::sun::star::lang::XTypeProvider, - public ::com::sun::star::lang::XUnoTunnel, - public ::com::sun::star::util::XCloneable, - public MutexAndBroadcastHelper, - public ::cppu::OPropertySetHelper, - public ::cppu::OWeakAggObject + public ::com::sun::star::beans::XPropertyState, + public ::com::sun::star::io::XPersistObject, + public ::com::sun::star::lang::XComponent, + public ::com::sun::star::lang::XServiceInfo, + public ::com::sun::star::lang::XTypeProvider, + public ::com::sun::star::lang::XUnoTunnel, + public ::com::sun::star::util::XCloneable, + public MutexAndBroadcastHelper, + public ::cppu::OPropertySetHelper, + public ::cppu::OWeakAggObject { private: ImplPropertyTable* mpData; diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 88449418c70a..6223e47a6871 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -35,8 +35,6 @@ #include <com/sun/star/awt/XTextLayoutConstrains.hpp> #include <com/sun/star/awt/XButton.hpp> #include <com/sun/star/awt/XToggleButton.hpp> -#include <com/sun/star/awt/XImageConsumer.hpp> -#include <com/sun/star/awt/XImageProducer.hpp> #include <com/sun/star/awt/XRadioButton.hpp> #include <com/sun/star/awt/XItemListener.hpp> #include <com/sun/star/awt/XCheckBox.hpp> @@ -57,7 +55,6 @@ #include <toolkit/controls/unocontrolbase.hxx> #include <toolkit/helper/macros.hxx> #include <toolkit/helper/servicenames.hxx> -#include <vcl/imgcons.hxx> #include <vcl/bitmapex.hxx> #include <cppuhelper/implbase5.hxx> #include <cppuhelper/implbase4.hxx> @@ -217,31 +214,20 @@ public: }; // ---------------------------------------------------- -// class ImageProducerControlModel +// class GraphicControlModel // ---------------------------------------------------- -class ImageProducerControlModel : public ::com::sun::star::awt::XImageProducer, - public UnoControlModel +class GraphicControlModel : public UnoControlModel { private: - std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > maListeners; bool mbAdjustingImagePosition; bool mbAdjustingGraphic; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL ); -protected: - ImageProducerControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } - ImageProducerControlModel( const ImageProducerControlModel& _rSource ) : com::sun::star::awt::XImageProducer(), UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } - - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - ::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(); - void SAL_CALL release() throw(); - // ::com::sun::star::awt::XImageProducer - void SAL_CALL addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& xConsumer ) throw (::com::sun::star::uno::RuntimeException); - void SAL_CALL startProduction( ) throw (::com::sun::star::uno::RuntimeException); +protected: + GraphicControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } + GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { } // ::cppu::OPropertySetHelper void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); @@ -250,35 +236,13 @@ protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; private: - ImageProducerControlModel& operator=( const ImageProducerControlModel& ); // never implemented -}; - -// ---------------------------------------------------- -// class ImageConsumerControl -// ---------------------------------------------------- -class ImageConsumerControl : public UnoControlBase -{ -protected: - ImageConsumerControl() { } - - void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); - - // 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 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 dispose( ) throw(::com::sun::star::uno::RuntimeException); - -private: - ImageConsumerControl( const ImageConsumerControl& ); // never implemented - ImageConsumerControl& operator=( const ImageConsumerControl& ); // never implemented + GraphicControlModel& operator=( const GraphicControlModel& ); // never implemented }; // ---------------------------------------------------- // class UnoControlButtonModel // ---------------------------------------------------- -class UnoControlButtonModel : public ImageProducerControlModel +class UnoControlButtonModel : public GraphicControlModel { protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; @@ -286,7 +250,7 @@ protected: public: UnoControlButtonModel(); - UnoControlButtonModel( const UnoControlButtonModel& rModel ) : ImageProducerControlModel( rModel ) {;} + UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlButtonModel( *this ); } @@ -297,13 +261,13 @@ public: ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, ImageProducerControlModel, szServiceName2_UnoControlButtonModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlButtonModel, GraphicControlModel, szServiceName2_UnoControlButtonModel ) }; // ---------------------------------------------------- // class UnoButtonControl // ---------------------------------------------------- -typedef ::cppu::AggImplInheritanceHelper4 < ImageConsumerControl +typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase , ::com::sun::star::awt::XButton , ::com::sun::star::awt::XToggleButton , ::com::sun::star::awt::XLayoutConstrains @@ -347,13 +311,13 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoButtonControl, ImageConsumerControl, szServiceName2_UnoControlButton ) + DECLIMPL_SERVICEINFO_DERIVED( UnoButtonControl, UnoControlBase, szServiceName2_UnoControlButton ) }; // ---------------------------------------------------- // class UnoControlImageControlModel // ---------------------------------------------------- -class UnoControlImageControlModel : public ImageProducerControlModel +class UnoControlImageControlModel : public GraphicControlModel { private: bool mbAdjustingImageScaleMode; @@ -364,7 +328,7 @@ protected: public: UnoControlImageControlModel(); - UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : ImageProducerControlModel( rModel ), mbAdjustingImageScaleMode( false ) { } + UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { } UnoControlModel* Clone() const { return new UnoControlImageControlModel( *this ); } @@ -375,7 +339,7 @@ public: ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlImageControlModel, ImageProducerControlModel, szServiceName2_UnoControlImageControlModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlImageControlModel, GraphicControlModel, szServiceName2_UnoControlImageControlModel ) // ::cppu::OPropertySetHelper void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); @@ -384,7 +348,7 @@ public: // ---------------------------------------------------- // class UnoImageControlControl // ---------------------------------------------------- -typedef ::cppu::AggImplInheritanceHelper1 < ImageConsumerControl +typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase , ::com::sun::star::awt::XLayoutConstrains > UnoImageControlControl_Base; class UnoImageControlControl : public UnoImageControlControl_Base @@ -409,13 +373,13 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoImageControlControl, ImageConsumerControl, szServiceName2_UnoControlImageControl ) + DECLIMPL_SERVICEINFO_DERIVED( UnoImageControlControl, UnoControlBase, szServiceName2_UnoControlImageControl ) }; // ---------------------------------------------------- // class UnoControlRadioButtonModel // ---------------------------------------------------- -class UnoControlRadioButtonModel : public ImageProducerControlModel +class UnoControlRadioButtonModel : public GraphicControlModel { protected: @@ -424,7 +388,7 @@ protected: public: UnoControlRadioButtonModel(); - UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : ImageProducerControlModel( rModel ) {;} + UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlRadioButtonModel( *this ); } @@ -435,14 +399,14 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlRadioButtonModel, ImageProducerControlModel, szServiceName2_UnoControlRadioButtonModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlRadioButtonModel, GraphicControlModel, szServiceName2_UnoControlRadioButtonModel ) }; // ---------------------------------------------------- // class UnoRadioButtonControl // ---------------------------------------------------- -typedef ::cppu::AggImplInheritanceHelper4 < ImageConsumerControl +typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase , ::com::sun::star::awt::XButton , ::com::sun::star::awt::XRadioButton , ::com::sun::star::awt::XItemListener @@ -462,7 +426,7 @@ public: 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 dispose( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { ImageConsumerControl::disposing( Source ); } + void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } // ::com::sun::star::awt::XControl sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException); @@ -488,14 +452,14 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoRadioButtonControl, ImageConsumerControl, szServiceName2_UnoControlRadioButton ) + DECLIMPL_SERVICEINFO_DERIVED( UnoRadioButtonControl, UnoControlBase, szServiceName2_UnoControlRadioButton ) }; // ---------------------------------------------------- // class UnoControlCheckBoxModel // ---------------------------------------------------- -class UnoControlCheckBoxModel : public ImageProducerControlModel +class UnoControlCheckBoxModel : public GraphicControlModel { protected: ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; @@ -503,7 +467,7 @@ protected: public: UnoControlCheckBoxModel(); - UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : ImageProducerControlModel( rModel ) {;} + UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;} UnoControlModel* Clone() const { return new UnoControlCheckBoxModel( *this ); } @@ -514,13 +478,13 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlCheckBoxModel, ImageProducerControlModel, szServiceName2_UnoControlCheckBoxModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlCheckBoxModel, GraphicControlModel, szServiceName2_UnoControlCheckBoxModel ) }; // ---------------------------------------------------- // class UnoCheckBoxControl // ---------------------------------------------------- -typedef ::cppu::AggImplInheritanceHelper4 < ImageConsumerControl +typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase , ::com::sun::star::awt::XButton , ::com::sun::star::awt::XCheckBox , ::com::sun::star::awt::XItemListener @@ -541,7 +505,7 @@ public: 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 dispose( ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { ImageConsumerControl::disposing( Source ); } + void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } // ::com::sun::star::awt::XControl sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException); @@ -569,7 +533,7 @@ public: ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoCheckBoxControl, ImageConsumerControl, szServiceName2_UnoControlCheckBox ) + DECLIMPL_SERVICEINFO_DERIVED( UnoCheckBoxControl, UnoControlBase, szServiceName2_UnoControlCheckBox ) }; @@ -761,11 +725,12 @@ struct UnoControlListBoxModel_Data; typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel , ::com::sun::star::awt::XItemList > UnoControlListBoxModel_Base; -class UnoControlListBoxModel :public UnoControlListBoxModel_Base +class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base { public: UnoControlListBoxModel(); UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ); + ~UnoControlListBoxModel(); UnoControlModel* Clone() const { return new UnoControlListBoxModel( *this ); } @@ -856,7 +821,7 @@ typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase , ::com::sun::star::awt::XTextLayoutConstrains , ::com::sun::star::awt::XItemListListener > UnoListBoxControl_Base; -class UnoListBoxControl : public UnoListBoxControl_Base +class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base { public: UnoListBoxControl(); @@ -920,6 +885,8 @@ protected: virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); virtual void updateFromModel(); + ActionListenerMultiplexer& getActionListeners(); + ItemListenerMultiplexer& getItemListeners(); private: ActionListenerMultiplexer maActionListeners; ItemListenerMultiplexer maItemListeners; diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx index b9fb82c3d4bb..b4151fe0f35e 100644 --- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx +++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx @@ -171,7 +171,7 @@ DECL_LISTENERMULTIPLEXER_END // ---------------------------------------------------- // class ActionListenerMultiplexer // ---------------------------------------------------- -DECL_LISTENERMULTIPLEXER_START( ActionListenerMultiplexer, ::com::sun::star::awt::XActionListener ) +DECL_LISTENERMULTIPLEXER_START_DLLPUB( ActionListenerMultiplexer, ::com::sun::star::awt::XActionListener ) void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException); DECL_LISTENERMULTIPLEXER_END diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index f8a1a703799c..837d283f4e8c 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -234,7 +234,7 @@ namespace rtl { TOOLKIT_DLLPUBLIC sal_uInt16 GetPropertyId( const ::rtl::OUString& rPropertyName ); const ::com::sun::star::uno::Type* GetPropertyType( sal_uInt16 nPropertyId ); -const ::rtl::OUString& GetPropertyName( sal_uInt16 nPropertyId ); +TOOLKIT_DLLPUBLIC const ::rtl::OUString& GetPropertyName( sal_uInt16 nPropertyId ); sal_Int16 GetPropertyAttribs( sal_uInt16 nPropertyId ); sal_uInt16 GetPropertyOrderNr( sal_uInt16 nPropertyId ); sal_Bool DoesDependOnOthers( sal_uInt16 nPropertyId ); diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 96d9d5810cc0..2d1df79b733b 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -104,10 +104,5 @@ extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceNa extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; -// ExtUnoWrapper: -extern const char __FAR_DATA szServiceName_ImageProducer[], szServiceName2_ImageProducer[]; - - - #endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_ diff --git a/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx b/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx index 5b5cb3021fc9..99d1763db1e6 100644 --- a/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx +++ b/toolkit/inc/toolkit/helper/unopropertyarrayhelper.hxx @@ -34,6 +34,7 @@ #include <tools/table.hxx> #include <list> +#include "toolkit/dllapi.h" // ---------------------------------------------------- // class UnoPropertyArrayHelper |