[Libreoffice-commits] .: Branch 'libreoffice-3-4' - tools/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jul 12 03:46:04 PDT 2011


 tools/source/ref/globname.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 24016c09cb9ccab425a3cebd1cbdf0023a502ffa
Author: Radek Doulik <rodo at novell.com>
Date:   Mon Jul 11 20:36:47 2011 +0200

    fix regression in SvGlobalName::operator <
    
     - it was comparing wrong parts and ommiting part of ID's, resulting
       in wrong results and thus ::std::map didn't work well with default
       less compare function of it's keys
     - fixes fdo#32709
    (cherry picked from commit 345dc7961bc142f167a1b8e5f43f4439e8234f06)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 1163ced..7da4ffb 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -208,10 +208,10 @@ sal_Bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const
     else if( Data2_a == Data2_b )
     {
         sal_uInt32 Data1_a;
-        memcpy(&Data1_a, pImp->szData+4, sizeof(sal_uInt32));
+        memcpy(&Data1_a, pImp->szData, sizeof(sal_uInt32));
 
         sal_uInt32 Data1_b;
-        memcpy(&Data1_b, rObj.pImp->szData+4, sizeof(sal_uInt32));
+        memcpy(&Data1_b, rObj.pImp->szData, sizeof(sal_uInt32));
 
         return Data1_a  < Data1_b;
     }


More information about the Libreoffice-commits mailing list