I though the underlying structure format is common for all documents (docx, xlsx, pptx .. ), but it seems from your clarification that each file format has its own way and structure to save information about the document such as if the document is encrypted or not.
Thank you both for your help and clarifications, I will dig more into MS's specifications along with OO's source code to get the task done.
