diff options
Diffstat (limited to 'framework/source/accelerators/keymapping.cxx')
-rw-r--r-- | framework/source/accelerators/keymapping.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/framework/source/accelerators/keymapping.cxx b/framework/source/accelerators/keymapping.cxx index 1a5648c8d43a..be0c4c27f291 100644 --- a/framework/source/accelerators/keymapping.cxx +++ b/framework/source/accelerators/keymapping.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/awt/Key.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <o3tl/string_view.hxx> namespace framework { @@ -135,6 +136,9 @@ KeyMapping::KeyIdentifierInfo const KeyMapping::KeyIdentifierMap[] = {css::awt::Key::BRACKETRIGHT , "KEY_BRACKETRIGHT" }, {css::awt::Key::SEMICOLON , "KEY_SEMICOLON" }, {css::awt::Key::QUOTERIGHT , "KEY_QUOTERIGHT" }, + {css::awt::Key::RIGHTCURLYBRACKET, "KEY_RIGHTCURLYBRACKET" }, + {css::awt::Key::NUMBERSIGN, "KEY_NUMBERSIGN" }, + {css::awt::Key::COLON , "KEY_COLON" }, {0 , "" } // mark the end of this array! }; @@ -186,10 +190,10 @@ OUString KeyMapping::mapCodeToIdentifier(sal_uInt16 nCode) return OUString::number(nCode); } -bool KeyMapping::impl_st_interpretIdentifierAsPureKeyCode(const OUString& sIdentifier, +bool KeyMapping::impl_st_interpretIdentifierAsPureKeyCode(std::u16string_view sIdentifier, sal_uInt16& rCode ) { - sal_Int32 nCode = sIdentifier.toInt32(); + sal_Int32 nCode = o3tl::toInt32(sIdentifier); if (nCode > 0) { rCode = static_cast<sal_uInt16>(nCode); @@ -199,7 +203,7 @@ bool KeyMapping::impl_st_interpretIdentifierAsPureKeyCode(const OUString& sIdent // 0 is normally an error of the called method toInt32() ... // But we must be aware, that the identifier is "0"! rCode = 0; - return sIdentifier == "0"; + return sIdentifier == u"0"; } } // namespace framework |