]> git.lyx.org Git - lyx.git/blob - src/insets/insetmarginal.C
Make it compile when USE_BOOST_FORMAT is unset
[lyx.git] / src / insets / insetmarginal.C
1 /**
2  * \file insetmarginal.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Jürgen Vigna
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #include <config.h>
13
14 #ifdef __GNUG__
15 #pragma implementation
16 #endif
17
18 #include "insetmarginal.h"
19 #include "gettext.h"
20 #include "lyxfont.h"
21 #include "BufferView.h"
22 #include "lyxtext.h"
23 #include "insets/insettext.h"
24 #include "support/LOstream.h"
25 #include "debug.h"
26
27
28 using std::ostream;
29
30
31 InsetMarginal::InsetMarginal(BufferParams const & bp)
32         : InsetFootlike(bp)
33 {
34         setLabel(_("margin"));
35         setInsetName("Marginal");
36 }
37
38
39 InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
40         : InsetFootlike(in, same_id)
41 {
42         setLabel(_("margin"));
43         setInsetName("Marginal");
44 }
45
46
47 Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
48 {
49         return new InsetMarginal(*const_cast<InsetMarginal *>(this), same_id);
50 }
51
52
53 string const InsetMarginal::editMessage() const
54 {
55         return _("Opened Marginal Note Inset");
56 }
57
58
59 int InsetMarginal::latex(Buffer const * buf,
60                          ostream & os, bool fragile, bool fp) const
61 {
62         os << "%\n\\marginpar{";
63
64         int const i = inset.latex(buf, os, fragile, fp);
65         os << "%\n}";
66
67         return i + 2;
68 }