]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetERT.cpp
Rename XHTMLStream to XMLStream, move it to another file, and prepare for DocBook...
[features.git] / src / insets / InsetERT.cpp
index 2d96f952f636c919df1bce41594089f77231df4f..403df75032da7d1c5263c65e785b42be7d68cbd1 100644 (file)
 #include "OutputParams.h"
 #include "ParagraphParameters.h"
 #include "Paragraph.h"
-#include "TextClass.h"
 
+#include "support/docstream.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
+#include "support/TempFile.h"
 
 #include <sstream>
 
@@ -46,6 +47,11 @@ InsetERT::InsetERT(Buffer * buf, CollapseStatus status)
 }
 
 
+InsetERT::InsetERT(InsetERT const & old)
+       : InsetCollapsible(old)
+{}
+
+
 void InsetERT::write(ostream & os) const
 {
        os << "ERT" << "\n";
@@ -128,6 +134,9 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
        switch (cmd.action()) {
+       case LFUN_INSET_INSERT:
+               status.setEnabled(false);
+               return true;
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "ert") {
                        status.setEnabled(true);
@@ -141,6 +150,7 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
+
 docstring const InsetERT::buttonLabel(BufferView const & bv) const
 {
        if (decoration() == InsetLayout::CLASSIC)
@@ -173,7 +183,7 @@ string InsetERT::params2string(CollapseStatus status)
 }
 
 
-docstring InsetERT::xhtml(XHTMLStream &, OutputParams const &) const
+docstring InsetERT::xhtml(XMLStream &, OutputParams const &) const
 {
        return docstring();
 }