--- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp Tue Feb 26 10:07:26 2013 -0800
+++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp Thu Mar 07 10:02:20 2013 -0800
@@ -43,11 +43,14 @@
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor)
-IndicRearrangementProcessor::IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader)
- : StateTableProcessor(morphSubtableHeader)
+ IndicRearrangementProcessor::IndicRearrangementProcessor(const LEReferenceTo<MorphSubtableHeader> &morphSubtableHeader, LEErrorCode &success)
+ : StateTableProcessor(morphSubtableHeader, success),
+ indicRearrangementSubtableHeader(morphSubtableHeader, success),
+ entryTable(stateTableHeader, success, (const IndicRearrangementStateEntry*)(&stateTableHeader->stHeader),
+ entryTableOffset, LE_UNBOUNDED_ARRAY),
+ int16Table(stateTableHeader, success, (const le_int16*)entryTable.getAlias(), 0, LE_UNBOUNDED_ARRAY)
+
{
- indicRearrangementSubtableHeader = (const IndicRearrangementSubtableHeader *) morphSubtableHeader;
- entryTable = (const IndicRearrangementStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset);
}
IndicRearrangementProcessor::~IndicRearrangementProcessor()
@@ -62,7 +65,8 @@
ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
{
- const IndicRearrangementStateEntry *entry = &entryTable[index];
+ LEErrorCode success = LE_NO_ERROR; // todo- make a param?
+ const IndicRearrangementStateEntry *entry = entryTable.getAlias(index,success);
ByteOffset newState = SWAPW(entry->newStateOffset);
IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags);