#include "Buffer.h"
#include "BufferParams.h"
#include "Cursor.h"
-#include "debug.h"
+#include "support/debug.h"
#include "MetricsInfo.h"
#include "output_latex.h"
#include "OutputParams.h"
#include "TexRow.h"
#include "TextMetrics.h"
+using namespace std;
namespace lyx {
-using std::endl;
-
InsetMathMBox::InsetMathMBox()
{
}
-bool InsetMathMBox::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathMBox::metrics(MetricsInfo & mi, Dimension & dim) const
{
TextMetrics & tm = mi.base.bv->textMetrics(&text_);
tm.metrics(mi, dim);
metricsMarkers2(dim);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}
ws << "\\mbox{\n";
TexRow texrow;
OutputParams runparams(&buf.params().encoding());
- latexParagraphs(buf, text_.paragraphs(), ws.os(), texrow, runparams);
+ latexParagraphs(buf, text_, ws.os(), texrow, runparams);
ws.addlines(texrow.rows());
ws << "}";
} else {
ws << "\\mbox{\n";
- std::ostringstream os;
+ ostringstream os;
text_.write(buf, os);
ws.os() << from_utf8(os.str());
ws << "}";
{
os << "\\mbox{\n";
TexRow texrow;
- latexParagraphs(buf, text_.paragraphs(), os, texrow, runparams);
+ latexParagraphs(buf, text_, os, texrow, runparams);
os << "}";
return texrow.rows();
}
}
-void InsetMathMBox::drawSelection(PainterInfo & pi, int x, int y) const
-{
- pi.base.bv->textMetrics(&text_).drawSelection(pi, x, y);
-}
-
-
} // namespace lyx