diff options
author | Herbert Duerr <hdu@openoffice.org> | 2002-11-07 07:55:49 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2002-11-07 07:55:49 +0000 |
commit | 9673e1f403469c69ac129791d3ff7b007968ad45 (patch) | |
tree | 658346929942fc6814bf77865da93c57a954331c /vcl/source/gdi/metric.cxx | |
parent | fb4ac86f5ab8df5351cefb939ee9cf9c1bb948e7 (diff) |
#102084# fix FontCharmap::GetPrevChar()
Diffstat (limited to 'vcl/source/gdi/metric.cxx')
-rw-r--r-- | vcl/source/gdi/metric.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index 245a0a573dd1..c2963274df1d 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -2,9 +2,9 @@ * * $RCSfile: metric.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hdu $ $Date: 2002-06-03 14:21:42 $ + * last change: $Author: hdu $ $Date: 2002-11-07 08:55:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -292,9 +292,10 @@ sal_UCS4 FontCharMap::GetPrevChar( sal_UCS4 cChar ) const return GetLastChar(); int nRange = ImplFindRange( cChar ); - // inbetween ranges or first in range? - if( (nRange & 1) || (cChar == mpRangeCodes[ nRange ]) ) - return (mpRangeCodes[ nRange ] - 1); // last in prev range + if( nRange & 1 ) // inbetween ranges? + return (mpRangeCodes[ nRange ] - 1); + else if( cChar == mpRangeCodes[ nRange ] ) // first in prev range? + return (mpRangeCodes[ nRange-1 ] - 1); return (cChar - 1); } |