]> git.lyx.org Git - lyx.git/blobdiff - src/BiblioInfo.cpp
Do not use toobar menu as fallback context menu
[lyx.git] / src / BiblioInfo.cpp
index 1e2a1be769bf2048db9ce85fa78a47108ef67e8a..07c0b67f9aa2712e6fcdab44c7e5efbc88439d8a 100644 (file)
@@ -503,8 +503,8 @@ docstring const BibTeXInfo::getAuthorOrEditorList(Buffer const * buf,
 }
 
 
-docstring const BibTeXInfo::getAuthorList(Buffer const * buf, 
-               docstring const & author, bool const full, bool const forceshort, 
+docstring const BibTeXInfo::getAuthorList(Buffer const * buf,
+               docstring const & author, bool const full, bool const forceshort,
                bool const allnames, bool const beginning) const
 {
        // Maxnames treshold depend on engine
@@ -760,7 +760,7 @@ docstring parseOptions(docstring const & format, string & optkey,
 
 /* FIXME
 Bug #9131 revealed an oddity in how we are generating citation information
-when more than one key is given. We end up building a longer and longer format 
+when more than one key is given. We end up building a longer and longer format
 string as we go, which we then have to re-parse, over and over and over again,
 rather than generating the information for the individual keys and then putting
 all of that together. We do that to deal with the way separators work, from what
@@ -1367,21 +1367,21 @@ bool BiblioInfo::isBibtex(docstring const & key) const
 }
 
 
-vector<docstring> const BiblioInfo::getCiteStrings(
+BiblioInfo::CiteStringMap const BiblioInfo::getCiteStrings(
        vector<docstring> const & keys, vector<CitationStyle> const & styles,
        Buffer const & buf, CiteItem const & ci) const
 {
        if (empty())
-               return vector<docstring>();
+               return vector<pair<docstring,docstring>>();
 
        string style;
-       vector<docstring> vec(styles.size());
-       for (size_t i = 0; i != vec.size(); ++i) {
+       CiteStringMap csm(styles.size());
+       for (size_t i = 0; i != csm.size(); ++i) {
                style = styles[i].name;
-               vec[i] = getLabel(keys, buf, style, ci);
+               csm[i] = make_pair(from_ascii(style), getLabel(keys, buf, style, ci));
        }
 
-       return vec;
+       return csm;
 }