I've found examples to change the position of the object browser window, but that doesn't seem to help. How do I get and work with the text (code) frame of the IDE?
Starting with
Code: Select all
oBasicIDE = CreateUNOService("com.sun.star.script.BasicIDE")
I've tried to inspect the oBasicIDE object, but OOo simply crashes, when I click the object in the Inspector frame.
Code: Select all
XRay oBasicIDE
I've also tried a different approach, using the executeDispatch method. I can copy and paste code from and to the currently open code frame by doing:
Code: Select all
oIDE_Frame = StarDesktop.CurrentComponent
oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDispatcher.executeDispatch(oIDE_Frame.getCurrentController().getframe(), ".uno:Copy", "", 0, Array())
'copies selected block of code to clipboard, cursor will be collapsed at end of selection after running the code
oDispatcher.executeDispatch(oIDE_Frame.getCurrentController().getframe(), ".uno:Paste", "", 0, Array())
'inserts content of clipboard at position of cursor, cursor will be collapsed at end of inserted content after running the code
I'm using Win XP and OOo 2.4.0.
Thanks a lot,
Hans