mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
mathed12.diff + some small tweeks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1488 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
af8dbd4a5c
commit
5059e558f1
@ -1,13 +1,23 @@
|
||||
2001-02-12 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* math_defs.h (struct MathedRowSt): make all private variables end
|
||||
with '_', initialize in initializer list instead of in function
|
||||
body.
|
||||
|
||||
2001-02-12 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* formula.C (LocalDispatch): Change the default action of
|
||||
break-line to create an align* environment instead of eqnarray*.
|
||||
|
||||
* math_inset.C (Metrics): Correct drawing of the multline environment.
|
||||
* math_inset.C (Metrics): Correct drawing of the multline
|
||||
environment.
|
||||
|
||||
2001-02-12 André Pönitz <poenitz@htwm.de>
|
||||
* array.[hC]: replace private variable maxsize_ with call
|
||||
to bf_.size()
|
||||
|
||||
* array.[hC]: replace private variable maxsize_ with call to
|
||||
bf_.size()
|
||||
* math_defs.h: replace int[] by std::vector<int> for
|
||||
MathedRowSt::widths
|
||||
|
||||
2001-02-09 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
|
@ -409,61 +409,55 @@ class MathParInset: public MathedInset {
|
||||
It allows to manage the extra info independently of the paragraph data.
|
||||
Only used for multiline paragraphs.
|
||||
*/
|
||||
struct MathedRowSt {
|
||||
///
|
||||
explicit
|
||||
MathedRowSt(int n) {
|
||||
w = new int[n + 1]; // this leaks
|
||||
asc = desc = y = 0;
|
||||
for (int i = 0 ; i < n + 1 ; ++i)
|
||||
w[i] = 0;
|
||||
next = 0;
|
||||
numbered = true;
|
||||
}
|
||||
///
|
||||
~MathedRowSt() {
|
||||
delete[] w;
|
||||
}
|
||||
/// Should be const but...
|
||||
MathedRowSt * getNext() const { return next; }
|
||||
/// ...we couldn't use this.
|
||||
void setNext(MathedRowSt * n) { next = n; }
|
||||
///
|
||||
string const & getLabel() const { return label; }
|
||||
///
|
||||
bool isNumbered() const { return numbered; }
|
||||
///
|
||||
int getBaseline() const { return y; }
|
||||
///
|
||||
void setBaseline(int b) { y = b; }
|
||||
///
|
||||
int ascent() const { return asc; }
|
||||
///
|
||||
int descent() const { return desc; }
|
||||
///
|
||||
void ascent(int a) { asc = a; }
|
||||
///
|
||||
void descent(int d) { desc = d; }
|
||||
///
|
||||
int getTab(int i) const { return w[i]; }
|
||||
///
|
||||
void setLabel(string const & l) { label = l; }
|
||||
///
|
||||
void setNumbered(bool nf) { numbered = nf; }
|
||||
///
|
||||
void setTab(int i, int t) { w[i] = t; }
|
||||
|
||||
private:
|
||||
/// Vericals
|
||||
int asc, desc, y;
|
||||
/// widths
|
||||
int * w;
|
||||
///
|
||||
string label;
|
||||
///
|
||||
bool numbered;
|
||||
///
|
||||
MathedRowSt * next;
|
||||
struct MathedRowSt
|
||||
{
|
||||
///
|
||||
explicit
|
||||
MathedRowSt(int n)
|
||||
: asc_(0), desc_(0), y_(0), widths_(n + 1, 0),
|
||||
numbered_(true), next_(0)
|
||||
{}
|
||||
/// Should be const but...
|
||||
MathedRowSt * getNext() const { return next_; }
|
||||
/// ...we couldn't use this.
|
||||
void setNext(MathedRowSt * n) { next_ = n; }
|
||||
///
|
||||
string const & getLabel() const { return label_; }
|
||||
///
|
||||
bool isNumbered() const { return numbered_; }
|
||||
///
|
||||
int getBaseline() const { return y_; }
|
||||
///
|
||||
void setBaseline(int b) { y_ = b; }
|
||||
///
|
||||
int ascent() const { return asc_; }
|
||||
///
|
||||
int descent() const { return desc_; }
|
||||
///
|
||||
void ascent(int a) { asc_ = a; }
|
||||
///
|
||||
void descent(int d) { desc_ = d; }
|
||||
///
|
||||
int getTab(int i) const { return widths_[i]; }
|
||||
///
|
||||
void setLabel(string const & l) { label_ = l; }
|
||||
///
|
||||
void setNumbered(bool nf) { numbered_ = nf; }
|
||||
///
|
||||
void setTab(int i, int t) { widths_[i] = t; }
|
||||
private:
|
||||
/// Vericals
|
||||
int asc_;
|
||||
int desc_;
|
||||
int y_;
|
||||
/// widths
|
||||
std::vector<int> widths_;
|
||||
///
|
||||
string label_;
|
||||
///
|
||||
bool numbered_;
|
||||
///
|
||||
MathedRowSt * next_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user