sot/source/sdstor/stgelem.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
New commits: commit 8a0298fc1fd05e0bee69048ea12d360768d7ecd0 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Mon Feb 10 23:42:15 2014 +0100 remove commented code Change-Id: Ibc04f08b52d754263151ee66d03b58abe2f4e4ee diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index ed1a144..3ebc729 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -352,16 +352,11 @@ void StgEntry::GetName( OUString& rName ) const short StgEntry::Compare( const StgEntry& r ) const { - /* - short nRes = r.nNameLen - nNameLen; - if( !nRes ) return strcmp( r.aName, aName ); - else return nRes; - */ sal_Int32 nRes = r.nNameLen - nNameLen; if( !nRes ) nRes = r.aName.compareTo( aName ); + return (short)nRes; - //return aName.CompareTo( r.aName ); } // These load/store operations are a bit more complicated, commit b3621802219d3ad7d8eafbb9367903c9001a3602 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Mon Feb 10 23:38:32 2014 +0100 fix crash during xls import, related fdo#36580 Looks like a possibly invalid xls file but let us just do the right thing and not crash. Change-Id: Id96db06798cd19d96938ca84956046e5a5e5b529 diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 0ac6bae..ed1a144 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -299,7 +299,7 @@ bool StgEntry::SetName( const OUString& rName ) } int i; - for( i = 0; i < aName.getLength() && i < 32; i++ ) + for( i = 0; i < rName.getLength() && i < 32; i++ ) { nName[ i ] = rName[ i ]; } @@ -307,7 +307,7 @@ bool StgEntry::SetName( const OUString& rName ) { nName[ i++ ] = 0; } - nNameLen = ( aName.getLength() + 1 ) << 1; + nNameLen = ( rName.getLength() + 1 ) << 1; return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits