summaryrefslogtreecommitdiff
path: root/vcl/source/glyphs/graphite_layout.cxx
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-12-16 16:07:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-06 14:32:30 +0000
commita16aacd6474f02307341646ec08f9e1608a8615d (patch)
tree23d5a086d982d77329f2de6196c97c3139d9bdbf /vcl/source/glyphs/graphite_layout.cxx
parent8723bf714b6156396f30ac71c0268e5a51c76337 (diff)
Resolves: #i123840# add and use the sal_GlyphId type
Using the central definition adds consistency and cleans up many ad hoc declarations. The type sal_GlyphId will become a class in the future so that its bitfield operations etc. can then be isolated into nice methods. (cherry picked from commit c0a84ad10964fb7a65b6239cbe1cef8698b5d17b) Conflicts: vcl/aqua/source/gdi/salatslayout.cxx vcl/aqua/source/gdi/salgdi.cxx vcl/generic/glyphs/gcach_ftyp.cxx vcl/generic/print/genpspgraphics.cxx vcl/generic/print/glyphset.cxx vcl/generic/print/glyphset.hxx vcl/headless/svptext.cxx vcl/inc/generic/genpspgraphics.h vcl/inc/generic/glyphcache.hxx vcl/inc/os2/salgdi.h vcl/inc/quartz/salgdi.h vcl/inc/salgdi.hxx vcl/inc/sallayout.hxx vcl/inc/unx/salgdi.h vcl/inc/vcl/fontmanager.hxx vcl/inc/win/salgdi.h vcl/os2/source/gdi/os2layout.cxx vcl/os2/source/gdi/salgdi3.cxx vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/sallayout.cxx vcl/source/glyphs/gcach_ftyp.hxx vcl/source/glyphs/gcach_layout.cxx vcl/source/glyphs/glyphcache.cxx vcl/source/glyphs/graphite_layout.cxx vcl/unx/generic/fontmanager/fontmanager.cxx vcl/unx/generic/gdi/gcach_xpeer.cxx vcl/unx/generic/gdi/gcach_xpeer.hxx vcl/unx/generic/gdi/salgdi3.cxx vcl/unx/generic/gdi/xrender_peer.hxx vcl/unx/headless/svpgdi.hxx vcl/unx/headless/svppspgraphics.cxx vcl/unx/headless/svppspgraphics.hxx vcl/win/source/gdi/salgdi3.cxx vcl/win/source/gdi/winlayout.cxx Change-Id: Ic629131950360e2df4c15db30d6a5362193c6330
Diffstat (limited to 'vcl/source/glyphs/graphite_layout.cxx')
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 0231bb45ea88..89b6feef1b90 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -745,7 +745,7 @@ long GraphiteLayout::FillDXArray( sal_Int32* pDXArray ) const
assert( (mvChar2BaseGlyph[i] == -1) ||
((signed)(mvChar2BaseGlyph[i]) < (signed)mvGlyphs.size()));
if (mvChar2BaseGlyph[i] != -1 &&
- mvGlyphs[mvChar2BaseGlyph[i]].mnGlyphIndex == GF_DROPPED)
+ mvGlyphs[mvChar2BaseGlyph[i]].maGlyphId == GF_DROPPED)
{
// when used in MultiSalLayout::GetTextBreak dropped glyphs
// must have zero width
@@ -975,7 +975,7 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt
#endif
assert((nLastGlyph > -1) && (nLastGlyph < (signed)mvGlyphs.size()));
mvGlyphs[nLastGlyph].mnNewWidth += nDWidth;
- if (gi.mnGlyphIndex != GF_DROPPED)
+ if (gi.maGlyphId != GF_DROPPED)
mvGlyphs[nLastGlyph].mnNewWidth += nDWidth;
else
nDGlyphOrigin += nDWidth;
@@ -1040,7 +1040,7 @@ void GraphiteLayout::kashidaJustify(std::vector<int>& rDeltaWidths, sal_GlyphId
continue;
}
// no kashida-injection for blank justified expansion either
- if( IsSpacingGlyph( (*i).mnGlyphIndex ) )
+ if( IsSpacingGlyph( (*i).maGlyphId ) )
{
++i;
continue;
@@ -1055,7 +1055,7 @@ void GraphiteLayout::kashidaJustify(std::vector<int>& rDeltaWidths, sal_GlyphId
}
nKashidaCount = 1 + (nGapWidth / nKashidaWidth);
#ifdef GRLAYOUT_DEBUG
- printf("inserting %d kashidas at %u\n", nKashidaCount, (*i).mnGlyphIndex);
+ printf("inserting %d kashidas at %u\n", nKashidaCount, (*i).maGlyphId);
#endif
GlyphItem glyphItem = *i;
Point aPos(0, 0);
@@ -1110,7 +1110,7 @@ void GraphiteLayout::GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray
int nChar2Base = mvChar2BaseGlyph[nCharSlot];
assert((nChar2Base > -1) && (nChar2Base < (signed)mvGlyphs.size()));
GlyphItem gi = mvGlyphs[nChar2Base];
- if (gi.mnGlyphIndex == GF_DROPPED)
+ if (gi.maGlyphId == GF_DROPPED)
{
continue;
}
@@ -1224,7 +1224,7 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out,
assert(glyph_slot >= 0);
// Find the first glyph in the substring.
for (; glyph_slot < signed(mvGlyphs.size()) &&
- ((mvGlyphs.begin() + glyph_slot)->mnGlyphIndex == GF_DROPPED);
+ ((mvGlyphs.begin() + glyph_slot)->maGlyphId == GF_DROPPED);
++glyph_slot) {};
// Update the length
@@ -1266,7 +1266,7 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out,
}
// Copy out this glyphs data.
++glyph_slot;
- *glyph_out++ = glyph_itr->mnGlyphIndex;
+ *glyph_out++ = glyph_itr->maGlyphId;
// Find the actual advance - this must be correct if called from
// MultiSalLayout::AdjustLayout which requests one glyph at a time.
@@ -1296,13 +1296,13 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out,
break;
// Stop if glyph dropped
- if (glyph_itr->mnGlyphIndex == GF_DROPPED)
+ if (glyph_itr->maGlyphId == GF_DROPPED)
break;
}
int numGlyphs = glyph_slot - glyph_slot_begin;
// move the next glyph_slot to a glyph that hasn't been dropped
while (glyph_slot < static_cast<int>(mvGlyphs.size()) &&
- (mvGlyphs.begin() + glyph_slot)->mnGlyphIndex == GF_DROPPED)
+ (mvGlyphs.begin() + glyph_slot)->maGlyphId == GF_DROPPED)
++glyph_slot;
return numGlyphs;
}
@@ -1313,7 +1313,7 @@ void GraphiteLayout::MoveGlyph( int nGlyphIndex, long nNewPos )
// needs to be done carefully so the glyph/char maps are maintained
// If a glyph has been dropped then it wasn't returned by GetNextGlyphs, so
// the index here may be wrong
- while ((mvGlyphs[nGlyphIndex].mnGlyphIndex == GF_DROPPED) &&
+ while ((mvGlyphs[nGlyphIndex].maGlyphId == GF_DROPPED) &&
(nGlyphIndex < (signed)mvGlyphs.size()))
{
nGlyphIndex++;
@@ -1339,7 +1339,7 @@ void GraphiteLayout::DropGlyph( int nGlyphIndex )
return;
GlyphItem & glyph = mvGlyphs[nGlyphIndex];
- glyph.mnGlyphIndex = GF_DROPPED;
+ glyph.maGlyphId = GF_DROPPED;
#ifdef GRLAYOUT_DEBUG
fprintf(grLog(),"Dropped %d\n", nGlyphIndex);
#endif
@@ -1355,7 +1355,7 @@ void GraphiteLayout::Simplify( bool isBaseLayout )
long deltaX = 0;
while (gi != mvGlyphs.end())
{
- if (gi->mnGlyphIndex == dropMarker)
+ if (gi->maGlyphId == dropMarker)
{
deltaX += gi->mnNewWidth;
gi->mnNewWidth = 0;