Am 29.11.2010 09:49, schrieb Filip:
Hello,

I have to implement some tool that has the ability to detect whether a
document created by Microsoft office 97-2010 (Word, Excel, PowerPoint, ...)
is encrypted or not.

It would be appreciated if you could help with this issue, or at least if
you can point out where such code is implemented in OpenOffice.

For Excel XLS files, there is a FILEPASS record structure at the beginning of the "Book" or "Workbook" storage stream (whichever stream exists), you can find a code example in oox/source/xls/biffcodec.cxx, BiffCodecHelper::importFilePass(). However, for simple detection of encryption, you don't need to read the contents, just check that the structure exists.

For Excel XLSX/XLSM/XLSB files, see Caolan's answer.


Regards
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to