]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetScript.cpp
Allow LyX format to be written to View>Source window.
[lyx.git] / src / insets / InsetScript.cpp
index 7268be5962726fb761f41a1cc5c3a146c0484a29..648b910e271381bfeba8e002c5d63012a4629d81 100644 (file)
@@ -143,9 +143,9 @@ InsetScript::~InsetScript()
 }
 
 
-docstring InsetScript::name() const 
+docstring InsetScript::layoutName() const
 {
-       return from_ascii("script:" + scripttranslator().find(params_.type));
+       return from_ascii("Script:" + scripttranslator().find(params_.type));
 }
 
 
@@ -326,31 +326,6 @@ docstring InsetScript::toolTip(BufferView const &, int, int) const
 }
 
 
-void InsetScript::validate(LaTeXFeatures & features) const
-{
-       if (params_.type == InsetScriptParams::Subscript)
-               features.require("subscript");
-       InsetText::validate(features);
-}
-
-
-int InsetScript::latex(otexstream & os, OutputParams const & runparams) const
-{
-       switch (params_.type) {
-       case InsetScriptParams::Subscript:
-               os << "\\textsubscript{";
-               break;
-       case InsetScriptParams::Superscript:
-               os << "\\textsuperscript{";
-               break;
-       }
-       int const i = InsetText::latex(os, runparams);
-       os << "}";
-
-       return i;
-}
-
-
 int InsetScript::plaintext(odocstream & os, OutputParams const & runparams) const
 {
        odocstringstream oss;
@@ -404,28 +379,9 @@ int InsetScript::docbook(odocstream & os, OutputParams const & runparams) const
 }
 
 
-docstring InsetScript::xhtml(XHTMLStream & xs, OutputParams const & runparams) const
-{
-       string cmdname;
-       switch (params_.type) {
-       case InsetScriptParams::Subscript:
-               cmdname = "sub";
-               break;
-       case InsetScriptParams::Superscript:
-               cmdname = "sup";
-               break;
-       }
-
-       xs << html::StartTag(cmdname);
-       docstring const ret = InsetText::xhtml(xs, runparams);
-       xs << html::EndTag(cmdname);
-       return ret;
-}
-
-
-docstring InsetScript::contextMenuName() const
+string InsetScript::contextMenuName() const
 {
-       return from_ascii("context-script");
+       return "context-script";
 }