Frank Schönheit - Sun Microsystems Germany wrote:
> Hi Mathias,
>
>> Switching off the design mode with the dispatch API is done in the
>> following way: (quote signs to avoid line breaks)
>>
>>>sub designmodeoff
>>>
>>> document = ThisComponent.CurrentController.Frame
>>> dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
>>> dim args(0) as new com.sun.star.beans.PropertyValue
>>> args(0).Name = "SwitchControlDesignMode"
>>> args(0).Value = false
>>> dispatcher.executeDispatch(document, ".uno:SwitchControlDesignMode", "",
>>> 0, args1())
>>>
>>>end sub
>>
>> For switching it on you must change one line:
>>
>>> args(0).Value = true
>
> Didn't know we have *that* cool helpers meanwhile, thanks for pointing out!
We have the DispatchHelper since we have macro recording, IIRC that was
OOo1.1. :-)
Ciao,
Mathias
--
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]