#include <boost/next_prior.hpp>
+#include <limits>
#include <sstream>
void Text::forToc(docstring & os, size_t maxlen, bool shorten) const
{
- LASSERT(maxlen >= 8, maxlen = 30);
+ 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);
if (shorten && os.length() >= maxlen)