]> git.lyx.org Git - lyx.git/blob - src/insets/InsetFlex.cpp
Kornel's gcc compile fix.
[lyx.git] / src / insets / InsetFlex.cpp
1 /**
2  * \file InsetFlex.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  * \author Martin Vermeer
8  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #include <config.h>
14
15 #include "InsetFlex.h"
16
17 #include "Buffer.h"
18 #include "BufferParams.h"
19 #include "Lexer.h"
20
21 #include "support/gettext.h"
22
23 #include <ostream>
24
25 using namespace std;
26
27 namespace lyx {
28
29
30 InsetFlex::InsetFlex(Buffer const & buf, string const & layoutName)
31         : InsetCollapsable(buf), name_(layoutName)
32 {
33         status_= Collapsed;
34 }
35
36
37 InsetFlex::InsetFlex(InsetFlex const & in)
38         : InsetCollapsable(in), name_(in.name_)
39 {}
40
41
42 InsetLayout::InsetDecoration InsetFlex::decoration() const
43 {
44         InsetLayout::InsetDecoration const dec = getLayout().decoration();
45         return dec == InsetLayout::DEFAULT ? InsetLayout::CONGLOMERATE : dec;
46 }
47
48
49 void InsetFlex::write(ostream & os) const
50 {
51         os << "Flex " <<
52                 (name_.empty() ? "undefined" : name_) << "\n";
53         InsetCollapsable::write(os);
54 }
55
56
57 } // namespace lyx