Last active
April 19, 2017 15:03
-
-
Save dajare/c452fd291d5d89173ac36a4b89f25245 to your computer and use it in GitHub Desktop.
LibreOffice Writer Basic macro to insert string "Th" without ligature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub insert_Th_no_ligature | |
Dim oDoc as variant | |
oDoc = ThisComponent | |
Dim oCurrentController as variant | |
oCurrentController = oDoc.getCurrentController() | |
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,"T" & chr(clng("&H2060")) & "h",false) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uses
U+2060
= Unicode word joiner:Macro adapted from Ask.LibO Q&A. For macro string concatenation, see Macro Guide, p. 67 (70 of PDF).