]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlShowFile.C
Overhaul the branches code.
[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
17 using lyx::support::GetFileContents;
18 using lyx::support::OnlyFilename;
19
20 using std::string;
21
22
23 ControlShowFile::ControlShowFile(Dialog & parent)
24         : Dialog::Controller(parent)
25 {}
26
27
28 bool ControlShowFile::initialiseParams(string const & data)
29 {
30         filename_ = data;
31         return true;
32 }
33
34
35 void ControlShowFile::clearParams()
36 {
37         filename_.erase();
38 }
39
40
41 string ControlShowFile::getFileContents()
42 {
43         return GetFileContents(filename_);
44 }
45
46
47 string ControlShowFile::getFileName()
48 {
49         return OnlyFilename(filename_);
50 }