Annexes/ 0000775 0000764 0000764 00000000000 11213341516 011136 5 ustar andy andy Annexes/configs/ 0000775 0000764 0000764 00000000000 11213341540 012563 5 ustar andy andy Annexes/configs/MacroFormatterADP.xcs 0000664 0000764 0000764 00000002177 11554113727 016577 0 ustar andy andy
Annexes/configs/MacroFormatterADP.xcu 0000664 0000764 0000764 00000002037 11554113727 016574 0 ustar andy andy
OOoTextBody
Courier New
635
8.0
9.0
in
%origin%
Descriptions/ 0000700 0000764 0000764 00000000000 11227116232 012167 5 ustar andy andy Descriptions/descr-de.txt 0000664 0000764 0000764 00000000171 11554113730 014434 0 ustar andy andy Colorize Basic, Java, C++ und XML.
Kodieren Sie wird identifizierent durch Punktarten.
Copyright 2009 Andrew Pitonyak
Descriptions/descr-en.txt 0000700 0000764 0000764 00000000156 11554113730 014440 0 ustar andy andy Colorize Basic, Java, C++, and XML.
Code is identified by paragraph styles.
Copyright 2009 Andrew Pitonyak
Descriptions/descr-es.txt 0000664 0000764 0000764 00000000164 11554113730 014455 0 ustar andy andy Colorize Basic, Java, C++, y XML.
Cifre es identificado por estilos del párrafo.
Copyright 2009 Andrew Pitonyak
Descriptions/descr-fr.txt 0000664 0000764 0000764 00000000174 11554113731 014457 0 ustar andy andy Colorize de base, Java, C++, et XML.
Codez est identifié par des modèles de paragraphe.
Copyright 2009 Andrew Pitonyak
Descriptions/descr-ja.txt 0000700 0000764 0000764 00000000153 11554113731 014426 0 ustar andy andy 、ジャワ基本、色C++およびXML。
色 Basic, Java, C++, and XML.
Copyright 2009 Andrew Pitonyak
Descriptions/descr-ru.txt 0000664 0000764 0000764 00000000132 11554113732 014471 0 ustar andy andy Расцвечивает StarBasic, Java, C++, и XML.
Copyright (c) 2009 Andrew Pitonyak
MacroFormatterADP/ 0000700 0000764 0000764 00000000000 11665275540 013011 5 ustar andy andy MacroFormatterADP/DialogStrings_es_ES.properties 0000664 0000764 0000764 00000002576 11554113735 020776 0 ustar andy andy # Strings for Dialog Library MacroFormatterADP
0.CfgFmtDlg.HelpText=
1.CfgFmtDlg.Title=
2.CfgFmtDlg.okButton.HelpText=
3.CfgFmtDlg.okButton.Label=OK
4.CfgFmtDlg.cancelButton.HelpText=
5.CfgFmtDlg.cancelButton.Label=Cancel
6.CfgFmtDlg.ParSmallCharHeight.HelpText=Font size for small paragraph styles (_code)
7.CfgFmtDlg.ParNormalCharHeight.HelpText=Font size for normal code paragraph styles.
8.CfgFmtDlg.Label1.HelpText=
9.CfgFmtDlg.Label1.Label=Tama\u00f1o texto peque\u00f1o:
10.CfgFmtDlg.Label2.HelpText=
11.CfgFmtDlg.Label2.Label=Normal tama\u00f1o texto:
12.CfgFmtDlg.Label3.HelpText=
13.CfgFmtDlg.Label3.Label=Tab width:
14.CfgFmtDlg.TabWidth.HelpText=Tab stops created in the paragraph styles.
15.CfgFmtDlg.Label4.HelpText=
16.CfgFmtDlg.Label4.Label=Nombre de font:
17.CfgFmtDlg.Label5.HelpText=
18.CfgFmtDlg.Label5.Label=Nombre del estilo del p\u00e1rrafo del texto:
19.CfgFmtDlg.FixedLine1.HelpText=
20.CfgFmtDlg.FixedLine1.Label=
21.CfgFmtDlg.Info.HelpText=General information is displayed here.
22.CfgFmtDlg.Info.Text=
23.CfgFmtDlg.ParNextStyleName.HelpText=Name of the paragraph style to use for normal text.
24.CfgFmtDlg.ParNextStyleName.Text=Default
25.CfgFmtDlg.FontName.HelpText=Font name for paragraph and character styles.
26.CfgFmtDlg.FontName.Text=Courier New
27.CfgFmtDlg.rbUnit1.HelpText=
28.CfgFmtDlg.rbUnit1.Label=inches
29.CfgFmtDlg.rbUnit2.HelpText=
30.CfgFmtDlg.rbUnit2.Label=cm
MacroFormatterADP/DialogStrings_ja_US.properties 0000664 0000764 0000764 00000003011 11554113736 020763 0 ustar andy andy # Strings for Dialog Library MacroFormatterADP
0.CfgFmtDlg.HelpText=
1.CfgFmtDlg.Title=
2.CfgFmtDlg.okButton.HelpText=
3.CfgFmtDlg.okButton.Label=OK
4.CfgFmtDlg.cancelButton.HelpText=
5.CfgFmtDlg.cancelButton.Label=Cancel
6.CfgFmtDlg.ParSmallCharHeight.HelpText=Font size for small paragraph styles (_code)
7.CfgFmtDlg.ParNormalCharHeight.HelpText=Font size for normal code paragraph styles.
8.CfgFmtDlg.Label1.HelpText=
9.CfgFmtDlg.Label1.Label=\u5c0f\u3055\u3044\u30c6\u30ad\u30b9\u30c8\u306e\u30b5\u30a4\u30ba:
10.CfgFmtDlg.Label2.HelpText=
11.CfgFmtDlg.Label2.Label=\u30c6\u30ad\u30b9\u30c8\u306e\u30b5\u30a4\u30ba\u306e\u5e38\u614b:
12.CfgFmtDlg.Label3.HelpText=
13.CfgFmtDlg.Label3.Label=Tab width:
14.CfgFmtDlg.TabWidth.HelpText=Tab stops created in the paragraph styles.
15.CfgFmtDlg.Label4.HelpText=
16.CfgFmtDlg.Label4.Label=Font \u540d\u524d:
17.CfgFmtDlg.Label5.HelpText=
18.CfgFmtDlg.Label5.Label=\u30c6\u30ad\u30b9\u30c8\u306e\u30d1\u30e9\u30b0\u30e9\u30d5\u69d8\u5f0f\u306e\u540d\u524d:
19.CfgFmtDlg.FixedLine1.HelpText=
20.CfgFmtDlg.FixedLine1.Label=
21.CfgFmtDlg.Info.HelpText=General information is displayed here.
22.CfgFmtDlg.Info.Text=
23.CfgFmtDlg.ParNextStyleName.HelpText=Name of the paragraph style to use for normal text.
24.CfgFmtDlg.ParNextStyleName.Text=Default
25.CfgFmtDlg.FontName.HelpText=Font name for paragraph and character styles.
26.CfgFmtDlg.FontName.Text=Courier New
27.CfgFmtDlg.rbUnit1.HelpText=
28.CfgFmtDlg.rbUnit1.Label=\u30a4\u30f3\u30c1
29.CfgFmtDlg.rbUnit2.HelpText=
30.CfgFmtDlg.rbUnit2.Label=cm
MacroFormatterADP/R.xba 0000664 0000764 0000764 00000022347 11574241754 013731 0 ustar andy andy
REM ***** BASIC *****
Option Explicit
Sub MainR
FMT_MasterColorizer(ThisComponent, "R", "CUR")
'FMT_MasterColorizer(ThisComponent, "R", "SEL")
'FMT_MasterColorizer(ThisComponent, "R", "DOC")
End Sub
Sub FMT_ColorCodeCurrentR()
FMT_MasterColorizer(ThisComponent, "R", "CUR")
End Sub
REM Format just the selected text
Sub HighlightSelR()
FMT_MasterColorizer(ThisComponent, "R", "SEL")
End Sub
'****************************************************************
'** Very simple parsing of R code.
'****************************************************************
Sub FMT_ColorCodeOneRangeStringR(oSel, sTokens(), sCharStyles())
' Which language is closest to R? Use that parser.
' You likely only require something close enough (if you know what I mean).
' For example, understanding that a new line has started ususlly does not matter.
' Code to handle multi-line comments, however, is usually language specific.
' In this case, the "#" character should be recognized as a single line comment.
' Also, I have never bothered to support inline escape charcters either, other than
' to not have a problem with "\"" representing a string with a double quote character.
' So, do not bother trying to handle syntax errors, just happily color code based on minimal
' information.
Dim oCurs 'Iterate paragraphs in the selected region.
Dim oTCurs 'Iterate the characters in a paragraph.
Dim oText 'Text object containing the selection.
Dim iPos%
Dim iLen%
Dim i% 'Temporary integer variable.
Dim sChar$ 'Current character
Dim sLine$ 'Current line (in lower case).
Dim bComment As Boolean
Dim bIsAsterick As Boolean
REM We are not currently processing a comment.
bComment = False
REM Position oTCurs at the start of the selection.
oText = oSel.getText()
oTCurs = oText.createTextCursorByRange(oSel.getStart())
oTCurs.goRight(0, False)
REM oCurs contains the first paragraph.
oCurs = FMT_CreateStartCursor(oText, oSel)
Do While oText.compareRegionEnds(oCurs, oSel) >= 0
REM Now, process a single line of text!
REM oCurs has selected the entire paragraph.
REM oTCurs is at the start of the paragraph.
sLine = LCase(oCurs.getString())
iLen = Len(sLine)
iPos = 1
Do While iPos <= iLen
REM Skip leading white space.
FMT_FindNextNonSpace(sLine, iPos%, iLen%)
If iPos > iLen Then Exit Do
sChar = Mid(sLine, iPos, 1)
REM Is the cursor in a multi-line comment?
If bComment Then
'It looks like R does NOT support multi-line comments, so, this will not be used.
ElseIf sChar = "#" Then
Rem Found a comment, mark the rest of the line.
REM Move the character cursor from the paragraph start
REM to the comment character.
REM Select the rest of the paragraph.
oTCurs.goRight(iPos-1, False)
oTCurs.gotoEndOfParagraph(True)
'Print "Setting (" & oTCurs.getString() & ")"
oTCurs.CharStyleName = sCharStyles(FMT_CSNI_Comment)
iPos = iLen + 1
ElseIf sChar = """" OR sChar = "'" Then
REM Move to the first double quote
oTCurs.goRight(iPos-1, False)
REM Remember the location of the first double quote
REM and then find then end of the quoted text.
i = iPos
FMT_FindEndQuoteEscape(sLine$, iPos%, iLen%)
REM Move the cursor to the closing double quote.
REM Set the character style for the string.
REM Move the cursor back to the start of the paragraph.
oTCurs.goRight(iPos - i, True)
oTCurs.CharStyleName = sCharStyles(FMT_CSNI_Literal)
oTCurs.gotoRange(oCurs.start, False)
ElseIf FMT_FindNumberEnd(sLine, iPos, iLen, i) Then
REM Move to the number start.
oTCurs.goRight(iPos-1, False)
oTCurs.goRight(i - iPos, True)
oTCurs.CharStyleName = sCharStyles(FMT_CSNI_Literal)
oTCurs.gotoRange(oCurs.start, False)
iPos = i
ElseIf sChar = "." OR FMT_IsSpecialChar(ASC(sChar)) Then
i = iPos
oTCurs.goRight(iPos - 1, False)
Do
iPos = iPos + 1
If iPos > iLen Then Exit Do
Loop Until NOT FMT_IsSpecialChar(ASC(Mid(sLine, iPos, 1)))
oTCurs.goRight(iPos - i, True)
oTCurs.CharStyleName = sCharStyles(FMT_CSNI_Special)
oTCurs.gotoRange(oCurs.start, False)
Else
REM No special characters, so this is a variable
REM or logic statement. Move to the first character.
i = iPos
oTCurs.goRight(iPos-1, False)
Do
iPos = iPos + 1
If iPos > iLen Then
Exit Do
End If
Loop Until FMT_IsWordSep(Asc(Mid(sLine, iPos, 1)))
oTCurs.goRight(iPos - i, True)
sChar = LCase(oTCurs.getString())
If FMT_ArrayHasString(sChar, sTokens()) Then
oTCurs.CharStyleName = sCharStyles(FMT_CSNI_KeyWord)
Else
oTCurs.CharStyleName = sCharStyles(FMT_CSNI_Ident)
End If
oTCurs.gotoRange(oCurs.start, False)
End If
Loop
If Not oCurs.gotoNextParagraph(False) Then Exit Do
oTCurs.gotoRange(oCurs, False)
If NOT FMT_CursorToParEnd(oText, oSel, oCurs) Then Exit Do
Loop
End Sub
'****************************************************************
'** Tokens recognized by R.
'****************************************************************
Sub FMT_InitTokensR(sTokens())
sTokens() = Array("getwd", "setwd", "list.files", "read.table", "objects", "rm", "ls", "attributes", _
"summary", "class", "dim", "levels", "ifelse", "methods", "arrows", "points", "box", _
"text", "axis", "for", "print", "help", "in", "dyn.load", "is.loaded", "if", "while",_
"return", "function", "plot", "hist", "boxplot", "read", "table", "scan", "kw2", _
"specific words", "greenT", "F", "TRUE", "FALSE", "kw3", "functions", "redquantile",_
"cut", "matrix", "dim", "cbind", "rbind", "apply", "rnorm", "extractAIC", "dyn", _
"load", "is", "loaded", "length", "t", "outer", "sum", "diag", "solve", "det", _
"list", "names", "rep", "mean", "eigen", "sqrt", "runif", "median", "range", _
"max", "min", "summary", "rpois", "pnorm", "qnorm", "pchisq", "seq", "dnorm", _
"step", "attach", "names", "header", "package", "sep", "breaks", "probs", _
"data", "bty", "axes", "pch", "cex", "angle", "labels", "FUN", "ncol", _
"byrow", "type", "pch", "col", "lwd", "row", "xlab", "ylab", "ask", "mfrow", _
"direction", "call", "aliased", "adj.r.squared", "terms", "sigma", "fstatistic", _
"residuals", "df", "cov.unscaled", "coefficients", "r.squared", "fitted.values", _
"xlevels", "assign", "call", "effects", "qr", "rank", "df.residual", "model", _
"nclass")
FMT_SortStringArrayAscending(sTokens())
End Sub
'****************************************************************
'** Get the character styles meant for highlighting R code.
'** R formats character styles as an identifier.
'****************************************************************
Function FMT_GetRCharacterStyles()
CreateStarBasicCharStyles()
FMT_GetRCharacterStyles() = Array( "_OOoComputerComment", _
"_OOoComputerLiteral", "_OOoComputerKeyWord", _
"_OOoComputerIdent", "_OOoComputerBase")
End Function