little optimization in accelerators
remove double calls Change-Id: I4242067bdc0fdcc5184d555bb293f17d66965fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147094 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
This commit is contained in:
committed by
Samuel Mehrbrodt
parent
c6dffdf014
commit
038f0b06a2
@@ -116,7 +116,6 @@ void AcceleratorCache::removeCommand(const OUString& sCommand)
|
||||
{
|
||||
removeKey(lKey);
|
||||
}
|
||||
m_lCommand2Keys.erase(sCommand);
|
||||
}
|
||||
|
||||
} // namespace framework
|
||||
|
@@ -614,10 +614,9 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeKeyEvent(const css::awt::K
|
||||
|
||||
if (rPrimaryCache.hasKey(aKeyEvent))
|
||||
{
|
||||
OUString sDelCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
|
||||
if (!sDelCommand.isEmpty())
|
||||
OUString sOriginalCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
|
||||
if (!sOriginalCommand.isEmpty())
|
||||
{
|
||||
OUString sOriginalCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
|
||||
if (rSecondaryCache.hasCommand(sOriginalCommand))
|
||||
{
|
||||
AcceleratorCache::TKeyList lSecondaryKeys = rSecondaryCache.getKeysByCommand(sOriginalCommand);
|
||||
|
Reference in New Issue
Block a user