Does storing pointers (e.g. bool*) to a document make sense anyway? What happens when you open the document from a different process instance? Do you expect those saved pointer values to be valid for a different process?

Even worse you are storing a pointers to a temporary object.