From 408abfcc27a2459ef8f803bdf18fa90319bf4722 Mon Sep 17 00:00:00 2001 From: Herbert Duerr Date: Thu, 12 Jul 2001 11:56:20 +0000 Subject: #81268# reenable selection with SPACE key --- svx/source/dialog/charmap.cxx | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'svx/source/dialog/charmap.cxx') diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 786a5bb3258b..48484997d6d4 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: charmap.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: pb $ $Date: 2001-07-12 06:01:28 $ + * last change: $Author: hdu $ $Date: 2001-07-12 12:56:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,8 +95,6 @@ #include "charmap.hxx" #include "dialmgr.hxx" -class SubsetMap; - // class SvxCharMapData ================================================== class SvxCharMapData @@ -351,15 +349,6 @@ void SvxShowCharSet::KeyInput( const KeyEvent& rKEvt ) return; } - sal_Unicode cChar = (sal_Unicode)rKEvt.GetCharCode(); - int mapIndex = UnicodeToMapIndex( maFontCharMap, cChar ); - if ( mapIndex >= 0 && mapIndex < maFontCharMap.GetCharCount() ) - { - SelectIndex( mapIndex ); - aPreSelectHdl.Call( this ); - return; - } - int tmpSelected = nSelectedIndex; switch ( aCode.GetCode() ) @@ -392,8 +381,12 @@ void SvxShowCharSet::KeyInput( const KeyEvent& rKEvt ) tmpSelected = maFontCharMap.GetCharCount() - 1; break; default: - Control::KeyInput( rKEvt ); - tmpSelected = - 1; // mark as invalid + tmpSelected = UnicodeToMapIndex( maFontCharMap, rKEvt.GetCharCode() ); + if ( tmpSelected < 0 || tmpSelected >= maFontCharMap.GetCharCount() ) + { + Control::KeyInput( rKEvt ); + tmpSelected = - 1; // mark as invalid + } } if ( tmpSelected >= 0 ) -- cgit