summaryrefslogtreecommitdiff
path: root/vcl/source/window/mnemonic.cxx
diff options
context:
space:
mode:
authorxuenhua <xuenhua2008@sina.com>2022-04-29 12:34:28 +0800
committerCaolán McNamara <caolanm@redhat.com>2022-04-29 12:00:18 +0200
commit1de6d6c539ec49a9cbeba9ab4c11fe8b6b5f14e7 (patch)
treee19ebf64c9aa1327286eebaa1296fa54da932b3c /vcl/source/window/mnemonic.cxx
parentfa88fd0fc8434a4a6077dd80afcd47464669d907 (diff)
Fix Method EraseAllMnemonicChars bug
MNEMONIC_RANGE_2_START and MNEMONIC_RANGE_2_END defined in 'core/include/vcl/mnemonic.hxx' are 'a' and 'z' This variable c is UpperCase, should be converted to lowercase, and thencompare with MNEMONIC_RANGE_2_START and MNEMONIC_RANGE_2_END. Change-Id: I721e293e88bf1b8260b7ea2dc39ae6a7fd4f3d79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133587 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/mnemonic.cxx')
-rw-r--r--vcl/source/window/mnemonic.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index d412b2ad4071..6e4b155c2af5 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -322,7 +322,7 @@ OUString MnemonicGenerator::EraseAllMnemonicChars( const OUString& rStr )
// check for CJK-style mnemonic
if( i > 0 && (i+2) < nLen )
{
- sal_Unicode c = sal_Unicode(rtl::toAsciiUpperCase(aStr[i+1]));
+ sal_Unicode c = sal_Unicode(rtl::toAsciiLowerCase(aStr[i+1]));
if( aStr[ i-1 ] == '(' &&
aStr[ i+2 ] == ')' &&
c >= MNEMONIC_RANGE_2_START && c <= MNEMONIC_RANGE_2_END )