throw away its return value and then go find a pointer to the loaded
child!!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35116
a592a061-630c-0410-9148-
cb99ea01b6c8
//in a comment or doing a dryrun
} else if (isInputOrInclude(params()) &&
isLyXFileName(included_file.absFileName())) {
//in a comment or doing a dryrun
} else if (isInputOrInclude(params()) &&
isLyXFileName(included_file.absFileName())) {
- //if it's a LyX file and we're inputting or including,
- //try to load it so we can write the associated latex
- if (!loadIfNeeded())
+ // if it's a LyX file and we're inputting or including,
+ // try to load it so we can write the associated latex
+
+ Buffer * tmp = loadIfNeeded();
+ if (!tmp)
- Buffer * tmp = theBufferList().getBuffer(included_file);
-
if (tmp->params().baseClass() != masterBuffer->params().baseClass()) {
// FIXME UNICODE
docstring text = bformat(_("Included file `%1$s'\n"
if (tmp->params().baseClass() != masterBuffer->params().baseClass()) {
// FIXME UNICODE
docstring text = bformat(_("Included file `%1$s'\n"
string const exportfile = changeExtension(incfile, ".sgml");
DocFileName writefile(changeExtension(included_file, ".sgml"));
string const exportfile = changeExtension(incfile, ".sgml");
DocFileName writefile(changeExtension(included_file, ".sgml"));
- if (loadIfNeeded()) {
- Buffer * tmp = theBufferList().getBuffer(FileName(included_file));
-
+ Buffer * tmp = loadIfNeeded();
+ if (tmp) {
string const mangled = writefile.mangledFileName();
writefile = makeAbsPath(mangled,
buffer().masterBuffer()->temppath());
string const mangled = writefile.mangledFileName();
writefile = makeAbsPath(mangled,
buffer().masterBuffer()->temppath());
// Here we must do the fun stuff...
// Load the file in the include if it needs
// to be loaded:
// Here we must do the fun stuff...
// Load the file in the include if it needs
// to be loaded:
- if (loadIfNeeded()) {
- // a file got loaded
- Buffer * const tmp = theBufferList().getBuffer(FileName(included_file));
+ Buffer * const tmp = loadIfNeeded();
+ if (tmp) {
+ // the file is loaded
// make sure the buffer isn't us
// FIXME RECURSIVE INCLUDES
// This is not sufficient, as recursive includes could be
// make sure the buffer isn't us
// FIXME RECURSIVE INCLUDES
// This is not sufficient, as recursive includes could be