From b894104a0b02a9b074c76feb925389d7bee6a493 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 8 Dec 2016 00:43:09 +0200 Subject: 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 Reviewed-by: Khaled Hosny --- vcl/quartz/salgdi.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl/quartz') diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index c2dba0242839..4b3a63ac140d 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -415,12 +415,12 @@ void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) CGAffineTransform aRotMatrix = CGAffineTransformMakeRotation(-rStyle.mfFontRotation); Point aPos; - sal_GlyphId aGlyphId; + const GlyphItem* pGlyph; std::vector aGlyphIds; std::vector aGlyphPos; std::vector aGlyphOrientation; int nStart = 0; - while (rLayout.GetNextGlyphs(1, &aGlyphId, aPos, nStart)) + while (rLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart)) { CGPoint aGCPos = CGPointMake(aPos.X(), -aPos.Y()); @@ -429,7 +429,7 @@ void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) if (rStyle.mfFontRotation) { - if ((aGlyphId & GF_ROTMASK) == GF_ROTL) + if ((pGlyph->maGlyphId & GF_ROTMASK) == GF_ROTL) { bUprightGlyph = true; // Adjust the position of upright (vertical) glyphs. @@ -442,7 +442,7 @@ void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) } } - aGlyphIds.push_back(aGlyphId & GF_IDXMASK); + aGlyphIds.push_back(pGlyph->maGlyphId & GF_IDXMASK); aGlyphPos.push_back(aGCPos); aGlyphOrientation.push_back(bUprightGlyph); } -- cgit