summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-02 17:29:53 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-02 17:29:53 +0000
commitd2a0296db073b174b438171785cfaee078fbadf3 (patch)
tree202dfee7b391cd940072f3907d102edba4282d46 /vcl
parentb59554e76788f5b4b6a5206d6ee89e006db55b45 (diff)
INTEGRATION: CWS geordi2q14 (1.76.28); FILE MERGED
2004/01/28 16:38:30 hr 1.76.28.1: #111934#: merge CWS vcl7pp1r3
Diffstat (limited to 'vcl')
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx22
1 files changed, 7 insertions, 15 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index f3398d9b0be1..c74823b57581 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.76 $
+ * $Revision: 1.77 $
*
- * last change: $Author: vg $ $Date: 2004-01-06 14:57:15 $
+ * last change: $Author: hr $ $Date: 2004-02-02 18:29:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -830,7 +830,7 @@ int SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor
void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const
{
- long nXPos = 0;
+ long nXPos = mnBaseAdv;
if( !mpGlyphs2Chars )
{
@@ -851,8 +851,9 @@ void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const
int nLeftIdx = 0;
for( i = 0; i < mnGlyphCount; ++i )
{
- long nXRight = nXPos + mpGlyphAdvances[ i ];
- int nCurrIdx = 2 * (mpGlyphs2Chars[ i ] - mnMinCharPos);
+ int nCurrIdx = mpGlyphs2Chars[ i ] - mnMinCharPos;
+ long nXRight = nXPos + mpCharWidths[ nCurrIdx ];
+ nCurrIdx *= 2;
if( nLeftIdx <= nCurrIdx )
{
// normal positions for LTR case
@@ -866,16 +867,7 @@ void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const
pCaretXArray[ nCurrIdx+1 ] = nXPos;
}
nLeftIdx = nCurrIdx;
- nXPos = nXRight;
- }
-
- // fixup unknown character positions to neighbor
- for( i = 0; i < nMaxIdx; ++i )
- {
- if( pCaretXArray[ i ] >= 0 )
- nXPos = pCaretXArray[ i ];
- else
- pCaretXArray[ i ] = nXPos;
+ nXPos += mpGlyphAdvances[ i ];
}
}
}