diff options
author | xuenhua <xuenhua2008@sina.com> | 2022-04-29 12:34:28 +0800 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-04-30 22:48:21 +0200 |
commit | dd4c66095790993b0ba6a50a17ffff2908ac00cb (patch) | |
tree | 871ca9aa2f9c876c126e3501cfb9b78f18b85495 /vcl/source | |
parent | 0844dd442e9805788ed940055c74d070e184121a (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133619
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/mnemonic.cxx | 2 |
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 ) |