Apache OpenOffice (AOO) Bugzilla – Issue 79664
Set variable fields hidden through API does not update state
Last modified: 2013-02-24 21:08:08 UTC
Hello, setting variable fields to be hidden (set IsVisible flag to false) does not work properly through the API. I used the code from the Snippets for hiding fields in Java and put it into a beanshell macro. For test purpose I also added a user field to hide it, too. When I run the macro, the user field gets hidden, but not the variable field. Doubleclicking on the variable field shows the checkbox "hidden" as checked. So the macro did the right thing, but there is no update of the state of this, I guess. I also tried the following: XTextFieldsSupplier xTextFieldsSupplier = (XTextFieldsSupplier) UnoRuntime.queryInterface(XTextFieldsSupplier.class, textDocument.getXTextDocument()); XRefreshable xRefreshable = (XRefreshable)UnoRuntime.queryInterface (XRefreshable.class, xTextFieldsSupplier.getTextFields()); xRefreshable.refresh(); This did not solve the issue, so I decided to create this bug report. Regards, Markus
Created attachment 46832 [details] Document with a macro to reproduce the bug
jsc :tl: it's the writer API
Any progrss on this? Can I expect that this is fixed in 2.3? Regards, Markus
No. There were too many other features and issues to take care of for 2.3. Setting target to 2.x since currently we should use 2.4 only for 'hand-selected' issues of special interest.
set target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Confirming with 2.4m241 - first field does not get hidden after running macro. Saving, closing, opening hides the field.