summaryrefslogtreecommitdiff
path: root/include/tools/pstm.hxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2016-03-01 23:21:02 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2016-03-01 23:51:05 +0100
commitf00967cf38ed0c2c197284391fc521825bb3c2ac (patch)
treed1505cfff1707c51a74ece3091dcc25afbc5d778 /include/tools/pstm.hxx
parent4845155e0126571e4176819c5f27b76160146ce0 (diff)
sal_uIntPtr/sal_uLong to Index (aka sal_uInt32) in UniqueIndex
Change-Id: I212cb3bb9d920741629fc4564bbd28b393e8fe00
Diffstat (limited to 'include/tools/pstm.hxx')
-rw-r--r--include/tools/pstm.hxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index 92b5349e493e..ab7541682340 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -91,8 +91,6 @@ public:
SvPersistBase *& rpObj );
};
-typedef std::map<SvPersistBase*, sal_uIntPtr> PersistBaseMap;
-
class SvStream;
/** Persistent Stream
@@ -130,12 +128,18 @@ class SvStream;
*/
class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
{
+public:
+ typedef UniqueIndex<SvPersistBase>::Index Index;
+
+private:
+ typedef std::map<SvPersistBase*, Index> PersistBaseMap;
+
SvClassManager & rClassMgr;
SvStream * pStm;
PersistBaseMap aPTable; // reversed pointer and key
UniqueIndex<SvPersistBase>
aPUIdx;
- sal_uIntPtr nStartIdx;
+ Index nStartIdx;
const SvPersistStream * pRefStm;
virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ) override;
@@ -151,13 +155,13 @@ public:
virtual void ResetError() override;
SvPersistStream( SvClassManager &, SvStream * pStream,
- sal_uInt32 nStartIdx = 1 );
+ Index nStartIdx = 1 );
virtual ~SvPersistStream();
void SetStream( SvStream * pStream );
- SvPersistBase * GetObject( sal_uIntPtr nIdx ) const;
- sal_uIntPtr GetIndex( SvPersistBase * ) const;
+ SvPersistBase * GetObject( Index nIdx ) const;
+ Index GetIndex( SvPersistBase * ) const;
static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal );
static sal_uInt32 ReadCompressed( SvStream & rStm );