#include "InsetMathScript.h"
#include "InsetMathMacro.h"
#include "MathMacroTable.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
#include "MathSupport.h"
#include "MathReplace.h"
#include <boost/assert.hpp>
-using lyx::odocstream;
+
+namespace lyx {
using std::abs;
using std::endl;
using std::vector;
-MathArray::MathArray()
-{}
-
-
MathArray::MathArray(const_iterator from, const_iterator to)
: base_type(from, to)
{}
void MathArray::dump2() const
{
- lyx::odocstringstream os;
+ odocstringstream os;
NormalStream ns(os);
for (const_iterator it = begin(); it != end(); ++it)
ns << *it << ' ';
- lyxerr << lyx::to_utf8(os.str());
+ lyxerr << to_utf8(os.str());
}
void MathArray::dump() const
{
- lyx::odocstringstream os;
+ odocstringstream os;
NormalStream ns(os);
for (const_iterator it = begin(); it != end(); ++it)
ns << '<' << *it << '>';
- lyxerr << lyx::to_utf8(os.str());
+ lyxerr << to_utf8(os.str());
}
namespace {
bool isInside(DocIterator const & it, MathArray const & ar,
- lyx::pos_type p1, lyx::pos_type p2)
+ pos_type p1, pos_type p2)
{
for (size_t i = 0; i != it.depth(); ++i) {
CursorSlice const & sl = it[i];
void MathArray::draw(PainterInfo & pi, int x, int y) const
{
//lyxerr << "MathArray::draw: x: " << x << " y: " << y << endl;
- setXY(*pi.base.bv, x, y);
+ BufferView & bv = *pi.base.bv;
+ setXY(bv, x, y);
if (empty()) {
pi.pain.rectangle(x, y - ascent(), width(), height(), LColor::mathline);
// don't draw outside the workarea
if (y + descent() <= 0
- || y - ascent() >= pi.pain.paperHeight()
+ || y - ascent() >= bv.workHeight()
|| x + width() <= 0
- || x >= pi.pain.paperWidth())
+ || x >= bv. workWidth())
return;
- //BufferView & bv = *pi.base.bv;
for (size_t i = 0, n = size(); i != n; ++i) {
MathAtom const & at = operator[](i);
#if 0
- Buffer const & buf = *bv.buffer();
+ Buffer const & buf = bv.buffer();
// special macro handling
MathMacro const * mac = at->asMacro();
if (mac && buf.hasMacro(mac->name())) {
}
}
#endif
- //BufferView & bv = *pi.base.bv;
- pi.base.bv->coordCache().insets().add(at.nucleus(), x, y);
+ bv.coordCache().insets().add(at.nucleus(), x, y);
at->drawSelection(pi, x, y);
at->draw(pi, x, y);
x += at->width();
std::ostream & operator<<(std::ostream & os, MathArray const & ar)
{
- lyx::odocstringstream oss;
+ odocstringstream oss;
NormalStream ns(oss);
ns << ar;
- return os << lyx::to_utf8(oss.str());
+ return os << to_utf8(oss.str());
}
ns << ar;
return os;
}
+
+
+} // namespace lyx