]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCaptionable.cpp
New DocBook support
[lyx.git] / src / insets / InsetCaptionable.cpp
index 467106fa43e3e10888b7d68e633a4ca03aa5e96a..a8a2108ce9bd8917c061065d6c6dc03c7a478827 100644 (file)
@@ -80,6 +80,19 @@ docstring InsetCaptionable::getCaptionText(OutputParams const & runparams) const
 }
 
 
+docstring InsetCaptionable::getCaptionDocBook(OutputParams const & runparams) const
+{
+       InsetCaption const * ins = getCaptionInset();
+       if (ins == nullptr)
+               return docstring();
+
+       odocstringstream ods;
+       XMLStream xs(ods);
+       ins->getCaptionAsDocBook(xs, runparams);
+       return ods.str();
+}
+
+
 docstring InsetCaptionable::getCaptionHTML(OutputParams const & runparams) const
 {
        InsetCaption const * ins = getCaptionInset();
@@ -87,11 +100,11 @@ docstring InsetCaptionable::getCaptionHTML(OutputParams const & runparams) const
                return docstring();
 
        odocstringstream ods;
-       XHTMLStream xs(ods);
+       XMLStream xs(ods);
        docstring def = ins->getCaptionAsHTML(xs, runparams);
        if (!def.empty())
                // should already have been escaped
-               xs << XHTMLStream::ESCAPE_NONE << def << '\n';
+               xs << XMLStream::ESCAPE_NONE << def << '\n';
        return ods.str();
 }
 
@@ -114,7 +127,7 @@ void InsetCaptionable::addToToc(DocIterator const & cpit, bool output_active,
        b.pop();
 }
 
-void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype)
+void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
 {
        Counters & cnts =
                buffer().masterBuffer()->params().documentClass().counters();
@@ -131,7 +144,7 @@ void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype)
        // Tell captions what the current float is
        cnts.current_float(caption_type_);
        cnts.isSubfloat(subflt);
-       InsetCollapsible::updateBuffer(it, utype);
+       InsetCollapsible::updateBuffer(it, utype, deleted);
        // Restore counters
        cnts.current_float(saveflt);
        if (utype == OutputUpdate)