]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathMBox.cpp
Do not throw exceptions here either. See r22806.
[lyx.git] / src / mathed / InsetMathMBox.cpp
index f7d7d1b07c3677380e08d6b729801b73bd463404..bf27b8d102050d395e7409ac37da080f911c2a29 100644 (file)
@@ -32,15 +32,15 @@ using namespace std;
 namespace lyx {
 
 
-InsetMathMBox::InsetMathMBox(Buffer const & buffer) : text_(buffer)
+InsetMathMBox::InsetMathMBox(Buffer * buffer) : InsetMath(buffer), text_(buffer)
 {
        text_.paragraphs().clear();
        text_.paragraphs().push_back(Paragraph());
 }
 
 
-InsetMathMBox::InsetMathMBox(Buffer const & buffer, Layout const & layout)
-       : text_(buffer)
+InsetMathMBox::InsetMathMBox(Buffer * buffer, Layout const & layout)
+       : InsetMath(buffer), text_(buffer)
 {
        text_.paragraphs().clear();
        text_.paragraphs().push_back(Paragraph());
@@ -81,7 +81,7 @@ void InsetMathMBox::write(WriteStream & ws) const
        } else {
                ws << "\\mbox{\n";
                ostringstream os;
-               text_.text().write(buffer(), os);
+               text_.text().write(os);
                ws.os() << from_utf8(os.str());
                ws << "}";
        }
@@ -118,4 +118,16 @@ void InsetMathMBox::cursorPos(BufferView const & bv,
 }
 
 
+void InsetMathMBox::mathmlize(MathStream & ms) const
+{      
+       SetMode textmode(ms, true, "class='mbox'");
+       ms << cell(0);
+}
+
+void InsetMathMBox::htmlize(HtmlStream & ms) const
+{      
+       SetHTMLMode textmode(ms, true, "class='mbox'");
+       ms << cell(0);
+}
+
 } // namespace lyx