diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2007-11-26 12:44:52 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2007-11-26 12:44:52 +0000 |
commit | 73d1d08c1da7c8f58bff07cb1f8629b9c7d02c78 (patch) | |
tree | 039b5b7261eabadccbfc1faedd32de54f4788c15 /framework/source/accelerators/acceleratorcache.cxx | |
parent | e8fea983571a79e9681a7471b2a8d4527936f279 (diff) |
INTEGRATION: CWS fwk72 (1.5.154); FILE MERGED
2007/09/06 11:39:26 as 1.5.154.1: #i72558# support removing of commands
Diffstat (limited to 'framework/source/accelerators/acceleratorcache.cxx')
-rw-r--r-- | framework/source/accelerators/acceleratorcache.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx index efb6e85c8cfc..fdfdaf38a58a 100644 --- a/framework/source/accelerators/acceleratorcache.cxx +++ b/framework/source/accelerators/acceleratorcache.cxx @@ -4,9 +4,9 @@ * * $RCSfile: acceleratorcache.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-16 13:40:27 $ + * last change: $Author: ihi $ $Date: 2007-11-26 13:44:52 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -245,9 +245,24 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey) } //----------------------------------------------- -void AcceleratorCache::removeCommand(const ::rtl::OUString& /*sCommand*/) +void AcceleratorCache::removeCommand(const ::rtl::OUString& sCommand) { - LOG_WARNING("AcceleratorCache::removeCommand()", "TODO implement me") + // SAFE -> ---------------------------------- + WriteGuard aWriteLock(m_aLock); + + const TKeyList& lKeys = getKeysByCommand(sCommand); + AcceleratorCache::TKeyList::const_iterator pKey ; + for ( pKey = lKeys.begin(); + pKey != lKeys.end() ; + ++pKey ) + { + const css::awt::KeyEvent& rKey = *pKey; + removeKey(rKey); + } + m_lCommand2Keys.erase(sCommand); + + aWriteLock.unlock(); + // <- SAFE ---------------------------------- } } // namespace framework |