]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/CommandInset.cpp
Substack support for XHTML.
[lyx.git] / src / mathed / CommandInset.cpp
index 84894adf2f9a8c4e5b5046fd416845076b9eb647..e09604e241c9f2973f1cde97d07172c05a9d343d 100644 (file)
@@ -14,7 +14,6 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "DispatchResult.h"
-#include "FuncRequest.h"
 
 #include <sstream>
 
@@ -23,8 +22,8 @@ using namespace std;
 namespace lyx {
 
 
-CommandInset::CommandInset(docstring const & name, bool needs_math_mode)
-       : InsetMathNest(2), name_(name), needs_math_mode_(needs_math_mode),
+CommandInset::CommandInset(Buffer * buf, docstring const & name, bool needs_math_mode)
+       : InsetMathNest(buf, 2), name_(name), needs_math_mode_(needs_math_mode),
          set_label_(false)
 {
        lock_ = true;
@@ -65,8 +64,9 @@ void CommandInset::draw(PainterInfo & pi, int x, int y) const
 
 void CommandInset::write(WriteStream & os) const
 {
+       ModeSpecifier specifier(os, currentMode(), lockedMode(), asciiOnly());
        MathEnsurer ensurer(os, needs_math_mode_);
-       os << '\\' << name_.c_str();
+       os << '\\' << name_;
        if (cell(1).size())
                os << '[' << cell(1) << ']';
        os << '{' << cell(0) << '}';