summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-22 15:53:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-22 17:17:48 +0100
commita997f6224201dff31dcadf91163876b4d8f557d0 (patch)
treeeb884b654cd44daebbd2d49d8c733e8a0e9aedd4 /framework
parentaaff8a5cde6b3df9efdf4cf18157c9318c463e1a (diff)
cleanup AcceleratorCache
(1) reduce visibility of stuff nothing is using outside the class (2) remove noise comments Change-Id: Icea829ef92d6121b957ad47a992ef7ac04656af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127324 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/inc/accelerators/acceleratorcache.hxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/framework/source/inc/accelerators/acceleratorcache.hxx b/framework/source/inc/accelerators/acceleratorcache.hxx
index b64177d56d77..adfdf8fe5aa2 100644
--- a/framework/source/inc/accelerators/acceleratorcache.hxx
+++ b/framework/source/inc/accelerators/acceleratorcache.hxx
@@ -42,18 +42,18 @@ namespace framework
*/
class AcceleratorCache
{
-
- // const, types
-
public:
- /** TODO document me
+ /**
commands -> keys
*/
typedef ::std::vector< css::awt::KeyEvent > TKeyList;
+
+ private:
+
typedef std::unordered_map<OUString, TKeyList> TCommand2Keys;
- /** TODO document me
+ /**
keys -> commands
*/
typedef std::unordered_map< css::awt::KeyEvent ,
@@ -61,10 +61,6 @@ class AcceleratorCache
KeyEventHashCode ,
KeyEventEqualsFunc > TKey2Commands;
- // member
-
- private:
-
/** map commands to keys in relation 1:n.
First key is interpreted as preferred one! */
TCommand2Keys m_lCommand2Keys;
@@ -72,8 +68,6 @@ class AcceleratorCache
/** map keys to commands in relation 1:1. */
TKey2Commands m_lKey2Commands;
- // interface
-
public:
/** @short checks if the specified key exists.
@@ -86,7 +80,6 @@ class AcceleratorCache
bool hasKey(const css::awt::KeyEvent& aKey) const;
bool hasCommand(const OUString& sCommand) const;
- /** TODO document me */
TKeyList getAllKeys() const;
/** @short add a new or change an existing key-command pair
@@ -112,10 +105,7 @@ class AcceleratorCache
*/
TKeyList getKeysByCommand(const OUString& sCommand) const;
- /** TODO */
OUString getCommandByKey(const css::awt::KeyEvent& aKey) const;
-
- /** TODO */
void removeKey(const css::awt::KeyEvent& aKey);
void removeCommand(const OUString& sCommand);
};