]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
support to load the mathdots package via the document settings; fixes #5373; fileform...
[lyx.git] / src / BufferList.cpp
index 6935324f3c78f46db435188a052f0863e73dc652..17b7aea9fa361129615b74e25178f0c4bfed78c3 100644 (file)
 #include "support/Package.h"
 
 #include "support/lassert.h"
-#include <boost/bind.hpp>
+#include "support/bind.h"
 
 #include <algorithm>
 #include <functional>
-
-using boost::bind;
+#include <iterator>
+#include <memory>
 
 using namespace std;
 using namespace lyx::support;
@@ -142,7 +142,7 @@ FileNameList const & BufferList::fileNames() const
        nvec.clear();
        transform(bstore.begin(), bstore.end(),
                  back_inserter(nvec),
-                 boost::bind(&Buffer::fileName, _1));
+                 bind(&Buffer::fileName, _1));
        return nvec;
 }
 
@@ -255,12 +255,12 @@ Buffer * BufferList::getBuffer(support::FileName const & fname) const
 {
        // 1) cheap test, using string comparison of file names
        BufferStorage::const_iterator it = find_if(bstore.begin(), bstore.end(),
-               bind(equal_to<FileName>(), bind(&Buffer::fileName, _1), fname));
+               lyx::bind(equal_to<FileName>(), lyx::bind(&Buffer::fileName, _1), fname));
        if (it != bstore.end())
                        return *it;
        // 2) possibly expensive test, using equivalence test of file names
        it = find_if(bstore.begin(), bstore.end(),
-               bind(equivalent_to(), bind(&Buffer::fileName, _1), fname));
+               lyx::bind(equivalent_to(), lyx::bind(&Buffer::fileName, _1), fname));
        return it != bstore.end() ? (*it) : 0;
 }
 
@@ -272,8 +272,7 @@ Buffer * BufferList::getBufferFromTmp(string const & s)
        for (; it < end; ++it) {
                if (prefixIs(s, (*it)->temppath())) {
                        // check whether the filename matches the master
-                       string const master_name = changeExtension(onlyFileName(
-                                               (*it)->absFileName()), ".tex");
+                       string const master_name = (*it)->latexName();
                        if (suffixIs(s, master_name))
                                return *it;
                        // if not, try with the children