summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/font.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/font.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/font.cxx')
-rw-r--r--vcl/source/outdev/font.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 9b0a5ddc4823..71d3f21574b2 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1296,16 +1296,14 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
Point aOutPoint;
Rectangle aRectangle;
- for( int nStart = 0;;)
+ const GlyphItem* pGlyph;
+ int nStart = 0;
+ while (rSalLayout.GetNextGlyphs(1, &pGlyph, aOutPoint, nStart))
{
- sal_GlyphId aGlyphId;
- if( !rSalLayout.GetNextGlyphs( 1, &aGlyphId, aOutPoint, nStart ) )
- break;
-
- if( !mpGraphics->GetGlyphBoundRect( aGlyphId, aRectangle ) )
+ if (!mpGraphics->GetGlyphBoundRect(pGlyph->maGlyphId, aRectangle ) )
continue;
- if( !SalLayout::IsSpacingGlyph( aGlyphId ) )
+ if (!SalLayout::IsSpacingGlyph(pGlyph->maGlyphId))
{
Point aAdjPoint = aOffset;
aAdjPoint.X() += aRectangle.Left() + (aRectangle.GetWidth() - nEmphasisWidth) / 2;