update dev300-m58
[ooovba.git] / applied_patches / 0484-emf+-vcl-bitmap.diff
blob4bcf5c5c7780f47e3a47fb2d7c9e6289fbfe5db3
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
3 @@ -36,6 +36,8 @@
4 #endif
5 #include <vcl/dllapi.h>
7 +#include <com/sun/star/rendering/XBitmapCanvas.hpp>
9 struct BitmapBuffer;
10 class SalGraphics;
11 class BitmapPalette;
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,
17 + Size& rSize,
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
25 return false;
28 +bool SvpSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > /*xBitmapCanvas*/, Size& /*rSize*/, bool /*bMask*/ )
30 + return false;
33 void SvpSalBitmap::Destroy()
35 m_aBitmap.reset();
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,
43 + Size& rSize,
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,
55 + Size& rSize,
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
62 @@ -50,6 +50,7 @@
63 #include <salbmp.h>
64 #include <salinst.h>
65 #include <vcl/bitmap.hxx>
66 +#include <com/sun/star/beans/XFastPropertySet.hpp>
68 // -----------
69 // - Defines -
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() ) {
79 + long pixmapHandle;
80 + sal_Int32 depth;
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() );
86 + bool bFreePixmap;
87 + if( bSuccess && (args[0] >>= bFreePixmap) && bFreePixmap )
88 + XFreePixmap( GetX11SalData()->GetDisplay()->GetDisplay(), pixmapHandle );
90 + return bSuccess;
91 + }
92 + }
93 + }
95 + return false;
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,
109 + Size& rSize,
110 + bool bMask = false );
112 void Destroy();
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*/ )
122 + return false;
125 +// ------------------------------------------------------------------
127 void AquaSalBitmap::Destroy()
129 DestroyContext();
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,
137 + Size& rSize,
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*/ )
150 + return false;
153 +// ------------------------------------------------------------------
155 void WinSalBitmap::Destroy()
157 if( mhDIB )