summaryrefslogtreecommitdiff
path: root/vcl/source/window/mnemonic.cxx
diff options
context:
space:
mode:
authorth <th@openoffice.org>2001-06-11 08:56:52 +0000
committerth <th@openoffice.org>2001-06-11 08:56:52 +0000
commit3f7be2829dfe6b0690dd4613b0b70e7c707f189a (patch)
tree10029bb96c2f8aebfa7c6efb2857d390d52c91ff /vcl/source/window/mnemonic.cxx
parent67e564c2812a91e31bef773cd7bb5926530beb12 (diff)
#87205# - Also ..., >> and some other characters are now handle correct for CJK-AutoMnemonics
Diffstat (limited to 'vcl/source/window/mnemonic.cxx')
-rw-r--r--vcl/source/window/mnemonic.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index 274d8b664c08..1fa3e8d41fd5 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: mnemonic.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: th $ $Date: 2001-06-08 13:52:07 $
+ * last change: $Author: th $ $Date: 2001-06-11 09:56:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -279,8 +279,19 @@ BOOL ImplMnemonicGenerator::CreateMnemonic( XubString& rKey )
aStr += c;
aStr += ')';
nIndex = rKey.Len();
- if ( (rKey.GetChar( nIndex-1 ) == ':') ||
- (rKey.GetChar( nIndex-1 ) == 0xFF1A) )
+ static sal_Unicode cGreaterGreater[] = { 0xFF1E, 0xFF1E };
+ if ( rKey.EqualsAscii( ">>", nIndex-2, 2 ) ||
+ rKey.Equals( cGreaterGreater, nIndex-2, 2 ) )
+ nIndex -= 2;
+ static sal_Unicode cDotDotDot[] = { 0xFF0E, 0xFF0E, 0xFF0E };
+ if ( rKey.EqualsAscii( "...", nIndex-3, 3 ) ||
+ rKey.Equals( cDotDotDot, nIndex-3, 3 ) )
+ nIndex -= 3;
+ sal_Unicode cLastChar = rKey.GetChar( nIndex-1 );
+ if ( (cLastChar == ':') || (cLastChar == 0xFF1A) ||
+ (cLastChar == '.') || (cLastChar == 0xFF0E) ||
+ (cLastChar == '?') || (cLastChar == 0xFF1F) ||
+ (cLastChar == ' ') )
nIndex--;
rKey.Insert( aStr, nIndex );
bChanged = TRUE;