diff -ur ooo_SRC680_m140_src.orig/svtools/inc/calendar.hxx ooo_SRC680_m140_src/svtools/inc/calendar.hxx --- ooo_SRC680_m140_src.orig/svtools/inc/calendar.hxx 2005-11-17 07:54:26.635828232 +0100 +++ ooo_SRC680_m140_src/svtools/inc/calendar.hxx 2005-11-17 07:55:49.337255704 +0100 @@ -200,7 +200,7 @@ Rectangle maPrevRect; Rectangle maNextRect; String maDayOfWeekText; - long mnDayOfWeekAry[7]; + sal_Int32 mnDayOfWeekAry[7]; Date maOldFormatFirstDate; Date maOldFormatLastDate; Date maFirstDate; diff -ur ooo_SRC680_m140_src.orig/svtools/inc/filerec.hxx ooo_SRC680_m140_src/svtools/inc/filerec.hxx --- ooo_SRC680_m140_src.orig/svtools/inc/filerec.hxx 2005-11-17 07:54:26.741812120 +0100 +++ ooo_SRC680_m140_src/svtools/inc/filerec.hxx 2005-11-17 07:55:49.339255400 +0100 @@ -54,24 +54,24 @@ #include "svarray.hxx" #endif -SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 ); +SV_DECL_VARARR( SfxUINT32s, sal_uInt32, 8, 8 ); //------------------------------------------------------------------------ -#define SFX_BOOL_DONTCARE BOOL(2) // Don't-Care-Wert f"ur BOOLs +#define SFX_BOOL_DONTCARE sal_Bool(2) // Don't-Care-Wert f"ur BOOLs -#define SFX_REC_PRETAG_EXT BYTE(0x00) // Pre-Tag f"ur Extended-Records -#define SFX_REC_PRETAG_EOR BYTE(0xFF) // Pre-Tag f"ur End-Of-Records +#define SFX_REC_PRETAG_EXT sal_uInt8(0x00) // Pre-Tag f"ur Extended-Records +#define SFX_REC_PRETAG_EOR sal_uInt8(0xFF) // Pre-Tag f"ur End-Of-Records -#define SFX_REC_TYPE_NONE BYTE(0x00) // unbekannter Record-Typ -#define SFX_REC_TYPE_FIRST BYTE(0x01) -#define SFX_REC_TYPE_SINGLE BYTE(0x01) // Single-Content-Record -#define SFX_REC_TYPE_FIXSIZE BYTE(0x02) // Fix-Size-Multi-Content-Record -#define SFX_REC_TYPE_VARSIZE_RELOC BYTE(0x03) // variable Rec-Size -#define SFX_REC_TYPE_VARSIZE BYTE(0x04) // alt (nicht verschiebbar) -#define SFX_REC_TYPE_MIXTAGS_RELOC BYTE(0x07) // Mixed Tag Content-Record -#define SFX_REC_TYPE_MIXTAGS BYTE(0x08) // alt (nicht verschiebbar) -#define SFX_REC_TYPE_LAST BYTE(0x08) +#define SFX_REC_TYPE_NONE sal_uInt8(0x00) // unbekannter Record-Typ +#define SFX_REC_TYPE_FIRST sal_uInt8(0x01) +#define SFX_REC_TYPE_SINGLE sal_uInt8(0x01) // Single-Content-Record +#define SFX_REC_TYPE_FIXSIZE sal_uInt8(0x02) // Fix-Size-Multi-Content-Record +#define SFX_REC_TYPE_VARSIZE_RELOC sal_uInt8(0x03) // variable Rec-Size +#define SFX_REC_TYPE_VARSIZE sal_uInt8(0x04) // alt (nicht verschiebbar) +#define SFX_REC_TYPE_MIXTAGS_RELOC sal_uInt8(0x07) // Mixed Tag Content-Record +#define SFX_REC_TYPE_MIXTAGS sal_uInt8(0x08) // alt (nicht verschiebbar) +#define SFX_REC_TYPE_LAST sal_uInt8(0x08) #define SFX_REC_TYPE_MINI 0x100 // Mini-Record #define SFX_REC_TYPE_DRAWENG 0x400 // Drawing-Engine-Record #define SFX_REC_TYPE_EOR 0xF00 // End-Of-Records @@ -245,18 +245,18 @@ { protected: SvStream* _pStream; // , in dem der Record liegt - UINT32 _nStartPos; // Start-Position des Gesamt-Records im Stream + sal_uInt32 _nStartPos; // Start-Position des Gesamt-Records im Stream FASTBOOL _bHeaderOk; /* TRUE, wenn der Header schon geschrieben ist; bei DBG_UTIL wird SFX_BOOL_DONTCARE ver- wendet, um die Gr"o\se von Fix-Sized-Records zu pr"ufen. */ - BYTE _nPreTag; // in den Header zu schreibendes 'Pre-Tag' + sal_uInt8 _nPreTag; // in den Header zu schreibendes 'Pre-Tag' public: inline SfxMiniRecordWriter( SvStream *pStream, - BYTE nTag ); - inline SfxMiniRecordWriter( SvStream *pStream, BYTE nTag, - UINT32 nSize ); + sal_uInt8 nTag ); + inline SfxMiniRecordWriter( SvStream *pStream, sal_uInt8 nTag, + sal_uInt32 nSize ); inline ~SfxMiniRecordWriter(); @@ -264,7 +264,7 @@ inline void Reset(); - UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); + sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); private: // not implementend, not allowed @@ -304,35 +304,35 @@ { protected: SvStream* _pStream; // , aus dem gelesen wird - UINT32 _nEofRec; // Position direkt hinter dem Record + sal_uInt32 _nEofRec; // Position direkt hinter dem Record FASTBOOL _bSkipped; // TRUE: der Record wurde explizit geskippt - BYTE _nPreTag; // aus dem Header gelesenes Pre-Tag + sal_uInt8 _nPreTag; // aus dem Header gelesenes Pre-Tag // Drei-Phasen-Ctor f"ur Subklassen SfxMiniRecordReader() {} - void Construct_Impl( SvStream *pStream, BYTE nTag ) + void Construct_Impl( SvStream *pStream, sal_uInt8 nTag ) { _pStream = pStream; _bSkipped = FALSE; _nPreTag = nTag; } - inline FASTBOOL SetHeader_Impl( UINT32 nHeader ); + inline FASTBOOL SetHeader_Impl( sal_uInt32 nHeader ); // als ung"ultig markieren und zur"uck-seeken - void SetInvalid_Impl( UINT32 nRecordStartPos ) + void SetInvalid_Impl( sal_uInt32 nRecordStartPos ) { _nPreTag = SFX_REC_PRETAG_EOR; _pStream->Seek( nRecordStartPos ); } public: - static USHORT ScanRecordType( SvStream *pStream ); + static sal_uInt16 ScanRecordType( SvStream *pStream ); SfxMiniRecordReader( SvStream *pStream ); - SfxMiniRecordReader( SvStream *pStream, BYTE nTag ); + SfxMiniRecordReader( SvStream *pStream, sal_uInt8 nTag ); inline ~SfxMiniRecordReader(); - inline BYTE GetTag() const; + inline sal_uInt8 GetTag() const; inline FASTBOOL IsValid() const; inline SvStream& operator*() const; @@ -387,20 +387,20 @@ { protected: - SfxSingleRecordWriter( BYTE nRecordType, + SfxSingleRecordWriter( sal_uInt8 nRecordType, SvStream *pStream, - UINT16 nTag, BYTE nCurVer ); + sal_uInt16 nTag, sal_uInt8 nCurVer ); public: SfxSingleRecordWriter( SvStream *pStream, - UINT16 nTag, BYTE nCurVer ); + sal_uInt16 nTag, sal_uInt8 nCurVer ); SfxSingleRecordWriter( SvStream *pStream, - UINT16 nTag, BYTE nCurVer, - UINT32 nSize ); + sal_uInt16 nTag, sal_uInt8 nCurVer, + sal_uInt32 nSize ); inline void Reset(); - UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); + sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); }; //------------------------------------------------------------------------ @@ -436,9 +436,9 @@ { protected: - UINT16 _nRecordTag; // Art des Gesamt-Inhalts - BYTE _nRecordVer; // Version des Gesamt-Inhalts - BYTE _nRecordType; // Record Type aus dem Header + sal_uInt16 _nRecordTag; // Art des Gesamt-Inhalts + sal_uInt8 _nRecordVer; // Version des Gesamt-Inhalts + sal_uInt8 _nRecordType; // Record Type aus dem Header // Drei-Phasen-Ctor f"ur Subklassen SfxSingleRecordReader() {} @@ -447,17 +447,17 @@ SfxMiniRecordReader::Construct_Impl( pStream, SFX_REC_PRETAG_EXT ); } - FASTBOOL FindHeader_Impl( UINT16 nTypes, UINT16 nTag ); - FASTBOOL ReadHeader_Impl( USHORT nTypes ); + FASTBOOL FindHeader_Impl( sal_uInt16 nTypes, sal_uInt16 nTag ); + FASTBOOL ReadHeader_Impl( sal_uInt16 nTypes ); public: SfxSingleRecordReader( SvStream *pStream ); - SfxSingleRecordReader( SvStream *pStream, USHORT nTag ); + SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag ); - inline UINT16 GetTag() const; + inline sal_uInt16 GetTag() const; - inline BYTE GetVersion() const; - inline FASTBOOL HasVersion( USHORT nVersion ) const; + inline sal_uInt8 GetVersion() const; + inline FASTBOOL HasVersion( sal_uInt16 nVersion ) const; }; //------------------------------------------------------------------------ @@ -502,7 +502,7 @@ { SfxMultiFixRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION ); - for ( USHORT n = 0; n < Count(); ++n ) + for ( sal_uInt16 n = 0; n < Count(); ++n ) { aRecord.NewContent(); *aRecord << aMember1[n]; @@ -513,28 +513,28 @@ { protected: - UINT32 _nContentStartPos; /* Startposition des jeweiligen + sal_uInt32 _nContentStartPos; /* Startposition des jeweiligen Contents - nur bei DBG_UTIL und f"ur Subklassen */ - UINT32 _nContentSize; // Gr"o\se jedes Contents - UINT16 _nContentCount; // jeweilige Anzahl der Contents + sal_uInt32 _nContentSize; // Gr"o\se jedes Contents + sal_uInt16 _nContentCount; // jeweilige Anzahl der Contents - SfxMultiFixRecordWriter( BYTE nRecordType, + SfxMultiFixRecordWriter( sal_uInt8 nRecordType, SvStream *pStream, - UINT16 nTag, BYTE nCurVer, - UINT32 nContentSize ); + sal_uInt16 nTag, sal_uInt8 nCurVer, + sal_uInt32 nContentSize ); public: SfxMultiFixRecordWriter( SvStream *pStream, - UINT16 nTag, BYTE nCurVer, - UINT32 nContentSize ); + sal_uInt16 nTag, sal_uInt8 nCurVer, + sal_uInt32 nContentSize ); inline ~SfxMultiFixRecordWriter(); inline void NewContent(); inline void Reset(); - UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); + sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); }; //------------------------------------------------------------------------ @@ -578,7 +578,7 @@ { SfxMultiVarRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION ); - for ( USHORT n = 0; n < Count(); ++n ) + for ( sal_uInt16 n = 0; n < Count(); ++n ) { aRecord.NewContent(); *aRecord << aMember1[n]; @@ -590,24 +590,24 @@ { protected: SfxUINT32s _aContentOfs; - USHORT _nContentVer; // nur f"ur SfxMultiMixRecordWriter + sal_uInt16 _nContentVer; // nur f"ur SfxMultiMixRecordWriter - SfxMultiVarRecordWriter( BYTE nRecordType, + SfxMultiVarRecordWriter( sal_uInt8 nRecordType, SvStream *pStream, - USHORT nRecordTag, - BYTE nRecordVer ); + sal_uInt16 nRecordTag, + sal_uInt8 nRecordVer ); void FlushContent_Impl(); public: SfxMultiVarRecordWriter( SvStream *pStream, - USHORT nRecordTag, - BYTE nRecordVer ); + sal_uInt16 nRecordTag, + sal_uInt8 nRecordVer ); ~SfxMultiVarRecordWriter(); void NewContent(); - virtual UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); + virtual sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = TRUE ); }; //------------------------------------------------------------------------ @@ -650,10 +650,10 @@ { public: inline SfxMultiMixRecordWriter( SvStream *pStream, - USHORT nRecordTag, - BYTE nRecordVer ); + sal_uInt16 nRecordTag, + sal_uInt8 nRecordVer ); - void NewContent( USHORT nTag, BYTE nVersion ); + void NewContent( sal_uInt16 nTag, sal_uInt8 nVersion ); // private: geht nicht, da einige Compiler dann auch vorherige privat machen void NewContent() @@ -679,7 +679,7 @@ { SfxMultiRecordReader aRecord( pStream ); - for ( USHORT nRecNo = 0; aRecord.GetContent(); ++nRecNo ) + for ( sal_uInt16 nRecNo = 0; aRecord.GetContent(); ++nRecNo ) { switch ( aRecord.GetTag() ) { @@ -698,30 +698,30 @@ */ { - UINT32 _nStartPos; // Start-Position des Records - UINT32* _pContentOfs; // Offsets der Startpositionen - UINT32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos - UINT16 _nContentCount; // Anzahl der Contents im Record - UINT16 _nContentNo; /* der Index des aktuellen Contents + sal_uInt32 _nStartPos; // Start-Position des Records + sal_uInt32* _pContentOfs; // Offsets der Startpositionen + sal_uInt32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos + sal_uInt16 _nContentCount; // Anzahl der Contents im Record + sal_uInt16 _nContentNo; /* der Index des aktuellen Contents enth"alt jeweils den Index des Contents, der beim n"achsten GetContent() geholt wird */ - UINT16 _nContentTag; // Art-Kennung des aktuellen Contents - BYTE _nContentVer; // Versions-Kennung des akt. Contents + sal_uInt16 _nContentTag; // Art-Kennung des aktuellen Contents + sal_uInt8 _nContentVer; // Versions-Kennung des akt. Contents FASTBOOL ReadHeader_Impl(); public: SfxMultiRecordReader( SvStream *pStream ); - SfxMultiRecordReader( SvStream *pStream, UINT16 nTag ); + SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag ); ~SfxMultiRecordReader(); FASTBOOL GetContent(); - inline UINT16 GetContentTag(); - inline BYTE GetContentVersion() const; - inline FASTBOOL HasContentVersion( USHORT nVersion ) const; + inline sal_uInt16 GetContentTag(); + inline sal_uInt8 GetContentVersion() const; + inline FASTBOOL HasContentVersion( sal_uInt16 nVersion ) const; - inline UINT32 ContentCount() const; + inline sal_uInt32 ContentCount() const; }; //========================================================================= @@ -729,7 +729,7 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - BYTE nTag // Record-Tag zwischen 0x01 und 0xFE + sal_uInt8 nTag // Record-Tag zwischen 0x01 und 0xFE ) /* [Beschreibung] @@ -755,8 +755,8 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - BYTE nTag, // Record-Tag zwischen 0x01 und 0xFE - UINT32 nSize // Gr"o\se der Daten in Bytes + sal_uInt8 nTag, // Record-Tag zwischen 0x01 und 0xFE + sal_uInt32 nSize // Gr"o\se der Daten in Bytes ) /* [Beschreibung] @@ -851,7 +851,7 @@ //------------------------------------------------------------------------- -inline BYTE SfxMiniRecordReader::GetTag() const +inline sal_uInt8 SfxMiniRecordReader::GetTag() const /* [Beschreibung] @@ -898,18 +898,18 @@ //========================================================================= -inline UINT32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) +inline sal_uInt32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) // siehe { - UINT32 nRet = 0; + sal_uInt32 nRet = 0; // wurde der Header noch nicht geschrieben? if ( !_bHeaderOk ) { // Basisklassen-Header schreiben - UINT32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec ); + sal_uInt32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec ); // ggf. ans Ende des eigenen Headers seeken oder hinter Rec bleiben if ( !bSeekToEndOfRec ) @@ -938,7 +938,7 @@ //========================================================================= -inline UINT16 SfxSingleRecordReader::GetTag() const +inline sal_uInt16 SfxSingleRecordReader::GetTag() const /* [Beschreibung] @@ -951,7 +951,7 @@ //------------------------------------------------------------------------- -inline BYTE SfxSingleRecordReader::GetVersion() const +inline sal_uInt8 SfxSingleRecordReader::GetVersion() const /* [Beschreibung] @@ -964,7 +964,7 @@ //------------------------------------------------------------------------- -inline FASTBOOL SfxSingleRecordReader::HasVersion( USHORT nVersion ) const +inline FASTBOOL SfxSingleRecordReader::HasVersion( sal_uInt16 nVersion ) const /* [Beschreibung] @@ -1030,8 +1030,8 @@ inline SfxMultiMixRecordWriter::SfxMultiMixRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - USHORT nRecordTag, // Gesamt-Record-Art-Kennung - BYTE nRecordVer // Gesamt-Record-Versions-Kennung + sal_uInt16 nRecordTag, // Gesamt-Record-Art-Kennung + sal_uInt8 nRecordVer // Gesamt-Record-Versions-Kennung ) /* [Beschreibung] @@ -1058,7 +1058,7 @@ //========================================================================= -inline UINT16 SfxMultiRecordReader::GetContentTag() +inline sal_uInt16 SfxMultiRecordReader::GetContentTag() /* [Beschreibung] @@ -1072,7 +1072,7 @@ //------------------------------------------------------------------------- -inline BYTE SfxMultiRecordReader::GetContentVersion() const +inline sal_uInt8 SfxMultiRecordReader::GetContentVersion() const /* [Beschreibung] @@ -1086,7 +1086,7 @@ //------------------------------------------------------------------------- -inline FASTBOOL SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const +inline FASTBOOL SfxMultiRecordReader::HasContentVersion( sal_uInt16 nVersion ) const /* [Beschreibung] @@ -1101,7 +1101,7 @@ //------------------------------------------------------------------------- -inline UINT32 SfxMultiRecordReader::ContentCount() const +inline sal_uInt32 SfxMultiRecordReader::ContentCount() const /* [Beschreibung] diff -ur ooo_SRC680_m140_src.orig/svtools/inc/flbytes.hxx ooo_SRC680_m140_src/svtools/inc/flbytes.hxx --- ooo_SRC680_m140_src.orig/svtools/inc/flbytes.hxx 2005-11-17 07:54:26.667823368 +0100 +++ ooo_SRC680_m140_src/svtools/inc/flbytes.hxx 2005-11-17 07:55:49.339255400 +0100 @@ -47,7 +47,7 @@ class SvFillLockBytes : public SvLockBytes { SvLockBytesRef xLockBytes; - ULONG nFilledSize; + sal_Size nFilledSize; BOOL bTerminated; BOOL bSync; public: @@ -55,17 +55,17 @@ SvFillLockBytes( SvLockBytes* pLockBytes ); virtual ErrCode ReadAt( - ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pRead ) const; + sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const; virtual ErrCode WriteAt( - ULONG nPos, const void* pBuffer, ULONG nCount, ULONG* pWritten ); + sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten ); virtual ErrCode Flush() const; - virtual ErrCode SetSize( ULONG nSize ); - virtual ErrCode LockRegion( ULONG nPos, ULONG nCount, LockType ); - virtual ErrCode UnlockRegion( ULONG nPos, ULONG nCount, LockType ); + virtual ErrCode SetSize( sal_Size nSize ); + virtual ErrCode LockRegion( sal_Size nPos, sal_Size nCount, LockType ); + virtual ErrCode UnlockRegion( sal_Size nPos, sal_Size nCount, LockType ); virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const; - ErrCode FillAppend( const void* pBuffer, ULONG nCount, ULONG *pWritten ); - ULONG Tell() const { return nFilledSize; } - void Seek( ULONG nPos ) { nFilledSize = nPos; } + ErrCode FillAppend( const void* pBuffer, sal_Size nCount, sal_Size *pWritten ); + sal_Size Tell() const { return nFilledSize; } + void Seek( sal_Size nPos ) { nFilledSize = nPos; } void Terminate(); }; @@ -107,34 +107,34 @@ virtual BOOL IsSynchronMode() const { return m_xAsyncLockBytes->IsSynchronMode(); } - virtual ErrCode ReadAt(ULONG nPos, void * pBuffer, ULONG nCount, - ULONG * pRead) const; + virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount, + sal_Size * pRead) const; - virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount, - ULONG * pWritten); + virtual ErrCode WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCount, + sal_Size * pWritten); virtual ErrCode Flush() const { return m_xAsyncLockBytes->Flush(); } - virtual ErrCode SetSize(ULONG nSize) + virtual ErrCode SetSize(sal_Size nSize) { return m_xAsyncLockBytes->SetSize(nSize); } - virtual ErrCode LockRegion(ULONG nPos, ULONG nCount, LockType eType) + virtual ErrCode LockRegion(sal_Size nPos, sal_Size nCount, LockType eType) { return m_xAsyncLockBytes->LockRegion(nPos, nCount, eType); } - virtual ErrCode UnlockRegion(ULONG nPos, ULONG nCount, LockType eType) + virtual ErrCode UnlockRegion(sal_Size nPos, sal_Size nCount, LockType eType) { return m_xAsyncLockBytes->UnlockRegion(nPos, nCount, eType); } virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag eFlag) const { return m_xAsyncLockBytes->Stat(pStat, eFlag); } - virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount, - ULONG * pWritten) + virtual ErrCode FillAppend(const void * pBuffer, sal_Size nCount, + sal_Size * pWritten) { return m_xAsyncLockBytes->FillAppend(pBuffer, nCount, pWritten); } - virtual ULONG Tell() const { return m_xAsyncLockBytes->Tell(); } + virtual sal_Size Tell() const { return m_xAsyncLockBytes->Tell(); } - virtual ULONG Seek(ULONG nPos) + virtual sal_Size Seek(sal_Size nPos) { return m_xAsyncLockBytes->Seek(nPos); } virtual void Terminate() { m_xAsyncLockBytes->Terminate(); } @@ -161,19 +161,19 @@ SvCompositeLockBytes( ); ~SvCompositeLockBytes(); - void Append( SvLockBytes* pLockBytes, ULONG nPos, ULONG nOffset ); - ULONG RelativeOffset( ULONG nPos ) const; + void Append( SvLockBytes* pLockBytes, sal_Size nPos, sal_Size nOffset ); + sal_Size RelativeOffset( sal_Size nPos ) const; void SetIsPending( BOOL bSet ); SvLockBytes* GetLastLockBytes() const; virtual ErrCode ReadAt( - ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pRead ) const; + sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const; virtual ErrCode WriteAt( - ULONG nPos, const void* pBuffer, ULONG nCount, ULONG* pWritten ); + sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten ); virtual ErrCode Flush() const; - virtual ErrCode SetSize( ULONG nSize ); - virtual ErrCode LockRegion( ULONG nPos, ULONG nCount, LockType ); - virtual ErrCode UnlockRegion( ULONG nPos, ULONG nCount, LockType ); + virtual ErrCode SetSize( sal_Size nSize ); + virtual ErrCode LockRegion( sal_Size nPos, sal_Size nCount, LockType ); + virtual ErrCode UnlockRegion( sal_Size nPos, sal_Size nCount, LockType ); virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const; }; diff -ur ooo_SRC680_m140_src.orig/svtools/inc/itempool.hxx ooo_SRC680_m140_src/svtools/inc/itempool.hxx --- ooo_SRC680_m140_src.orig/svtools/inc/itempool.hxx 2005-11-17 07:54:26.718815616 +0100 +++ ooo_SRC680_m140_src/svtools/inc/itempool.hxx 2005-11-17 07:55:49.340255248 +0100 @@ -158,9 +158,9 @@ //--------------------------------------------------------------------- protected: - static inline void SetRefCount( SfxPoolItem& rItem, ULONG n ); - static inline ULONG AddRef( const SfxPoolItem& rItem, ULONG n = 1 ); - static inline ULONG ReleaseRef( const SfxPoolItem& rItem, ULONG n = 1); + static inline void SetRefCount( SfxPoolItem& rItem, sal_uInt32 n ); + static inline sal_uInt32 AddRef( const SfxPoolItem& rItem, sal_uInt32 n = 1 ); + static inline sal_uInt32 ReleaseRef( const SfxPoolItem& rItem, sal_uInt32 n = 1); public: SfxItemPool( const SfxItemPool &rPool, @@ -284,19 +284,19 @@ // --------------- Inline Implementierungen ------------------------------ // nur der Pool darf den Referenz-Zaehler manipulieren !!! -inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, ULONG n ) +inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, sal_uInt32 n ) { rItem.SetRefCount(n); } // nur der Pool darf den Referenz-Zaehler manipulieren !!! -inline ULONG SfxItemPool::AddRef( const SfxPoolItem& rItem, ULONG n ) +inline sal_uInt32 SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uInt32 n ) { return rItem.AddRef(n); } // nur der Pool darf den Referenz-Zaehler manipulieren !!! -inline ULONG SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, ULONG n ) +inline sal_uInt32 SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, sal_uInt32 n ) { return rItem.ReleaseRef(n); } diff -ur ooo_SRC680_m140_src.orig/svtools/inc/roadmap.hxx ooo_SRC680_m140_src/svtools/inc/roadmap.hxx --- ooo_SRC680_m140_src.orig/svtools/inc/roadmap.hxx 2005-11-17 07:54:26.690819872 +0100 +++ ooo_SRC680_m140_src/svtools/inc/roadmap.hxx 2005-11-17 07:55:49.341255096 +0100 @@ -170,7 +170,7 @@ protected: - sal_Int32 PreNotify( NotifyEvent& rNEvt ); + long PreNotify( NotifyEvent& rNEvt ); protected: /// called when an item has been selected by any means diff -ur ooo_SRC680_m140_src.orig/svtools/inc/strmadpt.hxx ooo_SRC680_m140_src/svtools/inc/strmadpt.hxx --- ooo_SRC680_m140_src.orig/svtools/inc/strmadpt.hxx 2005-11-17 07:54:26.740812272 +0100 +++ ooo_SRC680_m140_src/svtools/inc/strmadpt.hxx 2005-11-17 07:55:49.341255096 +0100 @@ -61,7 +61,7 @@ { com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > m_xOutputStream; - sal_uInt32 m_nPosition; + sal_Size m_nPosition; public: TYPEINFO(); @@ -72,23 +72,23 @@ rTheOutputStream): m_xOutputStream(rTheOutputStream), m_nPosition(0) {} - virtual ErrCode ReadAt(ULONG, void *, ULONG, ULONG *) const; + virtual ErrCode ReadAt(sal_Size, void *, sal_Size, sal_Size *) const; - virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount, - ULONG * pWritten); + virtual ErrCode WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCount, + sal_Size * pWritten); virtual ErrCode Flush() const; - virtual ErrCode SetSize(ULONG); + virtual ErrCode SetSize(sal_Size); virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const; - virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount, - ULONG * pWritten); + virtual ErrCode FillAppend(const void * pBuffer, sal_Size nCount, + sal_Size * pWritten); - virtual ULONG Tell() const; + virtual sal_Size Tell() const; - virtual ULONG Seek(ULONG); + virtual sal_Size Seek(sal_Size); virtual void Terminate(); }; diff -ur ooo_SRC680_m140_src.orig/svtools/source/control/roadmap.cxx ooo_SRC680_m140_src/svtools/source/control/roadmap.cxx --- ooo_SRC680_m140_src.orig/svtools/source/control/roadmap.cxx 2005-11-17 07:54:27.029768344 +0100 +++ ooo_SRC680_m140_src/svtools/source/control/roadmap.cxx 2005-11-17 07:55:49.342254944 +0100 @@ -663,7 +663,7 @@ } //--------------------------------------------------------------------- - sal_Int32 ORoadmap::PreNotify( NotifyEvent& _rNEvt ) + long ORoadmap::PreNotify( NotifyEvent& _rNEvt ) { // capture KeyEvents for taskpane cycling if ( _rNEvt.GetType() == EVENT_KEYINPUT ) diff -ur ooo_SRC680_m140_src.orig/svtools/source/filerec/filerec.cxx ooo_SRC680_m140_src/svtools/source/filerec/filerec.cxx --- ooo_SRC680_m140_src.orig/svtools/source/filerec/filerec.cxx 2005-11-17 07:54:27.250734752 +0100 +++ ooo_SRC680_m140_src/svtools/source/filerec/filerec.cxx 2005-11-17 07:55:49.344254640 +0100 @@ -42,7 +42,7 @@ //======================================================================== -SV_IMPL_VARARR( SfxUINT32s, UINT32 ); +SV_IMPL_VARARR( SfxUINT32s, sal_uInt32 ); //======================================================================== @@ -68,21 +68,21 @@ */ #define SFX_REC_MINI_HEADER(nPreTag,nStartPos,nEndPos) \ - ( UINT32(nPreTag) | \ - UINT32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 ) + ( sal_uInt32(nPreTag) | \ + sal_uInt32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 ) #define SFX_REC_HEADER(nRecType,nContentTag,nContentVer) \ - ( UINT32(nRecType) | \ - ( UINT32(nContentVer) << 8 ) | \ - ( UINT32(nContentTag) << 16 ) ) + ( sal_uInt32(nRecType) | \ + ( sal_uInt32(nContentVer) << 8 ) | \ + ( sal_uInt32(nContentTag) << 16 ) ) #define SFX_REC_CONTENT_HEADER(nContentVer,n1StStartPos,nCurStartPos) \ - ( UINT32(nContentVer) | \ - UINT32( nCurStartPos - n1StStartPos ) << 8 ) + ( sal_uInt32(nContentVer) | \ + sal_uInt32( nCurStartPos - n1StStartPos ) << 8 ) //========================================================================= -UINT32 SfxMiniRecordWriter::Close +sal_uInt32 SfxMiniRecordWriter::Close ( FASTBOOL bSeekToEndOfRec /* TRUE (default) Der Stream wird an das Ende des Records @@ -105,7 +105,7 @@ [R"uckgabewert] - UINT32 != 0 + sal_uInt32 != 0 Position im Stream, die direkt hinter dem Record liegt. 'bSeekToEndOfRecord==TRUE' => R"uckgabewert == aktuelle Stream-Position nach Aufruf @@ -119,13 +119,13 @@ if ( !_bHeaderOk ) { // Header an den Anfang des Records schreiben - UINT32 nEndPos = _pStream->Tell(); - _pStream->Seek( _nStartPos ); + sal_uInt32 nEndPos = svstream_Size_to_u32( _pStream->Tell() ); + _pStream->Seek( svstream_u32_to_Size(_nStartPos) ); *_pStream << SFX_REC_MINI_HEADER( _nPreTag, _nStartPos, nEndPos ); // je nachdem ans Ende des Records seeken oder hinter Header bleiben if ( bSeekToEndOfRec ) - _pStream->Seek( nEndPos ); + _pStream->Seek( svstream_u32_to_Size(nEndPos) ); // Header wurde JETZT geschrieben _bHeaderOk = TRUE; @@ -136,14 +136,14 @@ else if ( SFX_BOOL_DONTCARE == _bHeaderOk ) { // Header auslesen, um Soll-Gr"o\se zu bestimmen - UINT32 nEndPos = _pStream->Tell(); - _pStream->Seek( _nStartPos ); - ULONG nHeader; + sal_uInt32 nEndPos = svstream_Size_to_u32( _pStream->Tell() ); + _pStream->Seek( svstream_u32_to_Size(_nStartPos) ); + sal_uInt32 nHeader; *_pStream >> nHeader; - _pStream->Seek( nEndPos ); + _pStream->Seek( svstream_u32_to_Size(nEndPos) ); // Soll-Gr"o\se mit Ist-Gr"o\se vergleichen - DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(UINT32), + DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(sal_uInt32), "fixed record size incorrect" ); DbgOutf( "SfxFileRec: written record until %ul", nEndPos ); } @@ -185,7 +185,7 @@ [R"uckgabewert] - USHORT SFX_REC_TYPE_EOR + sal_uInt16 SFX_REC_TYPE_EOR An der aktuellen Position des Streams steht eine End-Of-Records-Kennung. @@ -230,11 +230,11 @@ { // die ersten 4 Bytes als Mini-Header lesen - ULONG nHeader; + sal_uInt32 nHeader; *pStream >> nHeader; // k"onnte es sich um einen extended-Record handeln? - USHORT nPreTag = SFX_REC_PRE(nHeader); + sal_uInt16 nPreTag = SFX_REC_PRE(nHeader); if ( SFX_REC_PRETAG_EXT == nPreTag ) { // die n"achsten 4 Bytes als extended-Header lesen @@ -244,7 +244,7 @@ pStream->SeekRel(-8); // liegt eine g"ultige Record-Kennung vor? - USHORT nType = SFX_REC_TYP(nHeader); + sal_uInt16 nType = SFX_REC_TYP(nHeader); if ( nType >= SFX_REC_TYPE_FIRST && nType <= SFX_REC_TYPE_LAST ) // entsprechenden extended-Record-Typ zur"uckliefern return nType; @@ -261,7 +261,7 @@ return nPreTag; // liegt ein Drawin-Engine-Record vor? - if ( nHeader == UINT32(*"DRMD") || nHeader == UINT32(*"DRVW") ) + if ( nHeader == sal_uInt32(*"DRMD") || nHeader == sal_uInt32(*"DRVW") ) return SFX_REC_TYPE_DRAWENG; // alle anderen sind grunds"atzlich g"ultige Mini-Records @@ -270,7 +270,7 @@ //------------------------------------------------------------------------- -FASTBOOL SfxMiniRecordReader::SetHeader_Impl( UINT32 nHeader ) +FASTBOOL SfxMiniRecordReader::SetHeader_Impl( sal_uInt32 nHeader ) /* [Beschreibung] @@ -285,7 +285,7 @@ FASTBOOL bRet = TRUE; // Record-Ende und Pre-Tag aus dem Header ermitteln - _nEofRec = _pStream->Tell() + SFX_REC_OFS(nHeader); + _nEofRec = svstream_Size_to_u32(_pStream->Tell()) + SFX_REC_OFS(nHeader); _nPreTag = SFX_REC_PRE(nHeader); // wenn End-Of-Record-Kennung, dann Fehler @@ -322,9 +322,9 @@ _bSkipped( FALSE ) { // Header einlesen - UINT32 nStartPos = pStream->Tell(); // um im Fehlerfall zur"uck zu-seeken + sal_uInt32 nStartPos = svstream_Size_to_u32( pStream->Tell() ); // um im Fehlerfall zur"uck zu-seeken DBG( DbgOutf( "SfxFileRec: reading record at %ul", nStartPos ) ); - UINT32 nHeader; + sal_uInt32 nHeader; *pStream >> nHeader; // Headerdaten extrahieren @@ -336,7 +336,7 @@ else if ( _nPreTag == SFX_REC_PRETAG_EOR ) pStream->SetError( ERRCODE_IO_WRONGFORMAT ); if ( !IsValid() ) - pStream->Seek( nStartPos ); + pStream->Seek( svstream_u32_to_Size(nStartPos) ); } //------------------------------------------------------------------------- @@ -347,7 +347,7 @@ Position sich ein befindet. */ - BYTE nTag // Pre-Tag des gew"unschten Records + sal_uInt8 nTag // Pre-Tag des gew"unschten Records ) /* [Beschreibung] @@ -394,14 +394,14 @@ } // StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen - UINT32 nStartPos = pStream->Tell(); + sal_uInt32 nStartPos = svstream_Size_to_u32( pStream->Tell() ); // passenden Record suchen while(TRUE) { // Header lesen DBG( DbgOutf( "SfxFileRec: searching record at %ul", pStream->Tell() ) ); - UINT32 nHeader; + sal_uInt32 nHeader; *pStream >> nHeader; // Headerdaten von Basisklasse extrahieren lassen @@ -419,12 +419,12 @@ break; // sonst skippen und weitersuchen - pStream->Seek( _nEofRec ); + pStream->Seek( svstream_u32_to_Size(_nEofRec) ); continue; } // Fehler => zur"uck-seeken - pStream->Seek( nStartPos ); + pStream->Seek( svstream_u32_to_Size(nStartPos) ); break; } } @@ -433,10 +433,10 @@ SfxSingleRecordWriter::SfxSingleRecordWriter ( - BYTE nRecordType, // f"ur Subklassen + sal_uInt8 nRecordType, // f"ur Subklassen SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Inhalts-Art-Kennung - BYTE nContentVer // Inhalts-Versions-Kennung + sal_uInt16 nContentTag, // Inhalts-Art-Kennung + sal_uInt8 nContentVer // Inhalts-Versions-Kennung ) /* [Beschreibung] @@ -455,8 +455,8 @@ SfxSingleRecordWriter::SfxSingleRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Inhalts-Art-Kennung - BYTE nContentVer // Inhalts-Versions-Kennung + sal_uInt16 nContentTag, // Inhalts-Art-Kennung + sal_uInt8 nContentVer // Inhalts-Versions-Kennung ) /* [Beschreibung] @@ -477,9 +477,9 @@ SfxSingleRecordWriter::SfxSingleRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Inhalts-Art-Kennung - BYTE nContentVer, // Inhalts-Versions-Kennung - UINT32 nContentSize // Gr"o\se des Inhalts in Bytes + sal_uInt16 nContentTag, // Inhalts-Art-Kennung + sal_uInt8 nContentVer, // Inhalts-Versions-Kennung + sal_uInt32 nContentSize // Gr"o\se des Inhalts in Bytes ) /* [Beschreibung] @@ -497,7 +497,7 @@ //========================================================================= -inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes ) +inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( sal_uInt16 nTypes ) /* [Beschreibung] @@ -511,7 +511,7 @@ FASTBOOL bRet; // Basisklassen-Header einlesen - UINT32 nHeader; + sal_uInt32 nHeader; *_pStream >> nHeader; if ( !SetHeader_Impl( nHeader ) ) bRet = FALSE; @@ -535,7 +535,7 @@ : SfxMiniRecordReader() { // Startposition merken, um im Fehlerfall zur"uck-seeken zu k"onnen - UINT32 nStartPos = pStream->Tell(); + sal_uInt32 nStartPos = svstream_Size_to_u32( pStream->Tell() ); DBG( DbgOutf( "SfxFileRec: reading record at %ul", nStartPos ) ); // Basisklasse initialisieren (nicht via Ctor, da der nur MiniRecs akzept.) @@ -552,17 +552,17 @@ //------------------------------------------------------------------------- -SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag ) +SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag ) { // StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen - UINT32 nStartPos = pStream->Tell(); + sal_uInt32 nStartPos = svstream_Size_to_u32( pStream->Tell() ); // richtigen Record suchen, ggf. Error-Code setzen und zur"uck-seeken Construct_Impl( pStream ); if ( !FindHeader_Impl( SFX_REC_TYPE_SINGLE, nTag ) ) { // Error-Code setzen und zur"uck-seeken - pStream->Seek( nStartPos ); + pStream->Seek( svstream_u32_to_Size(nStartPos) ); pStream->SetError( ERRCODE_IO_WRONGFORMAT ); } } @@ -571,8 +571,8 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl ( - UINT16 nTypes, // arithm. Veroderung erlaubter Record-Typen - UINT16 nTag // zu findende Record-Art-Kennung + sal_uInt16 nTypes, // arithm. Veroderung erlaubter Record-Typen + sal_uInt16 nTag // zu findende Record-Art-Kennung ) /* [Beschreibung] @@ -587,13 +587,13 @@ { // StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen - UINT32 nStartPos = _pStream->Tell(); + sal_uInt32 nStartPos = svstream_Size_to_u32( _pStream->Tell() ); // richtigen Record suchen while ( !_pStream->IsEof() ) { // Header lesen - UINT32 nHeader; + sal_uInt32 nHeader; DBG( DbgOutf( "SfxFileRec: searching record at %ul", _pStream->Tell() ) ); *_pStream >> nHeader; if ( !SetHeader_Impl( nHeader ) ) @@ -623,12 +623,12 @@ // sonst skippen if ( !_pStream->IsEof() ) - _pStream->Seek( _nEofRec ); + _pStream->Seek( svstream_u32_to_Size(_nEofRec) ); } // Fehler setzen und zur"uck-seeken _pStream->SetError( ERRCODE_IO_WRONGFORMAT ); - _pStream->Seek( nStartPos ); + _pStream->Seek( svstream_u32_to_Size(nStartPos) ); return FALSE; } @@ -636,11 +636,11 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter ( - BYTE nRecordType, // Subklassen Record-Kennung + sal_uInt8 nRecordType, // Subklassen Record-Kennung SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Content-Art-Kennung - BYTE nContentVer, // Content-Versions-Kennung - UINT32 nContentSize // Gr"o\se jedes einzelnen Contents in Bytes + sal_uInt16 nContentTag, // Content-Art-Kennung + sal_uInt8 nContentVer, // Content-Versions-Kennung + sal_uInt32 nContentSize // Gr"o\se jedes einzelnen Contents in Bytes ) /* [Beschreibung] @@ -660,9 +660,9 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Content-Art-Kennung - BYTE nContentVer, // Content-Versions-Kennung - UINT32 nContentSize // Gr"o\se jedes einzelnen Contents in Bytes + sal_uInt16 nContentTag, // Content-Art-Kennung + sal_uInt8 nContentVer, // Content-Versions-Kennung + sal_uInt32 nContentSize // Gr"o\se jedes einzelnen Contents in Bytes ) /* [Beschreibung] @@ -681,7 +681,7 @@ //------------------------------------------------------------------------ -UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) +sal_uInt32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) // siehe @@ -690,7 +690,7 @@ if ( !_bHeaderOk ) { // Position hinter Record merken, um sie restaurieren zu k"onnen - UINT32 nEndPos = SfxSingleRecordWriter::Close( FALSE ); + sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( FALSE ); // gegen"uber SfxSingleRecord erweiterten Header schreiben *_pStream << _nContentCount; @@ -698,7 +698,7 @@ // je nachdem ans Ende des Records seeken oder hinter Header bleiben if ( bSeekToEndOfRec ) - _pStream->Seek(nEndPos); + _pStream->Seek( svstream_u32_to_Size(nEndPos) ); return nEndPos; } @@ -710,10 +710,10 @@ SfxMultiVarRecordWriter::SfxMultiVarRecordWriter ( - BYTE nRecordType, // Record-Kennung der Subklasse - SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nRecordTag, // Gesamt-Art-Kennung - BYTE nRecordVer // Gesamt-Versions-Kennung + sal_uInt8 nRecordType, // Record-Kennung der Subklasse + SvStream* pStream, // Stream, in dem der Record angelegt wird + sal_uInt16 nRecordTag, // Gesamt-Art-Kennung + sal_uInt8 nRecordVer // Gesamt-Versions-Kennung ) /* [Beschreibung] @@ -731,8 +731,8 @@ SfxMultiVarRecordWriter::SfxMultiVarRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nRecordTag, // Gesamt-Art-Kennung - BYTE nRecordVer // Gesamt-Versions-Kennung + sal_uInt16 nRecordTag, // Gesamt-Art-Kennung + sal_uInt8 nRecordVer // Gesamt-Versions-Kennung ) /* [Beschreibung] @@ -800,13 +800,13 @@ FlushContent_Impl(); // neuen Content beginnen - _nContentStartPos = _pStream->Tell(); + _nContentStartPos = svstream_Size_to_u32( _pStream->Tell() ); ++_nContentCount; } //------------------------------------------------------------------------- -UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) +sal_uInt32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) // siehe @@ -819,30 +819,30 @@ FlushContent_Impl(); // Content-Offset-Tabelle schreiben - UINT32 nContentOfsPos = _pStream->Tell(); + sal_uInt32 nContentOfsPos = svstream_Size_to_u32( _pStream->Tell() ); //! darf man das so einr"ucken? #if defined(OSL_LITENDIAN) _pStream->Write( _aContentOfs.GetData(), - sizeof(UINT32)*_nContentCount ); + svstream_u32_to_Size(sizeof(sal_uInt32)*_nContentCount) ); #else - for ( USHORT n = 0; n < _nContentCount; ++n ) - *_pStream << UINT32(_aContentOfs[n]); + for ( sal_uInt16 n = 0; n < _nContentCount; ++n ) + *_pStream << sal_uInt32(_aContentOfs[n]); #endif // SfxMultiFixRecordWriter::Close() "uberspringen! - UINT32 nEndPos = SfxSingleRecordWriter::Close( FALSE ); + sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( FALSE ); // eigenen Header schreiben *_pStream << _nContentCount; if ( SFX_REC_TYPE_VARSIZE_RELOC == _nPreTag || SFX_REC_TYPE_MIXTAGS_RELOC == _nPreTag ) - *_pStream << nContentOfsPos - ( _pStream->Tell() + sizeof(UINT32) ); + *_pStream << nContentOfsPos - (sal_uInt32)( svstream_Size_to_u32(_pStream->Tell()) + sizeof(sal_uInt32) ); else *_pStream << nContentOfsPos; // ans Ende des Records seeken bzw. am Ende des Headers bleiben if ( bSeekToEndOfRec ) - _pStream->Seek(nEndPos); + _pStream->Seek(svstream_u32_to_Size(nEndPos)); return nEndPos; } @@ -854,8 +854,8 @@ void SfxMultiMixRecordWriter::NewContent ( - UINT16 nContentTag, // Kennung f"ur die Art des Contents - BYTE nContentVer // Kennung f"ur die Version des Contents + sal_uInt16 nContentTag, // Kennung f"ur die Art des Contents + sal_uInt8 nContentVer // Kennung f"ur die Version des Contents ) /* [Beschreibung] @@ -871,7 +871,7 @@ FlushContent_Impl(); // Tag vor den Content schreiben, Version und Startposition merken - _nContentStartPos = _pStream->Tell(); + _nContentStartPos = svstream_Size_to_u32( _pStream->Tell() ); ++_nContentCount; *_pStream << nContentTag; _nContentVer = nContentVer; @@ -898,21 +898,21 @@ if ( _nRecordType != SFX_REC_TYPE_FIXSIZE ) { // Tabelle aus dem Stream einlesen - UINT32 nContentPos = _pStream->Tell(); + sal_uInt32 nContentPos = svstream_Size_to_u32( _pStream->Tell() ); if ( _nRecordType == SFX_REC_TYPE_VARSIZE_RELOC || _nRecordType == SFX_REC_TYPE_MIXTAGS_RELOC ) - _pStream->SeekRel( + _nContentSize ); + _pStream->SeekRel( + svstream_u32_to_Size(_nContentSize) ); else - _pStream->Seek( _nContentSize ); - _pContentOfs = new UINT32[_nContentCount]; + _pStream->Seek( svstream_u32_to_Size(_nContentSize) ); + _pContentOfs = new sal_uInt32[_nContentCount]; //! darf man jetzt so einr"ucken #if defined(OSL_LITENDIAN) - _pStream->Read( _pContentOfs, sizeof(UINT32)*_nContentCount ); + _pStream->Read( _pContentOfs, svstream_u32_to_Size(sizeof(sal_uInt32)*_nContentCount) ); #else - for ( USHORT n = 0; n < _nContentCount; ++n ) + for ( sal_uInt16 n = 0; n < _nContentCount; ++n ) *_pStream >> _pContentOfs[n]; #endif - _pStream->Seek( nContentPos ); + _pStream->Seek( svstream_u32_to_Size(nContentPos) ); } // Header konnte gelesen werden, wenn am Stream kein Error gesetzt ist @@ -925,7 +925,7 @@ : _nContentNo(0), _pContentOfs( NULL ) { // Position im Stream merken, um im Fehlerfall zur"uck-seeken zu k"onnen - _nStartPos = pStream->Tell(); + _nStartPos = svstream_Size_to_u32( pStream->Tell() ); // Basisklasse konstruieren (normaler Ctor w"urde nur SingleRecs lesen) SfxSingleRecordReader::Construct_Impl( pStream ); @@ -945,7 +945,7 @@ : _nContentNo(0) { // Position im Stream merken, um im Fehlerfall zur"uck-seeken zu k"onnen - _nStartPos = pStream->Tell(); + _nStartPos = svstream_Size_to_u32( pStream->Tell() ); // passenden Record suchen und Basisklasse initialisieren SfxSingleRecordReader::Construct_Impl( pStream ); @@ -989,10 +989,10 @@ if ( _nContentNo < _nContentCount ) { // den Stream an den Anfang des Contents positionieren - UINT32 nOffset = _nRecordType == SFX_REC_TYPE_FIXSIZE + sal_uInt32 nOffset = _nRecordType == SFX_REC_TYPE_FIXSIZE ? _nContentNo * _nContentSize : SFX_REC_CONTENT_OFS(_pContentOfs[_nContentNo]); - UINT32 nNewPos = _nStartPos + nOffset; + sal_uInt32 nNewPos = _nStartPos + nOffset; DBG_ASSERT( nNewPos >= _pStream->Tell(), "SfxMultiRecordReader::GetContent() - New position before current, to much data red!" ); // #99366#: correct stream pos in every case; @@ -1001,7 +1001,7 @@ // gives errors when writing with 5.1 and reading with current // versions, so we decided to remove the if clause (KA-05/17/2002) // if ( nNewPos > _pStream->Tell() ) - _pStream->Seek( nNewPos ); + _pStream->Seek( svstream_u32_to_Size(nNewPos) ); // ggf. Content-Header lesen if ( _nRecordType == SFX_REC_TYPE_MIXTAGS || diff -ur ooo_SRC680_m140_src.orig/svtools/source/filter.vcl/filter/dlgexpor.cxx ooo_SRC680_m140_src/svtools/source/filter.vcl/filter/dlgexpor.cxx --- ooo_SRC680_m140_src.orig/svtools/source/filter.vcl/filter/dlgexpor.cxx 2005-11-17 07:54:27.379715144 +0100 +++ ooo_SRC680_m140_src/svtools/source/filter.vcl/filter/dlgexpor.cxx 2005-11-17 07:55:49.345254488 +0100 @@ -182,7 +182,7 @@ { // Config-Parameter schreiben - sal_Int32 nRes = Max( Min( aCbbRes.GetText().ToInt32(), 600L), 75L ); + sal_Int32 nRes = Max( Min( aCbbRes.GetText().ToInt32(), (sal_Int32)600), (sal_Int32)75 ); ::com::sun::star::awt::Size aSize( (long)MetricField::ConvertDoubleValue( aMtfSizeX.GetValue(), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM ), (long)MetricField::ConvertDoubleValue( aMtfSizeY.GetValue(), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM ) ); diff -ur ooo_SRC680_m140_src.orig/svtools/source/filter.vcl/filter/filter.cxx ooo_SRC680_m140_src/svtools/source/filter.vcl/filter/filter.cxx --- ooo_SRC680_m140_src.orig/svtools/source/filter.vcl/filter/filter.cxx 2005-11-17 07:54:27.384714384 +0100 +++ ooo_SRC680_m140_src/svtools/source/filter.vcl/filter/filter.cxx 2005-11-17 07:55:49.346254336 +0100 @@ -864,7 +864,7 @@ MapMode aMap( MAP_100TH_INCH ); sal_Int32 nDPI = rConfigItem.ReadInt32( String( ResId( KEY_RES, pResMgr ) ), 75 ); - Fraction aFrac( 1, Min( Max( nDPI, 75L ), 600L ) ); + Fraction aFrac( 1, Min( Max( nDPI, (sal_Int32)75 ), (sal_Int32)600 ) ); aMap.SetScaleX( aFrac ); aMap.SetScaleY( aFrac ); diff -ur ooo_SRC680_m140_src.orig/svtools/source/filter.vcl/wmf/wmfwr.cxx ooo_SRC680_m140_src/svtools/source/filter.vcl/wmf/wmfwr.cxx --- ooo_SRC680_m140_src.orig/svtools/source/filter.vcl/wmf/wmfwr.cxx 2005-11-17 07:54:27.351719400 +0100 +++ ooo_SRC680_m140_src/svtools/source/filter.vcl/wmf/wmfwr.cxx 2005-11-17 07:55:49.347254184 +0100 @@ -894,7 +894,7 @@ // erzeugt, schreiben wir zuerst die Bitmap an die richtige Position // Und ueberschreiben hinterher den FILEHEADER mit den Parametern. nPosAnf=pWMF->Tell(); // Position merken, wo Parameter hin sollen - *pWMF << (long)0 << (long)0; // 8 bytes auffuellen (diese 8 bytes + + *pWMF << (sal_Int32)0 << (sal_Int32)0; // 8 bytes auffuellen (diese 8 bytes + // 14 bytes ueberfluessigen FILEHEADER // = 22 bytes Parameter) *pWMF << rBitmap; // Bitmap schreiben diff -ur ooo_SRC680_m140_src.orig/svtools/source/items/rectitem.cxx ooo_SRC680_m140_src/svtools/source/items/rectitem.cxx --- ooo_SRC680_m140_src.orig/svtools/source/items/rectitem.cxx 2005-11-17 07:54:27.144750864 +0100 +++ ooo_SRC680_m140_src/svtools/source/items/rectitem.cxx 2005-11-17 07:55:49.348254032 +0100 @@ -167,10 +167,10 @@ aVal.getHeight() ); break; } - case MID_RECT_LEFT: rVal <<= aVal.getX(); break; - case MID_RECT_RIGHT: rVal <<= aVal.getY(); break; - case MID_WIDTH: rVal <<= aVal.getWidth(); break; - case MID_HEIGHT: rVal <<= aVal.getHeight(); break; + case MID_RECT_LEFT: rVal <<= (sal_Int32)aVal.getX(); break; // FIXME: possible truncation in 64-bit mode + case MID_RECT_RIGHT: rVal <<= (sal_Int32)aVal.getY(); break; // FIXME: possible truncation in 64-bit mode + case MID_WIDTH: rVal <<= (sal_Int32)aVal.getWidth(); break; // FIXME: possible truncation in 64-bit mode + case MID_HEIGHT: rVal <<= (sal_Int32)aVal.getHeight(); break; // FIXME: possible truncation in 64-bit mode default: DBG_ERROR("Wrong MemberID!"); return FALSE; } diff -ur ooo_SRC680_m140_src.orig/svtools/source/items/szitem.cxx ooo_SRC680_m140_src/svtools/source/items/szitem.cxx --- ooo_SRC680_m140_src.orig/svtools/source/items/szitem.cxx 2005-11-17 07:54:27.153749496 +0100 +++ ooo_SRC680_m140_src/svtools/source/items/szitem.cxx 2005-11-17 07:55:49.348254032 +0100 @@ -172,9 +172,9 @@ break; } case MID_WIDTH: - rVal <<= aTmp.getWidth(); break; + rVal <<= (sal_Int32)aTmp.getWidth(); break; // FIXME: possible truncation in 64-bit mode case MID_HEIGHT: - rVal <<= aTmp.getHeight(); break; + rVal <<= (sal_Int32)aTmp.getHeight(); break; // FIXME: possible truncation in 64-bit mode default: DBG_ERROR("Wrong MemberId!"); return FALSE; } diff -ur ooo_SRC680_m140_src.orig/svtools/source/misc/flbytes.cxx ooo_SRC680_m140_src/svtools/source/misc/flbytes.cxx --- ooo_SRC680_m140_src.orig/svtools/source/misc/flbytes.cxx 2005-11-17 07:54:26.917785368 +0100 +++ ooo_SRC680_m140_src/svtools/source/misc/flbytes.cxx 2005-11-17 07:55:49.349253880 +0100 @@ -53,9 +53,9 @@ //============================================================================ namespace unnamed_svtools_flbytes { -inline ULONG MyMin( long a, long b ) +inline sal_Int32 MyMin( sal_Int32 a, sal_Int32 b ) { - return Max( long( Min( a , b ) ), 0L ); + return Max( sal_Int32( Min( a , b ) ), sal_Int32(0) ); } } @@ -77,14 +77,14 @@ } //============================================================================ -ErrCode SvFillLockBytes::ReadAt( ULONG nPos, void* pBuffer, ULONG nCount, - ULONG *pRead ) const +ErrCode SvFillLockBytes::ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, + sal_Size *pRead ) const { if( bTerminated ) return xLockBytes->ReadAt( nPos, pBuffer, nCount, pRead ); else { - ULONG nWanted = nPos + nCount; + sal_Size nWanted = nPos + nCount; if( IsSynchronMode() ) { while( nWanted > nFilledSize && !bTerminated ) @@ -93,8 +93,8 @@ } else { - ULONG nRead = MyMin( nCount, long( nFilledSize ) - nPos ); - ULONG nErr = xLockBytes->ReadAt( nPos, pBuffer, nRead, pRead ); + sal_Size nRead = MyMin( nCount, sal_Size( nFilledSize ) - nPos ); + sal_Size nErr = xLockBytes->ReadAt( nPos, pBuffer, nRead, pRead ); return ( !nCount || nRead == nCount || nErr ) ? nErr : ERRCODE_IO_PENDING; } @@ -102,14 +102,14 @@ } //============================================================================ -ErrCode SvFillLockBytes::WriteAt( ULONG nPos, const void* pBuffer, - ULONG nCount, ULONG *pWritten ) +ErrCode SvFillLockBytes::WriteAt( sal_Size nPos, const void* pBuffer, + sal_Size nCount, sal_Size *pWritten ) { if( bTerminated ) return xLockBytes->WriteAt( nPos, pBuffer, nCount, pWritten ); else { - ULONG nWanted = nPos + nCount; + sal_Size nWanted = nPos + nCount; if( IsSynchronMode() ) { while( nWanted > nFilledSize && !bTerminated ) @@ -118,8 +118,8 @@ } else { - ULONG nRead = MyMin( nCount, long( nFilledSize ) - nPos ); - ULONG nErr = xLockBytes->WriteAt( nPos, pBuffer, nRead, pWritten ); + sal_Size nRead = MyMin( nCount, sal_Size( nFilledSize ) - nPos ); + sal_Size nErr = xLockBytes->WriteAt( nPos, pBuffer, nRead, pWritten ); return ( !nCount || nRead == nCount || nErr ) ? nErr : ERRCODE_IO_PENDING; } @@ -133,20 +133,20 @@ } //============================================================================ -ErrCode SvFillLockBytes::SetSize( ULONG nSize ) +ErrCode SvFillLockBytes::SetSize( sal_Size nSize ) { return xLockBytes->SetSize( nSize ); } //============================================================================ -ErrCode SvFillLockBytes::LockRegion( ULONG nPos, ULONG nCount, LockType eType) +ErrCode SvFillLockBytes::LockRegion( sal_Size nPos, sal_Size nCount, LockType eType) { return xLockBytes->LockRegion( nPos, nCount, eType ); } //============================================================================ ErrCode SvFillLockBytes::UnlockRegion( - ULONG nPos, ULONG nCount, LockType eType) + sal_Size nPos, sal_Size nCount, LockType eType) { return xLockBytes->UnlockRegion( nPos, nCount, eType ); } @@ -159,7 +159,7 @@ } //============================================================================ -ErrCode SvFillLockBytes::FillAppend( const void* pBuffer, ULONG nCount, ULONG *pWritten ) +ErrCode SvFillLockBytes::FillAppend( const void* pBuffer, sal_Size nCount, sal_Size *pWritten ) { ErrCode nRet = xLockBytes->WriteAt( nFilledSize, pBuffer, nCount, pWritten ); @@ -186,12 +186,12 @@ //============================================================================ // virtual -ErrCode SvSyncLockBytes::ReadAt(ULONG nPos, void * pBuffer, ULONG nCount, - ULONG * pRead) const +ErrCode SvSyncLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount, + sal_Size * pRead) const { - for (ULONG nReadTotal = 0;;) + for (sal_Size nReadTotal = 0;;) { - ULONG nReadCount = 0; + sal_Size nReadCount = 0; ErrCode nError = m_xAsyncLockBytes->ReadAt(nPos, pBuffer, nCount, &nReadCount); nReadTotal += nReadCount; @@ -210,12 +210,12 @@ //============================================================================ // virtual -ErrCode SvSyncLockBytes::WriteAt(ULONG nPos, const void * pBuffer, - ULONG nCount, ULONG * pWritten) +ErrCode SvSyncLockBytes::WriteAt(sal_Size nPos, const void * pBuffer, + sal_Size nCount, sal_Size * pWritten) { - for (ULONG nWrittenTotal = 0;;) + for (sal_Size nWrittenTotal = 0;;) { - ULONG nWrittenCount = 0; + sal_Size nWrittenCount = 0; ErrCode nError = m_xAsyncLockBytes->WriteAt(nPos, pBuffer, nCount, &nWrittenCount); nWrittenTotal += nWrittenCount; @@ -244,34 +244,34 @@ SvULongs aPositions; SvULongs aOffsets; BOOL bPending; - ULONG RelativeOffset( ULONG nPos ) const; + sal_Size RelativeOffset( sal_Size nPos ) const; ErrCode ReadWrite_Impl( - ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pProcessed, + sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pProcessed, BOOL bRead ); SvCompositeLockBytes_Impl() : bPending( FALSE ){} }; //============================================================================ -ULONG SvCompositeLockBytes_Impl::RelativeOffset( ULONG nPos ) const +sal_Size SvCompositeLockBytes_Impl::RelativeOffset( sal_Size nPos ) const { const SvULongs& rPositions = aPositions; const SvULongs& rOffsets = aOffsets; - USHORT nMinPos = 0; - USHORT nListCount = rPositions.Count(); + sal_uInt16 nMinPos = 0; + sal_uInt16 nListCount = rPositions.Count(); // Erster Lockbytes, der bearbeitet werden muss while( nMinPos + 1 < nListCount && rPositions[ nMinPos + 1 ] <= nPos ) nMinPos ++; - ULONG nSectionStart = rPositions[ nMinPos ]; + sal_Size nSectionStart = rPositions[ nMinPos ]; if( nSectionStart > nPos ) - return ULONG_MAX; + return SAL_MAX_SIZE; return rOffsets[ nMinPos ] + nPos - nSectionStart; } //============================================================================ ErrCode SvCompositeLockBytes_Impl::ReadWrite_Impl( - ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pProcessed, + sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pProcessed, BOOL bRead ) { ErrCode nErr = ERRCODE_NONE; @@ -279,14 +279,14 @@ SvULongs& rOffsets = aOffsets; SvLockBytesMemberList& rLockBytes = aLockBytes; - ULONG nBytes = nCount; - USHORT nListCount = rPositions.Count(); - USHORT nMinPos = 0; + sal_Size nBytes = nCount; + sal_uInt16 nListCount = rPositions.Count(); + sal_uInt16 nMinPos = 0; // Erster Lockbytes, der bearbeitet werden muss while( nMinPos + 1 < nListCount && rPositions[ nMinPos + 1 ] <= nPos ) nMinPos ++; - ULONG nSectionStart = rPositions[ nMinPos ]; + sal_Size nSectionStart = rPositions[ nMinPos ]; if( nSectionStart > nPos ) { @@ -295,22 +295,22 @@ return ERRCODE_IO_CANTREAD; } - ULONG nDone; + sal_Size nDone; while( nMinPos < nListCount ) { - ULONG nToProcess; - ULONG nSectionStop; + sal_Size nToProcess; + sal_Size nSectionStop; if( nMinPos + 1 < nListCount ) { nSectionStop = rPositions[ nMinPos + 1 ]; - nToProcess = MyMin( long( nSectionStop ) - nPos, nBytes ); + nToProcess = MyMin( sal_sSize( nSectionStop ) - nPos, nBytes ); } else { nToProcess = nBytes; nSectionStop = 0; } - ULONG nAbsPos = nPos - nSectionStart + rOffsets[ nMinPos ]; + sal_Size nAbsPos = nPos - nSectionStart + rOffsets[ nMinPos ]; SvLockBytes* pLB = rLockBytes.GetObject( nMinPos ); if( bRead ) nErr = pLB->ReadAt( nAbsPos, pBuffer, nToProcess, &nDone ); @@ -356,21 +356,21 @@ } //============================================================================ -ULONG SvCompositeLockBytes::RelativeOffset( ULONG nPos ) const +sal_Size SvCompositeLockBytes::RelativeOffset( sal_Size nPos ) const { return pImpl->RelativeOffset( nPos ); } //============================================================================ ErrCode SvCompositeLockBytes::ReadAt( - ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pRead ) const + sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const { return pImpl->ReadWrite_Impl( nPos, pBuffer, nCount, pRead, TRUE ); } //============================================================================ ErrCode SvCompositeLockBytes::WriteAt( - ULONG nPos, const void* pBuffer, ULONG nCount, ULONG* pWritten ) + sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten ) { return pImpl->ReadWrite_Impl( nPos, const_cast< void * >(pBuffer), nCount, pWritten, FALSE ); @@ -381,20 +381,20 @@ { SvLockBytesMemberList& rLockBytes = pImpl->aLockBytes; ErrCode nErr = ERRCODE_NONE; - for( USHORT nCount = (USHORT)rLockBytes.Count(); !nErr && nCount--; ) + for( sal_uInt16 nCount = (sal_uInt16)rLockBytes.Count(); !nErr && nCount--; ) nErr = rLockBytes.GetObject( nCount )->Flush(); return nErr; } //============================================================================ -ErrCode SvCompositeLockBytes::SetSize( ULONG nSize ) +ErrCode SvCompositeLockBytes::SetSize( sal_Size nSize ) { DBG_ERROR( "not implemented" ); return ERRCODE_IO_NOTSUPPORTED; } //============================================================================ -ErrCode SvCompositeLockBytes::LockRegion( ULONG nPos, ULONG nCount, LockType ) +ErrCode SvCompositeLockBytes::LockRegion( sal_Size nPos, sal_Size nCount, LockType ) { DBG_ERROR( "not implemented" ); return ERRCODE_IO_NOTSUPPORTED; @@ -402,7 +402,7 @@ //============================================================================ ErrCode SvCompositeLockBytes::UnlockRegion( - ULONG nPos, ULONG nCount, LockType ) + sal_Size nPos, sal_Size nCount, LockType ) { DBG_ERROR( "not implemented" ); return ERRCODE_IO_NOTSUPPORTED; @@ -412,7 +412,7 @@ ErrCode SvCompositeLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFlag) const { - USHORT nMax = pImpl->aPositions.Count() - 1; + sal_uInt16 nMax = pImpl->aPositions.Count() - 1; SvLockBytesStat aStat; ErrCode nErr = pImpl->aLockBytes.GetObject( nMax )->Stat( &aStat, eFlag ); @@ -423,9 +423,9 @@ //============================================================================ void SvCompositeLockBytes::Append( - SvLockBytes* pLockBytes, ULONG nPos, ULONG nOffset ) + SvLockBytes* pLockBytes, sal_Size nPos, sal_Size nOffset ) { - USHORT nCount = pImpl->aOffsets.Count(); + sal_uInt16 nCount = pImpl->aOffsets.Count(); pImpl->aLockBytes.Insert( pLockBytes, nCount ); pImpl->aPositions.Insert( nPos, nCount ); pImpl->aOffsets.Insert( nOffset, nCount ); diff -ur ooo_SRC680_m140_src.orig/svtools/source/misc/graphictools.cxx ooo_SRC680_m140_src/svtools/source/misc/graphictools.cxx --- ooo_SRC680_m140_src.orig/svtools/source/misc/graphictools.cxx 2005-11-17 07:54:26.923784456 +0100 +++ ooo_SRC680_m140_src/svtools/source/misc/graphictools.cxx 2005-11-17 07:55:49.350253728 +0100 @@ -335,13 +335,13 @@ rClass.maEndArrow.Write( rOStm ); rOStm << rClass.mfTransparency; rOStm << rClass.mfStrokeWidth; - UINT16 nTmp = rClass.maCapType; + sal_uInt16 nTmp = rClass.maCapType; rOStm << nTmp; nTmp = rClass.maJoinType; rOStm << nTmp; rOStm << rClass.mfMiterLimit; - rOStm << (sal_Size)rClass.maDashArray.size(); + rOStm << svstream_Size_to_u32( rClass.maDashArray.size() ); size_t i; for(i=0; i> rClass.mfTransparency; rIStm >> rClass.mfStrokeWidth; - UINT16 nTmp; + sal_uInt16 nTmp; rIStm >> nTmp; rClass.maCapType = SvtGraphicStroke::CapType(nTmp); rIStm >> nTmp; rClass.maJoinType = SvtGraphicStroke::JoinType(nTmp); rIStm >> rClass.mfMiterLimit; - sal_Size nSize; - rIStm >> nSize; + sal_uInt32 nTemp; + rIStm >> nTemp; + sal_Size nSize = svstream_u32_to_Size(nTemp); rClass.maDashArray.resize(nSize); size_t i; for(i=0; i> nDataSize; nDataEnd = rStream.Tell() + nDataSize; } @@ -65,7 +65,7 @@ SvNumReadHeader::~SvNumReadHeader() { - ULONG nReadEnd = rStream.Tell(); + sal_uInt32 nReadEnd = rStream.Tell(); DBG_ASSERT( nReadEnd <= nDataEnd, "zuviele Bytes gelesen" ); if ( nReadEnd != nDataEnd ) rStream.Seek(nDataEnd); // Rest ueberspringen @@ -73,9 +73,9 @@ //#pragma SEG_FUNCDEF(numhead_03) -ULONG SvNumReadHeader::BytesLeft() const +sal_uInt32 SvNumReadHeader::BytesLeft() const { - ULONG nReadEnd = rStream.Tell(); + sal_uInt32 nReadEnd = rStream.Tell(); if (nReadEnd <= nDataEnd) return nDataEnd-nReadEnd; @@ -87,7 +87,7 @@ //#pragma SEG_FUNCDEF(numhead_04) -SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault) : +SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault) : rStream( rNewStream ) { nDataSize = nDefault; @@ -99,12 +99,12 @@ SvNumWriteHeader::~SvNumWriteHeader() { - ULONG nPos = rStream.Tell(); + sal_uInt32 nPos = rStream.Tell(); if ( nPos - nDataPos != nDataSize ) // Default getroffen? { nDataSize = nPos - nDataPos; - rStream.Seek(nDataPos - sizeof(ULONG)); + rStream.Seek(nDataPos - sizeof(sal_uInt32)); rStream << nDataSize; // Groesse am Anfang eintragen rStream.Seek(nPos); } @@ -119,26 +119,26 @@ ImpSvNumMultipleReadHeader::ImpSvNumMultipleReadHeader(SvStream& rNewStream) : rStream( rNewStream ) { - ULONG nDataSize; + sal_uInt32 nDataSize; rStream >> nDataSize; - ULONG nDataPos = rStream.Tell(); + sal_uInt32 nDataPos = svstream_Size_to_u32( rStream.Tell() ); nEntryEnd = nDataPos; - rStream.SeekRel(nDataSize); - USHORT nID; + rStream.SeekRel(svstream_u32_to_Size(nDataSize)); + sal_uInt16 nID; rStream >> nID; if (nID != SV_NUMID_SIZES) { DBG_ERROR("SV_NUMID_SIZES nicht gefunden"); } - ULONG nSizeTableLen; + sal_uInt32 nSizeTableLen; rStream >> nSizeTableLen; pBuf = new char[nSizeTableLen]; - rStream.Read( pBuf, nSizeTableLen ); - pMemStream = new SvMemoryStream( pBuf, nSizeTableLen, STREAM_READ ); + rStream.Read( pBuf, svstream_u32_to_Size(nSizeTableLen) ); + pMemStream = new SvMemoryStream( pBuf, svstream_u32_to_Size(nSizeTableLen), STREAM_READ ); - nEndPos = rStream.Tell(); - rStream.Seek( nDataPos ); + nEndPos = svstream_Size_to_u32( rStream.Tell() ); + rStream.Seek( svstream_u32_to_Size(nDataPos) ); } //#pragma SEG_FUNCDEF(numhead_07) @@ -150,43 +150,43 @@ delete pMemStream; delete [] pBuf; - rStream.Seek(nEndPos); + rStream.Seek(svstream_u32_to_Size(nEndPos)); } //! mit ctor synchron // static void ImpSvNumMultipleReadHeader::Skip( SvStream& rStream ) { - ULONG nDataSize; + sal_uInt32 nDataSize; rStream >> nDataSize; - rStream.SeekRel( nDataSize ); - USHORT nID; + rStream.SeekRel( svstream_u32_to_Size(nDataSize) ); + sal_uInt16 nID; rStream >> nID; if ( nID != SV_NUMID_SIZES ) { DBG_ERROR("SV_NUMID_SIZES nicht gefunden"); } - ULONG nSizeTableLen; + sal_uInt32 nSizeTableLen; rStream >> nSizeTableLen; - rStream.SeekRel( nSizeTableLen ); + rStream.SeekRel( svstream_u32_to_Size(nSizeTableLen) ); } //#pragma SEG_FUNCDEF(numhead_08) void ImpSvNumMultipleReadHeader::EndEntry() { - ULONG nPos = rStream.Tell(); + sal_uInt32 nPos = svstream_Size_to_u32( rStream.Tell() ); DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" ); if ( nPos != nEntryEnd ) - rStream.Seek( nEntryEnd ); // Rest ueberspringen + rStream.Seek( svstream_u32_to_Size(nEntryEnd) ); // Rest ueberspringen } //#pragma SEG_FUNCDEF(numhead_0d) void ImpSvNumMultipleReadHeader::StartEntry() { - ULONG nPos = rStream.Tell(); - ULONG nEntrySize; + sal_uInt32 nPos = svstream_Size_to_u32( rStream.Tell() ); + sal_uInt32 nEntrySize; (*pMemStream) >> nEntrySize; nEntryEnd = nPos + nEntrySize; @@ -194,9 +194,9 @@ //#pragma SEG_FUNCDEF(numhead_09) -ULONG ImpSvNumMultipleReadHeader::BytesLeft() const +sal_uInt32 ImpSvNumMultipleReadHeader::BytesLeft() const { - ULONG nReadEnd = rStream.Tell(); + sal_uInt32 nReadEnd = svstream_Size_to_u32( rStream.Tell() ); if (nReadEnd <= nEntryEnd) return nEntryEnd-nReadEnd; @@ -209,14 +209,14 @@ //#pragma SEG_FUNCDEF(numhead_0a) ImpSvNumMultipleWriteHeader::ImpSvNumMultipleWriteHeader(SvStream& rNewStream, - ULONG nDefault) : + sal_uInt32 nDefault) : rStream( rNewStream ), aMemStream( 4096, 4096 ) { nDataSize = nDefault; rStream << nDataSize; - nDataPos = rStream.Tell(); + nDataPos = svstream_Size_to_u32( rStream.Tell() ); nEntryStart = nDataPos; } @@ -224,19 +224,19 @@ ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader() { - ULONG nDataEnd = rStream.Tell(); + sal_uInt32 nDataEnd = svstream_Size_to_u32( rStream.Tell() ); - rStream << (USHORT) SV_NUMID_SIZES; - rStream << aMemStream.Tell(); + rStream << (sal_uInt16) SV_NUMID_SIZES; + rStream << svstream_Size_to_u32( aMemStream.Tell() ); rStream.Write( aMemStream.GetData(), aMemStream.Tell() ); if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen? { nDataSize = nDataEnd - nDataPos; - ULONG nPos = rStream.Tell(); - rStream.Seek(nDataPos-sizeof(ULONG)); + sal_uInt32 nPos = svstream_Size_to_u32( rStream.Tell() ); + rStream.Seek(svstream_u32_to_Size(nDataPos-sizeof(sal_uInt32))); rStream << nDataSize; // Groesse am Anfang eintragen - rStream.Seek(nPos); + rStream.Seek(svstream_u32_to_Size(nPos)); } } @@ -244,7 +244,7 @@ void ImpSvNumMultipleWriteHeader::EndEntry() { - ULONG nPos = rStream.Tell(); + sal_uInt32 nPos = svstream_Size_to_u32( rStream.Tell() ); aMemStream << nPos - nEntryStart; } @@ -252,7 +252,7 @@ void ImpSvNumMultipleWriteHeader::StartEntry() { - ULONG nPos = rStream.Tell(); + sal_uInt32 nPos = svstream_Size_to_u32( rStream.Tell() ); nEntryStart = nPos; } diff -ur ooo_SRC680_m140_src.orig/svtools/source/numbers/numhead.hxx ooo_SRC680_m140_src/svtools/source/numbers/numhead.hxx --- ooo_SRC680_m140_src.orig/svtools/source/numbers/numhead.hxx 2005-11-17 07:54:27.434706784 +0100 +++ ooo_SRC680_m140_src/svtools/source/numbers/numhead.hxx 2005-11-17 07:55:49.351253576 +0100 @@ -89,7 +89,7 @@ void StartEntry(); void EndEntry(); - ULONG BytesLeft() const; + sal_uInt32 BytesLeft() const; static void Skip( SvStream& ); // komplett ueberspringen }; @@ -104,7 +104,7 @@ ULONG nEntryStart; public: - ImpSvNumMultipleWriteHeader(SvStream& rNewStream, ULONG nDefault = 0); + ImpSvNumMultipleWriteHeader(SvStream& rNewStream, sal_uInt32 nDefault = 0); ~ImpSvNumMultipleWriteHeader(); void StartEntry(); diff -ur ooo_SRC680_m140_src.orig/svtools/source/svhtml/parhtml.cxx ooo_SRC680_m140_src/svtools/source/svhtml/parhtml.cxx --- ooo_SRC680_m140_src.orig/svtools/source/svhtml/parhtml.cxx 2005-11-17 07:54:27.418709216 +0100 +++ ooo_SRC680_m140_src/svtools/source/svhtml/parhtml.cxx 2005-11-17 07:55:49.352253424 +0100 @@ -165,7 +165,7 @@ "HTMLOption: unbekanntes Token" ); } -ULONG HTMLOption::GetNumber() const +sal_uInt32 HTMLOption::GetNumber() const { DBG_ASSERT( (nToken>=HTML_OPTION_NUMBER_START && nToken= 0L ? (sal_uInt32)nTmp : 0UL; + return nTmp >= 0U ? (sal_uInt32)nTmp : 0U; } INT32 HTMLOption::GetSNumber() const @@ -225,7 +225,7 @@ { // hier wird auf die korrekte Trennung der Zahlen durch ',' geachtet // und auch mal eine 0 eingefuegt - sal_uInt32 nPos = 0UL; + ULONG nPos = 0UL; while( nPos < aValue.Len() ) { register sal_Unicode c; diff -ur ooo_SRC680_m140_src.orig/svtools/source/uno/unoiface.cxx ooo_SRC680_m140_src/svtools/source/uno/unoiface.cxx --- ooo_SRC680_m140_src.orig/svtools/source/uno/unoiface.cxx 2005-11-17 07:54:26.812801328 +0100 +++ ooo_SRC680_m140_src/svtools/source/uno/unoiface.cxx 2005-11-17 07:55:49.354253120 +0100 @@ -1723,7 +1723,7 @@ { ::vos::OGuard aGuard( GetMutex() ); - maImageConsumer.SetColorModel( BitCount, RGBAPal.getLength(), (const unsigned long*) RGBAPal.getConstArray(), RedMask, GreenMask, BlueMask, AlphaMask ); + maImageConsumer.SetColorModel( BitCount, RGBAPal.getLength(), (const sal_uInt32*) RGBAPal.getConstArray(), RedMask, GreenMask, BlueMask, AlphaMask ); } @@ -1739,7 +1739,7 @@ { ::vos::OGuard aGuard( GetMutex() ); - maImageConsumer.SetPixelsByLongs( X, Y, Width, Height, (const unsigned long*) ProducerData.getConstArray(), Offset, Scansize ); + maImageConsumer.SetPixelsByLongs( X, Y, Width, Height, (const sal_uInt32*) ProducerData.getConstArray(), Offset, Scansize ); ImplUpdateImage( sal_True ); } diff -ur ooo_SRC680_m140_src.orig/svtools/workben/svdem.cxx ooo_SRC680_m140_src/svtools/workben/svdem.cxx --- ooo_SRC680_m140_src.orig/svtools/workben/svdem.cxx 2005-11-17 07:54:27.485699032 +0100 +++ ooo_SRC680_m140_src/svtools/workben/svdem.cxx 2005-11-17 07:55:49.355252968 +0100 @@ -33,8 +33,11 @@ * ************************************************************************/ #include -#include +#include +#include #include +#include +#include #include #include @@ -60,13 +63,13 @@ #include #include + +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::lang; // ----------------------------------------------------------------------- -class MyApp : public Application -{ -public: - void Main(); -}; +// Forward declaration +void Main(); // ----------------------------------------------------------------------- @@ -228,21 +231,37 @@ void Paint( const Rectangle& rRect ); void Resize(); }; - // ----------------------------------------------------------------------- -void MyApp::Main() +SAL_IMPLEMENT_MAIN() { try { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - xMSF = cppu::createRegistryServiceFactory( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True ); + Reference< XMultiServiceFactory > xMS; + xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True ); + + ::comphelper::setProcessServiceFactory( xMS ); + + InitVCL( xMS ); + ::Main(); + DeInitVCL(); + } + catch ( com::sun::star::uno::Exception & e ) + { + fprintf( stderr, "Error during bootstrapping servicemanager: %s\n" , + rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); + } + return 0; +} + - ::comphelper::setProcessServiceFactory( xMSF ); +// ----------------------------------------------------------------------- + +void Main() +{ Help aHelp; - SetHelp( &aHelp ); + Application::SetHelp( &aHelp ); Help::EnableContextHelp(); Help::EnableExtHelp(); Help::EnableBalloonHelp(); @@ -251,15 +270,9 @@ MyWin aMainWin( NULL, WinBits( WB_APP | WB_STDWORK | WB_CLIPCHILDREN ) ); aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "SVTOOLS - Workbench" ) ) ); aMainWin.GrabFocus(); - aMainWin.Show(); - - Execute(); - } - catch ( com::sun::star::uno::Exception & e ) - { - fprintf( stderr, "Error during bootstrapping servicemanager: %s\n" , - rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); - } + aMainWin.Show(); + + Application::Execute(); } // ----------------------------------------------------------------------- @@ -1116,4 +1129,3 @@ // ----------------------------------------------------------------------- -MyApp aMyApp;