mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Include child's own authors when using BufferParams from master.
This commit is contained in:
parent
f9bf721aba
commit
7c1fc6ea75
@ -636,6 +636,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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user