I am really stuck trying to figure out how to force a software update on openoffice writer cell calculations (3.3) when cell values โโare bookmarks and bookmarks are updated programmatically (via UNO calls in Java).
Example
| start | stop | duration | | 9:30 | 11:30 | = <A2>-<B2> | <= cell formula
This works great when the user manually edits the table, the value is updated when they move to the next cell. However, if I programmatically update values โโby inserting text into bookmarks in cells, the calculated cells are not updated. They will be updated if you click in the table, but I would like it to be automatic.
The bookmark is in the table as follows.
| start | stop | duration | | <start0> | <stop0> | = <A2>-<B2> |
Sample code for updating a bookmark:
XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier) UnoRuntime.queryInterface(XBookmarksSupplier.class, document); XNameAccess xNamedBookmarks = xBookmarksSupplier.getBookmarks(); Object bookmark = xNamedBookmarks.getByName("stop0"); XTextContent xBookmarkContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, bookmark); xBookmarkContent.getAnchor().setString("11:30");
source share