Hi Gary,

if you want to go with macros, the following will work:
The general part once (you might need to correct line breaks):

Sub lcl_InsertCharacter_Writer(byval sChar as string)
Dim oDoc as variant
        oDoc = ThisComponent
Dim oCurrentController as variant
        oCurrentController = oDoc.getCurrentController()
if not(oCurrentController.supportsService("com.sun.star.text.TextDocumentView")) then
        msgbox("only for text documents")
        exit sub
end if
Dim oTextViewCursor as variant
        oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
        oText=oTextViewCursor.Text
Else
        oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,sChar,false)
End Sub


And then for each desired character, for example:

sub S_Lower_Hatchek
        lcl_InsertCharacter_Writer(chr(clng("&H0161")))
end sub

sub C_Upper_Cedilla
        lcl_InsertCharacter_Writer(chr(clng("&Hc7")))
end sub

Of cause you need to adapt the number "&H0161" or "&Hc7" to your character. You can assign a short-cut to macros. Macros are at the bottom of the Category list in the Keyboard tab of the Customize dialog.

I found it difficult to remember short-cuts. Therefore I had made an own toolbar for these characters, where I used the character itself as name for the icon. I had added the macros and the toolbar to a document template. I had used it many yours ago for my pupils, so that they could easily write French texts. But with the new special character dialog, such is not really needed nowadays.

Kind regards
Regina


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to