Hi Carsten,
>> my next task is to remove and add some keyboard shortcuts to an
>> OpenOffice... I looked up the Dev-Guide but it does not tell much about
>> keybord shortcuts.
>>
>> Is it possible to manage the keyboard shortcuts via Java? If yes, where
>> can I start? Can you help me please once more?
> just have a look at the thread "UNO package setting keybindings" where I
> describe how to set keyboard shortcuts via API. There is also another
> thread "Problem adding a keyboard shortcut by API's" where this issue
> were discussed.
I found the BASIC examlpe. I want to translate it to Java but have a
starting problem. Maybe you can help me.
I cite you:
-----%<-----
REM ***** BASIC *****
REM *** Example to set a keyboard shortcut with the new ui
REM *** configuration API
Sub Main
REM *** Initialize constants. See IDL file
REM com.sun.star.awt.KeyEvent
REM com.sun.star.awt.KeyModifier
REM com.sun.star.awt.Key
MODIFIER_SHIFT = 1
MODIFIER_MOD1 = 2
MODIFIER_MOD2 = 4
KEY_F10 = 777
REM *** Retrieve the global accelerator configuration manager
oGlobalAccelCfgMgr =
createUnoService("com.sun.star.ui.GlobalAcceleratorConfiguration")
REM *** Retrieve the module configuration manager from central
REM *** module configuration manager supplier
oModuleCfgMgrSupplier = createUnoService(
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier")
-----%<-----
How can I get the oGlobalAccelCfgMgr? I tried:
-----%<-----
// Condition: XComponentContext xRemoteContext
Object test = xRemoteServiceManager.createInstanceWithContext(
"com.sun.star.ui.GlobalAcceleratorConfiguration", xRemoteContext);
com.sun.star.uno.XInterface xInterface = (com.sun.star.uno.XInterface)
UnoRuntime.queryInterface(
GlobalAcceleratorConfiguration.class,
test);
-----%<-----
The createInstance... works out, but how to go on?
Would you please give me a hint?
Greetings, Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]