diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2006-10-18 12:12:47 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2006-10-18 12:12:47 +0000 |
commit | fe510c8757b8bd4371c7760594dd37bf7d33e41b (patch) | |
tree | 210a8feec59094183a5216680e4c0ace53f5ec04 | |
parent | 474291d55a95c4de26a33ee94a7eac3a60d5c912 (diff) |
INTEGRATION: CWS dba205b (1.8.312); FILE MERGED
2006/08/08 11:26:24 fs 1.8.312.1: #i65585# derive SVTXRoadmap from VCLXImageConsumer, to benefit from its ability to also display an XGraphic (and to save some code duplication)
-rw-r--r-- | svtools/source/inc/unoiface.hxx | 59 |
1 files changed, 21 insertions, 38 deletions
diff --git a/svtools/source/inc/unoiface.hxx b/svtools/source/inc/unoiface.hxx index 7847e9566a62..1b2e4f7c1817 100644 --- a/svtools/source/inc/unoiface.hxx +++ b/svtools/source/inc/unoiface.hxx @@ -4,9 +4,9 @@ * * $RCSfile: unoiface.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: rt $ $Date: 2005-09-08 15:55:31 $ + * last change: $Author: ihi $ $Date: 2006-10-18 13:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -54,10 +54,8 @@ #include <comphelper/uno3.hxx> -//#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> -//#include <cppuhelper/implbase3.hxx> -#include <cppuhelper/implbase4.hxx> +#include <cppuhelper/implbase3.hxx> #ifndef _COM_SUN_STAR_AWT_XITEMEVENTBROADCASTER_HPP_ #include <com/sun/star/awt/XItemEventBroadcaster.hpp> @@ -244,44 +242,36 @@ namespace svt class ORoadmap; } -typedef ::cppu::ImplHelper4< ::com::sun::star::container::XContainerListener, - ::com::sun::star::beans::XPropertyChangeListener, - ::com::sun::star::awt::XImageConsumer, - ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base; - - struct RMItemData - { - sal_Bool b_Enabled; - sal_Int32 n_ID; - ::rtl::OUString Label; - }; +struct RMItemData +{ + sal_Bool b_Enabled; + sal_Int32 n_ID; + ::rtl::OUString Label; +}; -class SVTXRoadmap : public VCLXWindow, - public SVTXRoadmap_Base +typedef ::cppu::ImplInheritanceHelper3 < VCLXImageConsumer + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::beans::XPropertyChangeListener + , ::com::sun::star::awt::XItemEventBroadcaster + > SVTXRoadmap_Base; +class SVTXRoadmap : public SVTXRoadmap_Base { - - private: - ItemListenerMultiplexer maItemListeners; - ImageConsumer maImageConsumer; - BitmapEx maBitmap; RMItemData CurRMItemData; RMItemData GetRMItemData( const ::com::sun::star::container::ContainerEvent& _rEvent ); - void ImplUpdateImage( sal_Bool bGetNewImage ); protected: ::svt::ORoadmap* GetRoadmap() const { return (::svt::ORoadmap*)GetWindow(); } void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - + ~SVTXRoadmap(); public: SVTXRoadmap(); - ~SVTXRoadmap(); void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { VCLXWindow::disposing( Source ); } @@ -290,29 +280,22 @@ public: ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + // XContainerListener 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); + // XItemEventBroadcaster virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) 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); - - virtual void SAL_CALL init( sal_Int32 Width, sal_Int32 Height ) throw (::com::sun::star::uno::RuntimeException); - virtual 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); - virtual 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); - virtual 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); - virtual 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); - - DECLARE_XINTERFACE() - DECLARE_XTYPEPROVIDER() - protected: - virtual void SetWindow( Window* _pWindow ); - + // VCLXImageConsumer overridables + virtual void ImplSetNewImage(); }; |