]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCaptionable.cpp
requires is a keyword in C++2a
[lyx.git] / src / insets / InsetCaptionable.cpp
index 94326f4c352a6755a18b6a98fd45d2bd38fdda76..1a2e5f0670f64ab07c1edd2b608c610e79d9ec38 100644 (file)
@@ -97,7 +97,7 @@ docstring InsetCaptionable::getCaptionHTML(OutputParams const & runparams) const
 
 
 void InsetCaptionable::addToToc(DocIterator const & cpit, bool output_active,
-                                                               UpdateType utype) const
+                                                               UpdateType utype, TocBackend & backend) const
 {
        DocIterator pit = cpit;
        pit.push_back(CursorSlice(const_cast<InsetCaptionable &>(*this)));
@@ -107,14 +107,14 @@ void InsetCaptionable::addToToc(DocIterator const & cpit, bool output_active,
        // non-empty.
        if (utype != OutputUpdate)
                text().forOutliner(str, TOC_ENTRY_LENGTH);
-       TocBuilder & b = buffer().tocBackend().builder(caption_type_);
+       TocBuilder & b = backend.builder(caption_type_);
        b.pushItem(pit, str, output_active);
        // Proceed with the rest of the inset.
-       InsetCollapsable::addToToc(cpit, output_active, utype);
+       InsetCollapsible::addToToc(cpit, output_active, utype, backend);
        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 +131,7 @@ void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype)
        // Tell captions what the current float is
        cnts.current_float(caption_type_);
        cnts.isSubfloat(subflt);
-       InsetCollapsable::updateBuffer(it, utype);
+       InsetCollapsible::updateBuffer(it, utype, deleted);
        // Restore counters
        cnts.current_float(saveflt);
        if (utype == OutputUpdate)
@@ -142,7 +142,7 @@ void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype)
 
 bool InsetCaptionable::insetAllowed(InsetCode c) const
 {
-       return (c == CAPTION_CODE) || InsetCollapsable::insetAllowed(c);
+       return (c == CAPTION_CODE) || InsetCollapsible::insetAllowed(c);
 }