]> git.lyx.org Git - lyx.git/blob - src/mathed/math_liminset.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_liminset.C
1 /**
2  * \file math_liminset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "math_liminset.h"
14 #include "math_data.h"
15 #include "math_mathmlstream.h"
16 #include "debug.h"
17
18 using std::auto_ptr;
19 using std::endl;
20
21
22 MathLimInset::MathLimInset
23         (MathArray const & f, MathArray const & x, MathArray const & x0)
24         : MathNestInset(3)
25 {
26         cell(0) = f;
27         cell(1) = x;
28         cell(2) = x0;
29 }
30
31
32 auto_ptr<InsetBase> MathLimInset::doClone() const
33 {
34         return auto_ptr<InsetBase>(new MathLimInset(*this));
35 }
36
37
38 void MathLimInset::normalize(NormalStream & os) const
39 {
40         os << "[lim " << cell(0) << ' ' << cell(1) << ' ' << cell(2) << ']';
41 }
42
43
44 void MathLimInset::metrics(MetricsInfo &, Dimension &) const
45 {
46         lyxerr << "should not happen" << endl;
47 }
48
49
50 void MathLimInset::draw(PainterInfo &, int, int) const
51 {
52         lyxerr << "should not happen" << endl;
53 }
54
55
56 void MathLimInset::maple(MapleStream & os) const
57 {
58         os << "limit(" << cell(0) << ',' << cell(1) << '=' << cell(2) << ')';
59 }
60
61
62 void MathLimInset::mathematica(MathematicaStream & os) const
63 {
64         os << "Lim[" << cell(0) << ',' << cell(1) << ',' << cell(2) << ']';
65 }
66
67
68 void MathLimInset::mathmlize(MathMLStream & os) const
69 {
70         os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
71 }
72
73
74 void MathLimInset::write(WriteStream &) const
75 {
76         lyxerr << "should not happen" << endl;
77 }