framework/source/accelerators/acceleratorcache.cxx         |    1 -
 framework/source/accelerators/acceleratorconfiguration.cxx |    5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 038f0b06a2d7d90e7ea19f2233f2892d9c78a08c
Author:     Juergen Funk <juergen.funk...@cib.de>
AuthorDate: Wed Feb 15 12:25:10 2023 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
CommitDate: Mon Mar 20 11:37:40 2023 +0000

    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.mehrbr...@allotropia.de>

diff --git a/framework/source/accelerators/acceleratorcache.cxx 
b/framework/source/accelerators/acceleratorcache.cxx
index 0163654d4bf7..c0b819a2a9e8 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -116,7 +116,6 @@ void AcceleratorCache::removeCommand(const OUString& 
sCommand)
     {
         removeKey(lKey);
     }
-    m_lCommand2Keys.erase(sCommand);
 }
 
 } // namespace framework
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx 
b/framework/source/accelerators/acceleratorconfiguration.cxx
index 3507314a9a6e..48e0d362026e 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -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);

Reply via email to