Just to make sure this does not get lost:

I got it working _somehow_ using brute force (convert math to strings,
replace string, convert back, and that in a loop).

There are still a few quirks, e.g.
 - for replacing \alpha with \beta you have
   to search for '\alpha ' (with a trailing space!).
 - selection is optically wrong if the replace is repeated in the same
   formula
 - searching foo misses the second foo in  '$xxxfooyyy$foo foo' (but not
   in '$xxxfooyyy$zzzfoo foo'(!))

But I guess this could be ironed out. I would not mind if somebody had a
look...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)
Index: lyxfind.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfind.C,v
retrieving revision 1.31
diff -u -p -r1.31 lyxfind.C
--- lyxfind.C   8 Aug 2002 21:08:02 -0000       1.31
+++ lyxfind.C   9 Oct 2002 19:14:29 -0000
@@ -75,6 +75,7 @@ int LyXReplace(BufferView * bv,
                str1 = lowercase(searchstr);
                str2 = lowercase(text->selectionAsString(bv->buffer(), false));
        }
+       //lyxerr << "str1: '" << str1 << "' str2: '" << str2 << "'\n"; 
        if (str1 != str2) {
                if (!LyXFind(bv, searchstr, fw, casesens, matchwrd) ||
                        !replaceall)
@@ -87,20 +88,13 @@ int LyXReplace(BufferView * bv,
        int replace_count = 0;
        do {
                text = bv->getLyXText();
-               // We have to do this check only because mathed insets don't
-               // return their own LyXText but the LyXText of it's parent!
-               if (!bv->theLockingInset() ||
-                       ((text != bv->text) &&
-                        (text->inset_owner == text->inset_owner->getLockingInset())))
-               {
-                       bv->hideCursor();
-                       bv->update(text, BufferView::SELECT|BufferView::FITCUR);
-                       bv->toggleSelection(false);
-                       text->replaceSelectionWithString(bv, replacestr);
-                       text->setSelectionOverString(bv, replacestr);
-                       bv->update(text, 
BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
-                       ++replace_count;
-               }
+               bv->hideCursor();
+               bv->update(text, BufferView::SELECT|BufferView::FITCUR);
+               bv->toggleSelection(false);
+               text->replaceSelectionWithString(bv, replacestr);
+               text->setSelectionOverString(bv, replacestr);
+               bv->update(text, 
+BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+               ++replace_count;
                if (!once)
                        found = LyXFind(bv, searchstr, fw, casesens, matchwrd);
        } while (!once && replaceall && found);
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.263
diff -u -p -r1.263 text2.C
--- text2.C     10 Sep 2002 10:18:55 -0000      1.263
+++ text2.C     9 Oct 2002 19:14:29 -0000
@@ -916,7 +916,11 @@ void LyXText::setSelection(BufferView * 
 string const LyXText::selectionAsString(Buffer const * buffer,
                                        bool label) const
 {
-       if (!selection.set()) return string();
+       if (the_locking_inset) 
+               return the_locking_inset->selectionAsString(buffer);
+
+       if (!selection.set())
+               return string();
 
        // should be const ...
        Paragraph * startpar(selection.start.par());
@@ -924,9 +928,8 @@ string const LyXText::selectionAsString(
        pos_type const startpos(selection.start.pos());
        pos_type const endpos(selection.end.pos());
 
-       if (startpar == endpar) {
+       if (startpar == endpar)
                return startpar->asString(buffer, startpos, endpos, label);
-       }
 
        string result;
 
@@ -1582,25 +1585,32 @@ void LyXText::replaceSelectionWithString
        setCursorParUndo(bview);
        freezeUndo();
 
-       if (!selection.set()) { // create a dummy selection
-               selection.end = cursor;
-               selection.start = cursor;
-       }
+       if (the_locking_inset) {
 
-       // Get font setting before we cut
-       pos_type pos = selection.end.pos();
-       LyXFont const font = selection.start.par()
-               ->getFontSettings(bview->buffer()->params,
-                                 selection.start.pos());
-
-       // Insert the new string
-       for (string::const_iterator cit = str.begin(); cit != str.end(); ++cit) {
-               selection.end.par()->insertChar(pos, (*cit), font);
-               ++pos;
-       }
+               the_locking_inset->replaceSelectionWithString(bview, str);
 
-       // Cut the selection
-       cutSelection(bview, true, false);
+       } else {
+
+               if (!selection.set()) { // create a dummy selection
+                       selection.end = cursor;
+                       selection.start = cursor;
+               }
+
+               // Get font setting before we cut
+               pos_type pos = selection.end.pos();
+               LyXFont const font = selection.start.par()
+                       ->getFontSettings(bview->buffer()->params,
+                                               selection.start.pos());
+
+               // Insert the new string
+               for (string::const_iterator cit = str.begin(); cit != str.end(); 
+++cit) {
+                       selection.end.par()->insertChar(pos, (*cit), font);
+                       ++pos;
+               }
+
+               // Cut the selection
+               cutSelection(bview, true, false);
+       }
 
        unFreezeUndo();
 }
Index: insets/inset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v
retrieving revision 1.59
diff -u -p -r1.59 inset.h
--- insets/inset.h      25 Sep 2002 14:26:10 -0000      1.59
+++ insets/inset.h      9 Oct 2002 19:14:29 -0000
@@ -529,11 +529,9 @@ public:
        virtual WordLangTuple const
        selectNextWordToSpellcheck(BufferView *, float & value) const;
        ///
-       virtual void selectSelectedWord(BufferView *) { return; }
+       virtual void selectSelectedWord(BufferView *) {}
        ///
-       virtual void toggleSelection(BufferView *, bool /*kill_selection*/) {
-               return;
-       }
+       virtual void toggleSelection(BufferView *, bool /*kill_selection*/) {}
        ///
        // needed for search/replace functionality
        ///
@@ -542,6 +540,11 @@ public:
        ///
        virtual bool searchBackward(BufferView *, string const &,
                                    bool = true, bool = false);
+       ///
+       virtual void replaceSelectionWithString(BufferView *, string const &) {}
+       ///
+       virtual string selectionAsString(Buffer const *) const { return string(); }
+
 
 protected:
        ///
Index: mathed/formulabase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.213
diff -u -p -r1.213 formulabase.C
--- mathed/formulabase.C        9 Oct 2002 16:08:57 -0000       1.213
+++ mathed/formulabase.C        9 Oct 2002 19:14:30 -0000
@@ -865,7 +865,9 @@ bool InsetFormulaBase::searchForward(Buf
        //lyxerr << "searching '" << str << "' in " << this << ar << endl;
 
        for (MathIterator it = current; it != iend(par().nucleus()); ++it) {
-               if (it.cell().matchpart(ar, it.back().pos_)) {
+               MathArray tmp(it.cell().begin() + it.back().pos_, it.cell().end());
+               // must match from the beginning
+               if (asString(tmp).find(str) == 0) {
                        bv->unlockInset(bv->theLockingInset());
                        if (!bv->lockInset(this)) {
                                lyxerr << "Cannot lock inset" << endl;
@@ -884,6 +886,10 @@ bool InsetFormulaBase::searchForward(Buf
 
        //lyxerr << "not found!\n";
        lastformula = 0;
+
+       // there is a comment in inset/inset.h which says we have to
+       // unlock ourselves
+       bv->unlockInset(bv->theLockingInset());
        return false;
 }
 
@@ -891,8 +897,27 @@ bool InsetFormulaBase::searchForward(Buf
 bool InsetFormulaBase::searchBackward(BufferView * bv, string const & what,
                                      bool a, bool b)
 {
-       lyxerr[Debug::MATHED] << "searching backward not implemented in mathed\n";
+       lyxerr[Debug::MATHED] << "searching backward not implemented in mathed, "
+               "searching forward instead\n";
        return searchForward(bv, what, a, b);
+}
+
+
+void InsetFormulaBase::replaceSelectionWithString
+       (BufferView * bv, string const & str)
+{
+       lyxerr << "replacing with " << str << "\n";
+       if (mathcursor) {
+               mathcursor->insert(asArray(str));
+               updateLocal(bv, true);
+       }
+}
+
+
+string InsetFormulaBase::selectionAsString(Buffer const *) const
+{
+       lyxerr << "selection is '" << mathcursor->grabSelection().asString() << "'\n";
+       return mathcursor ? mathcursor->grabSelection().asString() : string(); 
 }
 
 
Index: mathed/formulabase.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulabase.h,v
retrieving revision 1.52
diff -u -p -r1.52 formulabase.h
--- mathed/formulabase.h        11 Sep 2002 08:26:02 -0000      1.52
+++ mathed/formulabase.h        9 Oct 2002 19:14:30 -0000
@@ -101,6 +101,8 @@ public:
        virtual bool searchBackward(BufferView *, string const &,
                                    bool = true, bool = false);
        ///
+       virtual void replaceSelectionWithString(BufferView *, string const &);
+       ///
        virtual bool isTextInset() const { return true; }
        ///
        virtual void mutateToText();
@@ -110,6 +112,8 @@ public:
        virtual EDITABLE editable() const { return HIGHLY_EDITABLE; }
        ///
        bool display() const;
+       ///
+       string selectionAsString(Buffer const *) const;
 
 private:
        /// unimplemented
Index: mathed/math_autocorrect.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_autocorrect.C,v
retrieving revision 1.5
diff -u -p -r1.5 math_autocorrect.C
--- mathed/math_autocorrect.C   11 Sep 2002 09:14:56 -0000      1.5
+++ mathed/math_autocorrect.C   9 Oct 2002 19:14:30 -0000
@@ -36,7 +36,7 @@ public:
        void write(ostream & os) const;
 private:
        ///
-       MathAtom from1_;
+       string from1_;
        ///
        char from2_;
        ///
@@ -52,14 +52,13 @@ bool Correction::read(istream & is)
                return false;
        if (s2.size() != 1)
                return false;
-       MathArray ar1, ar3;
-       mathed_parse_cell(ar1, s1);
-       mathed_parse_cell(ar3, s3);
-       if (ar1.size() != 1 || ar3.size() != 1)
+       MathArray ar;
+       mathed_parse_cell(ar, s3);
+       if (ar.size() != 1)
                return false;
-       from1_ = ar1.front();
+       from1_ = s1;
        from2_ = s2[0];
-       to_    = ar3.front();
+       to_    = ar.front();
        return true;
 }
 
Index: mathed/math_charinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_charinset.C,v
retrieving revision 1.47
diff -u -p -r1.47 math_charinset.C
--- mathed/math_charinset.C     8 Aug 2002 16:08:10 -0000       1.47
+++ mathed/math_charinset.C     9 Oct 2002 19:14:30 -0000
@@ -133,10 +133,3 @@ bool MathCharInset::isRelOp() const
 {
        return char_ == '=' || char_ == '<' || char_ == '>';
 }
-
-
-bool MathCharInset::match(MathInset const * p) const
-{
-       MathCharInset const * q = p->asCharInset();
-       return q && char_ == q->char_;
-}
Index: mathed/math_charinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_charinset.h,v
retrieving revision 1.25
diff -u -p -r1.25 math_charinset.h
--- mathed/math_charinset.h     11 Sep 2002 08:26:02 -0000      1.25
+++ mathed/math_charinset.h     9 Oct 2002 19:14:30 -0000
@@ -40,8 +40,6 @@ public:
        char getChar() const { return char_; }
        ///
        bool isRelOp() const;
-       ///
-       bool match(MathInset const *) const;
 
 private:
        /// the character
Index: mathed/math_cursor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.319
diff -u -p -r1.319 math_cursor.C
--- mathed/math_cursor.C        19 Sep 2002 06:52:13 -0000      1.319
+++ mathed/math_cursor.C        9 Oct 2002 19:14:30 -0000
@@ -402,10 +402,7 @@ void MathCursor::insert(MathArray const 
 
 void MathCursor::paste(MathGridInset const & data)
 {
-       ostringstream os;
-  WriteStream wi(os, false, false);
-  data.write(wi);
-       dispatch(FuncRequest(LFUN_PASTE, os.str()));
+       dispatch(FuncRequest(LFUN_PASTE, data.asString()));
 }
 
 
Index: mathed/math_cursor.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.h,v
retrieving revision 1.131
diff -u -p -r1.131 math_cursor.h
--- mathed/math_cursor.h        11 Sep 2002 08:26:02 -0000      1.131
+++ mathed/math_cursor.h        9 Oct 2002 19:14:30 -0000
@@ -241,10 +241,12 @@ public:
        void markErase();
        //void handleExtern(string const & arg);
 
+       /// grab grid marked by anchor and current cursor 
+       MathGridInset grabSelection() const;
+
        ///
        friend class Selection;
 
-
 private:
        /// injects content of a cell into parent
        void pullArg();
@@ -266,8 +268,6 @@ private:
        bool inNucleus() const;
 
 
-       /// grab grid marked by anchor and current cursor 
-       MathGridInset grabSelection() const;
        /// erase the selected part and re-sets the cursor
        void eraseSelection();
        /// guess what
Index: mathed/math_data.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_data.C,v
retrieving revision 1.20
diff -u -p -r1.20 math_data.C
--- mathed/math_data.C  11 Sep 2002 08:26:02 -0000      1.20
+++ mathed/math_data.C  9 Oct 2002 19:14:30 -0000
@@ -21,7 +21,6 @@
 #include "textpainter.h"
 
 
-using std::max;
 using std::min;
 using std::abs;
 
@@ -124,24 +123,6 @@ void MathArray::validate(LaTeXFeatures &
 }
 
 
-bool MathArray::match(MathArray const & ar) const
-{
-       return size() == ar.size() && matchpart(ar, 0);
-}
-
-
-bool MathArray::matchpart(MathArray const & ar, pos_type pos) const
-{
-       if (size() < ar.size() + pos)
-               return false;
-       const_iterator it = begin() + pos;
-       for (const_iterator jt = ar.begin(); jt != ar.end(); ++jt, ++it)
-               if (!(*jt)->match(*it))
-                       return false;
-       return true;
-}
-
-
 void MathArray::replace(ReplaceData & rep)
 {
        for (size_type i = 0; i < size(); ++i) {
@@ -164,9 +145,10 @@ void MathArray::replace(ReplaceData & re
 bool MathArray::find1(MathArray const & ar, size_type pos) const
 {
        //lyxerr << "finding '" << ar << "' in '" << *this << "'\n";
-       for (size_type i = 0, n = ar.size(); i < n; ++i)
-               if (!operator[](pos + i)->match(ar[i]))
+       for (size_type i = 0, n = ar.size(); i < n; ++i) {
+               if (!operator[](pos + i)->match(ar[i]->asString()))
                        return false;
+       }
        return true;
 }
 
Index: mathed/math_data.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_data.h,v
retrieving revision 1.17
diff -u -p -r1.17 math_data.h
--- mathed/math_data.h  11 Sep 2002 08:26:02 -0000      1.17
+++ mathed/math_data.h  9 Oct 2002 19:14:30 -0000
@@ -22,6 +22,7 @@
 
 #include "math_atom.h"
 #include "dimension.h"
+#include "LString.h"
 
 class MathMacro;
 class LaTeXFeatures;
@@ -90,10 +91,6 @@ public:
        ///
        void replace(ReplaceData &);
 
-       /// looks for exact match
-       bool match(MathArray const & ar) const;
-       /// looks for inclusion match starting at pos
-       bool matchpart(MathArray const & ar, pos_type pos) const;
        /// looks for containment, return == size mean not found
        size_type find(MathArray const & ar) const;
        /// looks for containment, return == size mean not found
Index: mathed/math_extern.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_extern.C,v
retrieving revision 1.42
diff -u -p -r1.42 math_extern.C
--- mathed/math_extern.C        11 Sep 2002 09:14:56 -0000      1.42
+++ mathed/math_extern.C        9 Oct 2002 19:14:30 -0000
@@ -363,7 +363,7 @@ void extractNumbers(MathArray & ar)
        for (MathArray::size_type i = 0; i < ar.size(); ++i) {
                if (!ar[i]->asCharInset())
                        continue;
-               if (!isDigitOrSimilar(ar[i]->asCharInset()->getChar()))
+               if (!isDigitOrSimilar(ar[i]->getChar()))
                        continue;
 
                string s = digitSequence(ar.begin() + i, ar.end());
@@ -477,7 +477,7 @@ void extractFunctions(MathArray & ar)
 
 bool testSymbol(MathAtom const & at, string const & name)
 {
-       return at->asSymbolInset() && at->asSymbolInset()->name() == name;
+       return at->asSymbolInset() && at->name() == name;
 }
 
 
Index: mathed/math_gridinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_gridinset.C,v
retrieving revision 1.84
diff -u -p -r1.84 math_gridinset.C
--- mathed/math_gridinset.C     26 Sep 2002 07:40:16 -0000      1.84
+++ mathed/math_gridinset.C     9 Oct 2002 19:14:30 -0000
@@ -26,7 +26,9 @@ string verboseHLine(int n)
        string res;
        for (int i = 0; i < n; ++i)
                res += "\\hline";
-       return res + ' ';
+       if (n)
+               res += " ";
+       return res;
 }
 
 }
Index: mathed/math_inset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_inset.C,v
retrieving revision 1.106
diff -u -p -r1.106 math_inset.C
--- mathed/math_inset.C 11 Sep 2002 09:14:56 -0000      1.106
+++ mathed/math_inset.C 9 Oct 2002 19:14:30 -0000
@@ -276,6 +276,21 @@ string MathInset::name() const
 }
 
 
+bool MathInset::match(string const & str) const
+{
+       return str == asString();
+}
+
+
+string MathInset::asString() const
+{
+       std::ostringstream os;
+       WriteStream ws(os);
+       write(ws);
+       return os.str();
+}
+
+
 string asString(MathArray const & ar)
 {
        std::ostringstream os;
Index: mathed/math_inset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_inset.h,v
retrieving revision 1.146
diff -u -p -r1.146 math_inset.h
--- mathed/math_inset.h 11 Sep 2002 09:14:56 -0000      1.146
+++ mathed/math_inset.h 9 Oct 2002 19:14:30 -0000
@@ -252,7 +252,7 @@ public:
        /// char char code if possible
        virtual void handleFont(string const &) {}
        /// is this inset equal to a given other inset?
-       virtual bool match(MathAtom const &) const { return false; }
+       virtual bool match(string const &) const;
        /// replace things by other things
        virtual void replace(ReplaceData &) {}
        /// do we contain a given subsequence?
@@ -304,6 +304,8 @@ public:
        virtual string fileInsetLabel() const { return "Formula"; }
        /// usually the latex name
        virtual string name() const;
+       /// usually the latex name
+       virtual string asString() const;
 };
 
 std::ostream & operator<<(std::ostream &, MathAtom const &);
Index: mathed/math_macro.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macro.h,v
retrieving revision 1.81
diff -u -p -r1.81 math_macro.h
--- mathed/math_macro.h 11 Sep 2002 08:26:02 -0000      1.81
+++ mathed/math_macro.h 9 Oct 2002 19:14:30 -0000
@@ -61,8 +61,6 @@ public:
        void validate(LaTeXFeatures &) const;
        ///
        bool isMacro() const { return true; }
-       ///
-       bool match(MathAtom const &) const { return false; }
 
        ///
        void maplize(MapleStream &) const;
Index: mathed/math_nestinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v
retrieving revision 1.58
diff -u -p -r1.58 math_nestinset.C
--- mathed/math_nestinset.C     22 Aug 2002 13:02:14 -0000      1.58
+++ mathed/math_nestinset.C     9 Oct 2002 19:14:30 -0000
@@ -228,17 +228,6 @@ void MathNestInset::validate(LaTeXFeatur
 }
 
 
-bool MathNestInset::match(MathAtom const & at) const
-{
-       if (nargs() != at->nargs())
-               return false;
-       for (idx_type i = 0; i < nargs(); ++i)
-               if (!cell(i).match(at->cell(i)))
-                       return false;
-       return true;
-}
-
-
 void MathNestInset::replace(ReplaceData & rep)
 {
        for (idx_type i = 0; i < nargs(); ++i)
Index: mathed/math_nestinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.h,v
retrieving revision 1.34
diff -u -p -r1.34 math_nestinset.h
--- mathed/math_nestinset.h     15 Aug 2002 10:02:53 -0000      1.34
+++ mathed/math_nestinset.h     9 Oct 2002 19:14:30 -0000
@@ -82,8 +82,6 @@ public:
        /// request "external features"
        void validate(LaTeXFeatures & features) const;
 
-       /// match in all cells
-       bool match(MathAtom const &) const;
        /// replace in all cells
        void replace(ReplaceData &);
        /// do we contain a given pattern?
Index: mathed/math_scriptinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_scriptinset.C,v
retrieving revision 1.74
diff -u -p -r1.74 math_scriptinset.C
--- mathed/math_scriptinset.C   30 Sep 2002 06:48:53 -0000      1.74
+++ mathed/math_scriptinset.C   9 Oct 2002 19:14:30 -0000
@@ -265,7 +265,7 @@ bool MathScriptInset::hasLimits() const
 
        // per default \int has limits beside the \int even in displayed formulas
        if (nuc().back()->asSymbolInset())
-               if (nuc().back()->asSymbolInset()->name().find("int") != string::npos)
+               if (nuc().back()->name().find("int") != string::npos)
                        return false;
 
        // assume "real" limits for everything else
Index: mathed/math_symbolinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_symbolinset.C,v
retrieving revision 1.46
diff -u -p -r1.46 math_symbolinset.C
--- mathed/math_symbolinset.C   11 Sep 2002 09:14:57 -0000      1.46
+++ mathed/math_symbolinset.C   9 Oct 2002 19:14:30 -0000
@@ -142,13 +142,6 @@ char const * MathMLtype(string const & s
 }
 
 
-bool MathSymbolInset::match(MathAtom const & at) const
-{
-       MathSymbolInset const * q = at->asSymbolInset();
-       return q && name() == q->name();
-}
-
-
 void MathSymbolInset::mathmlize(MathMLStream & os) const
 {
        char const * type = MathMLtype(sym_->extra);
Index: mathed/math_symbolinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_symbolinset.h,v
retrieving revision 1.28
diff -u -p -r1.28 math_symbolinset.h
--- mathed/math_symbolinset.h   11 Sep 2002 09:14:57 -0000      1.28
+++ mathed/math_symbolinset.h   9 Oct 2002 19:14:30 -0000
@@ -37,8 +37,6 @@ public:
        MathSymbolInset const * asSymbolInset() const { return this; }
        /// the LaTeX name of the symbol (without the backslash)
        string name() const;
-       ///
-       bool match(MathAtom const &) const;
        /// request "external features"
        void validate(LaTeXFeatures & features) const;
 
Index: mathed/math_unknowninset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_unknowninset.C,v
retrieving revision 1.15
diff -u -p -r1.15 math_unknowninset.C
--- mathed/math_unknowninset.C  9 Aug 2002 10:22:35 -0000       1.15
+++ mathed/math_unknowninset.C  9 Oct 2002 19:14:30 -0000
@@ -33,13 +33,6 @@ void MathUnknownInset::setName(string co
 }
 
 
-bool MathUnknownInset::match(MathAtom const & at) const
-{
-       MathUnknownInset const * q = at->asUnknownInset();
-       return q && name_ == q->name_;
-}
-
-
 void MathUnknownInset::normalize(NormalStream & os) const
 {
        os << "[unknown " << name_ << ']';
Index: mathed/math_unknowninset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_unknowninset.h,v
retrieving revision 1.10
diff -u -p -r1.10 math_unknowninset.h
--- mathed/math_unknowninset.h  9 Aug 2002 10:22:35 -0000       1.10
+++ mathed/math_unknowninset.h  9 Oct 2002 19:14:30 -0000
@@ -30,8 +30,6 @@ public:
        MathUnknownInset const * asUnknownInset() const { return this; }
        /// identifies UnknownInsets
        MathUnknownInset * asUnknownInset() { return this; }
-       ///
-       bool match(MathAtom const & at) const;
 
        ///
        void normalize(NormalStream &) const;
Index: mathed/ref_inset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ref_inset.C,v
retrieving revision 1.9
diff -u -p -r1.9 ref_inset.C
--- mathed/ref_inset.C  11 Sep 2002 08:26:02 -0000      1.9
+++ mathed/ref_inset.C  9 Oct 2002 19:14:30 -0000
@@ -46,7 +46,7 @@ RefInset::dispatch(FuncRequest const & c
                case LFUN_MOUSE_RELEASE:
                        if (cmd.button() == mouse_button::button3) {
                                lyxerr << "trying to goto ref" << cell(0) << "\n";
-                               cmd.view()->dispatch(FuncRequest(LFUN_REF_GOTO, 
asString(cell(0))));
+                               cmd.view()->dispatch(FuncRequest(LFUN_REF_GOTO, 
+::asString(cell(0))));
                                return DISPATCHED;
                        }
                        if (cmd.button() == mouse_button::button1) {
@@ -76,11 +76,11 @@ string RefInset::screenLabel() const
                        str = _(types[i].short_gui_name);
                        break;
                }
-       str += asString(cell(0));
+       str += ::asString(cell(0));
 
        //if (/* !isLatex && */ !cell(0).empty()) {
        //      str += "||";
-       //      str += asString(cell(1));
+       //      str += ::asString(cell(1));
        //}
        return str;
 }
@@ -97,15 +97,15 @@ void RefInset::validate(LaTeXFeatures & 
 
 int RefInset::ascii(std::ostream & os, int) const
 {
-       os << "[" << asString(cell(0)) << "]";
+       os << "[" << ::asString(cell(0)) << "]";
        return 0;
 }
 
 
 int RefInset::linuxdoc(std::ostream & os) const
 {
-       os << "<ref id=\"" << asString(cell(0))
-          << "\" name=\"" << asString(cell(1)) << "\" >";
+       os << "<ref id=\"" << ::asString(cell(0))
+          << "\" name=\"" << ::asString(cell(1)) << "\" >";
        return 0;
 }
 
@@ -113,10 +113,10 @@ int RefInset::linuxdoc(std::ostream & os
 int RefInset::docbook(std::ostream & os, bool) const
 {
        if (cell(1).empty()) {
-               os << "<xref linkend=\"" << asString(cell(0)) << "\">";
+               os << "<xref linkend=\"" << ::asString(cell(0)) << "\">";
        } else {
-               os << "<link linkend=\"" << asString(cell(0))
-                  << "\">" << asString(cell(1)) << "</link>";
+               os << "<link linkend=\"" << ::asString(cell(0))
+                  << "\">" << ::asString(cell(1)) << "</link>";
        }
 
        return 0;

Reply via email to