]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Patch by Richard Heck:
[lyx.git] / src / Buffer.cpp
index fbd56b8faa59901eae111bfd2e07baf1c02c3671..3fac1fc26e5c1fa535917414667f6217e2e21219 100644 (file)
@@ -142,7 +142,7 @@ using std::string;
 
 namespace {
 
-int const LYX_FORMAT = 275;
+int const LYX_FORMAT = 276;
 
 } // namespace anon
 
@@ -846,6 +846,19 @@ bool Buffer::write(ostream & ofs) const
            << "\\lyxformat " << LYX_FORMAT << "\n"
            << "\\begin_document\n";
 
+
+       /// For each author, set 'used' to true if there is a change
+       /// by this author in the document; otherwise set it to 'false'.
+       AuthorList::Authors::const_iterator a_it = params().authors().begin();
+       AuthorList::Authors::const_iterator a_end = params().authors().end();
+       for (; a_it != a_end; ++a_it)
+               a_it->second.used(false);
+
+       ParIterator const end = par_iterator_end();
+       ParIterator it = par_iterator_begin();
+       for ( ; it != end; ++it)
+               it->checkAuthors(params().authors());
+
        // now write out the buffer parameters.
        ofs << "\\begin_header\n";
        params().writeFile(ofs);