Created
January 8, 2018 20:23
-
-
Save Vinzz/6bd1799e9d64e66914cc614499a47170 to your computer and use it in GitHub Desktop.
Insert cards symbols in black or red within LibreOffice Writer (map these with a toolbar with card symbols as names)
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
REM ***** BASIC ***** | |
Sub InsertSymbol(text As String, color As long) | |
Dim oVC As Object | |
Dim oCursor As Object | |
Dim savColor as long | |
oVC = thisComponent.getCurrentController.getViewCursor | |
oCursor = oVC.getText.createTextCursorByRange(oVC) | |
savColor = oCursor.charColor | |
oCursor.charColor = color | |
oText = oVC.text | |
oText.insertString(oVC, text, False) | |
oCursor.charColor = savColor | |
End Sub | |
Sub InsertK | |
InsertSymbol("?", RGB(255,0,0)) | |
End Sub | |
Sub InsertC | |
InsertSymbol("?", RGB(255,0,0)) | |
End Sub | |
Sub InsertT | |
InsertSymbol("?", RGB(0,0,0)) | |
End Sub | |
Sub InsertP | |
InsertSymbol("?", RGB(0,0,0)) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment