Kaydet (Commit) 8d4d1766 authored tarafından Michael Meeks's avatar Michael Meeks

cleanup UHashMap fix.

üst e89b0abf
...@@ -921,55 +921,12 @@ UINT32 UHashMap::getId( const OUString& rCompareString ) ...@@ -921,55 +921,12 @@ UINT32 UHashMap::getId( const OUString& rCompareString )
return it->second; return it->second;
} }
UHashMapEntry pSdrShapeIdentifierMap[] =
{
{ RTL_CONSTASCII_STRINGPARAM(""), 0 )
};
// ---------------------------------------------------------------------
UHashMap aSdrShapeIdentifierMap( pSdrShapeIdentifierMap );
UHashMap::UHashMap( UHashMapEntry* pMap )
{
while( pMap->aIdentifier.getLength() )
{
OUString aStr( pMap->aIdentifier );
size_t nHash = aStr.hashCode() & (HASHARRAYSIZE-1);
m_aHashList[nHash].Insert(pMap);
pMap++;
}
}
// ---------------------------------------------------------------------
UINT32 UHashMap::getId( const OUString& rCompareString )
{
size_t nHash = rCompareString.hashCode() & (HASHARRAYSIZE-1);
UHashMapEntryList& rList = m_aHashList[nHash];
UHashMapEntry * pMap = rList.First();
while(pMap)
{
if( rCompareString == pMap->aIdentifier )
return pMap->nId;
pMap = rList.Next();
}
return UHASHMAP_NOTFOUND;
}
/*********************************************************************** /***********************************************************************
* class SvxUnoPropertyMapProvider * * class SvxUnoPropertyMapProvider *
***********************************************************************/ ***********************************************************************/
SvxUnoPropertyMapProvider aSvxMapProvider;
EXTERN_C EXTERN_C
#if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC )) #if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC ))
int _stdcall int _stdcall
......
...@@ -1385,7 +1385,7 @@ void SAL_CALL SvxShape::setName( const ::rtl::OUString& aName ) throw(::com::sun ...@@ -1385,7 +1385,7 @@ void SAL_CALL SvxShape::setName( const ::rtl::OUString& aName ) throw(::com::sun
//---------------------------------------------------------------------- //----------------------------------------------------------------------
OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException) OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException)
{ {
if( !aShapeType.getLength() ) if( !maShapeType.getLength() )
return UHashMap::getNameFromId( mpImpl->mnObjId ); return UHashMap::getNameFromId( mpImpl->mnObjId );
else else
return maShapeType; return maShapeType;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment