]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlShowFile.C
hopefully fix tex2lyx linking.
[lyx.git] / src / frontends / controllers / ControlShowFile.C
1 /**
2  * \file ControlShowFile.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Herbert Voß
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ControlShowFile.h"
14 #include "support/filetools.h"
15
16 using std::string;
17
18 namespace lyx {
19
20 using support::onlyFilename;
21
22 namespace frontend {
23
24
25 ControlShowFile::ControlShowFile(Dialog & parent)
26         : Dialog::Controller(parent)
27 {}
28
29
30 bool ControlShowFile::initialiseParams(string const & data)
31 {
32         filename_ = data;
33         return true;
34 }
35
36
37 void ControlShowFile::clearParams()
38 {
39         filename_.erase();
40 }
41
42
43 string ControlShowFile::getFileContents()
44 {
45         return support::getFileContents(filename_);
46 }
47
48
49 string ControlShowFile::getFileName()
50 {
51         return onlyFilename(filename_);
52 }
53
54 } // namespace frontend
55 } // namespace lyx