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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user