X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextClass.cpp;h=612539843f0b2148574d4eb3cb512ce113786e6e;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=5d01b9d2198444e1d01fb5975cc47d2c6e3523ae;hpb=ce8929e9b237af569934b434154d199634363268;p=lyx.git diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 5d01b9d219..612539843f 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -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::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_, ',')) {