Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


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+unsubscribe@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.