diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 09:31:58 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 09:31:58 +0000 |
commit | c37ef2c49caf8724b46c8495ed8d5c1dd84b35a1 (patch) | |
tree | 8d6d2da833ab01c3e0991e272c0d0faa07f254be /canvas/source/directx/dx_canvasbitmap.hxx | |
parent | ead48306fdb7bd8efd07c9066c71dd5aeb38fdbc (diff) |
INTEGRATION: CWS canvas05 (1.2.2); FILE MERGED
2008/04/21 07:29:42 thb 1.2.2.4: RESYNC: (1.2-1.3); FILE MERGED
2008/04/04 09:00:13 thb 1.2.2.3: Merging emf+ changes for dx canvas
2008/02/08 00:26:38 thb 1.2.2.2: #81092# Finishing cooperative canvas output stuff
2008/01/22 00:25:23 thb 1.2.2.1: #i81092# Making gdiplus and dx canvas more independent
Diffstat (limited to 'canvas/source/directx/dx_canvasbitmap.hxx')
-rwxr-xr-x | canvas/source/directx/dx_canvasbitmap.hxx | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/canvas/source/directx/dx_canvasbitmap.hxx b/canvas/source/directx/dx_canvasbitmap.hxx index d2c606200cca..1d3b223f5827 100755 --- a/canvas/source/directx/dx_canvasbitmap.hxx +++ b/canvas/source/directx/dx_canvasbitmap.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dx_canvasbitmap.hxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -31,36 +31,43 @@ #ifndef _DXCANVAS_CANVASBITMAP_HXX #define _DXCANVAS_CANVASBITMAP_HXX -#include <cppuhelper/compbase3.hxx> +#include <cppuhelper/compbase4.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/rendering/XBitmapCanvas.hpp> #include <com/sun/star/rendering/XIntegerBitmap.hpp> +#include <com/sun/star/beans/XFastPropertySet.hpp> #include <basegfx/vector/b2isize.hxx> #include <boost/shared_ptr.hpp> +#include <cppuhelper/compbase3.hxx> +#include <comphelper/uno3.hxx> +#include <canvas/base/basemutexhelper.hxx> #include <canvas/base/integerbitmapbase.hxx> -#include "dx_canvashelper.hxx" -#include "dx_spritecanvas.hxx" +#include "dx_bitmapprovider.hxx" +#include "dx_bitmapcanvashelper.hxx" +#include "dx_devicehelper.hxx" #include "dx_impltools.hxx" +#include "dx_ibitmap.hxx" /* Definition of CanvasBitmap class */ namespace dxcanvas { - typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::rendering::XBitmapCanvas, + typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::rendering::XBitmapCanvas, ::com::sun::star::rendering::XIntegerBitmap, - ::com::sun::star::lang::XServiceInfo > CanvasBitmapBase_Base; + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base; typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >, - CanvasHelper, + BitmapCanvasHelper, ::osl::MutexGuard, ::cppu::OWeakObject > CanvasBitmap_Base; - class CanvasBitmap : public CanvasBitmap_Base + class CanvasBitmap : public CanvasBitmap_Base, public BitmapProvider { public: /** Create a canvas bitmap for the given surface @@ -71,8 +78,8 @@ namespace dxcanvas @param rDevice Reference device, with which bitmap should be compatible */ - CanvasBitmap( const DXBitmapSharedPtr& rSurface, - const DeviceRef& rDevice ); + CanvasBitmap( const IBitmapSharedPtr& rSurface, + const DeviceRef& rDevice ); /// Dispose all internal references virtual void SAL_CALL disposing(); @@ -82,16 +89,18 @@ namespace dxcanvas virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); - // attention: Only intended client of this method is - // bitmapFromXBitmap()! - DXBitmapSharedPtr getSurface() { return mpSurface; }; + // BitmapProvider + virtual IBitmapSharedPtr getBitmap() const { return mpBitmap; } + + virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException) {} private: /** MUST hold here, too, since CanvasHelper only contains a raw pointer (without refcounting) */ - DeviceRef mpDevice; - DXBitmapSharedPtr mpSurface; + DeviceRef mpDevice; + IBitmapSharedPtr mpBitmap; }; } |