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