summaryrefslogtreecommitdiff
path: root/canvas/source/directx/dx_canvasbitmap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/directx/dx_canvasbitmap.cxx')
-rw-r--r--canvas/source/directx/dx_canvasbitmap.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index ad8680d44db1..263fe9dad53d 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -70,8 +70,8 @@ namespace dxcanvas
}
struct AlphaDIB
- {
- BITMAPINFOHEADER bmiHeader;
+ {
+ BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[256];
};
@@ -81,15 +81,15 @@ namespace dxcanvas
// 0 ... get BitmapEx
// 1 ... get Pixbuf with bitmap RGB content
// 2 ... get Pixbuf with bitmap alpha mask
- switch( nHandle )
+ switch( nHandle )
{
// sorry, no BitmapEx here...
case 0:
aRes = ::com::sun::star::uno::Any( reinterpret_cast<sal_Int64>( (BitmapEx*) NULL ) );
break;
- case 1:
- {
+ case 1:
+ {
if(!mpBitmap->hasAlpha())
{
HBITMAP aHBmp;
@@ -97,7 +97,7 @@ namespace dxcanvas
uno::Sequence< uno::Any > args(1);
args[0] = uno::Any( sal_Int64(aHBmp) );
-
+
aRes <<= args;
}
else
@@ -106,12 +106,12 @@ namespace dxcanvas
// canvas uses inline alpha channel
HDC hScreenDC=GetDC(NULL);
const basegfx::B2IVector aSize(mpBitmap->getSize());
- HBITMAP hBmpBitmap = CreateCompatibleBitmap( hScreenDC,
- aSize.getX(),
+ HBITMAP hBmpBitmap = CreateCompatibleBitmap( hScreenDC,
+ aSize.getX(),
aSize.getY() );
if( !hBmpBitmap )
return aRes;
-
+
BITMAPINFOHEADER aBIH;
aBIH.biSize = sizeof( BITMAPINFOHEADER );
@@ -129,11 +129,11 @@ namespace dxcanvas
aBIH.biClrImportant = 0;
Gdiplus::BitmapData aBmpData;
- aBmpData.Width = aSize.getX();
- aBmpData.Height = aSize.getY();
- aBmpData.Stride = 4*aBmpData.Width;
+ aBmpData.Width = aSize.getX();
+ aBmpData.Height = aSize.getY();
+ aBmpData.Stride = 4*aBmpData.Width;
aBmpData.PixelFormat = PixelFormat32bppARGB;
- aBmpData.Scan0 = NULL;
+ aBmpData.Scan0 = NULL;
const Gdiplus::Rect aRect( 0,0,aSize.getX(),aSize.getY() );
BitmapSharedPtr pGDIPlusBitmap=mpBitmap->getBitmap();
if( Gdiplus::Ok != pGDIPlusBitmap->LockBits( &aRect,
@@ -141,7 +141,7 @@ namespace dxcanvas
PixelFormat32bppARGB, // outputs ARGB (big endian)
&aBmpData ) )
{
- // failed to lock, bail out
+ // failed to lock, bail out
return aRes;
}
@@ -153,13 +153,13 @@ namespace dxcanvas
uno::Sequence< uno::Any > args(1);
args[0] = uno::Any( sal_Int64(hBmpBitmap) );
-
+
aRes <<= args;
}
}
break;
- case 2:
+ case 2:
{
if(!mpBitmap->hasAlpha())
{
@@ -189,7 +189,7 @@ namespace dxcanvas
HBITMAP hBmpBitmap = CreateCompatibleBitmap( hScreenDC, aSize.getX(), aSize.getY() );
if( !hBmpBitmap )
return aRes;
-
+
aDIB.bmiHeader.biSize = sizeof( BITMAPINFOHEADER );
aDIB.bmiHeader.biWidth = aSize.getX();
aDIB.bmiHeader.biHeight = -aSize.getY();
@@ -203,11 +203,11 @@ namespace dxcanvas
aDIB.bmiHeader.biClrImportant = 0;
Gdiplus::BitmapData aBmpData;
- aBmpData.Width = aSize.getX();
- aBmpData.Height = aSize.getY();
- aBmpData.Stride = 4*aBmpData.Width;
+ aBmpData.Width = aSize.getX();
+ aBmpData.Height = aSize.getY();
+ aBmpData.Stride = 4*aBmpData.Width;
aBmpData.PixelFormat = PixelFormat32bppARGB;
- aBmpData.Scan0 = NULL;
+ aBmpData.Scan0 = NULL;
const Gdiplus::Rect aRect( 0,0,aSize.getX(),aSize.getY() );
BitmapSharedPtr pGDIPlusBitmap=mpBitmap->getBitmap();
if( Gdiplus::Ok != pGDIPlusBitmap->LockBits( &aRect,
@@ -215,7 +215,7 @@ namespace dxcanvas
PixelFormat32bppARGB, // outputs ARGB (big endian)
&aBmpData ) )
{
- // failed to lock, bail out
+ // failed to lock, bail out
return aRes;
}
@@ -238,13 +238,13 @@ namespace dxcanvas
pGDIPlusBitmap->UnlockBits( &aBmpData );
// set bits to newly create HBITMAP
- SetDIBits( hScreenDC, hBmpBitmap, 0,
- aSize.getY(), pAlphaBits.get(),
+ SetDIBits( hScreenDC, hBmpBitmap, 0,
+ aSize.getY(), pAlphaBits.get(),
(PBITMAPINFO)&aDIB, DIB_RGB_COLORS );
uno::Sequence< uno::Any > args(1);
args[0] = uno::Any( sal_Int64(hBmpBitmap) );
-
+
aRes <<= args;
}
}
@@ -271,7 +271,7 @@ namespace dxcanvas
{
uno::Sequence< ::rtl::OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-
+
return aRet;
}