void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey)
{ // check if key exists
TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey); if (pKey == m_lKey2Commands.end()) return;
// get its registered command // Because we must know its place inside the optimized // structure, which bind keys to commands, too!
OUString sCommand = pKey->second;
pKey = m_lKey2Commands.end(); // nobody should use an undefined value .-)
// remove key from primary list
m_lKey2Commands.erase(aKey);
// get keylist for that command
TCommand2Keys::iterator pCommand = m_lCommand2Keys.find(sCommand); if (pCommand == m_lCommand2Keys.end()) return;
TKeyList& lKeys = pCommand->second;
// one or more keys assign if (lKeys.size() == 1) // remove key from optimized command list
m_lCommand2Keys.erase(sCommand); else// only remove this key from the keylist
{ auto pKeys = ::std::find(lKeys.begin(), lKeys.end(), aKey);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.