]> git.lyx.org Git - lyx.git/commitdiff
tiny bugfix; remove unnerded code
authorAndré Pönitz <poenitz@gmx.net>
Tue, 13 Nov 2001 12:51:43 +0000 (12:51 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 13 Nov 2001 12:51:43 +0000 (12:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3017 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C
src/mathed/math_cursor.h
src/mathed/math_xdata.C

index bdca913e107a68aa4efd3c2cd384f69d8a992bf9..30cae1143744c8388ac1465ac085360b8cd9281b 100644 (file)
@@ -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);
index 513886d97a902df095addcfd363e14bdb8481880..97f5ef97ccda3f90da38b4fd70eb011b70bdfdb6 100644 (file)
@@ -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);
 
index cffec88712d762a48e5ac119cf2a6443e7b90bd0..61ce8145be2cb751f752c20c1f96b22be3a58981 100644 (file)
@@ -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();