Can someone explain this to me?
In the code for getting the PAPX (getGrpprl of PAPFormattedDiskPage), the following code is used to determine the size of the PAPX:
[CODE]
int papxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * FC_SIZE) +
(index * BX_SIZE)));
int size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + papxOffset);
..other code elided ..
[/CODE]
What I don't understand is the papxOffset code and the size code. As I understand the documentation, the first byte of the PAPX (since we're in an FKP here) holds the count of words for this PAPX. So why isn't the papxOffset simply:
int papxOffset = _offset + ( ( ( _crun + 1 ) * FC_SIZE ) + ( index * BX_SIZE ) ) ) + 1;
I don't understand why you're getting the last byte of the BX's and then multiplying that value by 2. I don't see where in the documentation it says that the byte at that spot is something that indicates our offset for the PAPX's. (I may be missing something)
I ask because in using the above code, I keep getting weird values, such as my sprm types keep coming up as 0, which of course is not a valid type. Can someone explain the above code to me?
Thank you very much for any help you guys can give!
Robert
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
