X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FBufferList.cpp;h=d69438846f5a7f22591b66b57dcf34e1eb4eee56;hb=8b5bfa971bc9b3f2e49b48f25a2a2fee03004016;hp=0cfbec135da4b55253ba5f92f53a77347728508c;hpb=196d9caeb0b9f74d02750f774de1ca63a483803f;p=lyx.git diff --git a/src/BufferList.cpp b/src/BufferList.cpp index 0cfbec135d..d69438846f 100644 --- a/src/BufferList.cpp +++ b/src/BufferList.cpp @@ -15,6 +15,7 @@ #include "Author.h" #include "Buffer.h" #include "BufferParams.h" +#include "OutputParams.h" #include "frontends/alert.h" @@ -28,6 +29,7 @@ #include "support/lassert.h" #include +#include // exit() #include #include @@ -127,7 +129,7 @@ Buffer * BufferList::createNewBuffer(string const & s) { unique_ptr tmpbuf; try { - tmpbuf = make_unique(s); + tmpbuf = lyx::make_unique(s); } catch (ExceptionMessage const & message) { if (message.type_ == ErrorException) { Alert::error(message.title_, message.details_); @@ -312,21 +314,21 @@ Buffer * BufferList::getBuffer(support::FileName const & fname, bool internal) c } -Buffer * BufferList::getBufferFromTmp(string const & s, bool realpath) +Buffer * BufferList::getBufferFromTmp(string const & path, bool realpath) { for (Buffer * buf : bstore) { string const temppath = realpath ? FileName(buf->temppath()).realPath() : buf->temppath(); - if (prefixIs(s, temppath)) { + if (prefixIs(path, temppath)) { // check whether the filename matches the master string const master_name = buf->latexName(); - if (suffixIs(s, master_name)) + if (suffixIs(path, master_name)) return buf; // if not, try with the children for (Buffer * child : buf->getDescendants()) { string const mangled_child_name = DocFileName( changeExtension(child->absFileName(), ".tex")).mangledFileName(); - if (suffixIs(s, mangled_child_name)) + if (suffixIs(path, mangled_child_name)) return child; } }