Thirty or forty years ago, it would perhaps have been cumbersome for a document writing app like StarWriter, WordPerfect or Microsoft Word, to insert a dynamically-self-updating table of contents. But these days - it is usually (or always?) not much of a hassle to burden LibreOffice with also updating a ToC when edits are made. So, while I'm not suggesting we do this by default, I am suggesting we add support for an always-in-synch table of contents: It would be an opt-in toggle, and only available when the ToC cannot be edited manually.
(In reply to Eyal Rozenberg from comment #0) > ...also updating a ToC when edits are made. What kind of edits? Changes that affect thew page numbers, any formatting or just indentation/spacing, all key events to notice when the heading text is altered, etc.? I think this is not feasible.
(In reply to Heiko Tietze from comment #1) > What kind of edits? Changes that affect thew page numbers, any formatting or > just indentation/spacing, all key events to notice when the heading text is > altered, etc.? I mean, _all_ document edits. So, all of those you mentioned. Now > I think this is not feasible. Of course it's _feasible_ - if in no other way, then by triggering a ToC re-generation after each edit. But of course that would be rather wasteful. Developers would need to work out how to do this more lazily, while still having the same effect. Approaches could be: * Regenerate ToC every fixed period of time (if any edits were made) * Regenerate ToC whenever it comes into view (plus when saving, exporting, or printing) - so the user never sees it with invalid content, although this would mean we do not allow for the ToC's overflowing into another page or underflowing to take up one less page, i.e. there are noticeable effect of lazyness. * Regenerate ToC on any edit to a paragraph with a style that's captured in the ToC * Regenerate when LO is "idling", provided edits have been made ... or some combination of the above.
the bug 44448 is about the same,may be just close this one?
Au contraire, they're not at all the same - I spun off this bug because there's a big difference between updating on print, or on save, and being always up-to-date. But I will alter the title of that bug slightly to emphasize the difference. (In reply to Roman Kuznetsov from comment #3) > the bug 44448 is about the same,may be just close this one?