contrib/*.js: minor tweaks and consistency changes.
@@ -41,6 +41,6 @@ | ||
41 | 41 | SAPI5Object.Speak(WorkingFolder + ArgumentsObject.Item(4), 0); |
42 | 42 | PathParts = WScript.ScriptFullName.split("\\"); |
43 | 43 | Version = PathParts[PathParts.length - 4]; |
44 | -PathToSCompile = "\"" + ShellObject.RegRead ("HKLM\\SOFTWARE\\Freedom Scientific\\JAWS\\" + Version + "\\Target") + "scompile.exe\""; | |
44 | +PathToSCompile = "\"" + ShellObject.RegRead("HKLM\\SOFTWARE\\Freedom Scientific\\JAWS\\" + Version + "\\Target") + "scompile.exe\""; | |
45 | 45 | ShellObject.Run(PathToSCompile + ScriptName, 0, true); |
46 | 46 | SAPI5Object.Speak(Finished, 0); |
@@ -2,7 +2,7 @@ | ||
2 | 2 | // |
3 | 3 | // TortoiseSVN Diff script for Word Doc files |
4 | 4 | // |
5 | -// Copyright (C) 2004-2008, 2011-2015 the TortoiseSVN team | |
5 | +// Copyright (C) 2004-2008, 2011-2016 the TortoiseSVN team | |
6 | 6 | // This file is distributed under the same license as TortoiseSVN |
7 | 7 | // |
8 | 8 | // Last commit by: |
@@ -52,13 +52,13 @@ | ||
52 | 52 | |
53 | 53 | if (!objScript.FileExists(sBaseDoc)) |
54 | 54 | { |
55 | - WScript.Echo("File " + sBaseDoc + " does not exist. Cannot compare the documents."); | |
55 | + WScript.Echo("File " + sBaseDoc + " does not exist. Cannot compare the documents."); | |
56 | 56 | WScript.Quit(1); |
57 | 57 | } |
58 | 58 | |
59 | 59 | if (!objScript.FileExists(sNewDoc)) |
60 | 60 | { |
61 | - WScript.Echo("File " + sNewDoc + " does not exist. Cannot compare the documents."); | |
61 | + WScript.Echo("File " + sNewDoc + " does not exist. Cannot compare the documents."); | |
62 | 62 | WScript.Quit(1); |
63 | 63 | } |
64 | 64 |
@@ -77,7 +77,7 @@ | ||
77 | 77 | } |
78 | 78 | catch (e) |
79 | 79 | { |
80 | - // before giving up, try with OpenOffice | |
80 | + // Before giving up, try with OpenOffice | |
81 | 81 | var OO; |
82 | 82 | try |
83 | 83 | { |
@@ -88,17 +88,17 @@ | ||
88 | 88 | WScript.Echo("You must have Microsoft Word or OpenOffice installed to perform this operation."); |
89 | 89 | WScript.Quit(1); |
90 | 90 | } |
91 | - // yes, OO is installed - do the diff with that one instead | |
91 | + // Yes, OO is installed - do the diff with that one instead | |
92 | 92 | var objFile = objScript.GetFile(sNewDoc); |
93 | 93 | if ((objFile.Attributes & 1) === 1) |
94 | 94 | { |
95 | - // reset the readonly attribute | |
95 | + // Reset the readonly attribute | |
96 | 96 | objFile.Attributes &= ~1; |
97 | 97 | } |
98 | - //Create the DesktopSet | |
98 | + // Create the DesktopSet | |
99 | 99 | var objDesktop = OO.createInstance("com.sun.star.frame.Desktop"); |
100 | 100 | var objUriTranslator = OO.createInstance("com.sun.star.uri.ExternalUriReferenceTranslator"); |
101 | - //Adjust the paths for OO | |
101 | + // Adjust the paths for OO | |
102 | 102 | sBaseDoc = sBaseDoc.replace(/\\/g, "/"); |
103 | 103 | sBaseDoc = sBaseDoc.replace(/:/g, "|"); |
104 | 104 | sBaseDoc = sBaseDoc.replace(/ /g, "%20"); |
@@ -112,7 +112,7 @@ | ||
112 | 112 | sNewDoc = "file:///" + sNewDoc; |
113 | 113 | sNewDoc = objUriTranslator.translateToInternal(sNewDoc); |
114 | 114 | |
115 | - //Open the %base document | |
115 | + // Open the %base document | |
116 | 116 | var oPropertyValue = []; |
117 | 117 | oPropertyValue[0] = OO.Bridge_GetStruct("com.sun.star.beans.PropertyValue"); |
118 | 118 | oPropertyValue[0].Name = "ShowTrackedChanges"; |
@@ -119,12 +119,12 @@ | ||
119 | 119 | oPropertyValue[0].Value = true; |
120 | 120 | objDesktop.loadComponentFromURL(sNewDoc, "_blank", 0, oPropertyValue); |
121 | 121 | |
122 | - //Set the frame | |
122 | + // Set the frame | |
123 | 123 | var Frame = objDesktop.getCurrentFrame(); |
124 | 124 | |
125 | 125 | var dispatcher = OO.CreateInstance("com.sun.star.frame.DispatchHelper"); |
126 | 126 | |
127 | - //Execute the comparison | |
127 | + // Execute the comparison | |
128 | 128 | dispatcher.executeDispatch(Frame, ".uno:ShowTrackedChanges", "", 0, oPropertyValue); |
129 | 129 | oPropertyValue[0].Name = "URL"; |
130 | 130 | oPropertyValue[0].Value = sBaseDoc; |
@@ -151,7 +151,7 @@ | ||
151 | 151 | { |
152 | 152 | try |
153 | 153 | { |
154 | - // open empty document to prevent bug where first Open() call fails | |
154 | + // Open empty document to prevent bug where first Open() call fails | |
155 | 155 | word.Documents.Add(); |
156 | 156 | destination = word.Documents.Open(sNewDoc, true, parseInt(word.Version, 10) < vOffice2013); |
157 | 157 | } |
@@ -59,13 +59,13 @@ | ||
59 | 59 | |
60 | 60 | if (!objScript.FileExists(sBasePpt)) |
61 | 61 | { |
62 | - WScript.Echo("File " + sBasePpt + " does not exist. Cannot compare the presentations."); | |
62 | + WScript.Echo("File " + sBasePpt + " does not exist. Cannot compare the presentations."); | |
63 | 63 | WScript.Quit(1); |
64 | 64 | } |
65 | 65 | |
66 | 66 | if (!objScript.FileExists(sNewPpt)) |
67 | 67 | { |
68 | - WScript.Echo("File " + sNewPpt + " does not exist. Cannot compare the presentations."); | |
68 | + WScript.Echo("File " + sNewPpt + " does not exist. Cannot compare the presentations."); | |
69 | 69 | WScript.Quit(1); |
70 | 70 | } |
71 | 71 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | // |
3 | 3 | // TortoiseSVN Diff script for Excel files |
4 | 4 | // |
5 | -// Copyright (C) 2004-2008, 2012-2015 the TortoiseSVN team | |
5 | +// Copyright (C) 2004-2008, 2012-2016 the TortoiseSVN team | |
6 | 6 | // This file is distributed under the same license as TortoiseSVN |
7 | 7 | // |
8 | 8 | // Last commit by: |
@@ -161,7 +161,7 @@ | ||
161 | 161 | objDummyWorksheet.Visible = true; |
162 | 162 | if (fExcelVersion >= vOffice2003) |
163 | 163 | { |
164 | - objDummyWorksheet.Tab.ColorIndex = 16; // 16:Dark gray RGB(128,128,128) | |
164 | + objDummyWorksheet.Tab.ColorIndex = 16; // 16: Dark gray RGB(128,128,128) | |
165 | 165 | } |
166 | 166 | } |
167 | 167 |
@@ -230,8 +230,8 @@ | ||
230 | 230 | |
231 | 231 | // Unhide the Worksheet if it is hidden. |
232 | 232 | // This also sets color to the tab, if Office2003 or later. |
233 | -// - 46(Orange) : Hidden Worksheet | |
234 | -// - xlNone(default) : Not hidden Worksheet | |
233 | +// - 46 (Orange) : Hidden Worksheet | |
234 | +// - xlNone (default) : Not hidden Worksheet | |
235 | 235 | function UnhideWorksheet(objWorksheet) |
236 | 236 | { |
237 | 237 | if (objWorksheet.Visible) |
@@ -298,16 +298,18 @@ | ||
298 | 298 | // To avoid make huge message dialog, this limits message count to show. |
299 | 299 | function ShowWarning() |
300 | 300 | { |
301 | - if (aWarningMessages.length === 0) | |
301 | + var aWarningMessagesLength = aWarningMessages.length; | |
302 | + if (aWarningMessagesLength === 0) | |
302 | 303 | { |
303 | 304 | return; |
304 | 305 | } |
306 | + | |
305 | 307 | var sMessage = "The following warnings occurred while processing.\n"; |
306 | - for (var j = 0; j < aWarningMessages.length; j++) | |
308 | + for (var j = 0; j < aWarningMessagesLength; j++) | |
307 | 309 | { |
308 | 310 | if (j >= 10) |
309 | 311 | { |
310 | - sMessage += "... And more " + (aWarningMessages.length - j) + " messages"; | |
312 | + sMessage += "... And more " + (aWarningMessagesLength - j) + " messages"; | |
311 | 313 | break; |
312 | 314 | } |
313 | 315 | sMessage += "[" + (j + 1) + "] " + aWarningMessages[j] + "\n"; |
@@ -2,7 +2,7 @@ | ||
2 | 2 | // |
3 | 3 | // TortoiseSVN Merge script for Word Doc files |
4 | 4 | // |
5 | -// Copyright (C) 2004-2008, 2011-2015 the TortoiseSVN team | |
5 | +// Copyright (C) 2004-2008, 2011-2016 the TortoiseSVN team | |
6 | 6 | // This file is distributed under the same license as TortoiseSVN |
7 | 7 | // |
8 | 8 | // Last commit by: |
@@ -53,13 +53,13 @@ | ||
53 | 53 | |
54 | 54 | if (!objScript.FileExists(sTheirDoc)) |
55 | 55 | { |
56 | - WScript.Echo("File " + sTheirDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"); | |
56 | + WScript.Echo("File " + sTheirDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"); | |
57 | 57 | WScript.Quit(1); |
58 | 58 | } |
59 | 59 | |
60 | 60 | if (!objScript.FileExists(sMergedDoc)) |
61 | 61 | { |
62 | - WScript.Echo("File " + sMergedDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"); | |
62 | + WScript.Echo("File " + sMergedDoc + " does not exist. Cannot compare the documents.", vbExclamation, "File not found"); | |
63 | 63 | WScript.Quit(1); |
64 | 64 | } |
65 | 65 |
@@ -95,8 +95,9 @@ | ||
95 | 95 | } |
96 | 96 | else |
97 | 97 | { |
98 | - //2010 - handle slightly differently as the basic merge isn't that good | |
99 | - //note this is designed specifically for svn 3 way merges, during the commit conflict resolution process | |
98 | + // 2010 - handle slightly differently as the basic merge isn't that good. | |
99 | + // Note this is designed specifically for SVN 3 way merges, | |
100 | + // during the commit conflict resolution process | |
100 | 101 | baseDoc = word.Documents.Open(sBaseDoc); |
101 | 102 | myDoc = word.Documents.Open(sMyDoc); |
102 | 103 |