diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-14 13:56:21 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-14 13:56:21 +0100 |
commit | e8c2c1daae9008d383288f94600b1d34d2059fb1 (patch) | |
tree | 94a20ff44445a6bc959ff2330fa39e8ebada7c64 /filter/source/msfilter/escherex.cxx | |
parent | 3e3d12cb88fa6dc4e6d00692e57c9cb70c709e17 (diff) |
removetooltypes01: #i112600# remove tooltypes from filter
Diffstat (limited to 'filter/source/msfilter/escherex.cxx')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 214 |
1 files changed, 107 insertions, 107 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 82b0480a3d0c..d8e3b3762f00 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -215,7 +215,7 @@ void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, sal_Bool bBlib, sal_uI if ( bBlib ) // bBlib is only valid when fComplex = 0 nPropID |= 0x4000; if ( pProp ) - nPropID |= 0x8000; // fComplex = TRUE; + nPropID |= 0x8000; // fComplex = sal_True; sal_uInt32 i; for( i = 0; i < nSortCount; i++ ) @@ -298,8 +298,8 @@ EscherProperties EscherPropertyContainer::GetOpts() const extern "C" int __LOADONCALLAPI EscherPropSortFunc( const void* p1, const void* p2 ) { - INT16 nID1 = ((EscherPropSortStruct*)p1)->nPropId &~0xc000; - INT16 nID2 = ((EscherPropSortStruct*)p2)->nPropId &~0xc000; + sal_Int16 nID1 = ((EscherPropSortStruct*)p1)->nPropId &~0xc000; + sal_Int16 nID2 = ((EscherPropSortStruct*)p2)->nPropId &~0xc000; if( nID1 < nID2 ) return -1; @@ -1183,7 +1183,7 @@ sal_Bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const ByteString& rUniq { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property - aMemStrm.ObjectOwnsMemory( FALSE ); + aMemStrm.ObjectOwnsMemory( sal_False ); sal_uInt8* pBuf = (sal_uInt8*) aMemStrm.GetData(); sal_uInt32 nSize = aMemStrm.Seek( STREAM_SEEK_TO_END ); AddOpt( ESCHER_Prop_fillBlip, sal_True, nSize, pBuf, nSize ); @@ -1388,7 +1388,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( INetURLObject aTmp( aGraphicUrl ); GraphicDescriptor aDescriptor(aTmp); aDescriptor.Detect(); - const USHORT nFormat = aDescriptor.GetFileFormat(); + const sal_uInt16 nFormat = aDescriptor.GetFileFormat(); // can MSO handle it? if ( bMirrored || nAngle || @@ -1479,7 +1479,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property - aMemStrm.ObjectOwnsMemory( FALSE ); + aMemStrm.ObjectOwnsMemory( sal_False ); sal_uInt8* pBuf = (sal_uInt8*) aMemStrm.GetData(); sal_uInt32 nSize = aMemStrm.Seek( STREAM_SEEK_TO_END ); AddOpt( ESCHER_Prop_fillBlip, sal_True, nSize, pBuf, nSize ); @@ -1795,8 +1795,8 @@ sal_Bool EscherPropertyContainer::CreatePolygonProperties( AddOpt( ESCHER_Prop_geoBottom, rGeoRect.Height ); AddOpt( ESCHER_Prop_shapePath, ESCHER_ShapeComplex ); - AddOpt( ESCHER_Prop_pVertices, TRUE, nVerticesBufSize - 6, (sal_uInt8*)pVerticesBuf, nVerticesBufSize ); - AddOpt( ESCHER_Prop_pSegmentInfo, TRUE, nSegmentBufSize, (sal_uInt8*)pSegmentBuf, nSegmentBufSize ); + AddOpt( ESCHER_Prop_pVertices, sal_True, nVerticesBufSize - 6, (sal_uInt8*)pVerticesBuf, nVerticesBufSize ); + AddOpt( ESCHER_Prop_pSegmentInfo, sal_True, nSegmentBufSize, (sal_uInt8*)pSegmentBuf, nSegmentBufSize ); } } return bRetValue; @@ -2163,7 +2163,7 @@ void EscherPropertyContainer::LookForPolarHandles( const MSO_SPT eShapeType, sal sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue ) { if ( rkProp.State != beans::PropertyState_DIRECT_VALUE ) - return FALSE; + return sal_False; sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << nIndex ) ) != 0; if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE ) @@ -2181,7 +2181,7 @@ sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::draw nValue <<= 16; } - return TRUE; + return sal_True; } void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeType, const uno::Reference< drawing::XShape > & rXShape ) @@ -3351,32 +3351,32 @@ EscherPersistTable::~EscherPersistTable() // --------------------------------------------------------------------------------------------- -BOOL EscherPersistTable::PtIsID( UINT32 nID ) +sal_Bool EscherPersistTable::PtIsID( sal_uInt32 nID ) { for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { if ( ((EscherPersistEntry*)pPtr)->mnID == nID ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // --------------------------------------------------------------------------------------------- -void EscherPersistTable::PtInsert( UINT32 nID, UINT32 nOfs ) +void EscherPersistTable::PtInsert( sal_uInt32 nID, sal_uInt32 nOfs ) { maPersistTable.Insert( new EscherPersistEntry( nID, nOfs ) ); } // --------------------------------------------------------------------------------------------- -UINT32 EscherPersistTable::PtDelete( UINT32 nID ) +sal_uInt32 EscherPersistTable::PtDelete( sal_uInt32 nID ) { for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { if ( ((EscherPersistEntry*)pPtr)->mnID == nID ) { -// UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset; +// sal_uInt32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset; delete (EscherPersistEntry*) maPersistTable.Remove(); } } @@ -3385,7 +3385,7 @@ UINT32 EscherPersistTable::PtDelete( UINT32 nID ) // --------------------------------------------------------------------------------------------- -UINT32 EscherPersistTable::PtGetOffsetByID( UINT32 nID ) +sal_uInt32 EscherPersistTable::PtGetOffsetByID( sal_uInt32 nID ) { for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { @@ -3397,13 +3397,13 @@ UINT32 EscherPersistTable::PtGetOffsetByID( UINT32 nID ) // --------------------------------------------------------------------------------------------- -UINT32 EscherPersistTable::PtReplace( UINT32 nID, UINT32 nOfs ) +sal_uInt32 EscherPersistTable::PtReplace( sal_uInt32 nID, sal_uInt32 nOfs ) { for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { if ( ((EscherPersistEntry*)pPtr)->mnID == nID ) { - UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset; + sal_uInt32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset; ((EscherPersistEntry*)pPtr)->mnOffset = nOfs; return nRetValue; } @@ -3413,13 +3413,13 @@ UINT32 EscherPersistTable::PtReplace( UINT32 nID, UINT32 nOfs ) // --------------------------------------------------------------------------------------------- -UINT32 EscherPersistTable::PtReplaceOrInsert( UINT32 nID, UINT32 nOfs ) +sal_uInt32 EscherPersistTable::PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs ) { for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { if ( ((EscherPersistEntry*)pPtr)->mnID == nID ) { - UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset; + sal_uInt32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset; ((EscherPersistEntry*)pPtr)->mnOffset = nOfs; return nRetValue; } @@ -3498,7 +3498,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject mnSizeExtra ( 0 ), maPrefSize ( rObject.GetPrefSize() ), maPrefMapMode ( rObject.GetPrefMapMode() ), - mbIsEmpty ( TRUE ) + mbIsEmpty ( sal_True ) { mbIsNativeGraphicPossible = ( pGraphicAttr == NULL ); meBlibType = UNKNOWN; @@ -3535,12 +3535,12 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject << pGraphicAttr->GetChannelG() << pGraphicAttr->GetChannelB() << pGraphicAttr->GetGamma() - << (BOOL)( pGraphicAttr->IsInvert() == TRUE ) + << (sal_Bool)( pGraphicAttr->IsInvert() == sal_True ) << pGraphicAttr->GetTransparency(); mnIdentifier[ 1 ] = rtl_crc32( 0, aSt.GetData(), aSt.Tell() ); } else - mbIsNativeGraphicPossible = TRUE; + mbIsNativeGraphicPossible = sal_True; } sal_uInt32 i, nTmp, n1, n2; n1 = n2 = 0; @@ -3555,7 +3555,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject } mnIdentifier[ 2 ] = n1; mnIdentifier[ 3 ] = n2; - mbIsEmpty = FALSE; + mbIsEmpty = sal_False; } }; @@ -3595,14 +3595,14 @@ EscherBlibEntry::~EscherBlibEntry() // --------------------------------------------------------------------------------------------- -BOOL EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) const +sal_Bool EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) const { for ( int i = 0; i < 3; i++ ) { if ( mnIdentifier[ i ] != rEscherBlibEntry.mnIdentifier[ i ] ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } // --------------------------------------------------------------------------------------------- @@ -3619,7 +3619,7 @@ EscherGraphicProvider::EscherGraphicProvider( sal_uInt32 nFlags ) : EscherGraphicProvider::~EscherGraphicProvider() { - for ( UINT32 i = 0; i < mnBlibEntrys; delete mpBlibEntrys[ i++ ] ) ; + for ( sal_uInt32 i = 0; i < mnBlibEntrys; delete mpBlibEntrys[ i++ ] ) ; delete[] mpBlibEntrys; } @@ -3632,13 +3632,13 @@ void EscherGraphicProvider::SetNewBlipStreamOffset( sal_Int32 nOffset ) } } -UINT32 EscherGraphicProvider::ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry ) +sal_uInt32 EscherGraphicProvider::ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry ) { if ( mnBlibBufSize == mnBlibEntrys ) { mnBlibBufSize += 64; EscherBlibEntry** pTemp = new EscherBlibEntry*[ mnBlibBufSize ]; - for ( UINT32 i = 0; i < mnBlibEntrys; i++ ) + for ( sal_uInt32 i = 0; i < mnBlibEntrys; i++ ) { pTemp[ i ] = mpBlibEntrys[ i ]; } @@ -3693,15 +3693,15 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM // BLIP pMergePicStreamBSE->Seek( pBlibEntry->mnPictureOffset ); - UINT16 n16; + sal_uInt16 n16; // record version and instance *pMergePicStreamBSE >> n16; rSt << n16; // record type *pMergePicStreamBSE >> n16; - rSt << UINT16( ESCHER_BlipFirst + nBlibType ); + rSt << sal_uInt16( ESCHER_BlipFirst + nBlibType ); DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherGraphicProvider::WriteBlibStoreContainer: BLIP record types differ" ); - UINT32 n32; + sal_uInt32 n32; // record size *pMergePicStreamBSE >> n32; nBlipSize -= 8; @@ -3710,7 +3710,7 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM // record while ( nBlipSize ) { - UINT32 nBytes = ( nBlipSize > nBuf ? nBuf : nBlipSize ); + sal_uInt32 nBytes = ( nBlipSize > nBuf ? nBuf : nBlipSize ); pMergePicStreamBSE->Read( pBuf, nBytes ); rSt.Write( pBuf, nBytes ); nBlipSize -= nBytes; @@ -3748,7 +3748,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt EscherBlibEntry* p_EscherBlibEntry = new EscherBlibEntry( rPicOutStrm.Tell(), aGraphicObject, rId, pGraphicAttr ); if ( !p_EscherBlibEntry->IsEmpty() ) { - for ( UINT32 i = 0; i < mnBlibEntrys; i++ ) + for ( sal_uInt32 i = 0; i < mnBlibEntrys; i++ ) { if ( *( mpBlibEntrys[ i ] ) == *p_EscherBlibEntry ) { @@ -3758,7 +3758,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt } } - sal_Bool bUseNativeGraphic( FALSE ); + sal_Bool bUseNativeGraphic( sal_False ); Graphic aGraphic( aGraphicObject.GetTransformedGraphic( pGraphicAttr ) ); GfxLink aGraphicLink; @@ -3804,7 +3804,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt default: break; } if ( p_EscherBlibEntry->meBlibType != UNKNOWN ) - bUseNativeGraphic = TRUE; + bUseNativeGraphic = sal_True; } } if ( !bUseNativeGraphic ) @@ -3866,8 +3866,8 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt if ( mnFlags & _E_GRAPH_PROV_USE_INSTANCES ) { - rPicOutStrm << (UINT32)( 0x7f90000 | (UINT16)( mnBlibEntrys << 4 ) ) - << (UINT32)0; + rPicOutStrm << (sal_uInt32)( 0x7f90000 | (sal_uInt16)( mnBlibEntrys << 4 ) ) + << (sal_uInt32)0; nAtomSize = rPicOutStrm.Tell(); if ( eBlibType == PNG ) rPicOutStrm << (sal_uInt16)0x0606; @@ -3919,9 +3919,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt around, and the original size and scaling factor in word will be a very strange figure */ - UINT32 nPrefWidth = p_EscherBlibEntry->maPrefSize.Width(); - UINT32 nPrefHeight = p_EscherBlibEntry->maPrefSize.Height(); - UINT32 nWidth, nHeight; + sal_uInt32 nPrefWidth = p_EscherBlibEntry->maPrefSize.Width(); + sal_uInt32 nPrefHeight = p_EscherBlibEntry->maPrefSize.Height(); + sal_uInt32 nWidth, nHeight; if ( pVisArea ) { nWidth = pVisArea->Width * 360; @@ -4158,7 +4158,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst ) if ( pList ) { Polygon aPoly; - USHORT nNum, nAnz = pList->GetCount(); + sal_uInt16 nNum, nAnz = pList->GetCount(); if ( nAnz ) { for ( nNum = 0; nNum < nAnz; nNum++ ) @@ -4174,7 +4174,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst ) } else if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::SEGMENTS ) { - SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( TRUE ); + SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( sal_True ); if ( pPoly && pPoly->ISA( SdrPathObj ) ) { sal_Int16 a, b, nIndex = 0; @@ -4453,8 +4453,8 @@ EscherEx::EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm ) : mnGroupLevel ( 0 ), mnHellLayerId ( USHRT_MAX ), - mbEscherSpgr ( FALSE ), - mbEscherDg ( FALSE ) + mbEscherSpgr ( sal_False ), + mbEscherDg ( sal_False ) { mnStrmStartOfs = mpOutStrm->Tell(); mpImplEscherExSdr.reset( new ImplEscherExSdr( *this ) ); @@ -4503,15 +4503,15 @@ void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ ) // --------------------------------------------------------------------------------------------- -void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom ) +void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom ) { - UINT32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell(); - BYTE* pBuf; + sal_uInt32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell(); + sal_uInt8* pBuf; // Persist table anpassen for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { - UINT32 nOfs = ((EscherPersistEntry*)pPtr)->mnOffset; + sal_uInt32 nOfs = ((EscherPersistEntry*)pPtr)->mnOffset; if ( nOfs >= nCurPos ) ((EscherPersistEntry*)pPtr)->mnOffset += nBytes; } @@ -4529,7 +4529,7 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom ) if ( (nCurPos < nEndOfRecord) || ((nCurPos == nEndOfRecord) && (bContainer || bExpandEndOfAtom)) ) { mpOutStrm->SeekRel( -4 ); - *mpOutStrm << (UINT32)( nSize + nBytes ); + *mpOutStrm << (sal_uInt32)( nSize + nBytes ); if ( !bContainer ) mpOutStrm->SeekRel( nSize ); } @@ -4547,7 +4547,7 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom ) mpOutStrm->Seek( STREAM_SEEK_TO_END ); nSource = mpOutStrm->Tell(); nToCopy = nSource - nCurPos; // Stream um nBytes vergroessern - pBuf = new BYTE[ 0x40000 ]; // 256KB Buffer + pBuf = new sal_uInt8[ 0x40000 ]; // 256KB Buffer while ( nToCopy ) { nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy; @@ -4564,9 +4564,9 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom ) // --------------------------------------------------------------------------------------------- -BOOL EscherEx::SeekBehindRecHeader( UINT16 nRecType ) +sal_Bool EscherEx::SeekBehindRecHeader( sal_uInt16 nRecType ) { - UINT32 nOldPos, nStreamEnd, nType, nSize; + sal_uInt32 nOldPos, nStreamEnd, nType, nSize; nOldPos = mpOutStrm->Tell(); nStreamEnd = mpOutStrm->Seek( STREAM_SEEK_TO_END ); @@ -4575,60 +4575,60 @@ BOOL EscherEx::SeekBehindRecHeader( UINT16 nRecType ) { *mpOutStrm >> nType >> nSize; if ( ( nType >> 16 ) == nRecType ) - return TRUE; + return sal_True; if ( ( nType & 0xf ) != 0xf ) mpOutStrm->SeekRel( nSize ); } mpOutStrm->Seek( nOldPos ); - return FALSE; + return sal_False; } // --------------------------------------------------------------------------------------------- -void EscherEx::InsertPersistOffset( UINT32 nKey, UINT32 nOffset ) +void EscherEx::InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ) { PtInsert( ESCHER_Persist_PrivateEntry | nKey, nOffset ); } -void EscherEx::ReplacePersistOffset( UINT32 nKey, UINT32 nOffset ) +void EscherEx::ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ) { PtReplace( ESCHER_Persist_PrivateEntry | nKey, nOffset ); } -UINT32 EscherEx::GetPersistOffset( UINT32 nKey ) +sal_uInt32 EscherEx::GetPersistOffset( sal_uInt32 nKey ) { return PtGetOffsetByID( ESCHER_Persist_PrivateEntry | nKey ); } // --------------------------------------------------------------------------------------------- -BOOL EscherEx::DoSeek( UINT32 nKey ) +sal_Bool EscherEx::DoSeek( sal_uInt32 nKey ) { - UINT32 nPos = PtGetOffsetByID( nKey ); + sal_uInt32 nPos = PtGetOffsetByID( nKey ); if ( nPos ) mpOutStrm->Seek( nPos ); else { if (! PtIsID( nKey ) ) - return FALSE; + return sal_False; mpOutStrm->Seek( 0 ); } - return TRUE; + return sal_True; } // --------------------------------------------------------------------------------------------- -BOOL EscherEx::SeekToPersistOffset( UINT32 nKey ) +sal_Bool EscherEx::SeekToPersistOffset( sal_uInt32 nKey ) { return DoSeek( ESCHER_Persist_PrivateEntry | nKey ); } // --------------------------------------------------------------------------------------------- -BOOL EscherEx::InsertAtPersistOffset( UINT32 nKey, UINT32 nValue ) +sal_Bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) { - UINT32 nOldPos = mpOutStrm->Tell(); - BOOL bRetValue = SeekToPersistOffset( nKey ); + sal_uInt32 nOldPos = mpOutStrm->Tell(); + sal_Bool bRetValue = SeekToPersistOffset( nKey ); if ( bRetValue ) { *mpOutStrm << nValue; @@ -4639,9 +4639,9 @@ BOOL EscherEx::InsertAtPersistOffset( UINT32 nKey, UINT32 nValue ) // --------------------------------------------------------------------------------------------- -void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) +void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) { - *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | 0xf ) << nEscherContainer << (UINT32)0; + *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | 0xf ) << nEscherContainer << (sal_uInt32)0; mOffsets.push_back( mpOutStrm->Tell() - 4 ); mRecTypes.push_back( nEscherContainer ); switch( nEscherContainer ) @@ -4665,12 +4665,12 @@ void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) { if ( !mbEscherDg ) { - mbEscherDg = TRUE; + mbEscherDg = sal_True; mnCurrentDg = mxGlobal->GenerateDrawingId(); AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg ); PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() ); - *mpOutStrm << (UINT32)0 // The number of shapes in this drawing - << (UINT32)0; // The last MSOSPID given to an SP in this DG + *mpOutStrm << (sal_uInt32)0 // The number of shapes in this drawing + << (sal_uInt32)0; // The last MSOSPID given to an SP in this DG } } } @@ -4680,7 +4680,7 @@ void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) { if ( mbEscherDg ) { - mbEscherSpgr = TRUE; + mbEscherSpgr = sal_True; } } break; @@ -4710,7 +4710,7 @@ void EscherEx::CloseContainer() { if ( mbEscherDg ) { - mbEscherDg = FALSE; + mbEscherDg = sal_False; if ( DoSeek( ESCHER_Persist_Dg | mnCurrentDg ) ) *mpOutStrm << mxGlobal->GetDrawingShapeCount( mnCurrentDg ) << mxGlobal->GetLastShapeId( mnCurrentDg ); } @@ -4721,7 +4721,7 @@ void EscherEx::CloseContainer() { if ( mbEscherSpgr ) { - mbEscherSpgr = FALSE; + mbEscherSpgr = sal_False; } } @@ -4740,25 +4740,25 @@ void EscherEx::CloseContainer() void EscherEx::BeginAtom() { mnCountOfs = mpOutStrm->Tell(); - *mpOutStrm << (UINT32)0 << (UINT32)0; // record header wird spaeter geschrieben + *mpOutStrm << (sal_uInt32)0 << (sal_uInt32)0; // record header wird spaeter geschrieben } // --------------------------------------------------------------------------------------------- -void EscherEx::EndAtom( UINT16 nRecType, int nRecVersion, int nRecInstance ) +void EscherEx::EndAtom( sal_uInt16 nRecType, int nRecVersion, int nRecInstance ) { - UINT32 nOldPos = mpOutStrm->Tell(); + sal_uInt32 nOldPos = mpOutStrm->Tell(); mpOutStrm->Seek( mnCountOfs ); sal_uInt32 nSize = nOldPos - mnCountOfs; - *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << (UINT32)( nSize - 8 ); + *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << (sal_uInt32)( nSize - 8 ); mpOutStrm->Seek( nOldPos ); } // --------------------------------------------------------------------------------------------- -void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int nRecInstance ) +void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersion, int nRecInstance ) { - *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << nAtomSize; + *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << nAtomSize; } // --------------------------------------------------------------------------------------------- @@ -4792,7 +4792,7 @@ EscherExHostAppData* EscherEx::EnterAdditionalTextGroup() // --------------------------------------------------------------------------------------------- -UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRect ) +sal_uInt32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRect ) { Rectangle aRect; if( pBoundRect ) @@ -4803,10 +4803,10 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe AddAtom( 16, ESCHER_Spgr, 1 ); PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel, mpOutStrm->Tell() ); - *mpOutStrm << (INT32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden - << (INT32)aRect.Top() - << (INT32)aRect.Right() - << (INT32)aRect.Bottom(); + *mpOutStrm << (sal_Int32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden + << (sal_Int32)aRect.Top() + << (sal_Int32)aRect.Right() + << (sal_Int32)aRect.Bottom(); sal_uInt32 nShapeId = GenerateShapeId(); if ( !mnGroupLevel ) @@ -4840,25 +4840,25 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe return nShapeId; } -UINT32 EscherEx::EnterGroup( const Rectangle* pBoundRect ) +sal_uInt32 EscherEx::EnterGroup( const Rectangle* pBoundRect ) { return EnterGroup( String::EmptyString(), pBoundRect ); } // --------------------------------------------------------------------------------------------- -BOOL EscherEx::SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect ) +sal_Bool EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) { - BOOL bRetValue = FALSE; + sal_Bool bRetValue = sal_False; if ( nGroupLevel ) { - UINT32 nCurrentPos = mpOutStrm->Tell(); + sal_uInt32 nCurrentPos = mpOutStrm->Tell(); if ( DoSeek( ESCHER_Persist_Grouping_Snap | ( nGroupLevel - 1 ) ) ) { - *mpOutStrm << (INT32)rRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden - << (INT32)rRect.Top() - << (INT32)rRect.Right() - << (INT32)rRect.Bottom(); + *mpOutStrm << (sal_Int32)rRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden + << (sal_Int32)rRect.Top() + << (sal_Int32)rRect.Right() + << (sal_Int32)rRect.Bottom(); mpOutStrm->Seek( nCurrentPos ); } } @@ -4867,15 +4867,15 @@ BOOL EscherEx::SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect ) // --------------------------------------------------------------------------------------------- -BOOL EscherEx::SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect ) +sal_Bool EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) { - BOOL bRetValue = FALSE; + sal_Bool bRetValue = sal_False; if ( nGroupLevel ) { - UINT32 nCurrentPos = mpOutStrm->Tell(); + sal_uInt32 nCurrentPos = mpOutStrm->Tell(); if ( DoSeek( ESCHER_Persist_Grouping_Logic | ( nGroupLevel - 1 ) ) ) { - *mpOutStrm << (INT16)rRect.Top() << (INT16)rRect.Left() << (INT16)rRect.Right() << (INT16)rRect.Bottom(); + *mpOutStrm << (sal_Int16)rRect.Top() << (sal_Int16)rRect.Left() << (sal_Int16)rRect.Right() << (sal_Int16)rRect.Bottom(); mpOutStrm->Seek( nCurrentPos ); } } @@ -4894,7 +4894,7 @@ void EscherEx::LeaveGroup() // --------------------------------------------------------------------------------------------- -void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID ) +void EscherEx::AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlags, sal_uInt32 nShapeID ) { AddAtom( 8, ESCHER_Sp, 2, nShpInstance ); @@ -4918,13 +4918,13 @@ void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& ) // --------------------------------------------------------------------------------------------- -UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap ) +sal_uInt32 EscherEx::GetColor( const sal_uInt32 nSOColor, sal_Bool bSwap ) { if ( bSwap ) { - UINT32 nColor = nSOColor & 0xff00; // GRUEN - nColor |= (BYTE)( nSOColor ) << 16; // ROT - nColor |= (BYTE)( nSOColor >> 16 ); // BLAU + sal_uInt32 nColor = nSOColor & 0xff00; // GRUEN + nColor |= (sal_uInt8)( nSOColor ) << 16; // ROT + nColor |= (sal_uInt8)( nSOColor >> 16 ); // BLAU return nColor; } else @@ -4933,14 +4933,14 @@ UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap ) // --------------------------------------------------------------------------------------------- -UINT32 EscherEx::GetColor( const Color& rSOColor, BOOL bSwap ) +sal_uInt32 EscherEx::GetColor( const Color& rSOColor, sal_Bool bSwap ) { - UINT32 nColor = ( rSOColor.GetRed() << 16 ); + sal_uInt32 nColor = ( rSOColor.GetRed() << 16 ); nColor |= ( rSOColor.GetGreen() << 8 ); nColor |= rSOColor.GetBlue(); if ( !bSwap ) - nColor = GetColor( nColor, TRUE ); + nColor = GetColor( nColor, sal_True ); return nColor; } |