1 --- vcl/inc/vcl/salbmp.hxx.old 2009-04-02 10:44:25.000000000 +0000
2 +++ vcl/inc/vcl/salbmp.hxx 2009-04-06 16:42:16.000000000 +0000
5 #include <vcl/dllapi.h>
7 +#include <com/sun/star/rendering/XBitmapCanvas.hpp>
12 @@ -55,6 +57,9 @@ public:
13 SalGraphics* pGraphics ) = 0;
14 virtual bool Create( const SalBitmap& rSalBmp,
15 USHORT nNewBitCount ) = 0;
16 + virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
18 + bool bMask = false ) = 0;
19 virtual void Destroy() = 0;
20 virtual Size GetSize() const = 0;
21 virtual USHORT GetBitCount() const = 0;
22 --- vcl/unx/headless/svpbmp.cxx.old 2009-04-02 10:44:27.000000000 +0000
23 +++ vcl/unx/headless/svpbmp.cxx 2009-04-06 16:42:16.000000000 +0000
24 @@ -119,6 +119,11 @@ bool SvpSalBitmap::Create( const SalBitm
28 +bool SvpSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > /*xBitmapCanvas*/, Size& /*rSize*/, bool /*bMask*/ )
33 void SvpSalBitmap::Destroy()
36 --- vcl/unx/headless/svpbmp.hxx.old 2009-04-02 10:44:27.000000000 +0000
37 +++ vcl/unx/headless/svpbmp.hxx 2009-04-06 16:42:16.000000000 +0000
38 @@ -56,6 +56,9 @@ public:
39 SalGraphics* pGraphics );
40 virtual bool Create( const SalBitmap& rSalBmp,
41 USHORT nNewBitCount );
42 + virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
44 + bool bMask = false );
45 virtual void Destroy();
46 virtual Size GetSize() const;
47 virtual USHORT GetBitCount() const;
48 --- vcl/unx/inc/salbmp.h.old 2009-04-02 10:44:28.000000000 +0000
49 +++ vcl/unx/inc/salbmp.h 2009-04-06 16:42:16.000000000 +0000
50 @@ -113,6 +113,9 @@ public:
51 SalGraphics* pGraphics );
52 virtual bool Create( const SalBitmap& rSalBmp,
53 USHORT nNewBitCount );
54 + virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
56 + bool bMask = false );
58 virtual void Destroy();
60 --- vcl/unx/source/gdi/salbmp.cxx.old 2009-04-02 10:44:26.000000000 +0000
61 +++ vcl/unx/source/gdi/salbmp.cxx 2009-04-06 16:42:16.000000000 +0000
65 #include <vcl/bitmap.hxx>
66 +#include <com/sun/star/beans/XFastPropertySet.hpp>
70 @@ -746,6 +747,31 @@ bool X11SalBitmap::Create( const SalBitm
73 // -----------------------------------------------------------------------------
75 +bool X11SalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas, Size& rSize, bool bMask )
77 + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > xFastPropertySet( xBitmapCanvas, ::com::sun::star::uno::UNO_QUERY );
78 + if( xFastPropertySet.get() ) {
81 + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > args;
83 + if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
84 + if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) {
85 + bool bSuccess = ImplCreateFromDrawable( pixmapHandle, 0, depth, 0, 0, (long) rSize.Width(), (long) rSize.Height() );
87 + if( bSuccess && (args[0] >>= bFreePixmap) && bFreePixmap )
88 + XFreePixmap( GetX11SalData()->GetDisplay()->GetDisplay(), pixmapHandle );
98 +// -----------------------------------------------------------------------------
100 void X11SalBitmap::Destroy()
102 --- vcl/aqua/inc/salbmp.h.old 2009-04-02 10:44:23.000000000 +0000
103 +++ vcl/aqua/inc/salbmp.h 2009-04-06 16:42:16.000000000 +0000
104 @@ -78,6 +78,9 @@ public:
105 bool Create( const SalBitmap& rSalBmp );
106 bool Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics );
107 bool Create( const SalBitmap& rSalBmp, USHORT nNewBitCount );
108 + virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
110 + bool bMask = false );
114 --- vcl/aqua/source/gdi/salbmp.cxx.old 2009-04-02 10:44:22.000000000 +0000
115 +++ vcl/aqua/source/gdi/salbmp.cxx 2009-04-06 16:42:16.000000000 +0000
116 @@ -156,6 +156,13 @@ bool AquaSalBitmap::Create( const SalBit
118 // ------------------------------------------------------------------
120 +bool AquaSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > /*xBitmapCanvas*/, Size& /*rSize*/, bool /*bMask*/ )
125 +// ------------------------------------------------------------------
127 void AquaSalBitmap::Destroy()
130 --- vcl/win/inc/salbmp.h.old 2009-04-02 10:44:29.000000000 +0000
131 +++ vcl/win/inc/salbmp.h 2009-04-06 16:42:16.000000000 +0000
132 @@ -77,6 +77,9 @@ public:
133 virtual bool Create( const SalBitmap& rSalBmpImpl );
134 virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics );
135 virtual bool Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount );
136 + virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
138 + bool bMask = false );
140 virtual void Destroy();
142 --- vcl/win/source/gdi/salbmp.cxx.old 2009-04-02 10:44:28.000000000 +0000
143 +++ vcl/win/source/gdi/salbmp.cxx 2009-04-06 16:42:16.000000000 +0000
144 @@ -267,6 +267,13 @@ bool WinSalBitmap::Create( const SalBitm
146 // ------------------------------------------------------------------
148 +bool WinSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > /*xBitmapCanvas*/, Size& /*rSize*/, bool /*bMask*/ )
153 +// ------------------------------------------------------------------
155 void WinSalBitmap::Destroy()