]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Update sk.po
[lyx.git] / src / Buffer.cpp
index 96005b92157f18b816c8dbc965d66c4faf994cc5..3c7f1cc1e0f46c26fc9170d643cff3b50def377f 100644 (file)
@@ -1110,6 +1110,24 @@ bool Buffer::readDocument(Lexer & lex)
 }
 
 
+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);
@@ -2686,7 +2704,7 @@ void Buffer::markDepClean(string const & name)
 }
 
 
-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