[Solved] Shortcut for a specific Shape Type

Discuss the drawing application

[Solved] Shortcut for a specific Shape Type

Postby Yoshi_Ma » Tue Feb 10, 2015 5:47 pm

Hello

I am trying to add a keyboard shortcut for "Flowchart: Alternate Process".

However, there is no option for it when I go to Tools -> Customize -> Keyboard. Only for basic shapes such as Rectangle :crazy:

Is there a method of adding this, such as through a macro?

Thanks
Last edited by RoryOF on Tue Feb 10, 2015 7:19 pm, edited 2 times in total.
Reason: Added green tick. [RoryOF, Moderator]
OpenOffice 4.1.1 on Windows 7
Yoshi_Ma
 
Posts: 4
Joined: Fri Feb 06, 2015 7:47 pm

Re: Shortcut for a specific Shape Type

Postby Yoshi_Ma » Tue Feb 10, 2015 7:01 pm

I worked it out myself. Add a shortcut to the following Macro:

Code: Select all   Expand viewCollapse view
sub InsertAltProcess
   dim document as object
   dim dispatcher as object

   document   = ThisComponent.CurrentController.Frame
   dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
   
   dispatcher.executeDispatch(document, ".uno:FlowChartShapes.flowchart-alternate-process", "", 0, Array())
end sub
OpenOffice 4.1.1 on Windows 7
Yoshi_Ma
 
Posts: 4
Joined: Fri Feb 06, 2015 7:47 pm


Return to Draw

Who is online

Users browsing this forum: No registered users and 1 guest