INumberFormat numberFormat, boolean isFormula) throws NOAException {
try {
XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, textDocument.getXTextDocument());
Object textField = xMultiServiceFactory.createInstance(ITextFieldService.VARIABLES_TEXTFIELD_ID);
XDependentTextField xDependentTextField = (XDependentTextField)UnoRuntime.queryInterface(XDependentTextField.class, textField);
xDependentTextField.attachTextFieldMaster(xPropertySet);
XPropertySet xPropertySetField = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xDependentTextField);
xPropertySetField.setPropertyValue("IsVisible", new Boolean(visible));
xPropertySetField.setPropertyValue("IsFixedLanguage", new Boolean(false));