diff options
author | Rüdiger Timm <rt@openoffice.org> | 2003-12-01 08:59:25 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2003-12-01 08:59:25 +0000 |
commit | 70c51e4b90d099aeb8eee31253994f6ea688902e (patch) | |
tree | 00c23e09efc5bf62b3bc1970cb6610b9dd14995e /vcl | |
parent | 7a8e976a7471463421a47fddbdabd6b1d70d7503 (diff) |
INTEGRATION: CWS geordi2q10 (1.74.8); FILE MERGED
2003/11/27 10:28:56 rt 1.74.8.1: #111934#: join CWS vcl7pp1r2
Diffstat (limited to 'vcl')
-rwxr-xr-x | vcl/win/source/gdi/winlayout.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index c0d256e51faf..1ddf2d1e2710 100755 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -2,9 +2,9 @@ * * $RCSfile: winlayout.cxx,v $ * - * $Revision: 1.74 $ + * $Revision: 1.75 $ * - * last change: $Author: kz $ $Date: 2003-11-18 14:52:40 $ + * last change: $Author: rt $ $Date: 2003-12-01 09:59:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -814,16 +814,15 @@ int SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor return STRING_LEN; long nExtraWidth = mnBaseAdv * nFactor; - for( int i = 0; i < mnCharCount; ++i ) + for( int n = 0; n < mnCharCount; ++n ) { - nExtraWidth += mpCharWidths[ i ] * nFactor; + // skip unused characters + if( mpChars2Glyphs && (mpChars2Glyphs[n] < 0) ) + continue; + // add char widths until max + nExtraWidth += mpCharWidths[ n ] * nFactor; if( nExtraWidth >= nMaxWidth ) - { - if( mpGlyphs2Chars ) - return mpGlyphs2Chars[ i ]; - else - return (mnMinCharPos + i); - } + return (mnMinCharPos + n); nExtraWidth += nCharExtra; } |