// Grab the 4 byte value that tells us what properties follow
int paraFlags = LittleEndian.getInt(rawContents,pos);
pos += 4;
// Now make sense of those properties
TextPropCollection thisCollection = new TextPropCollection(textLen, paraIgn);
int plSize = thisCollection.buildTextPropList(
paraFlags, paragraphTextPropTypes, rawContents, pos);
pos += plSize;
// Save this properties set
paragraphStyles.add(thisCollection);
// Handle extra 1 paragraph styles at the end
if(pos < rawContents.length && textHandled == size) {
prsize++;
}
}
if (rawContents.length > 0 && textHandled != (size+1)){
logger.log(POILogger.WARN, "Problem reading paragraph style runs: textHandled = " + textHandled + ", text.size+1 = " + (size+1));
}
// Now do the character stylings
textHandled = 0;
int chsize = size;
while(pos < rawContents.length && textHandled < chsize) {
// First up, fetch the number of characters this applies to
int textLen = LittleEndian.getInt(rawContents,pos);
textHandled += textLen;
pos += 4;
// There is no 2 byte value
short no_val = -1;
// Grab the 4 byte value that tells us what properties follow
int charFlags = LittleEndian.getInt(rawContents,pos);
pos += 4;
// Now make sense of those properties
// (Assuming we actually have some)
TextPropCollection thisCollection = new TextPropCollection(textLen, no_val);
int chSize = thisCollection.buildTextPropList(
charFlags, characterTextPropTypes, rawContents, pos);
pos += chSize;
// Save this properties set
charStyles.add(thisCollection);