]> git.lyx.org Git - features.git/commitdiff
remove position cache from insets - these were the last data item stored in
authorAndré Pönitz <poenitz@gmx.net>
Wed, 24 Oct 2001 09:16:06 +0000 (09:16 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 24 Oct 2001 09:16:06 +0000 (09:16 +0000)
each inset, so we are down to the absolute minimum here...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2929 a592a061-630c-0410-9148-cb99ea01b6c8

28 files changed:
src/mathed/formula.C
src/mathed/formulabase.C
src/mathed/formulabase.h
src/mathed/formulamacro.C
src/mathed/math_binominset.C
src/mathed/math_charinset.C
src/mathed/math_cursor.C
src/mathed/math_decorationinset.C
src/mathed/math_deliminset.C
src/mathed/math_fracinset.C
src/mathed/math_funcinset.C
src/mathed/math_funcliminset.C
src/mathed/math_gridinset.C
src/mathed/math_inset.C
src/mathed/math_inset.h
src/mathed/math_macro.C
src/mathed/math_macrotemplate.C
src/mathed/math_matrixinset.C
src/mathed/math_nestinset.C
src/mathed/math_nestinset.h
src/mathed/math_notinset.C
src/mathed/math_rootinset.C
src/mathed/math_scriptinset.C
src/mathed/math_sizeinset.C
src/mathed/math_specialcharinset.C
src/mathed/math_sqrtinset.C
src/mathed/math_stackrelinset.C
src/mathed/math_symbolinset.C

index 492b3d355af41aa0dfd04a1f9cc86434545e1255..ce31858fa874e23716acd48b965d846712ab15f9 100644 (file)
@@ -163,6 +163,8 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & font,
 
        par_->draw(pain, x, y);
        xx += par_->width();
+       xo_ = x;
+       yo_ = y;
 
        setCursorVisible(false);
 }
@@ -365,11 +367,17 @@ void InsetFormula::handleExtern(const string & arg)
        if (!mathcursor)
                return; 
 
+       bool selected = mathcursor->selection();
+
        MathArray ar;
-       if (mathcursor->selection())
+       if (selected) {
                mathcursor->selGet(ar);
-       else 
+               lyxerr << "use selection: " << ar << "\n";
+       } else {
                ar = mathcursor->cursor().cell();
+               lyxerr << "use whole cell: " << ar << "\n";
+       }
+
 
        // parse args
        string lang;
@@ -392,15 +400,14 @@ void InsetFormula::handleExtern(const string & arg)
        string code = os.str().c_str();
 
        // run external sript
-       string script = "lyx2" + arg + " '" + code + "' " + outfile;
+       string script = "lyx2" + lang + " '" + code + "' " + outfile;
        lyxerr << "calling: " << script << endl;
        Systemcalls cmd(Systemcalls::System, script, 0);
 
-       // append a '='
-       //ar.push_back(MathAtom(new MathCharInset('=')));
-       
        // append result
        MathArray br;
+       if (selected)
+               br.push_back(MathAtom(new MathCharInset('=', LM_TC_VAR)));
        ifstream is(outfile.c_str());
        mathed_parse_cell(br, is);
        mathcursor->insert(br);
index f355b6fd5f2c65941348c018dfce70ab6d155300..aa7e612105e42f497e87c4fda8ef85e0c242672d 100644 (file)
@@ -103,7 +103,7 @@ MathArrayInset * matrixpar(MathInset::idx_type & idx)
 
 
 InsetFormulaBase::InsetFormulaBase()
-       : view_(0), font_()
+       : view_(0), font_(), xo_(0), yo_(0)
 {
        // This is needed as long the math parser is not re-entrant
        MathMacroTable::builtinMacros();
@@ -172,9 +172,9 @@ void InsetFormulaBase::insetUnlock(BufferView * bv)
 void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
 {
        mathcursor->getPos(x, y);
-       x -= par()->xo();
-       y -= par()->yo();
-       y -= 3;
+       x += xo_;
+       y += yo_ - 3;
+       //lyxerr << "getCursorPos: " << x << " " << y << "\n";
 }
 
 
@@ -189,14 +189,14 @@ void InsetFormulaBase::toggleInsetCursor(BufferView * bv)
                int x;
                int y;
                mathcursor->getPos(x, y);
-               //x -= par()->xo();
-               y -= par()->yo();
                y -= 3;
+               y -= yo_;
                int asc = 0;
                int des = 0;
                MathMetricsInfo mi(bv, font_, LM_ST_TEXT);
                math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
                bv->showLockedInsetCursor(x, y, asc, des);
+               //lyxerr << "toggleInsetCursor: " << x << " " << y << "\n";
        }
 
        toggleCursorVisible();
