diff options
Diffstat (limited to 'svx/source/xoutdev/xattrbmp.cxx')
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 57c894e00475..874cb35d3e30 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -70,7 +70,7 @@ XOBitmap::XOBitmap() : eType ( XBITMAP_NONE ), eStyle ( XBITMAP_STRETCH ), pPixelArray ( NULL ), - bGraphicDirty ( FALSE ) + bGraphicDirty ( sal_False ) { } @@ -89,7 +89,7 @@ XOBitmap::XOBitmap( const Bitmap& rBmp, XBitmapStyle eInStyle ) : eStyle ( eInStyle ), aGraphicObject ( rBmp ), pPixelArray ( NULL ), - bGraphicDirty ( FALSE ) + bGraphicDirty ( sal_False ) { } @@ -108,13 +108,13 @@ XOBitmap::XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eInStyle ) eStyle ( eInStyle ), aGraphicObject ( rGraphicObject ), pPixelArray ( NULL ), - bGraphicDirty ( FALSE ) + bGraphicDirty ( sal_False ) { } /************************************************************************* |* -|* XOBitmap::XOBitmap( USHORT* pArray, const Color& aPixelColor, +|* XOBitmap::XOBitmap( sal_uInt16* pArray, const Color& aPixelColor, |* const Color& aBckgrColor, const Size& rSize = Size( 8, 8 ), |* XBitmapStyle eStyle = XBITMAP_TILE ) |* @@ -124,7 +124,7 @@ XOBitmap::XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eInStyle ) |* *************************************************************************/ -XOBitmap::XOBitmap( const USHORT* pArray, const Color& rPixelColor, +XOBitmap::XOBitmap( const sal_uInt16* pArray, const Color& rPixelColor, const Color& rBckgrColor, const Size& rSize, XBitmapStyle eInStyle ) : eStyle ( eInStyle ), @@ -132,15 +132,15 @@ XOBitmap::XOBitmap( const USHORT* pArray, const Color& rPixelColor, aArraySize ( rSize ), aPixelColor ( rPixelColor ), aBckgrColor ( rBckgrColor ), - bGraphicDirty ( TRUE ) + bGraphicDirty ( sal_True ) { if( aArraySize.Width() == 8 && aArraySize.Height() == 8 ) { eType = XBITMAP_8X8; - pPixelArray = new USHORT[ 64 ]; + pPixelArray = new sal_uInt16[ 64 ]; - for( USHORT i = 0; i < 64; i++ ) + for( sal_uInt16 i = 0; i < 64; i++ ) *( pPixelArray + i ) = *( pArray + i ); } else @@ -174,9 +174,9 @@ XOBitmap::XOBitmap( const XOBitmap& rXBmp ) : { if( eType == XBITMAP_8X8 ) { - pPixelArray = new USHORT[ 64 ]; + pPixelArray = new sal_uInt16[ 64 ]; - for( USHORT i = 0; i < 64; i++ ) + for( sal_uInt16 i = 0; i < 64; i++ ) *( pPixelArray + i ) = *( rXBmp.pPixelArray + i ); } } @@ -222,9 +222,9 @@ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) { if( eType == XBITMAP_8X8 ) { - pPixelArray = new USHORT[ 64 ]; + pPixelArray = new sal_uInt16[ 64 ]; - for( USHORT i = 0; i < 64; i++ ) + for( sal_uInt16 i = 0; i < 64; i++ ) *( pPixelArray + i ) = *( rXBmp.pPixelArray + i ); } } @@ -251,24 +251,24 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const aBckgrColor != rXOBitmap.aBckgrColor || bGraphicDirty != rXOBitmap.bGraphicDirty ) { - return( FALSE ); + return( sal_False ); } if( pPixelArray && rXOBitmap.pPixelArray ) { - USHORT nCount = (USHORT) ( aArraySize.Width() * aArraySize.Height() ); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = (sal_uInt16) ( aArraySize.Width() * aArraySize.Height() ); + for( sal_uInt16 i = 0; i < nCount; i++ ) { if( *( pPixelArray + i ) != *( rXOBitmap.pPixelArray + i ) ) - return( FALSE ); + return( sal_False ); } } - return( TRUE ); + return( sal_True ); } /************************************************************************* |* -|* void SetPixelArray( const USHORT* pArray ) +|* void SetPixelArray( const sal_uInt16* pArray ) |* |* Beschreibung |* Ersterstellung 27.07.95 @@ -276,19 +276,19 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const |* *************************************************************************/ -void XOBitmap::SetPixelArray( const USHORT* pArray ) +void XOBitmap::SetPixelArray( const sal_uInt16* pArray ) { if( eType == XBITMAP_8X8 ) { if( pPixelArray ) delete []pPixelArray; - pPixelArray = new USHORT[ 64 ]; + pPixelArray = new sal_uInt16[ 64 ]; - for( USHORT i = 0; i < 64; i++ ) + for( sal_uInt16 i = 0; i < 64; i++ ) *( pPixelArray + i ) = *( pArray + i ); - bGraphicDirty = TRUE; + bGraphicDirty = sal_True; } else { @@ -343,12 +343,12 @@ const GraphicObject& XOBitmap::GetGraphicObject() const void XOBitmap::Bitmap2Array() { VirtualDevice aVD; - BOOL bPixelColor = FALSE; + sal_Bool bPixelColor = sal_False; const Bitmap aBitmap( GetBitmap() ); - const USHORT nLines = 8; // von Type abhaengig + const sal_uInt16 nLines = 8; // von Type abhaengig if( !pPixelArray ) - pPixelArray = new USHORT[ nLines * nLines ]; + pPixelArray = new sal_uInt16[ nLines * nLines ]; aVD.SetOutputSizePixel( aBitmap.GetSizePixel() ); aVD.DrawBitmap( Point(), aBitmap ); @@ -356,9 +356,9 @@ void XOBitmap::Bitmap2Array() // Aufbau des Arrays und Ermittlung der Vorder-, bzw. // Hintergrundfarbe - for( USHORT i = 0; i < nLines; i++ ) + for( sal_uInt16 i = 0; i < nLines; i++ ) { - for( USHORT j = 0; j < nLines; j++ ) + for( sal_uInt16 j = 0; j < nLines; j++ ) { if ( aVD.GetPixel( Point( j, i ) ) == aBckgrColor ) *( pPixelArray + j + i * nLines ) = 0; @@ -368,7 +368,7 @@ void XOBitmap::Bitmap2Array() if( !bPixelColor ) { aPixelColor = aVD.GetPixel( Point( j, i ) ); - bPixelColor = TRUE; + bPixelColor = sal_True; } } } @@ -389,7 +389,7 @@ void XOBitmap::Bitmap2Array() void XOBitmap::Array2Bitmap() { VirtualDevice aVD; - USHORT nLines = 8; // von Type abhaengig + sal_uInt16 nLines = 8; // von Type abhaengig if( !pPixelArray ) return; @@ -397,9 +397,9 @@ void XOBitmap::Array2Bitmap() aVD.SetOutputSizePixel( Size( nLines, nLines ) ); // Aufbau der Bitmap - for( USHORT i = 0; i < nLines; i++ ) + for( sal_uInt16 i = 0; i < nLines; i++ ) { - for( USHORT j = 0; j < nLines; j++ ) + for( sal_uInt16 j = 0; j < nLines; j++ ) { if( *( pPixelArray + j + i * nLines ) == 0 ) aVD.DrawPixel( Point( j, i ), aBckgrColor ); @@ -409,7 +409,7 @@ void XOBitmap::Array2Bitmap() } aGraphicObject = GraphicObject( aVD.GetBitmap( Point(), Size( nLines, nLines ) ) ); - bGraphicDirty = FALSE; + bGraphicDirty = sal_False; } // ----------------------- @@ -479,7 +479,7 @@ XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) : |* *************************************************************************/ -XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) : +XFillBitmapItem::XFillBitmapItem( SvStream& rIn, sal_uInt16 nVer ) : NameOrIndex( XATTR_FILLBITMAP, rIn ) { if( nVer == 0 ) @@ -508,7 +508,7 @@ XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) : { if (!IsIndex()) { - INT16 iTmp; + sal_Int16 iTmp; rIn >> iTmp; aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp ); rIn >> iTmp; @@ -522,10 +522,10 @@ XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) : } else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 ) { - USHORT* pArray = new USHORT[ 64 ]; + sal_uInt16* pArray = new sal_uInt16[ 64 ]; Color aColor; - for( USHORT i = 0; i < 64; i++ ) + for( sal_uInt16 i = 0; i < 64; i++ ) rIn >> *( pArray + i ); aXOBitmap.SetPixelArray( pArray ); @@ -591,7 +591,7 @@ int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const /************************************************************************* |* -|* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const +|* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, sal_uInt16 nVer) const |* |* Beschreibung |* Ersterstellung 17.11.94 @@ -599,7 +599,7 @@ int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const |* *************************************************************************/ -SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const +SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, sal_uInt16 nVer) const { return new XFillBitmapItem( rIn, nVer ); } @@ -614,22 +614,22 @@ SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const |* *************************************************************************/ -SvStream& XFillBitmapItem::Store( SvStream& rOut, USHORT nItemVersion ) const +SvStream& XFillBitmapItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { NameOrIndex::Store( rOut, nItemVersion ); if (!IsIndex()) { - rOut << (INT16) aXOBitmap.GetBitmapStyle(); + rOut << (sal_Int16) aXOBitmap.GetBitmapStyle(); if( !aXOBitmap.GetBitmap() ) - rOut << (INT16) XBITMAP_NONE; + rOut << (sal_Int16) XBITMAP_NONE; else { - rOut << (INT16) aXOBitmap.GetBitmapType(); + rOut << (sal_Int16) aXOBitmap.GetBitmapType(); if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT ) { - const USHORT nOldComprMode = rOut.GetCompressMode(); - USHORT nNewComprMode = nOldComprMode; + const sal_uInt16 nOldComprMode = rOut.GetCompressMode(); + sal_uInt16 nNewComprMode = nOldComprMode; if( rOut.GetVersion() >= SOFFICE_FILEFORMAT_50 ) nNewComprMode |= COMPRESSMODE_ZBITMAP; @@ -642,9 +642,9 @@ SvStream& XFillBitmapItem::Store( SvStream& rOut, USHORT nItemVersion ) const } else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 ) { - USHORT* pArray = aXOBitmap.GetPixelArray(); - for( USHORT i = 0; i < 64; i++ ) - rOut << (USHORT) *( pArray + i ); + sal_uInt16* pArray = aXOBitmap.GetPixelArray(); + for( sal_uInt16 i = 0; i < 64; i++ ) + rOut << (sal_uInt16) *( pArray + i ); rOut << aXOBitmap.GetPixelColor(); rOut << aXOBitmap.GetBackgroundColor(); @@ -676,7 +676,7 @@ const XOBitmap& XFillBitmapItem::GetBitmapValue(const XBitmapTable* pTable) cons /************************************************************************* |* -|* USHORT XFillBitmapItem::GetVersion() const +|* sal_uInt16 XFillBitmapItem::GetVersion() const |* |* Beschreibung |* Ersterstellung 26.07.95 @@ -684,7 +684,7 @@ const XOBitmap& XFillBitmapItem::GetBitmapValue(const XBitmapTable* pTable) cons |* *************************************************************************/ -USHORT XFillBitmapItem::GetVersion( USHORT /*nFileFormatVersion*/) const +sal_uInt16 XFillBitmapItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const { // 2. Version return( 1 ); @@ -716,7 +716,7 @@ SfxItemPresentation XFillBitmapItem::GetPresentation //------------------------------------------------------------------------ -sal_Bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +sal_Bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -782,7 +782,7 @@ sal_Bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMe //------------------------------------------------------------------------ -sal_Bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +sal_Bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -865,7 +865,7 @@ sal_Bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE return (bSetName || bSetURL || bSetBitmap); } -BOOL XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) +sal_Bool XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) { return ((XFillBitmapItem*)p1)->GetBitmapValue().GetGraphicObject().GetUniqueID() == ((XFillBitmapItem*)p2)->GetBitmapValue().GetGraphicObject().GetUniqueID(); |