Kaydet (Commit) c1edceb2 authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uInt16 to sal_Int32 with some cleanup

Change-Id: Ib6e42702dd1ce29645215114b26286f05ccc1332
üst c1122339
...@@ -322,20 +322,19 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const ...@@ -322,20 +322,19 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
return aToolString; return aToolString;
} }
// Create a simple hashcode: the first six characters were evaluated. // Create a simple hashcode: the first six characters are evaluated.
sal_uInt16 SbxVariable::MakeHashCode( const OUString& rName ) sal_uInt16 SbxVariable::MakeHashCode( const OUString& rName )
{ {
sal_uInt16 n = 0; sal_uInt16 n = 0;
sal_Int32 i = 0; sal_Int32 nLen = rName.getLength();
sal_uInt16 nLen = rName.getLength();
if( nLen > 6 ) if( nLen > 6 )
{ {
nLen = 6; nLen = 6;
} }
while( nLen-- ) for( sal_Int32 i=0; i<nLen; ++i )
{ {
sal_uInt8 c = (sal_uInt8)rName[i++]; sal_uInt8 c = static_cast<sal_uInt8>(rName[i]);
// If we have a commen sigen break!! // If we have a commen sigen break!!
if( c >= 0x80 ) if( c >= 0x80 )
{ {
......
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