@@ -210,13 +210,12 @@ void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
                        int x;
                        int y;
                        mathcursor->getPos(x, y);
-                       x -= par()->xo();
-                       y -= par()->yo();
                        int asc = 0;
                        int des = 0;
                        MathMetricsInfo mi(bv, font_, LM_ST_TEXT);
                        math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
                        bv->fitLockedInsetCursor(x, y, asc, des);
+                       //lyxerr << "showInsetCursor: " << x << " " << y << "\n";
                }
                toggleInsetCursor(bv);
        }
@@ -255,9 +254,8 @@ void InsetFormulaBase::insetButtonRelease(BufferView * bv,
 {
        if (mathcursor) {
                hideInsetCursor(bv);
-               x += par()->xo();
-               y += par()->yo();
-               mathcursor->setPos(x, y);
+               mathcursor->setPos(x + xo_, y + yo_);
+               //lyxerr << "insetButtonRelease: " << x + xo_ << " " << y + yo_ << "\n";
                showInsetCursor(bv);
                if (sel_flag) {
                        sel_flag = false;
@@ -288,14 +286,12 @@ void InsetFormulaBase::insetMotionNotify(BufferView * bv,
        if (sel_x && sel_y && abs(x-sel_x) > 4 && !sel_flag) {
                sel_flag = true;
                hideInsetCursor(bv);
-               mathcursor->setPos(sel_x + par()->xo(), sel_y + par()->yo());
+               mathcursor->setPos(sel_x, sel_y);
                mathcursor->selStart();
                showInsetCursor(bv);
                mathcursor->getPos(sel_x, sel_y);
        } else if (sel_flag) {
                hideInsetCursor(bv);
-               x += par()->xo();
-               y += par()->yo();
                mathcursor->setPos(x, y);
                showInsetCursor(bv);
                mathcursor->getPos(x, y);
@@ -429,14 +425,11 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
                //      break;
        case LFUN_SETXY: {
                lyxerr << "LFUN_SETXY broken!\n";
-               int x;
-               int y;
-               int x1;
-               int y1;
+               int x = 0;
+               int y = 0;
                istringstream is(arg.c_str());
                is >> x >> y;
-               par()->getXY(x1, y1);
-               mathcursor->setPos(x1 + x, y1 + y);
+               mathcursor->setPos(x, y);
                updateLocal(bv, false);
                break;
        }
@@ -683,6 +676,21 @@ Inset::Code InsetFormulaBase::lyxCode() const
 }
 
 
+int InsetFormulaBase::upperY() const
+{
+       return yo_ - ascent(view_, font_);
+}
+
+
+int InsetFormulaBase::lowerY() const
+{
+       return yo_ + descent(view_, font_);
+}
+
+
+/////////////////////////////////////////////////////////////////////
+
+
 void mathDispatchCreation(BufferView * bv, string const & arg, bool display)
 {
        if (bv->available()) {
@@ -795,3 +803,4 @@ void mathDispatchGreek(BufferView * bv, string const & arg)
        }
 }         
 
+
index 4d33c9700b9a9db422ddade7ef190cc8d9330876..8f5c30f94b0f78484d54782907cdfda25694c3c6 100644 (file)
@@ -45,6 +45,10 @@ public:
        virtual void draw(BufferView *,LyXFont const &, int, float &, bool) const = 0;
        ///
        virtual MathInsetTypes getType() const = 0;
+       /// upper y coordinate
+       virtual int upperY() const;
+       /// lower y coordinate
+       virtual int lowerY() const;
 
 public:
        ///
@@ -93,6 +97,10 @@ public:
        virtual void metrics(BufferView * bv = 0, LyXFont const & font = LyXFont()) const;
        ///
        virtual void updateLocal(BufferView * bv, bool mark_dirty);
+       ///
+       int xo() const { return xo_; }
+       ///
+       int yo() const { return yo_; }
 private:
        /// unimplemented
        void operator=(const InsetFormulaBase &);
@@ -100,6 +108,11 @@ private:
        mutable BufferView * view_;     
        ///
        mutable LyXFont font_;
+protected:
+       ///
+       mutable int xo_;
+       ///
+       mutable int yo_;
 };
 
 // We don't really mess want around with mathed stuff outside mathed.
index 587155747ee679a1a4a816883fc76296394786ea..e2e28577b3337a060ea98c7da5d22cf52f34b51c 100644 (file)
@@ -115,7 +115,7 @@ void InsetFormulaMacro::read(Buffer const *, LyXLex & lex)
 {
        string name = mathed_parse_macro(lex);
        setInsetName(name);
-       lyxerr << "metrics disabled";
+       //lyxerr << "metrics disabled";
        metrics();
 }
 
@@ -202,7 +202,7 @@ MathInsetTypes InsetFormulaMacro::getType() const
 
 
 void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
-                            int baseline, float & x, bool /*cleared*/) const
+                            int y, float & x, bool /*cleared*/) const
 {
        Painter & pain = bv->painter();
        LyXFont font(f);
@@ -210,24 +210,23 @@ void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
        // label
        font.setColor(LColor::math);
        
-       int const y = baseline - ascent(bv, font) + 1;
+       int const a = y - ascent(bv, font) + 1;
        int const w = width(bv, font) - 2;
        int const h = ascent(bv, font) + descent(bv, font) - 2;
 
        // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
-       pain.fillRectangle(int(x), y , w, h, LColor::mathmacrobg);
-       pain.rectangle(int(x), y, w, h, LColor::mathframe);
+       pain.fillRectangle(int(x), a , w, h, LColor::mathmacrobg);
+       pain.rectangle(int(x), a, w, h, LColor::mathframe);
 
        if (mathcursor && mathcursor->formula() == this)
                mathcursor->drawSelection(pain);
 
-       pain.text(int(x + 2), baseline, prefix(), font);
+       pain.text(int(x + 2), y, prefix(), font);
        x += width(bv, font);
 
        // formula
-       float t = par()->width() + 5;
-       x -= t;
-       par()->draw(pain, int(x), baseline);
-       x += t;
+       xo_ = int(x) - par()->width() - 5;
+       yo_ = y;
+       par()->draw(pain, xo_, yo_);
 }
 
index 7ffbd19fee98d040939ee7b049b66a9e3e49538e..85e9de308b499f8c20e3a053f69216026b8d8687 100644 (file)
@@ -42,8 +42,6 @@ void MathBinomInset::metrics(MathMetricsInfo const & st) const
 
 void MathBinomInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        int m = x + width() / 2;
        xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5);
        xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent()  + 3 - 5);
