summaryrefslogtreecommitdiff
path: root/tools/inc/tools/pstm.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/inc/tools/pstm.hxx')
-rw-r--r--tools/inc/tools/pstm.hxx68
1 files changed, 34 insertions, 34 deletions
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index 2575ccae8f3e..f149e977f3b3 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -52,11 +52,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** );
class TOOLS_DLLPUBLIC SvClassManager
{
- typedef std::hash_map< USHORT, SvCreateInstancePersist > Map;
+ typedef std::hash_map< sal_uInt16, SvCreateInstancePersist > Map;
Map aAssocTable;
public:
- void Register( USHORT nClassId, SvCreateInstancePersist pFunc );
- SvCreateInstancePersist Get( USHORT nClassId );
+ void Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc );
+ SvCreateInstancePersist Get( sal_uInt16 nClassId );
};
/************************** S v R t t i B a s e **************************/
@@ -71,11 +71,11 @@ SV_DECL_IMPL_REF(SvRttiBase)
/*************************************************************************/
#define SV_DECL_PERSIST( Class, CLASS_ID ) \
TYPEINFO(); \
- static USHORT StaticClassId() { return CLASS_ID; } \
+ static sal_uInt16 StaticClassId() { return CLASS_ID; } \
static void * CreateInstance( SvPersistBase ** ppBase ); \
friend SvPersistStream& operator >> ( SvPersistStream & rStm, \
Class *& rpObj); \
- virtual USHORT GetClassId() const; \
+ virtual sal_uInt16 GetClassId() const; \
virtual void Load( SvPersistStream & ); \
virtual void Save( SvPersistStream & );
@@ -89,7 +89,7 @@ SV_DECL_IMPL_REF(SvRttiBase)
*ppBase = p; \
return p; \
} \
- USHORT Class::GetClassId() const \
+ sal_uInt16 Class::GetClassId() const \
{ return StaticClassId(); } \
SvPersistStream& operator >> (SvPersistStream & rStm, Class *& rpObj)\
{ \
@@ -112,7 +112,7 @@ class SvPersistStream;
class SvPersistBase : public SvRttiBase
{
public:
- virtual USHORT GetClassId() const = 0;
+ virtual sal_uInt16 GetClassId() const = 0;
virtual void Load( SvPersistStream & ) = 0;
virtual void Save( SvPersistStream & ) = 0;
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm,
@@ -130,9 +130,9 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberL
{
public:
SvPersistBaseMemberList();
- SvPersistBaseMemberList(USHORT nInitSz, USHORT nResize );
+ SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );
- void WriteObjects( SvPersistStream &, BOOL bOnlyStreamedObj = FALSE ) const;
+ void WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const;
TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &);
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBaseMemberList &);
};
@@ -170,7 +170,7 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
die im Stream vorkommen k"onnen, ben"otigt. Die Liste aller Klassen
wird in einem <SvClassManager> Objekt gespeichert und dem
SvPersistStream "ubergeben, wenn er erzeugt wird.
- Weiterhin wird die M"oglichkeit geboten UINT32 Werte komprimiert
+ Weiterhin wird die M"oglichkeit geboten sal_uInt32 Werte komprimiert
zu schreiben und zu lesen (<SvPersistStream::WriteCompressed>,
<SvPersistStream::ReadCompressed>).
Es gibt auch die drei Hilfsmethoden <SvPersistStream::WriteDummyLen>,
@@ -201,49 +201,49 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
SvStream * pStm;
Table aPTable; // Pointer und Key gedreht
SvPersistUIdx aPUIdx;
- ULONG nStartIdx;
+ sal_uIntPtr nStartIdx;
const SvPersistStream * pRefStm;
- UINT32 nFlags;
+ sal_uInt32 nFlags;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
virtual void FlushData();
protected:
- ULONG GetCurMaxIndex( const SvPersistUIdx & ) const;
- ULONG GetCurMaxIndex() const
+ sal_uIntPtr GetCurMaxIndex( const SvPersistUIdx & ) const;
+ sal_uIntPtr GetCurMaxIndex() const
{ return GetCurMaxIndex( aPUIdx ); }
- void WriteObj( BYTE nHdr, SvPersistBase * pObj );
- UINT32 ReadObj( SvPersistBase * & rpObj,
- BOOL bRegister );
+ void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj );
+ sal_uInt32 ReadObj( SvPersistBase * & rpObj,
+ sal_Bool bRegister );
public:
- BOOL IsStreamed( SvPersistBase * pObj ) const
+ sal_Bool IsStreamed( SvPersistBase * pObj ) const
{ return 0 != GetIndex( pObj ); }
virtual void ResetError();
SvPersistStream( SvClassManager &, SvStream * pStream,
- UINT32 nStartIdx = 1 );
+ sal_uInt32 nStartIdx = 1 );
SvPersistStream( SvClassManager &, SvStream * pStream,
const SvPersistStream & rPersStm );
~SvPersistStream();
void SetStream( SvStream * pStream );
SvStream * GetStream() const { return pStm; }
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
- SvPersistBase * GetObject( ULONG nIdx ) const;
- ULONG GetIndex( SvPersistBase * ) const;
+ SvPersistBase * GetObject( sal_uIntPtr nIdx ) const;
+ sal_uIntPtr GetIndex( SvPersistBase * ) const;
- void SetContextFlags( UINT32 n ) { nFlags = n; }
- UINT32 GetContextFlags() const { return nFlags; }
+ void SetContextFlags( sal_uInt32 n ) { nFlags = n; }
+ sal_uInt32 GetContextFlags() const { return nFlags; }
- static void WriteCompressed( SvStream & rStm, UINT32 nVal );
- static UINT32 ReadCompressed( SvStream & rStm );
+ static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal );
+ static sal_uInt32 ReadCompressed( SvStream & rStm );
- UINT32 WriteDummyLen();
- void WriteLen( UINT32 nLenPos );
- UINT32 ReadLen( UINT32 * pTestPos );
+ sal_uInt32 WriteDummyLen();
+ void WriteLen( sal_uInt32 nLenPos );
+ sal_uInt32 ReadLen( sal_uInt32 * pTestPos );
SvPersistStream& WritePointer( SvPersistBase * pObj );
SvPersistStream& ReadPointer( SvPersistBase * & rpObj );
@@ -254,8 +254,8 @@ public:
// gespeichert werden.
friend SvStream& operator >> ( SvStream &, SvPersistStream & );
friend SvStream& operator << ( SvStream &, SvPersistStream & );
- ULONG InsertObj( SvPersistBase * );
- ULONG RemoveObj( SvPersistBase * );
+ sal_uIntPtr InsertObj( SvPersistBase * );
+ sal_uIntPtr RemoveObj( SvPersistBase * );
};
#endif // _PSTM_HXX