]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetScript.cpp
New DocBook support
[lyx.git] / src / insets / InsetScript.cpp
index c7bdd4279d0ee7778ae7dc5ad7ca46ead262d8cd..3dc9e1248a6f4bb3e822eadefe36deae14b8433f 100644 (file)
@@ -40,6 +40,7 @@
 #include "frontends/Painter.h"
 
 #include <algorithm>
+#include <output_docbook.h>
 
 using namespace std;
 
@@ -151,12 +152,6 @@ docstring InsetScript::layoutName() const
 }
 
 
-Inset::DisplayType InsetScript::display() const
-{
-       return Inline;
-}
-
-
 void InsetScript::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        int const shift = params_.shift(mi.base.font);
@@ -281,6 +276,7 @@ bool InsetScript::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_PREVIEW_INSERT:
        case LFUN_QUOTE_INSERT:
        case LFUN_TABULAR_INSERT:
+       case LFUN_TABULAR_STYLE_INSERT:
        case LFUN_WRAP_INSERT:
                flag.setEnabled(false);
                return true;
@@ -359,7 +355,7 @@ int InsetScript::plaintext(odocstringstream & os,
 }
 
 
-int InsetScript::docbook(odocstream & os, OutputParams const & runparams) const
+void InsetScript::docbook(XMLStream & xs, OutputParams const & runparams) const
 {
        docstring cmdname;
        switch (params_.type) {
@@ -370,11 +366,10 @@ int InsetScript::docbook(odocstream & os, OutputParams const & runparams) const
                cmdname = from_ascii("superscript");
                break;
        }
-       os << '<' + cmdname + '>';
-       int const i = InsetText::docbook(os, runparams);
-       os << "</" + cmdname + '>';
 
-       return i;
+       xs << xml::StartTag(cmdname);
+       InsetText::docbook(xs, runparams);
+       xs << xml::EndTag(cmdname);
 }