]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
Improve handling of top and bottom margin
[lyx.git] / src / insets / Inset.cpp
index 93866bacd7c9a24d1cb852ee2a583b7f070e1fe8..b561533998ede6e1dbfe86249d35abc77ec78f12 100644 (file)
@@ -29,6 +29,7 @@
 #include "FuncStatus.h"
 #include "MetricsInfo.h"
 #include "output_xhtml.h"
+#include "xml.h"
 #include "Text.h"
 #include "TextClass.h"
 #include "TocBackend.h"
@@ -74,6 +75,7 @@ static void build_translator()
        insetnames[TOC_CODE] = InsetName("toc");
        insetnames[QUOTE_CODE] = InsetName("quote");
        insetnames[REF_CODE] = InsetName("ref");
+       insetnames[COUNTER_CODE] = InsetName("counter");
        insetnames[HYPERLINK_CODE] = InsetName("href");
        insetnames[SEPARATOR_CODE] = InsetName("separator");
        insetnames[ENDING_CODE] = InsetName("ending");
@@ -224,7 +226,7 @@ bool Inset::isBufferLoaded() const
 bool Inset::isBufferValid() const
 {
        return buffer_
-               && (isBufferLoaded() || buffer_->isClone());
+               && (isBufferLoaded() || buffer_->isInternal() || buffer_->isClone());
 }
 
 
@@ -246,7 +248,7 @@ bool Inset::allowEmpty() const
 }
 
 
-bool Inset::forceLTR() const
+bool Inset::forceLTR(OutputParams const &) const
 {
        return getLayout().forceLTR();
 }
@@ -465,13 +467,13 @@ bool Inset::idxUpDown(Cursor &, bool) const
 }
 
 
-int Inset::docbook(odocstream &, OutputParams const &) const
+void Inset::docbook(XMLStream & xs, OutputParams const &) const
 {
-       return 0;
+       xs << "[[Inset: " << from_ascii(insetName(lyxCode())) << "]]";
 }
 
 
-docstring Inset::xhtml(XHTMLStream & xs, OutputParams const &) const
+docstring Inset::xhtml(XMLStream & xs, OutputParams const &) const
 {
        xs << "[[Inset: " << from_ascii(insetName(lyxCode())) << "]]";
        return docstring();