#include "mathed/math_inset.h"
#include "mathed/math_scriptinset.h"
#include "mathed/math_macrotable.h"
+#include "mathed/math_parser.h"
#include "support/limited_stack.h"
#include <sstream>
#include <limits>
+using lyx::char_type;
using lyx::pit_type;
using std::string;
using std::isalpha;
#endif
using std::min;
-using std::swap;
namespace {
et.pit() = boost::prior(cache.end())->first;
if (et.pit() >= et.lastpit())
et = doc_iterator_end(inset);
- else
+ else
++et.pit();
double best_dist = std::numeric_limits<double>::max();;
//lyxerr << "Pit start: " << from << endl;
//lyxerr << "bruteFind3: x: " << x << " y: " << y
- // << " xlow: " << xlow << " xhigh: " << xhigh
- // << " ylow: " << ylow << " yhigh: " << yhigh
+ // << " xlow: " << xlow << " xhigh: " << xhigh
+ // << " ylow: " << ylow << " yhigh: " << yhigh
// << endl;
InsetBase & inset = bv.buffer()->inset();
DocIterator it = doc_iterator_begin(inset);
void LCursor::markInsert()
{
- insert(char(0));
+ insert(char_type(0));
}
void LCursor::insert(string const & str)
{
for_each(str.begin(), str.end(),
- boost::bind(static_cast<void(LCursor::*)(char)>
+ boost::bind(static_cast<void(LCursor::*)(char_type)>
(&LCursor::insert), this, _1));
}
-void LCursor::insert(char c)
+void LCursor::insert(char_type c)
{
//lyxerr << "LCursor::insert char '" << c << "'" << endl;
BOOST_ASSERT(!empty());
if (macro && macro->getInsetName() == name)
lyxerr << "can't enter recursive macro" << endl;
+ MathNestInset * const in = inset().asMathInset()->asNestInset();
+ if (in && in->interpret(*this, s))
+ return true;
plainInsert(createMathInset(name));
return true;
}
// FIXME: Switch this on for more robust movement
#if 0
- return bruteFind3(*this, xo, yo, up);
+ return bruteFind3(*this, xo, yo, up);
#else
//xarray().boundingBox(xlow, xhigh, ylow, yhigh);