2014-03-11 7:58 GMT+01:00 Jürgen Spitzmüller:

> I prefer to fix the author problem.
>

I propose something along this line. Fixes the problem for me.

Jürgen
diff --git a/po/de.gmo b/po/de.gmo
index 308b7d9..7219f94 100644
Binary files a/po/de.gmo and b/po/de.gmo differ
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 7205f69..a16afbb 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -636,6 +636,21 @@ BufferParams const & Buffer::params() const
 }
 
 
+BufferParams const & Buffer::masterParams() const
+{
+       if (masterBuffer() == this)
+               return params();
+
+       // Copy child authors to the params
+       BufferParams & mparams = const_cast<Buffer *>(masterBuffer())->params();
+       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();
diff --git a/src/Buffer.h b/src/Buffer.h
index 5fdf020..fe0294b 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -510,6 +510,8 @@ public:
        ///
        BufferParams & params();
        BufferParams const & params() const;
+       ///
+       BufferParams const & masterParams() const;
 
        /** The list of paragraphs.
            This is a linked list of paragraph, this list holds the
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 7118ff6..d32c0be 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1451,7 +1451,7 @@ void Paragraph::Private::validate(LaTeXFeatures & 
features) const
                bool const is_command = layout_->latextype == LATEX_COMMAND;
                Buffer const & buf = inset_owner_->buffer();
                BufferParams const & bp = features.runparams().is_child
-                       ? buf.masterBuffer()->params() : buf.params();
+                       ? buf.masterParams() : buf.params();
                Font f;
                TexRow texrow;
                // Using a string stream here circumvents the encoding
diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index a07b538..31211d1 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -524,7 +524,7 @@ void TeXOnePar(Buffer const & buf,
               int start_pos, int end_pos)
 {
        BufferParams const & bparams = runparams_in.is_child
-               ? buf.masterBuffer()->params() : buf.params();
+               ? buf.masterParams() : buf.params();
        ParagraphList const & paragraphs = text.paragraphs();
        Paragraph const & par = paragraphs.at(pit);
        // FIXME This check should not really be needed.

Reply via email to