1 diff -rup /home/rodo/svn/ooo-build-1/build/ooh680-m8/vcl/unx/inc/salbmp.h vcl/unx/inc/salbmp.h
2 --- /home/rodo/svn/ooo-build-1/build/ooh680-m8/vcl/unx/inc/salbmp.h 2008-03-03 11:01:10.000000000 +0100
3 +++ vcl/unx/inc/salbmp.h 2008-02-28 13:18:23.000000000 +0100
4 @@ -74,7 +74,8 @@ private:
8 - long nWidth, long nHeight );
9 + long nWidth, long nHeight,
14 @@ -95,6 +96,7 @@ private:
22 diff -rup /home/rodo/svn/ooo-build-1/build/ooh680-m8/vcl/unx/source/gdi/salbmp.cxx vcl/unx/source/gdi/salbmp.cxx
23 --- /home/rodo/svn/ooo-build-1/build/ooh680-m8/vcl/unx/source/gdi/salbmp.cxx 2008-03-03 11:01:10.000000000 +0100
24 +++ vcl/unx/source/gdi/salbmp.cxx 2008-02-28 13:39:01.000000000 +0100
25 @@ -97,7 +98,8 @@ ULONG X11SalBitmap::mnCacheInstCount
27 X11SalBitmap::X11SalBitmap() :
35 @@ -211,7 +213,8 @@ BitmapBuffer* X11SalBitmap::ImplCreateDI
39 - long nWidth, long nHeight )
40 + long nWidth, long nHeight,
43 BitmapBuffer* pDIB = NULL;
45 @@ -322,6 +325,21 @@ BitmapBuffer* X11SalBitmap::ImplCreateDI
46 rPal[ 0 ] = Color( COL_BLACK );
47 rPal[ 1 ] = Color( COL_WHITE );
49 + else if( pImage->depth == 8 && bGrey )
51 + rPal.SetEntryCount( 256 );
54 + for( USHORT i = 0; i < 256; i++ )
56 + BitmapColor& rBmpCol = rPal[ i ];
58 + rBmpCol.SetRed( i );
59 + rBmpCol.SetGreen( i );
60 + rBmpCol.SetBlue( i );
64 else if( aSrcBuf.mnBitCount <= 8 )
66 const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
67 @@ -365,7 +383,8 @@ XImage* X11SalBitmap::ImplCreateXImage(
68 mpDDB->ImplGetDepth(),
70 mpDDB->ImplGetWidth(),
71 - mpDDB->ImplGetHeight() );
72 + mpDDB->ImplGetHeight(),
76 if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight )
77 @@ -448,6 +467,20 @@ XImage* X11SalBitmap::ImplCreateXImage(
78 (*pPal)[ 0 ] = Color( COL_BLACK );
79 (*pPal)[ 1 ] = Color( COL_WHITE );
81 + else if( pImage->depth == 8 && mbGrey )
83 + pPal = new BitmapPalette( 256 );
85 + for( USHORT i = 0; i < 256; i++ )
87 + BitmapColor& rBmpCol = (*pPal)[ i ];
89 + rBmpCol.SetRed( i );
90 + rBmpCol.SetGreen( i );
91 + rBmpCol.SetBlue( i );
95 else if( pImage->depth <= 8 )
97 const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
98 @@ -612,7 +645,8 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( Dr
99 mpDDB->ImplGetDepth(),
101 mpDDB->ImplGetWidth(),
102 - mpDDB->ImplGetHeight() );
103 + mpDDB->ImplGetHeight(),
107 delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = NULL;
108 @@ -775,6 +809,8 @@ bool X11SalBitmap::Create( const ::com::
110 if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
111 if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) {
114 bool bSuccess = ImplCreateFromDrawable( pixmapHandle, 0, depth, 0, 0, (long) rSize.Width(), (long) rSize.Height() );
116 if( bSuccess && (args[0] >>= bFreePixmap) && bFreePixmap )
117 @@ -844,7 +882,7 @@ BitmapBuffer* X11SalBitmap::AcquireBuffe
118 mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(),
119 mpDDB->ImplGetScreen(),
120 mpDDB->ImplGetDepth(),
121 - 0, 0, mpDDB->ImplGetWidth(), mpDDB->ImplGetHeight() );
122 + 0, 0, mpDDB->ImplGetWidth(), mpDDB->ImplGetHeight(), mbGrey );