X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBiblioInfo.h;h=5a6f0d5b4e0c6cebcdf959edefb68f0d7d25b86c;hb=45e8ea4acc557dd54e062750f47ff569b5b98c43;hp=4509101fd379486c7b5ed200b3f23e0088b53a02;hpb=3883b85f49054c109cb8a9a293721a5e41edb68d;p=lyx.git diff --git a/src/BiblioInfo.h b/src/BiblioInfo.h index 4509101fd3..5a6f0d5b4e 100644 --- a/src/BiblioInfo.h +++ b/src/BiblioInfo.h @@ -70,10 +70,13 @@ public: bool const allnames = false, bool const beginning = true) const; /// docstring const getYear() const; + /// + void getLocators(docstring & doi, docstring & url, docstring & file) const; /// \return formatted BibTeX data suitable for framing. /// \param vector of pointers to crossref/xdata information docstring const & getInfo(BibTeXInfoList const & xrefs, - Buffer const & buf, CiteItem const & ci) const; + Buffer const & buf, CiteItem const & ci, + docstring const & format = docstring()) const; /// \return formatted BibTeX data for a citation label docstring const getLabel(BibTeXInfoList const xrefs, Buffer const & buf, docstring const & format, @@ -165,6 +168,8 @@ private: mutable docstring info_; /// a cache for getInfo(richtext = true) mutable docstring info_richtext_; + /// cache for last format pattern + mutable docstring format_; /// docstring cite_number_; /// @@ -213,6 +218,9 @@ public: /// language. docstring const getYear(docstring const & key, Buffer const & buf, bool use_modifier = false) const; + /// get either local pdf or web location of the citation referenced by key. + /// DOI/file are prefixed so they form proper URL for generic qt handler + void getLocators(docstring const & key, docstring & doi, docstring & url, docstring & file) const; /// docstring const getCiteNumber(docstring const & key) const; /// \return formatted BibTeX data associated with a given key. @@ -222,7 +230,7 @@ public: /// output any richtext tags marked in the citation format and escape < and > /// elsewhere, and the general output context. docstring const getInfo(docstring const & key, Buffer const & buf, - CiteItem const & ci) const; + CiteItem const & ci, docstring const & format = docstring()) const; /// \return formatted BibTeX data for citation labels. /// Citation labels can have more than one key. docstring const getLabel(std::vector keys, Buffer const & buf,