From: Richard Heck Date: Sun, 24 Mar 2013 13:34:00 +0000 (-0400) Subject: Fix bug #8603: We want unabbreviated TOC entries here. X-Git-Tag: 2.1.0beta1~494 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d2e947d585ba19852ffe3294720ca06fc2d17db1;p=features.git Fix bug #8603: We want unabbreviated TOC entries here. --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index c6a8c2202b..9103abda0b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -4286,7 +4286,7 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const d->bibinfo_cache_valid_ = true; d->cite_labels_valid_ = true; - cbuf.tocBackend().update(true); + cbuf.tocBackend().update(utype == OutputUpdate); if (scope == UpdateMaster) cbuf.structureChanged(); } diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 4c7cd74e4e..a239fb9061 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -107,7 +107,8 @@ void InsetCaption::addToToc(DocIterator const & cpit, bool output_active) const Toc & toc = buffer().tocBackend().toc(floattype_); docstring str = full_label_; - text().forToc(str, TOC_ENTRY_LENGTH); + int length = output_active ? INT_MAX : TOC_ENTRY_LENGTH; + text().forToc(str, length); toc.push_back(TocItem(pit, 0, str, output_active)); // Proceed with the rest of the inset. diff --git a/src/insets/InsetCaption.h b/src/insets/InsetCaption.h index 37566ca678..b037c34660 100644 --- a/src/insets/InsetCaption.h +++ b/src/insets/InsetCaption.h @@ -79,7 +79,8 @@ private: docstring xhtml(XHTMLStream & os, OutputParams const & runparams) const; /// void setCustomLabel(docstring const & label); - /// + /// \param output_active : is the toc being generated for use by the + /// output routines? void addToToc(DocIterator const & di, bool output_active) const; /// virtual bool forcePlainLayout(idx_type = 0) const { return true; }