diff options
author | Radek Doulik <rodo@novell.com> | 2012-03-29 14:33:00 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2012-03-29 14:37:31 +0200 |
commit | 7564b2c1092eeb7969577769b82a4c537e37206f (patch) | |
tree | 5a8f565f9cc338abccbe60a3ad61e912ef1eae60 /vcl | |
parent | e0a43983faff4982ddfd151b0ae4c28623edf894 (diff) |
emf+ on win: implement bitmap creation from bitmapcanvas
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 0cc5bb086d03..ab42393e0284 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -31,6 +31,7 @@ #include <vcl/bitmap.hxx> // for BitmapSystemData #include <vcl/salbtype.hxx> +#include <com/sun/star/beans/XFastPropertySet.hpp> #include <win/wincomp.hxx> #include <win/salgdi.h> @@ -267,8 +268,22 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount ) // ------------------------------------------------------------------ -bool WinSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > /*xBitmapCanvas*/, Size& /*rSize*/, bool /*bMask*/ ) +bool WinSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas, Size& /*rSize*/, bool bMask ) { + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > + xFastPropertySet( xBitmapCanvas, ::com::sun::star::uno::UNO_QUERY ); + + if( xFastPropertySet.get() ) { + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > args; + + if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) { + sal_Int64 aHBmp64; + + if( args[0] >>= aHBmp64 ) { + return Create( HBITMAP(aHBmp64), false, false ); + } + } + } return false; } |