Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

My favorite shortcut key for 'Paste unformatted text' is 'Ctrl+U', assigned to that macro:

sub paste_unformatted
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SelectedFormat"
args1(0).Value = 1

dispatcher.executeDispatch(document, ".uno:ClipboardFormatItems", "", 0, args1())

end sub

You may create this macro as follows:

(1) Record macro

Ctrl+Shift+V > U > Enter

Stop recording

(2) [New window: LibreOffice Basic Macros]

Type 'Macro name' (e.g.): 'paste_unformatted' <save>

(3) Tools > Customize > Keyboard > Functions > Category > LibreOffice Macros > user > Standard > Module1 Function > 'paste_unformatted'

Shortcut keys > Ctrl+U > Modify > OK

Customize 'Ctrl+U'

My favorite shortcut key for 'Paste unformatted text' is 'Ctrl+U', assigned to that macro:

sub paste_unformatted
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SelectedFormat"
args1(0).Value = 1

dispatcher.executeDispatch(document, ".uno:ClipboardFormatItems", "", 0, args1())

end sub

You may create this macro as follows:

(1) Record macro

Ctrl+Shift+V > U > Enter

Stop recording

(2) [New window: LibreOffice Basic Macros]

Type 'Macro name' (e.g.): 'paste_unformatted' <save>'paste_unformatted' > Save

(3) Tools > Customize > Keyboard > Functions > Category > LibreOffice Macros > user > Standard > Module1 Function > 'paste_unformatted'

Shortcut keys > Ctrl+U > Modify > OK

Customize 'Ctrl+U'

My favorite shortcut key for 'Paste unformatted text' is 'Ctrl+U', assigned to that macro:

sub paste_unformatted
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SelectedFormat"
args1(0).Value = 1

dispatcher.executeDispatch(document, ".uno:ClipboardFormatItems", "", 0, args1())

end sub

You may create this macro as follows:

(1) Record macro

Ctrl+Shift+V > U > Enter

Stop recording

(2) [New window: LibreOffice Basic Macros]

Type 'Macro name' (e.g.): 'paste_unformatted' > Save

(3) Tools > Customize > Keyboard > Functions > Category > LibreOffice Macros > user > Standard > Module1 Module1

Function > 'paste_unformatted'

Shortcut keys > Ctrl+U > Modify > OK

Customize 'Ctrl+U'