summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-04 23:01:46 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-05 11:10:18 -0400
commit8f555e3be27768a7a9a80b5ce4cba95ea1cd2880 (patch)
tree38d3bea2b3af97e3666ed1eca3f1a1268f5d7c71 /tools
parente7dc75ace3ba42d8f7f4736bac66a218cec5f39e (diff)
Use signed 32-bit integer as class IDs.
To allow UNO field type values to be used. Change-Id: If03d3f37cf5b050fe080771c799c3e82c0264a4a
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/pstm.hxx14
-rw-r--r--tools/source/ref/pstm.cxx4
2 files changed, 9 insertions, 9 deletions
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index c9899773833c..4f338a7f15b6 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -48,11 +48,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** );
class TOOLS_DLLPUBLIC SvClassManager
{
- typedef boost::unordered_map< sal_uInt16, SvCreateInstancePersist > Map;
+ typedef boost::unordered_map<sal_Int32, SvCreateInstancePersist> Map;
Map aAssocTable;
public:
- void Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc );
- SvCreateInstancePersist Get( sal_uInt16 nClassId );
+ void Register( sal_Int32 nClassId, SvCreateInstancePersist pFunc );
+ SvCreateInstancePersist Get( sal_Int32 nClassId );
};
/************************** S v R t t i B a s e **************************/
@@ -67,11 +67,11 @@ SV_DECL_IMPL_REF(SvRttiBase)
/*************************************************************************/
#define SV_DECL_PERSIST( Class, CLASS_ID ) \
TYPEINFO(); \
- static sal_uInt16 StaticClassId() { return CLASS_ID; } \
+ static sal_Int32 StaticClassId() { return CLASS_ID; } \
static void * CreateInstance( SvPersistBase ** ppBase ); \
friend SvPersistStream& operator >> ( SvPersistStream & rStm, \
Class *& rpObj); \
- virtual sal_uInt16 GetClassId() const; \
+ virtual sal_Int32 GetClassId() const; \
virtual void Load( SvPersistStream & ); \
virtual void Save( SvPersistStream & );
@@ -85,7 +85,7 @@ SV_DECL_IMPL_REF(SvRttiBase)
*ppBase = p; \
return p; \
} \
- sal_uInt16 Class::GetClassId() const \
+ sal_Int32 Class::GetClassId() const \
{ return StaticClassId(); } \
SvPersistStream& operator >> (SvPersistStream & rStm, Class *& rpObj)\
{ \
@@ -108,7 +108,7 @@ class SvPersistStream;
class SvPersistBase : public SvRttiBase
{
public:
- virtual sal_uInt16 GetClassId() const = 0;
+ virtual sal_Int32 GetClassId() const = 0;
virtual void Load( SvPersistStream & ) = 0;
virtual void Save( SvPersistStream & ) = 0;
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm,
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index cba50700c7be..966aaace7ac2 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -37,7 +37,7 @@
/************************************************************************
|* SvClassManager::Register()
*************************************************************************/
-void SvClassManager::Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc )
+void SvClassManager::Register( sal_Int32 nClassId, SvCreateInstancePersist pFunc )
{
#ifdef DBG_UTIL
SvCreateInstancePersist p;
@@ -50,7 +50,7 @@ void SvClassManager::Register( sal_uInt16 nClassId, SvCreateInstancePersist pFun
/************************************************************************
|* SvClassManager::Get()
*************************************************************************/
-SvCreateInstancePersist SvClassManager::Get( sal_uInt16 nClassId )
+SvCreateInstancePersist SvClassManager::Get( sal_Int32 nClassId )
{
Map::const_iterator i(aAssocTable.find(nClassId));
return i == aAssocTable.end() ? 0 : i->second;