]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.cpp
Update Toc when navigation menu is trigged.
[lyx.git] / src / insets / InsetFloat.cpp
index b0405555ff32e5249e2db4d33a27327ba7d49a64..c83fb96635906cebc028f5192fbd17cbab618eff 100644 (file)
@@ -279,7 +279,7 @@ docstring const InsetFloat::editMessage() const
 
 
 int InsetFloat::latex(Buffer const & buf, odocstream & os,
-                      OutputParams const & runparams) const
+                     OutputParams const & runparams) const
 {
        FloatList const & floats = buf.params().getTextClass().floats();
        string tmptype = (params_.wide ? params_.type + "*" : params_.type);
@@ -328,9 +328,9 @@ int InsetFloat::latex(Buffer const & buf, odocstream & os,
 
 
 int InsetFloat::plaintext(Buffer const & buf, odocstream & os,
-                          OutputParams const & runparams) const
+                         OutputParams const & runparams) const
 {
-       os << '[' << _("float") << ' ' << floatName(params_.type, buf.params()) << ":\n";
+       os << '[' << buf.B_("float") << ' ' << floatName(params_.type, buf.params()) << ":\n";
        InsetText::plaintext(buf, os, runparams);
        os << "\n]";
 
@@ -339,10 +339,10 @@ int InsetFloat::plaintext(Buffer const & buf, odocstream & os,
 
 
 int InsetFloat::docbook(Buffer const & buf, odocstream & os,
-                        OutputParams const & runparams) const
+                       OutputParams const & runparams) const
 {
-        // FIXME UNICODE
-        os << '<' << from_ascii(params_.type) << '>';
+       // FIXME UNICODE
+       os << '<' << from_ascii(params_.type) << '>';
        int const i = InsetText::docbook(buf, os, runparams);
        os << "</" << from_ascii(params_.type) << '>';
 
@@ -386,31 +386,6 @@ void InsetFloat::sideways(bool s, BufferParams const & bp)
 }
 
 
-void InsetFloat::addToToc(TocList & toclist, Buffer const & buf) const
-{
-       // Is there a need to provide a list of float insets?
-       return;
-
-       // Abdel (01/02/2006): I'll let this code for reference in case
-       // there's a need to do something similar for another kind of
-       // inset.
-       ParConstIterator pit = par_const_iterator_begin(*this);
-       ParConstIterator end = par_const_iterator_end(*this);
-
-       // Find a caption layout in one of the (child inset's) pars
-       for (; pit != end; ++pit) {
-               if (pit->layout()->labeltype == LABEL_SENSITIVE) {
-                       Toc & toc = toclist[params_.type];
-                       docstring const str =
-                               convert<docstring>(toc.size() + 1)
-                               + ". " + pit->asString(buf, false);
-                       toc.push_back(TocItem(pit, 0, str));
-                       return;
-               }
-       }
-}
-
-
 string const InsetFloatMailer::name_("float");
 
 InsetFloatMailer::InsetFloatMailer(InsetFloat & inset)