From: André Pönitz Date: Tue, 13 Nov 2001 12:51:43 +0000 (+0000) Subject: tiny bugfix; remove unnerded code X-Git-Tag: 1.6.10~20348 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1e3e8aaac940149d0ab01f376f5fddd9c4d79c7b;p=features.git tiny bugfix; remove unnerded code git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3017 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index bdca913e10..30cae11437 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -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); diff --git a/src/mathed/math_cursor.h b/src/mathed/math_cursor.h index 513886d97a..97f5ef97cc 100644 --- a/src/mathed/math_cursor.h +++ b/src/mathed/math_cursor.h @@ -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); diff --git a/src/mathed/math_xdata.C b/src/mathed/math_xdata.C index cffec88712..61ce8145be 100644 --- a/src/mathed/math_xdata.C +++ b/src/mathed/math_xdata.C @@ -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();