]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetScript.cpp
Improve handling of top and bottom margin
[lyx.git] / src / insets / InsetScript.cpp
index f87f6c474765f4a6b6888b442f8580cb69f4dbc8..eccf3c302959a465ba74527fc0055b6560db577e 100644 (file)
@@ -26,6 +26,7 @@
 #include "LyXAction.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "TextClass.h"
 #include "TextMetrics.h"
@@ -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);
@@ -360,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) {
@@ -371,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);
 }