X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextClass.cpp;h=612539843f0b2148574d4eb3cb512ce113786e6e;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=615734870dc7d87290e61d6b55b6ac8499989596;hpb=322808281ff449c542295c8e07d5b6c4c950b571;p=lyx.git diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 615734870d..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 from_utf8(type); - } else - return it->second; -} - - string const & TextClass::prerequisites(string const & sep) const { if (contains(prerequisites_, ',')) { @@ -1818,7 +1812,7 @@ Layout const & DocumentClass::htmlTOCLayout() const string const DocumentClass::getCiteFormat(CiteEngineType const & type, string const & entry, bool const punct, string const & fallback) const { - string default_format = "{%author%[[%author%, ]][[{%editor%[[%editor%, ed., ]]}]]}\"%title%\"{%journal%[[, {!!}%journal%{!!}]][[{%publisher%[[, %publisher%]][[{%institution%[[, %institution%]]}]]}]]}{%year%[[ (%year%)]]}{%pages%[[, %pages%]]}"; + string default_format = "{%fullnames:author%[[%fullnames:author%, ]][[{%fullnames:editor%[[%fullnames:editor%, ed., ]]}]]}\"%title%\"{%journal%[[, {!!}%journal%{!!}]][[{%publisher%[[, %publisher%]][[{%institution%[[, %institution%]]}]]}]]}{%year%[[ (%year%)]]}{%pages%[[, %pages%]]}"; if (punct) default_format += ".";