Ask Your Question
0

UNO: How to focus an element

asked 2019-08-18 02:26:28 +0200

Hi-Angel gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-08-18 03:04:15 +0200

Hi-Angel gravatar image

updated 2019-08-18 03:07:15 +0200

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-18 02:26:28 +0200

Seen: 12 times

Last updated: Aug 18