]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetScript.cpp
Cocoa based Qt-4.6 needs to paint every character separately to match metrics computa...
[lyx.git] / src / insets / InsetScript.cpp
index 514445a943b35acf742132ac8bce0b3fa84c6dce..32c83ff161eb2a106ae89eb5760a63ab1eb7531f 100644 (file)
@@ -143,7 +143,7 @@ InsetScript::~InsetScript()
 }
 
 
-docstring InsetScript::name() const 
+docstring InsetScript::layoutName() const
 {
        return from_ascii("script:" + scripttranslator().find(params_.type));
 }
@@ -214,6 +214,7 @@ void InsetScript::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action()) {
        case LFUN_INSET_MODIFY:
+               cur.recordUndoInset(ATOMIC_UNDO, this);
                string2params(to_utf8(cmd.argument()), params_);
                break;
        default:
@@ -333,7 +334,7 @@ void InsetScript::validate(LaTeXFeatures & features) const
 }
 
 
-int InsetScript::latex(odocstream & os, OutputParams const & runparams) const
+void InsetScript::latex(otexstream & os, OutputParams const & runparams) const
 {
        switch (params_.type) {
        case InsetScriptParams::Subscript:
@@ -343,10 +344,8 @@ int InsetScript::latex(odocstream & os, OutputParams const & runparams) const
                os << "\\textsuperscript{";
                break;
        }
-       int const i = InsetText::latex(os, runparams);
+       InsetText::latex(os, runparams);
        os << "}";
-
-       return i;
 }
 
 
@@ -422,7 +421,7 @@ docstring InsetScript::xhtml(XHTMLStream & xs, OutputParams const & runparams) c
 }
 
 
-docstring InsetScript::contextMenu(BufferView const &, int, int) const
+docstring InsetScript::contextMenuName() const
 {
        return from_ascii("context-script");
 }