vcl/source/window/mnemonic.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1de6d6c539ec49a9cbeba9ab4c11fe8b6b5f14e7 Author: xuenhua <xuenhua2...@sina.com> AuthorDate: Fri Apr 29 12:34:28 2022 +0800 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Apr 29 12:00:18 2022 +0200 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 <caol...@redhat.com> 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 )