summaryrefslogtreecommitdiff
path: root/sot/source/sdstor/stgelem.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sot/source/sdstor/stgelem.cxx')
-rw-r--r--sot/source/sdstor/stgelem.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 4b29e10c7075..3e1dc9543d4a 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -350,13 +350,12 @@ void StgEntry::GetName( OUString& rName ) const
// Compare two entries. Do this case-insensitive.
-short StgEntry::Compare( const StgEntry& r ) const
+sal_Int32 StgEntry::Compare( const StgEntry& r ) const
{
- sal_Int32 nRes = r.nNameLen - nNameLen;
- if( !nRes )
- nRes = r.aName.compareTo( aName );
-
- return (short)nRes;
+ if (r.nNameLen != nNameLen)
+ return r.nNameLen > nNameLen ? 1 : -1;
+ else
+ return r.aName.compareTo(aName);
}
// These load/store operations are a bit more complicated,