As part of this question, I’m trying to figure out, how can I simulate “mouse-clicking” a slide, so it becomes focused? This would allow then to call Copy
API, so the focused element gets copied.
Okay, so, I figured to search for select
term, and although I didn’t find anything on the internet either, however I found in a Controller a function select()
, and calling it on either slide or image works. Example of accessing this property (snip):
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop", ctx)
desktop.CurrentComponent.CurrentController.select(my_picture)
For a more complete code you can refer to the question I linked in this question.
The bad news though that calling it on a DrawPage, and then using Copy/Paste does not create a new slide, but that is probably another question.