]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetVSpace.cpp
Fix bug #8580: Do not include material in the XHTML TOC that is not
[lyx.git] / src / insets / InsetVSpace.cpp
index bcbe0decc9370107a4673467f73566fc5cefc8e3..927980dcf301ce8e9f7f9a69444d68e26ca36e4f 100644 (file)
@@ -55,9 +55,10 @@ InsetVSpace::InsetVSpace(VSpace const & space)
 
 void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action()) {
 
        case LFUN_INSET_MODIFY: {
+               cur.recordUndo();
                InsetVSpace::string2params(to_utf8(cmd.argument()), space_);
                break;
        }
@@ -72,7 +73,7 @@ void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action()) {
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "vspace") {
@@ -200,14 +201,14 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-int InsetVSpace::latex(odocstream & os, OutputParams const &) const
+void InsetVSpace::latex(otexstream & os, OutputParams const &) const
 {
        os << from_ascii(space_.asLatexCommand(buffer().params())) << '\n';
-       return 1;
 }
 
 
-int InsetVSpace::plaintext(odocstream & os, OutputParams const &) const
+int InsetVSpace::plaintext(odocstringstream & os,
+        OutputParams const &, size_t) const
 {
        os << "\n\n";
        return PLAINTEXT_NEWLINE;
@@ -232,9 +233,9 @@ docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const
 }
 
 
-docstring InsetVSpace::contextMenu(BufferView const &, int, int) const
+string InsetVSpace::contextMenuName() const
 {
-       return from_ascii("context-vspace");
+       return "context-vspace";
 }