summaryrefslogtreecommitdiff
path: root/vcl/source/window/mnemonic.cxx
diff options
context:
space:
mode:
authorMalte Timmermann <Malte.Timmermann@sun.com>2010-02-08 16:03:09 +0100
committerMalte Timmermann <Malte.Timmermann@sun.com>2010-02-08 16:03:09 +0100
commit614e8a2cb080c30cbbec0bd670d1730abb6ed0a3 (patch)
tree680eef6683179a530abfcc80bd15937f4e77a4f1 /vcl/source/window/mnemonic.cxx
parent4603fb29dc5661d175804121aed28972fa999572 (diff)
mtaccfixes: #i87415 Mnemonics need to be unambiguous
Diffstat (limited to 'vcl/source/window/mnemonic.cxx')
-rw-r--r--vcl/source/window/mnemonic.cxx68
1 files changed, 35 insertions, 33 deletions
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index 42e9b4aebdeb..bfb19a185bf9 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -335,39 +335,41 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
}
}
- if( ! bChanged )
- {
- /*
- * #97809# if all else fails use the first character of a word
- * anyway and live with duplicate mnemonics
- */
- nIndex = 0;
- do
- {
- c = aKey.GetChar( nIndex );
-
- nMnemonicIndex = ImplGetMnemonicIndex( c );
- if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
- {
- maMnemonics[nMnemonicIndex] = 0;
- rKey.Insert( MNEMONIC_CHAR, nIndex );
- bChanged = TRUE;
- break;
- }
-
- // Search for next word
- do
- {
- nIndex++;
- c = aKey.GetChar( nIndex );
- if ( c == ' ' )
- break;
- }
- while ( nIndex < nLen );
- nIndex++;
- }
- while ( nIndex < nLen );
- }
+// #i87415# Duplicates mnemonics are bad for consistent keyboard accessibility
+// It's probably better to not have mnemonics for some widgets, than to have ambiguous ones.
+// if( ! bChanged )
+// {
+// /*
+// * #97809# if all else fails use the first character of a word
+// * anyway and live with duplicate mnemonics
+// */
+// nIndex = 0;
+// do
+// {
+// c = aKey.GetChar( nIndex );
+//
+// nMnemonicIndex = ImplGetMnemonicIndex( c );
+// if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
+// {
+// maMnemonics[nMnemonicIndex] = 0;
+// rKey.Insert( MNEMONIC_CHAR, nIndex );
+// bChanged = TRUE;
+// break;
+// }
+//
+// // Search for next word
+// do
+// {
+// nIndex++;
+// c = aKey.GetChar( nIndex );
+// if ( c == ' ' )
+// break;
+// }
+// while ( nIndex < nLen );
+// nIndex++;
+// }
+// while ( nIndex < nLen );
+// }
return bChanged;
}