}
+bool Buffer::isSyncTeXenabled() const
+{
+ bool enabled = params().output_sync;
+
+ if (!enabled)
+ for (auto const & c : theConverters()) {
+ const string dest = c.to().substr(0,3);
+ if (dest == "dvi" || dest == "pdf") {
+ const string cmd = c.command();
+ enabled |= cmd.find("-synctex=") != string::npos
+ && cmd.find("-synctex=0") == string::npos;
+ if (enabled)
+ break;
+ }
+ }
+ return enabled;
+}
+
bool Buffer::importString(string const & format, docstring const & contents, ErrorList & errorList)
{
Format const * fmt = theFormats().getFormat(format);
FileName const lyx = tempFileName("Buffer_importFileXXXXXX.lyx");
Converters::RetVal const retval =
- theConverters().convert(nullptr, name, lyx, name, format, "lyx", errorList);
+ theConverters().convert(this, name, lyx, name, format, "lyx", errorList);
if (retval == Converters::SUCCESS) {
bool const success = readFile(lyx) == ReadSuccess;
removeTempFile(lyx);
lyx_exit(1);
}
- d->texrow = move(os.texrow());
+ d->texrow = std::move(os.texrow());
ofs.close();
if (ofs.fail()) {
}
-bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag)
+bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag) const
{
if (isInternal()) {
// FIXME? if there is an Buffer LFUN that can be dispatched even