jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp
changeset 16891 91e99bed64ae
parent 16889 3df90f344221
equal deleted inserted replaced
16890:36b30720a997 16891:91e99bed64ae
    45 
    45 
    46 NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2()
    46 NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2()
    47 {
    47 {
    48 }
    48 }
    49 
    49 
    50 NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader)
    50 NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(
    51     : SubtableProcessor2(morphSubtableHeader)
    51      const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
       
    52   : SubtableProcessor2(morphSubtableHeader, success)
    52 {
    53 {
    53 }
    54 }
    54 
    55 
    55 NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2()
    56 NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2()
    56 {
    57 {
    57 }
    58 }
    58 
    59 
    59 SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(const MorphSubtableHeader2 *morphSubtableHeader)
    60 SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(
       
    61       const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
    60 {
    62 {
    61     const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader;
    63     const LEReferenceTo<NonContextualGlyphSubstitutionHeader2> header(morphSubtableHeader, success);
       
    64     if(LE_FAILURE(success)) return NULL;
    62 
    65 
    63     switch (SWAPW(header->table.format))
    66     switch (SWAPW(header->table.format))
    64     {
    67     {
    65     case ltfSimpleArray:
    68     case ltfSimpleArray:
    66         return new SimpleArrayProcessor2(morphSubtableHeader);
    69       return new SimpleArrayProcessor2(morphSubtableHeader, success);
    67 
    70 
    68     case ltfSegmentSingle:
    71     case ltfSegmentSingle:
    69         return new SegmentSingleProcessor2(morphSubtableHeader);
    72       return new SegmentSingleProcessor2(morphSubtableHeader, success);
    70 
    73 
    71     case ltfSegmentArray:
    74     case ltfSegmentArray:
    72         return new SegmentArrayProcessor2(morphSubtableHeader);
    75       return new SegmentArrayProcessor2(morphSubtableHeader, success);
    73 
    76 
    74     case ltfSingleTable:
    77     case ltfSingleTable:
    75         return new SingleTableProcessor2(morphSubtableHeader);
    78       return new SingleTableProcessor2(morphSubtableHeader, success);
    76 
    79 
    77     case ltfTrimmedArray:
    80     case ltfTrimmedArray:
    78         return new TrimmedArrayProcessor2(morphSubtableHeader);
    81       return new TrimmedArrayProcessor2(morphSubtableHeader, success);
    79 
    82 
    80     default:
    83     default:
    81         return NULL;
    84         return NULL;
    82     }
    85     }
    83 }
    86 }