void InsetCitation::Edit(int, int)
{
if(current_view->buffer()->isReadonly())
- WarnReadonly();
+ WarnReadonly(current_view->buffer()->fileName());
if (!citation_form) {
citation_form = create_form_citation_form();
void InsetBibKey::Edit(int, int)
{
if(current_view->buffer()->isReadonly())
- WarnReadonly();
+ WarnReadonly(current_view->buffer()->fileName());
if (!bibitem_form) {
bibitem_form = create_form_bibitem_form();
// This method returns a comma separated list of Bibtex entries
-string InsetBibtex::getKeys()
+string InsetBibtex::getKeys(char delim)
{
// This hack is copied from InsetBibtex::Latex.
// Is it still needed? Probably yes.
while(!tmp.empty()) {
string fil = findtexfile(ChangeExtension(tmp, "bib", false),
"bib");
- lyxerr << "Bibfile: " << fil << endl;
+ lyxerr[Debug::LATEX] << "Bibfile: " << fil << endl;
// If we didn't find a matching file name just fail silently
if (!fil.empty()) {
// This is a _very_ simple parser for Bibtex database
ifstream ifs(fil.c_str());
string linebuf;
while (getline(ifs, linebuf)) {
+ linebuf = frontStrip(linebuf);
if (prefixIs(linebuf, "@")) {
linebuf = subst(linebuf, '{', '(');
linebuf = split(linebuf, tmp, '(');
&& !prefixIs(tmp, "@preamble")) {
linebuf = split(linebuf,
tmp, ',');
+ tmp = frontStrip(strip(tmp));
if (!tmp.empty()) {
- keys += strip(tmp);
- keys += ", ";
+ keys += tmp;
+ keys += delim;
}
}
}