]> git.lyx.org Git - lyx.git/blob - src/insets/insetfootlike.C
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / insets / insetfootlike.C
1 /* This file is part of
2  * ======================================================
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright 2000-2001 The LyX Team.
7  *
8  * ======================================================
9  */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "insetfootlike.h"
18 #include "lyxfont.h"
19 #include "buffer.h"
20 #include "lyxtext.h"
21 #include "support/LOstream.h"
22
23
24 InsetFootlike::InsetFootlike()
25         : InsetCollapsable()
26 {
27         LyXFont font(LyXFont::ALL_SANE);
28         font.decSize();
29         font.decSize();
30         font.setColor(LColor::collapsable);
31         setLabelFont(font);
32         setAutoCollapse(false);
33 }
34
35
36 void InsetFootlike::write(Buffer const * buf, std::ostream & os) const 
37 {
38         os << getInsetName() << "\n";
39         InsetCollapsable::write(buf, os);
40 }
41
42
43 bool InsetFootlike::insetAllowed(Inset::Code code) const
44 {
45         if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE))
46                 return false;
47         return InsetCollapsable::insetAllowed(code);
48 }