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"
20 #include "helper_funcs.h"
21 #include "tex_helpers.h"
24 #include "support/filetools.h"
30 ControlBibtex::ControlBibtex(Dialog & d)
31 : ControlCommand(d, "bibtex")
35 string const ControlBibtex::Browse(string const & in_name,
37 string const & pattern)
39 pair<string, string> dir1(_("Documents|#o#O"),
40 string(lyxrc.document_path));
41 return browseRelFile(in_name, kernel().buffer()->filePath(),
42 title, pattern, false, dir1);
46 void ControlBibtex::getBibStyles(vector<string> & data) const
50 getTexFileList("bstFiles.lst", data);
51 // test, if we have a valid list, otherwise run rescan
54 getTexFileList("bstFiles.lst", data);
56 vector<string>::iterator it = data.begin();
57 vector<string>::iterator end = data.end();
58 for (; it != end; ++it) {
59 *it = OnlyFilename(*it);
64 void ControlBibtex::getBibFiles(vector<string> & data) const
68 getTexFileList("bibFiles.lst", data);
69 // test, if we have a valid list, otherwise run rescan
72 getTexFileList("bibFiles.lst", data);
74 vector<string>::iterator it = data.begin();
75 vector<string>::iterator end = data.end();
76 for (; it != end; ++it) {
77 *it = OnlyFilename(*it);
82 void ControlBibtex::rescanBibStyles() const