Created
August 25, 2013 21:09
-
-
Save dajare/6336327 to your computer and use it in GitHub Desktop.
LibreOffice macro to start/stop small caps character formatting
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 SmallCapsStart | |
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 = "CaseMap" | |
args1(0).Value = 4 | |
dispatcher.executeDispatch(document, ".uno:CaseMap", "", 0, args1()) | |
end sub | |
sub SmallCapsStop | |
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 = "CaseMap" | |
args1(0).Value = 0 | |
dispatcher.executeDispatch(document, ".uno:CaseMap", "", 0, args1()) | |
end sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I found this macro on an OpenOffice.org forum, which toggles between Small Caps and no formating of the characters. Found it useful, thought I'd share it here: