is left over from when the outliner really did just display a TOC.
}
-void Paragraph::forToc(docstring & os, size_t maxlen) const
+void Paragraph::forOutliner(docstring & os, size_t maxlen) const
{
if (!d->params_.labelString().empty())
os += d->params_.labelString() + ' ';
else if (c == '\t' || c == '\n')
os += ' ';
else if (c == META_INSET)
- getInset(i)->forToc(os, maxlen);
+ getInset(i)->forOutliner(os, maxlen);
}
}
docstring asString(pos_type beg, pos_type end,
int options = AS_STR_NONE) const;
///
- void forToc(docstring &, size_t maxlen) const;
+ void forOutliner(docstring &, size_t maxlen) const;
/// Extract only the explicitly visible text (without any formatting),
/// descending into insets
}
-void Text::forToc(docstring & os, size_t maxlen, bool shorten) const
+void Text::forOutliner(docstring & os, size_t maxlen, bool shorten) const
{
if (maxlen == 0)
maxlen = std::numeric_limits<std::size_t>::max();
else
LASSERT(maxlen >= 8, maxlen = TOC_ENTRY_LENGTH);
for (size_t i = 0; i != pars_.size() && os.length() < maxlen; ++i)
- pars_[i].forToc(os, maxlen);
+ pars_[i].forOutliner(os, maxlen);
if (shorten && os.length() >= maxlen)
os = os.substr(0, maxlen - 3) + from_ascii("...");
}
/// if \param os is longer than maxlen chars.
/// if \param maxlen is passed as 0, then it is ignored. (In fact,
/// it is reset to the maximum value for size_t.)
- void forToc(docstring & os, size_t maxlen, bool shorten = true) const;
+ void forOutliner(docstring & os, size_t maxlen, bool shorten = true) const;
/// insert a character at cursor position
/// FIXME: replace Cursor with DocIterator.
}
-void Inset::forToc(docstring &, size_t) const
+void Inset::forOutliner(docstring &, size_t) const
{
}
virtual void toString(odocstream &) const {}
/// Appends a potentially abbreviated version of the inset to
/// \param str. Intended for use by the TOC.
- virtual void forToc(docstring & str,
+ virtual void forOutliner(docstring & str,
size_t maxlen = TOC_ENTRY_LENGTH) const;
/// can the contents of the inset be edited on screen ?
}
-void InsetBranch::forToc(docstring & os, size_t maxlen) const
+void InsetBranch::forOutliner(docstring & os, size_t maxlen) const
{
if (isBranchSelected())
- InsetCollapsable::forToc(os, maxlen);
+ InsetCollapsable::forOutliner(os, maxlen);
}
Toc & toc = buffer().tocBackend().toc("branch");
docstring str = params_.branch + ": ";
- text().forToc(str, TOC_ENTRY_LENGTH);
+ text().forOutliner(str, TOC_ENTRY_LENGTH);
toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
// Proceed with the rest of the inset.
bool const doing_output = output_active && isBranchSelected();
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
void validate(LaTeXFeatures &) const;
///
Toc & toc = buffer().tocBackend().toc(floattype_);
docstring str = full_label_;
int length = output_active ? INT_MAX : TOC_ENTRY_LENGTH;
- text().forToc(str, length);
+ text().forOutliner(str, length);
toc.push_back(TocItem(pit, 0, str, output_active));
// Proceed with the rest of the inset.
}
-void InsetCitation::forToc(docstring & os, size_t) const
+void InsetCitation::forOutliner(docstring & os, size_t) const
{
os += screenLabel();
}
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
void validate(LaTeXFeatures &) const {}
///
Toc & toc = buffer().tocBackend().toc("footnote");
docstring str = custom_label_ + ": ";
- text().forToc(str, TOC_ENTRY_LENGTH);
+ text().forOutliner(str, TOC_ENTRY_LENGTH);
toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
// Proceed with the rest of the inset.
InsetFootlike::addToToc(cpit, output_active);
}
-void InsetHyperlink::forToc(docstring & os, size_t) const
+void InsetHyperlink::forOutliner(docstring & os, size_t) const
{
docstring const & n = getParam("name");
if (!n.empty()) {
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
///
}
-void InsetIPAChar::forToc(docstring & os, size_t) const
+void InsetIPAChar::forOutliner(docstring & os, size_t) const
{
odocstringstream ods;
plaintext(ods, OutputParams(0));
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
InsetCode lyxCode() const { return IPACHAR_CODE; }
/// We don't need \begin_inset and \end_inset
DocIterator pit = cpit;
pit.push_back(CursorSlice(const_cast<InsetIndex &>(*this)));
docstring str;
- text().forToc(str, 0);
+ text().forOutliner(str, 0);
buffer().tocBackend().toc("index").push_back(TocItem(pit, 0, str, output_active));
// Proceed with the rest of the inset.
InsetCollapsable::addToToc(cpit, output_active);
Toc & toc = buffer().tocBackend().toc("marginalnote");
docstring str;
- text().forToc(str, TOC_ENTRY_LENGTH);
+ text().forOutliner(str, TOC_ENTRY_LENGTH);
toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
// Proceed with the rest of the inset.
InsetFootlike::addToToc(cpit, output_active);
Toc & toc = buffer().tocBackend().toc("note");
InsetLayout const & il = getLayout();
docstring str = translateIfPossible(il.labelstring()) + from_ascii(": ");
- text().forToc(str, TOC_ENTRY_LENGTH);
+ text().forOutliner(str, TOC_ENTRY_LENGTH);
toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
// Proceed with the rest of the inset.
}
-void InsetQuotes::forToc(docstring & os, size_t) const
+void InsetQuotes::forOutliner(docstring & os, size_t) const
{
os += displayString();
}
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t maxlen) const;
+ void forOutliner(docstring &, size_t maxlen) const;
///
void validate(LaTeXFeatures &) const;
}
-void InsetRef::forToc(docstring & os, size_t) const
+void InsetRef::forOutliner(docstring & os, size_t) const
{
// There's no need for details in the TOC, and a long label
// will just get in the way.
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
void validate(LaTeXFeatures & features) const;
///
}
-void InsetSpace::forToc(docstring & os, size_t) const
+void InsetSpace::forOutliner(docstring & os, size_t) const
{
// There's no need to be cute here.
os += " ";
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
bool hasSettings() const { return true; }
///
}
-void InsetSpecialChar::forToc(docstring & os, size_t) const
+void InsetSpecialChar::forOutliner(docstring & os, size_t) const
{
odocstringstream ods;
plaintext(ods, OutputParams(0));
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
InsetCode lyxCode() const { return SPECIALCHAR_CODE; }
/// We don't need \begin_inset and \end_inset
}
-void InsetText::forToc(docstring & os, size_t maxlen) const
+void InsetText::forOutliner(docstring & os, size_t maxlen) const
{
if (!getLayout().isInToc())
return;
- text().forToc(os, maxlen, false);
+ text().forOutliner(os, maxlen, false);
}
tocstring = par.labelString();
if (!tocstring.empty())
tocstring += ' ';
- arginset->text().forToc(tocstring, length);
+ arginset->text().forOutliner(tocstring, length);
} else
- par.forToc(tocstring, length);
+ par.forOutliner(tocstring, length);
dit.pos() = 0;
toc.push_back(TocItem(dit, toclevel - min_toclevel,
tocstring, doing_output, tocstring));
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
///
void addToToc(DocIterator const & di, bool output_active) const;
///
}
-void InsetMathHull::forToc(docstring & os, size_t) const
+void InsetMathHull::forOutliner(docstring & os, size_t) const
{
odocstringstream ods;
OutputParams op(0);
///
void toString(odocstream &) const;
///
- void forToc(docstring &, size_t) const;
+ void forOutliner(docstring &, size_t) const;
/// get notification when the cursor leaves this inset
bool notifyCursorLeaves(Cursor const & old, Cursor & cur);