- docstring label;
- vector<docstring> keys = getVectorFromString(keyList);
- vector<docstring>::const_iterator it = keys.begin();
- vector<docstring>::const_iterator end = keys.end();
- for (; it != end; ++it) {
- // get the bibdata corresponding to the key
- docstring const author(biblist.getAbbreviatedAuthor(*it));
- docstring const year(biblist.getYear(*it));
-
- // Something isn't right. Fail safely.
- if (author.empty() || year.empty())
- return docstring();
-
- // authors1/<before>; ... ;
- // authors_last, <after>
- if (cite_type == "cite" && engine == biblio::ENGINE_JURABIB) {
- if (it == keys.begin())
- label += author + before_str + sep_str;
- else
- label += author + sep_str;
-
- // (authors1 (<before> year); ... ;
- // authors_last (<before> year, <after>)
- } else if (cite_type == "citet") {
- switch (engine) {
- case biblio::ENGINE_NATBIB_AUTHORYEAR:
- label += author + op_str + before_str +
- year + cp + sep_str;
- break;
- case biblio::ENGINE_NATBIB_NUMERICAL:
- label += author + op_str + before_str + '#' + *it + cp + sep_str;
- break;
- case biblio::ENGINE_JURABIB:
- label += before_str + author + op_str +
- year + cp + sep_str;
- break;
- case biblio::ENGINE_BASIC:
- break;
- }
+docstring InsetCitation::toolTip(BufferView const & bv, int, int) const
+{
+ Buffer const & buf = bv.buffer();
+ // Only after the buffer is loaded from file...
+ if (!buf.isFullyLoaded())
+ return docstring();