summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/textline.cxx
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-12-08 00:43:09 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-12-10 00:58:26 +0000
commitb894104a0b02a9b074c76feb925389d7bee6a493 (patch)
tree93e8a9362281f2c992f503a4e38ec17d04a9132b /vcl/source/outdev/textline.cxx
parentb52167df08511239c3d08904a3d12a3c92141f38 (diff)
Pass GlyphItem around
We have this nice structure that contains (almost) all the information we need, so pass it around instead of passing separate fragments of said information. The ultimate is to kill the horrible sal_GlyphId hack if encoding various bits of information in the higher bits of a 32-bit integer. Change-Id: Ie496bb4c2932157527a388e2a94e46bf0a325a70 Reviewed-on: https://gerrit.libreoffice.org/31781 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/source/outdev/textline.cxx')
-rw-r--r--vcl/source/outdev/textline.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index d742e8fcf098..c16fd4aa6511 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -752,15 +752,12 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
DeviceCoordinate nDist = 0;
DeviceCoordinate nWidth = 0;
DeviceCoordinate nAdvance = 0;
- for( int nStart = 0;;)
+ const GlyphItem* pGlyph;
+ int nStart = 0;
+ while (rSalLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart))
{
- // iterate through the layouted glyphs
- sal_GlyphId aGlyphId;
- if( !rSalLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
- break;
-
// calculate the boundaries of each word
- if( !SalLayout::IsSpacingGlyph( aGlyphId ) )
+ if (!SalLayout::IsSpacingGlyph(pGlyph->maGlyphId))
{
if( !nWidth )
{