#include "support/Path.h"
#include "support/Systemcall.h"
+using std::endl;
+using std::find_if;
+using std::string;
+using std::vector;
+using std::distance;
+
namespace lyx {
using support::dirList;
using support::FileName;
using support::getExtension;
-using support::isFileReadable;
using support::libFileSearch;
using support::libScriptSearch;
using support::makeAbsPath;
using support::subst;
using support::Systemcall;
-using std::endl;
-using std::find_if;
-using std::string;
-using std::vector;
-using std::distance;
-
namespace Alert = lyx::frontend::Alert;
<< command << endl;
Systemcall one;
one.startscript(Systemcall::Wait, command);
- if (isFileReadable(to_file)) {
+ if (to_file.isFileReadable()) {
if (conversionflags & try_cache)
ConverterCache::get().add(orig_from,
to_format, to_file);
cit != edgepath.end(); ++cit) {
Converter const & conv = converterlist_[*cit];
bool dummy = conv.To->dummy() && conv.to != "program";
- if (!dummy)
+ if (!dummy) {
LYXERR(Debug::FILES) << "Converting from "
<< conv.from << " to " << conv.to << endl;
+ }
infile = outfile;
outfile = FileName(conv.result_dir.empty()
? changeExtension(from_file.absFilename(), conv.To->extension())
namespace {
-class showMessage : public std::unary_function<docstring, void>, public boost::signals::trackable {
+class ShowMessage
+ : public boost::signals::trackable {
public:
- showMessage(Buffer const & b) : buffer_(b) {};
- void operator()(docstring const & m) const
- {
- buffer_.message(m);
- }
+ ShowMessage(Buffer const & b) : buffer_(b) {};
+ void operator()(docstring const & msg) const { buffer_.message(msg); }
private:
Buffer const & buffer_;
};
runparams.document_language = buffer.params().language->babel();
// do the LaTeX run(s)
- string const name = buffer.getLatexName();
+ string const name = buffer.latexName();
LaTeX latex(command, runparams, FileName(makeAbsPath(name)));
TeXErrors terr;
- showMessage show(buffer);
+ ShowMessage show(buffer);
latex.message.connect(show);
int const result = latex.run(terr);