X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/SingleSubstitutionSubtables.cpp diff --git a/icuSources/layout/SingleSubstitutionSubtables.cpp b/icuSources/layout/SingleSubstitutionSubtables.cpp index 338c2a73..e66b305e 100644 --- a/icuSources/layout/SingleSubstitutionSubtables.cpp +++ b/icuSources/layout/SingleSubstitutionSubtables.cpp @@ -1,7 +1,6 @@ /* - * @(#)SingleSubstitutionSubtables.cpp 1.6 00/03/15 * - * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -15,7 +14,7 @@ U_NAMESPACE_BEGIN -le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { switch(SWAPW(subtableFormat)) { @@ -24,16 +23,16 @@ le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, cons case 1: { - const SingleSubstitutionFormat1Subtable *subtable = (const SingleSubstitutionFormat1Subtable *) this; + const LEReferenceTo subtable(base, success, (const SingleSubstitutionFormat1Subtable *) this); - return subtable->process(glyphIterator, filter); + return subtable->process(subtable, glyphIterator, success, filter); } case 2: { - const SingleSubstitutionFormat2Subtable *subtable = (const SingleSubstitutionFormat2Subtable *) this; + const LEReferenceTo subtable(base, success, (const SingleSubstitutionFormat2Subtable *) this); - return subtable->process(glyphIterator, filter); + return subtable->process(subtable, glyphIterator, success, filter); } default: @@ -41,10 +40,10 @@ le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, cons } } -le_uint32 SingleSubstitutionFormat1Subtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { TTGlyphID substitute = ((TTGlyphID) LE_GET_GLYPH(glyph)) + SWAPW(deltaGlyphID); @@ -59,10 +58,10 @@ le_uint32 SingleSubstitutionFormat1Subtable::process(GlyphIterator *glyphIterato return 0; } -le_uint32 SingleSubstitutionFormat2Subtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 SingleSubstitutionFormat2Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]);