]> git.lyx.org Git - lyx.git/blob - src/mathed/math_parinset.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_parinset.C
1 /**
2  * \file math_parinset.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_parinset.h"
14 #include "math_data.h"
15 #include "math_mathmlstream.h"
16 #include "support/std_ostream.h"
17
18
19 using std::auto_ptr;
20
21
22 MathParInset::MathParInset(MathArray const & ar)
23 {
24         cells_[0] = ar;
25 }
26
27
28 void MathParInset::metrics(MetricsInfo & mi, Dimension & dim) const
29 {
30         FontSetChanger dummy1(mi.base, "textnormal");
31         MathGridInset::metrics(mi);
32         dim = dim_;
33 }
34
35
36 void MathParInset::draw(PainterInfo & pi, int x, int y) const
37 {
38         FontSetChanger dummy1(pi.base, "textnormal");
39         MathGridInset::draw(pi, x, y);
40 }
41
42
43 void MathParInset::write(WriteStream & os) const
44 {
45         for (idx_type i = 0; i < nargs(); ++i)
46                 os << cell(i) << "\n";
47 }
48
49
50 void MathParInset::infoize(std::ostream & os) const
51 {
52         os << "Type: Paragraph ";
53 }
54
55
56 auto_ptr<InsetBase> MathParInset::doClone() const
57 {
58         return auto_ptr<InsetBase>(new MathParInset(*this));
59 }