From 7564b2c1092eeb7969577769b82a4c537e37206f Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 29 Mar 2012 14:33:00 +0200 Subject: emf+ on win: implement bitmap creation from bitmapcanvas --- vcl/win/source/gdi/salbmp.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'vcl') 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 // for BitmapSystemData #include +#include #include #include @@ -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; } -- cgit