X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/SingleSubstitutionSubtables.cpp diff --git a/icuSources/layout/SingleSubstitutionSubtables.cpp b/icuSources/layout/SingleSubstitutionSubtables.cpp index ae72ddfd..e66b305e 100644 --- a/icuSources/layout/SingleSubstitutionSubtables.cpp +++ b/icuSources/layout/SingleSubstitutionSubtables.cpp @@ -1,6 +1,6 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -14,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)) { @@ -23,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: @@ -40,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); @@ -58,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]);