mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
tiny bugfix; remove unnerded code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3017 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7f7275c914
commit
1e3e8aaac9
@ -1176,19 +1176,6 @@ int MathCursor::cellYOffset() const
|
||||
}
|
||||
|
||||
|
||||
int MathCursor::xpos() const
|
||||
{
|
||||
return cellXOffset() + xarray().pos2x(pos());
|
||||
}
|
||||
|
||||
|
||||
int MathCursor::ypos() const
|
||||
{
|
||||
return cellYOffset();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MathCursor::gotoX(int x)
|
||||
{
|
||||
pos() = xarray().x2pos(x - cellXOffset());
|
||||
@ -1286,7 +1273,7 @@ bool MathCursor::interpret(string const & s)
|
||||
|
||||
if (s.size() >= 5 && s.substr(0, 5) == "cases") {
|
||||
unsigned int n = 1;
|
||||
istringstream is(s.substr(6).c_str());
|
||||
istringstream is(s.substr(5).c_str());
|
||||
is >> n;
|
||||
n = std::max(1u, n);
|
||||
niceInsert(MathAtom(new MathCasesInset(n)));
|
||||
@ -1298,7 +1285,7 @@ bool MathCursor::interpret(string const & s)
|
||||
unsigned int n = 1;
|
||||
string v_align;
|
||||
string h_align;
|
||||
istringstream is(s.substr(7).c_str());
|
||||
istringstream is(s.substr(6).c_str());
|
||||
is >> m >> n >> v_align >> h_align;
|
||||
m = std::max(1u, m);
|
||||
n = std::max(1u, n);
|
||||
|
@ -289,10 +289,6 @@ private:
|
||||
int cellXOffset() const;
|
||||
/// y-offset of current cell relative to par yo
|
||||
int cellYOffset() const;
|
||||
/// current x position relative to par xo
|
||||
int xpos() const;
|
||||
/// current y position relative to par yo
|
||||
int ypos() const;
|
||||
/// adjust position in current cell according to x. idx is not changed.
|
||||
void gotoX(int x);
|
||||
|
||||
|
@ -18,15 +18,15 @@ MathXArray::MathXArray()
|
||||
{}
|
||||
|
||||
|
||||
void MathXArray::metrics(MathMetricsInfo const & st) const
|
||||
void MathXArray::metrics(MathMetricsInfo const & mi) const
|
||||
{
|
||||
size_ = st;
|
||||
mathed_char_dim(LM_TC_VAR, st, 'I', ascent_, descent_, width_);
|
||||
size_ = mi;
|
||||
mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
|
||||
|
||||
if (data_.empty())
|
||||
return;
|
||||
|
||||
math_font_max_dim(LM_TC_TEXTRM, st, ascent_, descent_);
|
||||
math_font_max_dim(LM_TC_TEXTRM, mi, ascent_, descent_);
|
||||
width_ = 0;
|
||||
|
||||
//lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";
|
||||
@ -35,13 +35,13 @@ void MathXArray::metrics(MathMetricsInfo const & st) const
|
||||
MathInset const * p = it->nucleus();
|
||||
MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
|
||||
if (q) {
|
||||
q->metrics(p, st);
|
||||
q->metrics(p, mi);
|
||||
ascent_ = std::max(ascent_, q->ascent(p));
|
||||
descent_ = std::max(descent_, q->descent(p));
|
||||
width_ += q->width(p);
|
||||
++it;
|
||||
} else {
|
||||
p->metrics(st);
|
||||
p->metrics(mi);
|
||||
ascent_ = std::max(ascent_, p->ascent());
|
||||
descent_ = std::max(descent_, p->descent());
|
||||
width_ += p->width();
|
||||
|
Loading…
Reference in New Issue
Block a user