// get buffer of external file
InsetInclude const & ins =
static_cast<InsetInclude const &>(*it);
- Buffer * child = ins.getChildBuffer();
+ Buffer * child = ins.loadIfNeeded();
if (!child)
continue;
child->dispatch(func, dr);
InsetInclude const & incinset =
static_cast<InsetInclude const &>(*insit.inset);
macro_lock = true;
- Buffer * child = incinset.getChildBuffer();
+ Buffer * child = incinset.loadIfNeeded();
macro_lock = false;
if (!child)
continue;
// get buffer of external file
InsetInclude const & ins =
static_cast<InsetInclude const &>(*it);
- Buffer * child = ins.getChildBuffer();
+ Buffer * child = ins.loadIfNeeded();
if (!child)
continue;
child->getUsedBranches(result, true);
}
-Buffer * InsetInclude::getChildBuffer() const
-{
- return loadIfNeeded();
-}
-
-
Buffer * InsetInclude::loadIfNeeded() const
{
// This is for background export and preview. We don't even want to
b.pushItem(cpit, screenLabel(), output_active);
b.pop();
} else {
- Buffer const * const childbuffer = getChildBuffer();
+ Buffer const * const childbuffer = loadIfNeeded();
TocBuilder & b = backend.builder("child");
docstring str = childbuffer ? childbuffer->fileName().displayName()
void InsetInclude::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
{
file_exist_ = includedFileExist();
- Buffer const * const childbuffer = getChildBuffer();
+ Buffer const * const childbuffer = loadIfNeeded();
if (childbuffer) {
if (!checkForRecursiveInclude(childbuffer))
childbuffer->updateBuffer(Buffer::UpdateChildOnly, utype);
///
void setChildBuffer(Buffer * buffer);
- /// \return the child buffer if the file is a LyX doc and could be loaded
- Buffer * getChildBuffer() const;
+
+ /// \return loaded Buffer or zero if the file loading did not proceed.
+ Buffer * loadIfNeeded() const;
/** Update the cache with all bibfiles in use of the child buffer
* (including bibfiles of grandchild documents).
* and the preview should be regenerated.
*/
void fileChanged() const;
- /// \return loaded Buffer or zero if the file loading did not proceed.
- Buffer * loadIfNeeded() const;
/// launch external application
void editIncluded(std::string const & file);
///