https://issues.apache.org/bugzilla/show_bug.cgi?id=44886





--- Comment #7 from Josh Micich <[EMAIL PROTECTED]>  2008-04-28 01:38:16 PST ---
(In reply to comment #4)
> If we can trust the comments in that document, then:
>   3. The means of determining this is
>      blip_instance ^ blip_signature == 1, where both of these values appear to
> be nontrivial to compute (to me anyway.)

I guess you got this from page 17.  The full text is:

"The primary UID is only saved to disk if (blip_instance ^ blip_signature ==
1). Blip_instance is MSOFBH.inst and  blip_signature is one of the values
defined in MSOBI"

MSFOBH seems to be the common record header from page 8.  I believe the POI
class EscherRecordHeader corresponds to this:
MSOFBH.ver,inst <=> EscherRecordHeader.options
MSOFBH.fbt      <=> EscherRecordHeader.recordId 
MSOFBH.cbLength <=> EscherRecordHeader.remainingBytes

So the inst field probably corresponds to EscherRecord.getInstance()

MSOBI enum is mentioned on page 15.  It's not clear to me how to calculate
blip_signature.  The exclusive or operator giving a result of 1 is also a bit
weird here.  Note that none of the constants from MSOBI have the LSB set. So
perhaps the test for writing the extra UID is whether the LSB of
EscherRecord.getInstance() is set.  Perhaps the expression was written as such
to emphasize that this rule only works when blip_signature ==
EscherRecord.getInstance() & 0x0FFE.

This is all speculation on my part.  You might be best to verify the behaviour
empirically.  Two existing POI junits hit the method
EscherMetafileBlip.fillFields() 4 times:
TestHSSFPictureData.testPictures() line: 45     "SimpleWithImages.xls"
TestOLE2Embeding.testEmbeding() line: 36        "ole2-embedding.xls"
- so perhaps with these files, and your current examples you can decipher
Microsoft's cryptic description of the m_rgbUidPrimary field.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to