Bug 169211 - Support tracking/indication of when a ToC needs an update
Summary: Support tracking/indication of when a ToC needs an update
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2025-11-02 13:36 UTC by Eyal Rozenberg
Modified: 2025-11-03 16:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2025-11-02 13:36:09 UTC
At the moment, ToC updates are completely lazy: You create, or update, your ToC, and then LO forgets about it until you next manually request an update. There is no indication of when the ToC goes out-of-sync with the rest of the document.

I suggest that LO supports tracking this situation.

Specifically, that could be used for a visual indication on a ToC of its being out-of-sync, so you know you need to update it. It could also be used by other code which may want this information for its decisions, e.g. the suggestion in the discussion on bug 44448, to warn about an out-of-sync ToC before printing.
Comment 1 Heiko Tietze 2025-11-03 13:40:56 UTC
Likely impossible. And doesn't it apply to all variables?
Comment 2 Eyal Rozenberg 2025-11-03 16:55:01 UTC
(In reply to Heiko Tietze from comment #1)
> Likely impossible. 

It certainly possible, with the 'easiest' way being: Any edit, anywhere, marks the ToC as out-of-sync/in-need-of-update. The challenge would be not to always just say that, but rather manage to deduce that a bunch of edits will keep the ToC as it is.

> And doesn't it apply to all variables?

You mean, fields whose value depends on document contents? Maybe it could, but that's not what I'm proposing here. The idea is that when you look at the ToC, or do something else with it, you'll know whether it's up to date or not.

One could argue that this is not worth it, and we might as well just be willing to do auto-updates (as per bug 169212), so, marking needDevEval is probably the right idea.