]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFoot.cpp
Squash some warnings.
[lyx.git] / src / insets / InsetFoot.cpp
index e941f4aa011d78f730a20403b212d6d1561f191d..7008fda976c7db3f753581e18797b978ca634d67 100644 (file)
@@ -26,6 +26,7 @@
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/gettext.h"
+#include "support/lstrings.h"
 
 using namespace std;
 
@@ -74,17 +75,22 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype)
 }
 
 
-void InsetFoot::addToToc(DocIterator const & cpit, bool output_active) const
+void InsetFoot::addToToc(DocIterator const & cpit, bool output_active,
+                                                UpdateType utype) const
 {
        DocIterator pit = cpit;
        pit.push_back(CursorSlice(const_cast<InsetFoot &>(*this)));
-
+       
+       docstring tooltip;
+       text().forOutliner(tooltip, TOC_ENTRY_LENGTH);
+       docstring str = custom_label_ + ": " + tooltip;
+       tooltip = support::wrapParas(tooltip, 0, 60, 2);
+       
        shared_ptr<Toc> toc = buffer().tocBackend().toc("footnote");
-       docstring str = custom_label_ + ": ";
-       text().forOutliner(str, TOC_ENTRY_LENGTH);
-       toc->push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
+       toc->push_back(TocItem(pit, 0, str, output_active, tooltip));
+       
        // Proceed with the rest of the inset.
-       InsetFootlike::addToToc(cpit, output_active);
+       InsetFootlike::addToToc(cpit, output_active, utype);
 }