index 3d1557c402446a3a992223ecbf5972587b5c2c59..8b0a570184bf7e84c262cf26176c2c20fd7a3973 100644 (file)
@@ -84,8 +84,6 @@ void MathCharInset::metrics(MathMetricsInfo const & mi) const
 
 void MathCharInset::draw(Painter & pain, int x, int y) const
 { 
-       xo(x);
-       yo(y);
        //lyxerr << "drawing '" << char_ << "' code: " << code_ << endl;
        drawChar(pain, code_, mi_, x, y, char_);
 }
index 019e9fb1402e32ddbe136a1d73e14d0f1b93aa88..2bcfb6bb59411c9ddb0261421c9d6fdab119d22a 100644 (file)
@@ -750,7 +750,7 @@ void MathCursor::selClear()
 void MathCursor::selGet(MathArray & ar)
 {
        seldump("selGet");
-       if (selection_)
+       if (!selection_)
                return;
 
        theSelection.grab(*this);
@@ -1179,9 +1179,8 @@ bool MathCursor::goUp()
        int y0;
        getPos(x0, y0);
        std::vector<MathCursorPos> save = Cursor_;
-       MathAtom const & out = formula()->par();
        y0 -= xarray().ascent();
-       for (int y = y0 - 4; y > out->yo() - out->ascent(); y -= 4) {
+       for (int y = y0 - 4; y > formula()->upperY(); y -= 4) {
                setPos(x0, y);
                if (save != Cursor_ && xarray().yo() < y0)
                        return true;    
@@ -1212,9 +1211,8 @@ bool MathCursor::goDown()
        int y0;
        getPos(x0, y0);
        std::vector<MathCursorPos> save = Cursor_;
-       MathAtom const & out = formula()->par();
        y0 += xarray().descent();
-       for (int y = y0 + 4; y < out->yo() + out->descent(); y += 4) {
+       for (int y = y0 + 4; y < formula()->lowerY(); y += 4) {
                setPos(x0, y);
                if (save != Cursor_ && xarray().yo() > y0)
                        return true;    
index 35a2515d6b07c57555e5b058544f684482abd497..7c76cee6eb7b1a85225a0a7dd48720522a7aa4a7 100644 (file)
@@ -84,8 +84,6 @@ void MathDecorationInset::metrics(MathMetricsInfo const & st) const
 
 void MathDecorationInset::draw(Painter & pain, int x, int y) const
 { 
-       xo(x);
-       yo(x);
        xcell(0).draw(pain, x, y);
        if (wide()) 
                mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_);
index 40f548695cf822496ed5048ceac653ddf051cedd..ed1b0ea57398f0d18047bfaab393951a19d73de9 100644 (file)
@@ -76,9 +76,6 @@ void MathDelimInset::metrics(MathMetricsInfo const & mi) const
 
 void MathDelimInset::draw(Painter & pain, int x, int y) const
 { 
-       xo(x);
-       yo(y); 
-
        int const w = dw();
        int const b = y - ascent_;
        xcell(0).draw(pain, x + w + 2, y);
index 4a4cd0ef64bacb46495ab1ad3304ef49e724384c..0dcf7a801497cf7bf146a8804887a2fd98f4556e 100644 (file)
@@ -33,8 +33,6 @@ void MathFracInset::metrics(MathMetricsInfo const & mi) const
 
 void MathFracInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        int m = x + width() / 2;
        xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5);
        xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent()  + 3 - 5);
index 765aa191b94cf61d2b75da094f68ffc6dcfaa687..f53f513eddefccadcd9376433bed7b4b6287aa66 100644 (file)
@@ -58,7 +58,5 @@ void MathFuncInset::metrics(MathMetricsInfo const & mi) const
 
 void MathFuncInset::draw(Painter & pain, int x, int y) const
 { 
-       xo(x);
-       yo(y);
        drawStr(pain, LM_TC_TEX, mi_, x, y, name_);
 }
index 9939eaf494bfca1c6b0e667c974252476caadb49..5af941b386eabf61ea9a57ede571f7708a39878e 100644 (file)
@@ -44,7 +44,5 @@ void MathFuncLimInset::metrics(MathMetricsInfo const & mi) const
 
 void MathFuncLimInset::draw(Painter & pain, int x, int y) const
 {  
-       xo(x);
-       yo(y);
        drawStr(pain, LM_TC_TEXTRM, mi_, x, y, sym_->name);
 }
index 46b77d26511a3e7eba4cc1b19f042cb381f155f1..e2b3239a5c14efa051f658d7673d164cc50c4e25 100644 (file)
@@ -257,8 +257,6 @@ void MathGridInset::metrics(MathMetricsInfo const & mi) const
 
 void MathGridInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        for (idx_type idx = 0; idx < nargs(); ++idx)
                xcell(idx).draw(pain, x + cellXOffset(idx), y + cellYOffset(idx));
 }
index f8e45759743f4197364504f9b3bdcd61e79746b2..40984b1670e543e80668f36a615d023339ea5796 100644 (file)
@@ -25,7 +25,6 @@
 
 
 MathInset::MathInset()
-       : xo_(0), yo_(0)
 {}
 
 
@@ -47,30 +46,6 @@ std::ostream & operator<<(std::ostream & os, MathInset const & inset)
 }
 
 
-int MathInset::xo() const
-{
-       return xo_;
-}
-
-
-int MathInset::yo() const
-{
-       return yo_;
-}
-
-
-void MathInset::xo(int x) const
-{
-       xo_ = x;
-}
-
-
-void MathInset::yo(int y) const
-{
-       yo_ = y;
-}
-
-
 MathInset::size_type MathInset::nargs() const
 {
        return 0;
@@ -182,13 +157,6 @@ void MathInset::idxDeleteRange(idx_type, idx_type)
 {}
 
 
-void MathInset::getXY(int & x, int & y) const
-{
-       x = xo();
-       y = yo();
-}
-
-
 void MathInset::writeNormal(std::ostream & os) const
 {
        os << "[unknown ";
@@ -209,13 +177,8 @@ void MathInset::dump() const
 
 bool MathInset::covers(int x, int y) const
 {
-       //lyxerr << "cover? p: " << this << " x: " << x << " y: " <<  y
-       //      << " xo_: " << xo_ << " yo_: " << yo_  << endl;
-       return
-               x >= xo_ &&
-               x <= xo_ + width() &&
-               y >= yo_ - ascent() &&
-               y <= yo_ + descent();
+       lyxerr << "MathInset::covers() called directly!\n";
+       return false;
 }
 
 
index 665db40f4de0996def85df16cd087e3aa79b77e9..d2a8802bddfce4fff9dd8c8cacc5968e799da3fd 100644 (file)
@@ -104,7 +104,7 @@ public:
        /// the virtual base destructor
        virtual ~MathInset(); 
 
-       /// draw the object, sets xo_ and yo_ cached values 
+       /// draw the object
        virtual void draw(Painter &, int x, int y) const;
        /// write LaTeX and Lyx code
        virtual void write(MathWriteInfo & os) const;
@@ -171,16 +171,6 @@ public:
        ///
        virtual MathXArray const & xcell(idx_type) const;
                        
-       ///
-       virtual int xo() const;
-       ///
-       virtual int yo() const;
-       ///
-       virtual void xo(int tx) const;
-       ///
-       virtual void yo(int ty) const;
-       ///
-
        ///
        virtual col_type ncols() const { return 1; }
        ///
@@ -202,8 +192,6 @@ public:
        ///
        virtual void delCol(col_type) {}
 
-       ///
-       virtual void getXY(int & x, int & y) const;
        ///
        virtual bool covers(int x, int y) const;
 
@@ -253,13 +241,6 @@ public:
        virtual void validate(LaTeXFeatures & features) const;
        ///
        virtual void handleFont(MathTextCodes) {}
-
-private:
-       /// the following are used for positioning the cursor with the mouse
-       /// cached cursor start position in pixels from the document left
-       mutable int xo_;
-       /// cached cursor start position in pixels from the document top
-       mutable int yo_;
 };
 
 std::ostream & operator<<(std::ostream &, MathInset const &);
index c62f84dac884b743c2668c06e09bbedda212bcf8..5872f070d50470b913f4e8daa88ea51638c26308 100644 (file)
@@ -113,9 +113,6 @@ void MathMacro::metrics(MathMetricsInfo const & mi) const
 
 void MathMacro::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
-
        metrics(mi_);
 
        if (defining()) {
index 486e200cc0e15be1823f9d945987e2894a7b5316..2e9c9d2ef10bc5963d307e9a6a477134067ea308 100644 (file)
@@ -67,8 +67,6 @@ void MathMacroTemplate::metrics(MathMetricsInfo const & mi) const
 
 void MathMacroTemplate::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        xcell(0).draw(pain, x + 2, y + 1);
        pain.rectangle(x, y - ascent(), width(), height(), LColor::blue);
 }
index 70c3788326af75615de585ac3913b029480390e2..afa54f49816907d7e643cec26d31b864f0ad03cd 100644 (file)
@@ -173,9 +173,6 @@ void MathMatrixInset::metrics(MathMetricsInfo const & mi) const
 
 void MathMatrixInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
-
        MathGridInset::draw(pain, x, y);
 
        if (numberedType()) {
index ac8150043a3560d137f76ad34a82dde0a0aafde6..2cc97de50a23d3dc6ed1f45523c7a4cdfa35621f 100644 (file)
@@ -57,8 +57,6 @@ void MathNestInset::metrics(MathMetricsInfo const & mi) const
 
 void MathNestInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        for (idx_type i = 0; i < nargs(); ++i)
                xcell(i).draw(pain, x + xcell(i).xo(), y + xcell(i).yo());
 }
@@ -161,3 +159,21 @@ void MathNestInset::validate(LaTeXFeatures & features) const
        for (idx_type i = 0; i < nargs(); ++i)
                cell(i).validate(features);
 }
+
+
+bool MathNestInset::covers(int x, int y) const
+{
+       if (!nargs())
+               return false;
+       int x0 = xcell(0).xo();
+       int y0 = xcell(0).yo() - xcell(0).ascent();
+       int x1 = xcell(0).xo() + xcell(0).width();
+       int y1 = xcell(0).yo() + xcell(0).descent();
+       for (idx_type i = 1; i < nargs(); ++i) {
+               x0 = min(x0, xcell(i).xo());
+               y0 = min(y0, xcell(i).yo() - xcell(i).ascent());
+               x1 = max(x1, xcell(i).xo() + xcell(i).width());
+               y1 = max(y1, xcell(i).yo() + xcell(i).descent());
+       }
+       return x >= x0 && x <= x1 && y >= y0 && y <= y1;
+}
index 8bf33e0038ad0aba5e594121dc47237236e6b557..1416239b63db7b404bb73de958b2cbac1e4d11d1 100644 (file)
@@ -68,6 +68,8 @@ public:
 
        ///
        void validate(LaTeXFeatures & features) const;
+       ///
+       bool covers(int x, int y) const;
 
 protected:
        ///
index 3c6442c7ba1f410b8c354c8c3dd3333bba76f143..da26ba0a3b02c6ecf2eb88a463756425a644159d 100644 (file)
@@ -41,9 +41,6 @@ void MathNotInset::metrics(MathMetricsInfo const & mi) const
 
 void MathNotInset::draw(Painter & pain, int x, int y) const
 {  
-       xo(x);
-       yo(y);
-
        if (math_font_available(LM_TC_CMSY))
                drawChar(pain, LM_TC_CMSY, mi_, x, y, 54);
        else
index d5190cea733e9879884afa6fde5c7ae16ac6abde..d84ec004ace0b2c6febd3b3f25dd9f0222ba6bb7 100644 (file)
@@ -42,8 +42,6 @@ void MathRootInset::metrics(MathMetricsInfo const & mi) const
 
 void MathRootInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        int const w = xcell(0).width();
        xcell(0).draw(pain, x, y - 5 - xcell(0).descent());       // the "exponent"
        xcell(1).draw(pain, x + w + 8, y);   // the "base"
index b68c70f26fc786a597c4ecfac6da791f5bb8d5ce..39de7947d868d1ef89bb2c3b0f2c7803cc11a3ce 100644 (file)
@@ -209,9 +209,6 @@ void MathScriptInset::draw(Painter & pain, int x, int y) const
 void MathScriptInset::draw(MathInset const * nuc, Painter & pain,
        int x, int y) const
 {  
-       xo(x);
-       yo(y);
-
        if (nuc)
                nuc->draw(pain, x + dxx(nuc), y);
        else
index d7e4c1b5300eab6078a63075b123aa9fa8d48370..a06896ba0fe76d45f0a6bbe916c25bdeca81fa93 100644 (file)
@@ -20,8 +20,6 @@ MathInset * MathSizeInset::clone() const
 
 void MathSizeInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        xcell(0).draw(pain, x, y);
 }
 
index bfd1eaf130b089f74f0d27d189c0d5bd575db8f9..fad43219c75a04661eb4332967a69c9a4c243471 100644 (file)
@@ -44,8 +44,6 @@ void MathSpecialCharInset::metrics(MathMetricsInfo const & mi) const
 
 void MathSpecialCharInset::draw(Painter & pain, int x, int y) const
 { 
-       xo(x);
-       yo(y);
        drawChar(pain, LM_TC_CONST, mi_, x, y, char_);
 }
 
index 5bfb8112a65e4f1575159c3a88fd561c465a0ddb..acd1440cf9c73288982babdef6859d98f956f4bd 100644 (file)
@@ -30,8 +30,6 @@ void MathSqrtInset::metrics(MathMetricsInfo const & mi) const
 
 void MathSqrtInset::draw(Painter & pain, int x, int y) const
 { 
-       xo(x);
-       yo(y);
        xcell(0).draw(pain, x + 10, y); 
        int const a = ascent_;
        int const d = descent_;
index 1333bc6414c208243af799ed9753bd6ad218e8a4..eb19b0ba0f3f22585f1571ff3d12c632394f0a14 100644 (file)
@@ -31,8 +31,6 @@ void MathStackrelInset::metrics(MathMetricsInfo const & mi) const
 
 void MathStackrelInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        int m = x + width() / 2;
        xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).height() - 4);
        xcell(1).draw(pain, m - xcell(1).width() / 2, y);
index 24e3e9a923735e963b75102561e104031a286044..09a3cbadad8a42ab85cc68ea8cc6a6700593c867 100644 (file)
@@ -81,8 +81,6 @@ void MathSymbolInset::metrics(MathMetricsInfo const & mi) const
 
 void MathSymbolInset::draw(Painter & pain, int x, int y) const
 {  
-       xo(x);
-       yo(y);
        MathTextCodes Code = code();
        if (sym_->latex_font_id > 0 && math_font_available(Code))
                drawChar(pain, Code, mi_, x, y - h_, sym_->latex_font_id);