diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-07-15 11:32:30 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-07-15 12:16:32 +0200 |
commit | 9a6ba2dacbcad6a326613a691b005348e3d8cedd (patch) | |
tree | 5ddf47f12aa9920b859942d145e797f35cc5e6fa /vcl | |
parent | 062de1e49312fda5e184d12576d37a569769bb86 (diff) |
fdo#66577: Cursor displaced in Web Layout
Using lrint() helps a bit, but does not fix the issue entirely.
Change-Id: Ib80e2c5a57d632f289e49322d3712c6321ae1ec2
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/coretext/ctlayout.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/coretext/ctlayout.cxx b/vcl/coretext/ctlayout.cxx index dd3b2ea26d96..935dc94242d3 100644 --- a/vcl/coretext/ctlayout.cxx +++ b/vcl/coretext/ctlayout.cxx @@ -342,7 +342,7 @@ int CTLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int& // convert glyph details for VCL *(pGlyphIDs++) = pCGGlyphIdx[ nSubIndex ]; if( pGlyphAdvances ) - *(pGlyphAdvances++) = pCGGlyphAdvs[ nSubIndex ].width; + *(pGlyphAdvances++) = lrint(pCGGlyphAdvs[ nSubIndex ].width); if( pCharIndexes ) *(pCharIndexes++) = pCGGlyphStrIdx[ nSubIndex] + mnMinCharPos; if( pFallbackFonts ) @@ -407,7 +407,7 @@ long CTLayout::FillDXArray( sal_Int32* pDXArray ) const CTRunGetStringIndices( pGlyphRun, aFullRange, &aIndexVec[0] ); for( int i = 0; i != nGlyphCount; ++i ) { const int nRelIdx = aIndexVec[i]; - pDXArray[ nRelIdx ] += aSizeVec[i].width; + pDXArray[ nRelIdx ] += lrint(aSizeVec[i].width); } } } @@ -501,10 +501,10 @@ bool CTLayout::GetBoundRect( SalGraphics& rGraphics, Rectangle& rVCLRect ) const CGContextRestoreGState( rAquaGraphics.mrContext ); - rVCLRect.Left() = aVclPos.x + aMacRect.origin.x; - rVCLRect.Right() = aVclPos.x + (aMacRect.origin.x + aMacRect.size.width); - rVCLRect.Bottom() = aVclPos.x - (aMacRect.origin.y); - rVCLRect.Top() = aVclPos.x - (aMacRect.origin.y + aMacRect.size.height); + rVCLRect.Left() = aVclPos.x + lrint(aMacRect.origin.x); + rVCLRect.Right() = aVclPos.x + lrint(aMacRect.origin.x + aMacRect.size.width); + rVCLRect.Bottom() = aVclPos.x - lrint(aMacRect.origin.y); + rVCLRect.Top() = aVclPos.x - lrint(aMacRect.origin.y + aMacRect.size.height); return true; } |