#include "frontends/Painter.h"
#include "textpainter.h"
+using namespace lyx::support;
using std::max;
using std::min;
using std::abs;
+using std::endl;
MathArray::MathArray()
MathAtom & MathArray::operator[](pos_type pos)
{
- lyx::Assert(pos < size());
+ Assert(pos < size());
return base_type::operator[](pos);
}
MathAtom const & MathArray::operator[](pos_type pos) const
{
- lyx::Assert(pos < size());
+ Assert(pos < size());
return base_type::operator[](pos);
}
void MathArray::insert(size_type pos, MathArray const & ar)
{
- lyx::Assert(pos <= size());
+ Assert(pos <= size());
base_type::insert(begin() + pos, ar.begin(), ar.end());
}
for (size_type i = 0; i < size(); ++i) {
if (find1(rep.from, i)) {
// match found
- lyxerr << "match found!\n";
+ lyxerr << "match found!" << endl;
erase(i, i + rep.from.size());
insert(i, rep.to);
}
bool MathArray::find1(MathArray const & ar, size_type pos) const
{
- //lyxerr << "finding '" << ar << "' in '" << *this << "'\n";
+ //lyxerr << "finding '" << ar << "' in '" << *this << "'" << endl;
for (size_type i = 0, n = ar.size(); i < n; ++i)
if (!operator[](pos + i)->match(ar[i]))
return false;