for (int i = 0; i != bibfiles.count(); ++i)
add_->bibLW->addItem(changeExtension(bibfiles[i], ""));
- QString bibstyle = styleFile();
+ QString const bibstyle = styleFile();
bibtocCB->setChecked(bibtotoc() && !bibtopic);
bibtocCB->setEnabled(!bibtopic);
else if (bibtopic && btPrintCO->count() < 3)
btPrintCO->insertItem(1, qt_("all uncited references", 0));
- docstring btprint = params_["btprint"];
+ docstring const & btprint = params_["btprint"];
int btp = 0;
if ((bibtopic && btprint == "btPrintNotCited") ||
(!bibtopic && btprint == "btPrintAll"))
int item_nr = -1;
- QStringList str = bibStyles();
+ QStringList const str = bibStyles();
for (int i = 0; i != str.count(); ++i) {
QString item = changeExtension(str[i], "");
if (item == bibstyle)
// use \nocite{*}
params_["btprint"] = from_ascii("btPrintAll");
break;
- }
+ }
}
}
QString const label1 = qt_("Documents|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("BibTeX Databases (*.bib)"));
- return browseRelFile(in_name, bufferFilePath(),
+ return browseRelToParent(in_name, bufferFilePath(),
qt_("Select a BibTeX database to add"), filter, false, label1, dir1);
}
QString const label1 = qt_("Documents|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
QStringList const filter(qt_("BibTeX Styles (*.bst)"));
- return browseRelFile(in_name, bufferFilePath(),
+ return browseRelToParent(in_name, bufferFilePath(),
qt_("Select a BibTeX style"), filter, false, label1, dir1);
}
void GuiBibtex::rescanBibStyles() const
{
- rescanTexStyles();
+ rescanTexStyles("bst bib");
}
{
// the different bibtex packages have (and need) their
// own "plain" stylefiles
- CiteEngine const engine = buffer().params().citeEngine();
- QString defaultstyle;
- switch (engine) {
- case ENGINE_BASIC:
- defaultstyle = "plain";
- break;
- case ENGINE_NATBIB_AUTHORYEAR:
- defaultstyle = "plainnat";
- break;
- case ENGINE_NATBIB_NUMERICAL:
- defaultstyle = "plainnat";
- break;
- case ENGINE_JURABIB:
- defaultstyle = "jurabib";
- break;
- }
+ QString defaultstyle = toqstr(buffer().params().defaultBiblioStyle());
QString bst = toqstr(params_["options"]);
if (bibtotoc()){