]> git.lyx.org Git - lyx.git/blobdiff - src/BiblioInfo.cpp
installer: further preparation
[lyx.git] / src / BiblioInfo.cpp
index bb971628e5f1334d1bd7ccd36b6c7d16f690a49a..3298990a00d4e8a7486efa6c1f8eba3f2d094d69 100644 (file)
@@ -370,9 +370,10 @@ string parseEmbeddedOption(string const & format, string & ifelsepart)
                LYXERR0("ERROR! Couldn't parse `" << format <<"'.");
                return format;
        }
-       LASSERT(rest.size() <= format.size(), /* */);
+       LASSERT(rest.size() <= format.size(),
+               { ifelsepart = ""; return format; });
        ifelsepart = format.substr(0, format.size() - rest.size());
-               return rest;
+       return rest;
 }
 
 
@@ -664,7 +665,7 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
                key = oldkey.substr(6);
                cleanit = true;
        }
-               
+
        docstring ret = operator[](key);
        if (ret.empty() && xref)
                ret = (*xref)[key];
@@ -679,6 +680,10 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
                        ret = bib_key_;
                else if (key == "label")
                        ret = label_;
+               else if (key == "modifier" && modifier_ != 0)
+                       ret = modifier_;
+               else if (key == "numericallabel")
+                       ret = cite_number_;
                else if (key == "abbrvauthor")
                        // Special key to provide abbreviated author names.
                        ret = getAbbreviatedAuthor(buf, false);
@@ -713,7 +718,7 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
        }
        if (cleanit)
                return html::cleanAttr(ret);
-       
+
        return ret;
 }
 
@@ -980,7 +985,7 @@ void BiblioInfo::makeCitationLabels(Buffer const & buf)
 {
        collectCitedEntries(buf);
        CiteEngineType const engine_type = buf.params().citeEngineType();
-       bool const numbers = (engine_type == ENGINE_TYPE_NUMERICAL);
+       bool const numbers = (engine_type & ENGINE_TYPE_NUMERICAL);
 
        int keynumber = 0;
        char modifier = 0;