summaryrefslogtreecommitdiff
path: root/idl/inc/hash.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-27 07:52:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-27 12:59:46 +0000
commitf75694e5b13236248171885633b0a3612940e04a (patch)
tree68dc468fde558672059ec50a7966a6461844ddaf /idl/inc/hash.hxx
parent41e92ab2b7a8fcb7f5738f656bdac47bc0847f29 (diff)
ByteString->rtl::OString
Diffstat (limited to 'idl/inc/hash.hxx')
-rw-r--r--idl/inc/hash.hxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
index 6449dfd7b9e6..733f0ebbdb93 100644
--- a/idl/inc/hash.hxx
+++ b/idl/inc/hash.hxx
@@ -40,12 +40,12 @@ class SvHashTable
sal_uInt32 lAsk; // number of requests
sal_uInt32 lTry; // number of tries
protected:
- sal_Bool Test_Insert( const void *, sal_Bool bInsert, sal_uInt32 * pInsertPos );
+ sal_Bool Test_Insert( const rtl::OString&, sal_Bool bInsert, sal_uInt32 * pInsertPos );
// compare element with entry
- virtual StringCompare Compare( const void * , sal_uInt32 ) const = 0;
+ virtual bool equals( const rtl::OString& , sal_uInt32 ) const = 0;
// get hash value from subclass
- virtual sal_uInt32 HashFunc( const void * ) const = 0;
+ virtual sal_uInt32 HashFunc( const rtl::OString& ) const = 0;
public:
SvHashTable( sal_uInt32 nMaxEntries );
virtual ~SvHashTable();
@@ -59,20 +59,20 @@ class SvStringHashTable;
class SvStringHashEntry : public SvRefBase
{
friend class SvStringHashTable;
- ByteString aName;
+ rtl::OString aName;
sal_uInt32 nHashId;
sal_uLong nValue;
sal_Bool bHasId;
public:
SvStringHashEntry() : bHasId( sal_False ) {;}
- SvStringHashEntry( const ByteString & rName, sal_uInt32 nIdx )
+ SvStringHashEntry( const rtl::OString& rName, sal_uInt32 nIdx )
: aName( rName )
, nHashId( nIdx )
, nValue( 0 )
, bHasId( sal_True ) {}
~SvStringHashEntry();
- const ByteString & GetName() const { return aName; }
+ const rtl::OString& GetName() const { return aName; }
sal_Bool HasId() const { return bHasId; }
sal_uInt32 GetId() const { return nHashId; }
@@ -101,17 +101,17 @@ class SvStringHashTable : public SvHashTable
{
SvStringHashEntry* pEntries;
protected:
- virtual sal_uInt32 HashFunc( const void * pElement ) const;
- virtual StringCompare Compare( const void * pElement, sal_uInt32 nIndex ) const;
+ virtual sal_uInt32 HashFunc( const rtl::OString& rElement ) const;
+ virtual bool equals( const rtl::OString &rElement, sal_uInt32 nIndex ) const;
public:
SvStringHashTable( sal_uInt32 nMaxEntries ); // max size of hash-tabel
virtual ~SvStringHashTable();
- ByteString GetNearString( const ByteString & rName ) const;
+ rtl::OString GetNearString( const rtl::OString& rName ) const;
virtual sal_Bool IsEntry( sal_uInt32 nIndex ) const;
- sal_Bool Insert( const ByteString & rStr, sal_uInt32 * pHash ); // insert string
- sal_Bool Test( const ByteString & rStr, sal_uInt32 * pHash ) const; // test of insert string
+ sal_Bool Insert( const rtl::OString& rStr, sal_uInt32 * pHash ); // insert string
+ sal_Bool Test( const rtl::OString& rStr, sal_uInt32 * pHash ) const; // test of insert string
SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string
SvStringHashEntry & operator []( sal_uInt32 nPos ) const
{ return pEntries[ nPos ]; }