Michael Gerz schrieb:
Jean-Marc Lasgouttes schrieb:
Michael> In the LyX document header, we have to list all authors for
Michael> which a change is tracked in the document. That means that we
Michael> have to iterate through the complete document and check
Michael> whether there is any change for a given author whenever we
Michael> store a LyX document. Does anybody know a simple approach to
Michael> do that? I guess the dociterator stuff may help but I am not
Michael> familiar with it.

You should do that in Paragraph::validate. Add some addAuthor method
to LaTeXFeatures.


Presently, LyX files have entries like this:

    \change_inserted 0 1180893704

"0" points to an author that is listed in the header. Although this is a very compact way of storing authors, things become troublesome if the internal list of authors is not stored in its entirety. However, this is what we want to achieve in order to resolve our "security" problems.

Question: Would it be possible to change the file format at this stage of development? E.g., to

    \change_inserted "Michael Gerz" 1180893704

If not, we might have to change the author index for *all* changes before saving a document.

Any comments or suggestions for a better solution?


First off all: I have almost no knowledge of the file format.
My suggestion: If it's possible to store the author list at the end of the file then you could rebuild the list during the save operation (i.e. start with an empty list add to it every author that appears during save operation and write the new author index to the file). After that replace the old list with the new one and write it to the end of file.

Bernhard

Reply via email to