]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
Account for old versions of Pygments
[lyx.git] / src / TextClass.cpp
index 5d01b9d2198444e1d01fb5975cc47d2c6e3523ae..612539843f0b2148574d4eb3cb512ce113786e6e 100644 (file)
@@ -463,8 +463,13 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
 
                case TC_INPUT: // Include file
                        if (lexrc.next()) {
+                               FileName tmp;
                                string const inc = lexrc.getString();
-                               FileName tmp = libFileSearch("layouts", inc,
+                               if (!path().empty() && (prefixIs(inc, "./") ||
+                                                       prefixIs(inc, "../")))
+                                       tmp = fileSearch(path(), inc, "layout");
+                               else
+                                       tmp = libFileSearch("layouts", inc,
                                                            "layout");
 
                                if (tmp.empty()) {
@@ -544,9 +549,8 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
                        // Either way, we just scan the rest and discard it
                        else {
                                Layout lay;
-                               // false positive from coverity
-                               // coverity[CHECKED_RETURN]
-                               readStyle(lexrc, lay);
+                               // signal to coverity that we do not care about the result
+                               (void)readStyle(lexrc, lay);
                        }
                        break;
                }
@@ -1097,6 +1101,8 @@ bool TextClass::readCiteEngine(Lexer & lexrc)
                                latex_cmd += ichar;
                        else if (mode == StarDesc)
                                stardesc += ichar;
+                       else if (ichar == '$')
+                               cs.hasQualifiedList = true;
                        else if (ichar == '*')
                                cs.hasStarredVersion = true;
                        else if (ichar == '[' && cs.textAfter)
@@ -1416,18 +1422,6 @@ bool TextClass::readOutlinerName(Lexer & lexrc)
 }
 
 
-docstring TextClass::outlinerName(std::string const & type) const
-{
-       std::map<std::string,docstring>::const_iterator const it
-               = outliner_names_.find(type);
-       if (it == outliner_names_.end()) {
-               LYXERR0("Missing OutlinerName for " << type << "!");
-               return translateIfPossible(from_utf8(type));
-       } else
-               return translateIfPossible(it->second);
-}
-
-
 string const & TextClass::prerequisites(string const & sep) const
 {
        if (contains(prerequisites_, ',')) {