]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
style
[lyx.git] / src / Buffer.cpp
index 7205f692789a3653e0827183637e6eddc19e6dad..6f7a5cd63f0fb8bd40b912c431a056dcf7304214 100644 (file)
@@ -354,6 +354,7 @@ private:
 /// Creates the per buffer temporary directory
 static FileName createBufferTmpDir()
 {
+       // FIXME THREAD
        static int count;
        // We are in our own directory.  Why bother to mangle name?
        // In fact I wrote this code to circumvent a problematic behaviour
@@ -636,6 +637,21 @@ BufferParams const & Buffer::params() const
 }
 
 
+BufferParams const & Buffer::masterParams() const
+{
+       if (masterBuffer() == this)
+               return params();
+
+       BufferParams & mparams = const_cast<Buffer *>(masterBuffer())->params();
+       // Copy child authors to the params. We need those pointers.
+       AuthorList const & child_authors = params().authors();
+       AuthorList::Authors::const_iterator it = child_authors.begin();
+       for (; it != child_authors.end(); it++)
+               mparams.authors().record(*it);
+       return mparams;
+}
+
+
 ParagraphList & Buffer::paragraphs()
 {
        return text().paragraphs();