On 10/27/10 16:30, Peter Eberlein wrote:
how can I turn AutoComplete off?

I tried:
Object helper =
Mcf.createInstanceWithContext("com.sun.star.frame.DispatchHelper",
xComponentContext);
XDispatchHelper xDispatchHelper = (XDispatchHelper)
UnoRuntime.queryInterface(XDispatchHelper.class, helper);

PropertyValue[] args = new PropertyValue[1];
args[0] = new PropertyValue();
args[0].Name = "AutoComplete";
args[0].Value = false;

XDispatchProvider xDispatchProvider = (XDispatchProvider)
UnoRuntime.queryInterface(XDispatchProvider.class,
xModel.getCurrentController().getFrame());

xDispatchHelper.executeDispatch(xDispatchProvider, ".uno:AutoComplete",
"", 0, args);

This doesn't work. Seem there is only a "Toggling" without args possible.
If this is true: How can I detect, if AutoComplete is On or Off?

Service com.sun.star.sheet.GlobalSheetSettings has a property DoAutoComplete. It can be read and modified, so you don't need the dispatch stuff for that.

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org

Reply via email to