commit a635e461a1ba6299ae57bb13e4168dfd767e96a3
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Nov 30 09:46:05 2023 +0100

    Remove code that has been dead for almost 20 years
---
 src/Cursor.cpp               |    2 -
 src/mathed/InsetMathHull.cpp |   63 ------------------------------------------
 src/mathed/InsetMathHull.h   |    2 -
 3 files changed, 0 insertions(+), 67 deletions(-)

diff --git a/src/Cursor.cpp b/src/Cursor.cpp
index ca13bda..0e1c3de 100644
--- a/src/Cursor.cpp
+++ b/src/Cursor.cpp
@@ -1882,8 +1882,6 @@ void Cursor::pullArg()
                plainErase();
                cell().insert(pos(), ar);
                resetAnchor();
-       } else {
-               //formula()->mutateToText();
        }
 }
 
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 1cf3be2..2ba98b3 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -2243,28 +2243,6 @@ int InsetMathHull::border() const
 
 
 
-// simply scrap this function if you want
-void InsetMathHull::mutateToText()
-{
-#if 0
-       // translate to latex
-       ostringstream os;
-       latex(os, false, false);
-       string str = os.str();
-
-       // insert this text
-       Text * lt = view_->cursor().innerText();
-       string::const_iterator cit = str.begin();
-       string::const_iterator end = str.end();
-       for (; cit != end; ++cit)
-               view_->getIntl()->getTransManager().TranslateAndInsert(*cit, 
lt);
-
-       // remove ourselves
-       //dispatch(LFUN_ESCAPE);
-#endif
-}
-
-
 void InsetMathHull::handleFont(Cursor & cur, docstring const & arg,
        docstring const & font)
 {
@@ -2309,47 +2287,6 @@ void InsetMathHull::edit(Cursor & cur, bool front, 
EntryDirection entry_from)
 /////////////////////////////////////////////////////////////////////
 
 
-#if 0
-bool InsetMathHull::searchForward(BufferView * bv, string const & str,
-                                    bool, bool)
-{
-       // FIXME: completely broken
-       static InsetMathHull * lastformula = 0;
-       static CursorBase current = DocIterator(ibegin(nucleus()));
-       static MathData ar;
-       static string laststr;
-
-       if (lastformula != this || laststr != str) {
-               //lyxerr << "reset lastformula to " << this << endl;
-               lastformula = this;
-               laststr = str;
-               current = ibegin(nucleus());
-               ar.clear();
-               mathed_parse_cell(ar, str, Parse::NORMAL, &buffer());
-       } else {
-               increment(current);
-       }
-       //lyxerr << "searching '" << str << "' in " << this << ar << endl;
-
-       for (DocIterator it = current; it != iend(nucleus()); increment(it)) {
-               CursorSlice & top = it.back();
-               MathData const & a = top.asInsetMath()->cell(top.idx_);
-               if (a.matchpart(ar, top.pos_)) {
-                       bv->cursor().setSelection(it, ar.size());
-                       current = it;
-                       top.pos_ += ar.size();
-                       bv->update();
-                       return true;
-               }
-       }
-
-       //lyxerr << "not found!" << endl;
-       lastformula = 0;
-       return false;
-}
-#endif
-
-
 void InsetMathHull::write(ostream & os) const
 {
        odocstringstream oss;
diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h
index f57fdbc..cced01c 100644
--- a/src/mathed/InsetMathHull.h
+++ b/src/mathed/InsetMathHull.h
@@ -276,8 +276,6 @@ private:
 //
 public:
        ///
-       virtual void mutateToText();
-       ///
        bool editable() const override { return true; }
        ///
        void edit(Cursor & cur, bool front,
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to