]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathPar.cpp
Fix a few rename inconsistencies discovered by JMarc in insets and mathed, step 1
[lyx.git] / src / mathed / InsetMathPar.cpp
1 /**
2  * \file InsetMathPar.cpp
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 "InsetMathPar.h"
14 #include "MathArray.h"
15 #include "MathStream.h"
16 #include "support/std_ostream.h"
17
18
19 namespace lyx {
20
21
22 using std::auto_ptr;
23
24
25 InsetMathPar::InsetMathPar(MathArray const & ar)
26 {
27         cells_[0] = ar;
28 }
29
30
31 bool InsetMathPar::metrics(MetricsInfo & mi, Dimension & dim) const
32 {
33         dim = dim_;
34         FontSetChanger dummy1(mi.base, "textnormal");
35         InsetMathGrid::metrics(mi);
36         if (dim_ == dim)
37                 return false;
38         dim = dim_;
39         return true;
40 }
41
42
43 void InsetMathPar::draw(PainterInfo & pi, int x, int y) const
44 {
45         FontSetChanger dummy1(pi.base, "textnormal");
46         InsetMathGrid::draw(pi, x, y);
47 }
48
49
50 void InsetMathPar::write(WriteStream & os) const
51 {
52         for (idx_type i = 0; i < nargs(); ++i)
53                 os << cell(i) << "\n";
54 }
55
56
57 void InsetMathPar::infoize(odocstream & os) const
58 {
59         os << "Type: Paragraph ";
60 }
61
62
63 auto_ptr<InsetBase> InsetMathPar::doClone() const
64 {
65         return auto_ptr<InsetBase>(new InsetMathPar(*this));
66 }
67
68
69 } // namespace lyx