#include "buffer.h"
#include "bufferlist.h"
-#include "counters.h"
#include "LyXAction.h"
#include "lyxrc.h"
#include "lyxlex.h"
Buffer::Buffer(string const & file, bool ronly)
: niceFile(true), lyx_clean(true), bak_clean(true),
unnamed(false), dep_clean(0), read_only(ronly),
- filename_(file), users(0), ctrs(new Counters)
+ filename_(file), users(0)
{
lyxerr[Debug::INFO] << "Buffer::Buffer()" << endl;
filepath_ = OnlyPath(file);
"Use LyX 0.10.x to read this!"));
return false;
} else {
- string const command = "lyx2lyx "
+ string command =
+ LibFileSearch("lyx2lyx", "lyx2lyx");
+ if (command.empty()) {
+ Alert::alert(_("ERROR!"),
+ _("Can't find conversion script."));
+ return false;
+ }
+ command += " -t"
+ +tostr(LYX_FORMAT)+" "
+ QuoteName(filename_);
cmd_ret const ret = RunCommand(command);
if (ret.first) {
Alert::alert(_("ERROR!"),
- _("An error occured while "
- "running the conversion script."));
+ _("An error occured while "
+ "running the conversion script."));
return false;
}
istringstream is(ret.second);
if (!keys.empty())
return keys;
-
+
// Might be either using bibtex or a child has bibliography
for (inset_iterator it = inset_const_iterator_begin();
it != inset_const_iterator_end(); ++it) {
}
-Counters & Buffer::counters() const
-{
- return *ctrs.get();
-}
-
-
void Buffer::inset_iterator::setParagraph()
{
while (pit != pend) {