2 * \file ControlBibtex.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
15 #include "ControlBibtex.h"
18 #include "helper_funcs.h"
19 #include "tex_helpers.h"
22 #include "support/filetools.h"
23 #include "support/globbing.h"
25 using lyx::support::FileFilterList;
26 using lyx::support::OnlyFilename;
33 ControlBibtex::ControlBibtex(Dialog & d)
34 : ControlCommand(d, "bibtex")
38 string const ControlBibtex::browse(string const & in_name,
40 FileFilterList const & filters) const
42 pair<string, string> dir1(_("Documents|#o#O"),
43 string(lyxrc.document_path));
44 return browseRelFile(in_name, kernel().bufferFilepath(),
45 title, filters, false, dir1);
49 void ControlBibtex::getBibStyles(vector<string> & data) const
53 getTexFileList("bstFiles.lst", data);
54 // test, if we have a valid list, otherwise run rescan
57 getTexFileList("bstFiles.lst", data);
59 vector<string>::iterator it = data.begin();
60 vector<string>::iterator end = data.end();
61 for (; it != end; ++it) {
62 *it = OnlyFilename(*it);
67 void ControlBibtex::getBibFiles(vector<string> & data) const
71 getTexFileList("bibFiles.lst", data);
72 // test, if we have a valid list, otherwise run rescan
75 getTexFileList("bibFiles.lst", data);
77 vector<string>::iterator it = data.begin();
78 vector<string>::iterator end = data.end();
79 for (; it != end; ++it) {
80 *it = OnlyFilename(*it);
85 void ControlBibtex::rescanBibStyles() const