vcl/source/window/accel.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 20d6bd273c43a9b8573fa077f6d9d631bd2d53cc
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Dec 12 16:18:37 2011 +0000

    pair::second is false if element with same key already existed
    
    The pair::second element in the pair is set to true if a new element was
    inserted or false if an element with the same value existed

diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index e755d48..50afd2b 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -271,7 +271,7 @@ void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, 
const KeyCode& rKeyCode,
         OSL_FAIL( "Accelerator::InsertItem(): KeyCode with KeyCode 0 not 
allowed" );
         delete pEntry;
     }
-    else if ( mpData->maKeyMap.insert( std::make_pair( nCode, pEntry ) 
).second )
+    else if ( !mpData->maKeyMap.insert( std::make_pair( nCode, pEntry ) 
).second )
     {
         OSL_TRACE( "Accelerator::InsertItem(): KeyCode (Key: %lx) already 
exists", nCode );
         delete pEntry;
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to