mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
* Buffer.cpp: load all child documents in one go where it makes sense. This has the advantage to call updateLabels() only once for the master buffer. We can think of maintaining a child document list in the future.
* Biblio.cpp: fillWithBibKeys(): ditto. * InsetInclude.cpp: loadIfNeeded(): set the parent name in any case. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19586 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4d8c291cd0
commit
eb14ee5e22
@ -14,6 +14,7 @@
|
||||
|
||||
#include "Biblio.h"
|
||||
|
||||
#include "buffer_funcs.h"
|
||||
#include "gettext.h"
|
||||
#include "InsetIterator.h"
|
||||
#include "Paragraph.h"
|
||||
@ -845,6 +846,9 @@ void fillWithBibKeys(Buffer const * const buf,
|
||||
return;
|
||||
}
|
||||
|
||||
// Pre-load all child documents.
|
||||
loadChildDocuments(*buf);
|
||||
|
||||
for (InsetIterator it = inset_iterator_begin(buf->inset()); it; ++it)
|
||||
it->fillWithBibKeys(*buf, keys, it);
|
||||
}
|
||||
|
@ -1058,6 +1058,8 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
params().parentname.erase();
|
||||
}
|
||||
|
||||
loadChildDocuments(*this);
|
||||
|
||||
// the real stuff
|
||||
latexParagraphs(*this, paragraphs(), os, texrow(), runparams);
|
||||
|
||||
@ -1209,6 +1211,8 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname,
|
||||
|
||||
params().getTextClass().counters().reset();
|
||||
|
||||
loadChildDocuments(*this);
|
||||
|
||||
sgml::openTag(os, top);
|
||||
os << '\n';
|
||||
docbookParagraphs(paragraphs(), *this, os, runparams);
|
||||
@ -1298,6 +1302,8 @@ void Buffer::validate(LaTeXFeatures & features) const
|
||||
if (params().use_esint == BufferParams::package_on)
|
||||
features.require("esint");
|
||||
|
||||
loadChildDocuments(*this);
|
||||
|
||||
for_each(paragraphs().begin(), paragraphs().end(),
|
||||
boost::bind(&Paragraph::validate, _1, boost::ref(features)));
|
||||
|
||||
@ -1345,6 +1351,8 @@ void Buffer::getLabelList(vector<docstring> & list) const
|
||||
return;
|
||||
}
|
||||
|
||||
loadChildDocuments(*this);
|
||||
|
||||
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it)
|
||||
it.nextInset()->getLabelList(*this, list);
|
||||
}
|
||||
|
@ -414,7 +414,6 @@ Buffer * loadIfNeeded(Buffer const & buffer, InsetCommandParams const & params)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
buf->setParentName(parentFilename(buffer));
|
||||
return buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user