diff options
Diffstat (limited to 'svx/source/xoutdev/xattrbmp.cxx')
-rwxr-xr-x[-rw-r--r--] | svx/source/xoutdev/xattrbmp.cxx | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index bff7e065b3e6..af4a4034a00b 100644..100755 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -39,13 +39,13 @@ #include <editeng/memberids.hrc> #include <svx/dialogs.hrc> -#include "xattr.hxx" +#include "svx/xattr.hxx" #include <svx/xtable.hxx> #include <svx/xdef.hxx> #include <svx/unomid.hxx> #include <editeng/unoprnms.hxx> -#include "unoapi.hxx" +#include "svx/unoapi.hxx" #include <svx/svdmodel.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -67,7 +67,7 @@ XOBitmap::XOBitmap() : eType ( XBITMAP_NONE ), eStyle ( XBITMAP_STRETCH ), pPixelArray ( NULL ), - bGraphicDirty ( FALSE ) + bGraphicDirty ( sal_False ) { } @@ -82,7 +82,7 @@ XOBitmap::XOBitmap( const Bitmap& rBmp, XBitmapStyle eInStyle ) : eStyle ( eInStyle ), aGraphicObject ( rBmp ), pPixelArray ( NULL ), - bGraphicDirty ( FALSE ) + bGraphicDirty ( sal_False ) { } @@ -97,19 +97,19 @@ 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 ) |* *************************************************************************/ -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 ), @@ -117,15 +117,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 @@ -155,9 +155,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 ); } } @@ -195,9 +195,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 ); } } @@ -220,40 +220,40 @@ 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 ) |* *************************************************************************/ -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 { @@ -298,12 +298,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 ); @@ -311,9 +311,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; @@ -323,7 +323,7 @@ void XOBitmap::Bitmap2Array() if( !bPixelColor ) { aPixelColor = aVD.GetPixel( Point( j, i ) ); - bPixelColor = TRUE; + bPixelColor = sal_True; } } } @@ -342,7 +342,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; @@ -350,9 +350,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 ); @@ -362,7 +362,7 @@ void XOBitmap::Array2Bitmap() } aGraphicObject = GraphicObject( aVD.GetBitmap( Point(), Size( nLines, nLines ) ) ); - bGraphicDirty = FALSE; + bGraphicDirty = sal_False; } // ----------------------- @@ -416,7 +416,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 ) @@ -445,7 +445,7 @@ XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) : { if (!IsIndex()) { - INT16 iTmp; + sal_Int16 iTmp; rIn >> iTmp; aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp ); rIn >> iTmp; @@ -459,10 +459,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 ); @@ -520,11 +520,11 @@ int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const /************************************************************************* |* -|* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const +|* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, sal_uInt16 nVer) const |* *************************************************************************/ -SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const +SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, sal_uInt16 nVer) const { return new XFillBitmapItem( rIn, nVer ); } @@ -535,22 +535,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; @@ -563,9 +563,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(); @@ -593,11 +593,11 @@ const XOBitmap& XFillBitmapItem::GetBitmapValue(const XBitmapTable* pTable) cons /************************************************************************* |* -|* USHORT XFillBitmapItem::GetVersion() const +|* sal_uInt16 XFillBitmapItem::GetVersion() const |* *************************************************************************/ -USHORT XFillBitmapItem::GetVersion( USHORT /*nFileFormatVersion*/) const +sal_uInt16 XFillBitmapItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const { // 2. Version return( 1 ); @@ -629,7 +629,7 @@ SfxItemPresentation XFillBitmapItem::GetPresentation //------------------------------------------------------------------------ -bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -695,7 +695,7 @@ bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMember //------------------------------------------------------------------------ -bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -778,7 +778,7 @@ bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMe 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(); |