When I right-click a field in LO writer, e.g. a cross-reference, there should be a menu item on the context menu for "Update Field" (not all fields, just the right-clicked field).
I don't think Writer ever used to have that item, but just in case: It's missing with
Version: 184.108.40.206.alpha0+ / LibreOffice Community
Build ID: d9b33ed6644203141fdb0776c291425c2bc9f5ac
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Why do you expect a field not to be up-to-date?
(In reply to Heiko Tietze from comment #2)
> Why do you expect a field not to be up-to-date?
Because a field isn't necessarily automatically up-to-date. Or - are you saying if that happens, then it's a bug?
(In reply to Eyal Rozenberg from comment #3)
> are you saying if that happens, then it's a bug?
I don't see a reason why fields cannot show the most recent content. Miklos, what do you think?
Not updating all fields automatically has a few benefits:
1) updating all these fields can take a bit of time for large documents, so doing it on every keypress would be seen as a problem by some users (Writer could be too slow to be usable)
2) we could also have code to track the dependencies of all fields (similar to e.g. what Calc does), not having that code makes the codebase simpler
3) there is not much pressure on us to do such auto-updates in all cases, e.g. Word doesn't update fields even on file load
So given that users learned to live with not auto-updating fields, this allows a bit simpler and faster code. That being said, we do auto-update a few fields, e.g. moving a page number field to a next page auto-updates it.
On the other hand, users learned that hand-editing a generated ToC is possible, and if we take that away, they can see that as a regression.
With these in mind, completely eliminating the explicit field update doesn't sound good.
Adding a possibly to explicitly update an individual field makes sense to me.
So let's make it an interesting easyhack, guess the prototype would be ImpEditEngine::UpdateFields().
*** Bug 152060 has been marked as a duplicate of this bug. ***