#include "support/Package.h"
#include "support/lassert.h"
-#include <boost/bind.hpp>
+#include "support/bind.h"
#include <algorithm>
#include <functional>
+#include <iterator>
-using boost::bind;
using namespace std;
using namespace lyx::support;
}
}
tmpbuf->params().useClassDefaults();
- if (tmpbuf->fileName().extension() == "internal") {
+ if (tmpbuf->isInternal()) {
binternal.push_back(tmpbuf.get());
} else {
LYXERR(Debug::INFO, "Assigning to buffer " << bstore.size());
nvec.clear();
transform(bstore.begin(), bstore.end(),
back_inserter(nvec),
- boost::bind(&Buffer::fileName, _1));
+ bind(&Buffer::fileName, _1));
return nvec;
}
}
-bool BufferList::isLoaded(Buffer const * b) const
+ bool BufferList::isLoaded(Buffer const * b) const
{
+ if (!b)
+ return false;
BufferStorage::const_iterator cit =
find(bstore.begin(), bstore.end(), b);
return cit != bstore.end();
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
for (; cit < cend; ++cit) {
string const mangled_child_name = DocFileName(
changeExtension((*cit)->absFileName(),
- ".tex")).mangledFilename();
+ ".tex")).mangledFileName();
if (suffixIs(s, mangled_child_name))
return *cit;
}
}
+void BufferList::changed(bool update_metrics) const
+{
+ BufferStorage::const_iterator it = bstore.begin();
+ BufferStorage::const_iterator end = bstore.end();
+ for (; it != end; ++it)
+ (*it)->changed(update_metrics);
+ it = binternal.begin();
+ end = binternal.end();
+ for (; it != end; ++it)
+ (*it)->changed(update_metrics);
+}
+
+
} // namespace lyx