]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetScript.cpp
Math.lyx, Tutorial.lyx: fix some typos spotted by a user
[lyx.git] / src / insets / InsetScript.cpp
index b85b36ee13d8e32f476ccdedd431b66ddc494788..135962353a40e70beb029a61ecf6e8c35e1ca71a 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));
 }
 
 
@@ -261,7 +261,7 @@ bool InsetScript::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
        switch (cmd.action()) {
-       case LFUN_BREAK_PARAGRAPH:
+       case LFUN_PARAGRAPH_BREAK:
        case LFUN_LAYOUT:
        case LFUN_LAYOUT_PARAGRAPH:
        case LFUN_MATH_DISPLAY:
@@ -272,7 +272,6 @@ bool InsetScript::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_FLOAT_LIST_INSERT:
        case LFUN_FLOAT_WIDE_INSERT:
        case LFUN_FOOTNOTE_INSERT:
-       case LFUN_HFILL_INSERT:
        case LFUN_INDEX_PRINT:
        case LFUN_LISTING_INSERT:
        case LFUN_MARGINALNOTE_INSERT:
@@ -326,29 +325,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);
-}
-
-
-void InsetScript::latex(otexstream & os, OutputParams const & runparams) const
-{
-       switch (params_.type) {
-       case InsetScriptParams::Subscript:
-               os << "\\textsubscript{";
-               break;
-       case InsetScriptParams::Superscript:
-               os << "\\textsuperscript{";
-               break;
-       }
-       InsetText::latex(os, runparams);
-       os << "}";
-}
-
-
 int InsetScript::plaintext(odocstream & os, OutputParams const & runparams) const
 {
        odocstringstream oss;
@@ -402,28 +378,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";
 }