]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fracbase.C
re-enable automatic deletion of empty super/subscripts;
[lyx.git] / src / mathed / math_fracbase.C
1 #ifdef __GNUG__
2 #pragma implementation
3 #endif
4
5 #include "math_fracbase.h"
6 #include "math_mathmlstream.h"
7
8
9 MathFracbaseInset::MathFracbaseInset()
10         : MathNestInset(2)
11 {}
12
13
14 bool MathFracbaseInset::idxRight(MathInset::idx_type &,
15                                  MathInset::pos_type &) const
16 {
17         return false;
18 }
19
20
21 bool MathFracbaseInset::idxLeft(MathInset::idx_type &,
22                                 MathInset::pos_type &) const
23 {
24         return false;
25 }
26
27
28 bool MathFracbaseInset::idxFirstUp(idx_type & idx, pos_type & pos) const
29 {
30         idx = 0;
31         pos = 0;
32         return true;
33 }
34
35
36 bool MathFracbaseInset::idxFirstDown(idx_type & idx, pos_type & pos) const
37 {
38         idx = 1;
39         pos = 0;
40         return true;
41 }
42
43
44 bool MathFracbaseInset::idxLastUp(idx_type & idx, pos_type & pos) const
45 {
46         idx = 0;
47         pos = cell(0).size();
48         return true;
49 }
50
51
52 bool MathFracbaseInset::idxLastDown(idx_type & idx, pos_type & pos) const
53 {
54         idx = 1;
55         pos = cell(1).size();
56         return true;
57 }
58
59
60 bool MathFracbaseInset::idxUp(idx_type & idx) const
61 {
62         if (idx == 0)
63                 return false;
64         idx = 0;
65         return true;
66 }
67
68
69 bool MathFracbaseInset::idxDown(idx_type & idx) const
70 {
71         if (idx == 1)
72                 return false;
73         idx = 1;
74         return true;
75 }