Révision | 28649 (tree) |
---|---|
l'heure | 2019-08-04 19:44:47 |
Auteur | stefankueng |
Merged revision(s) r28647 from trunk:
* prevent office from executing macros in the diff scripts.
@@ -2,7 +2,7 @@ | ||
2 | 2 | // |
3 | 3 | // TortoiseSVN Diff script for Word Doc files |
4 | 4 | // |
5 | -// Copyright (C) 2004-2008, 2011-2016 the TortoiseSVN team | |
5 | +// Copyright (C) 2004-2008, 2011-2016, 2019 the TortoiseSVN team | |
6 | 6 | // This file is distributed under the same license as TortoiseSVN |
7 | 7 | // |
8 | 8 | // Last commit by: |
@@ -65,6 +65,8 @@ | ||
65 | 65 | try |
66 | 66 | { |
67 | 67 | word = WScript.CreateObject("Word.Application"); |
68 | + // disable macros | |
69 | + word.AutomationSecurity = 3; //msoAutomationSecurityForceDisable | |
68 | 70 | |
69 | 71 | if (parseInt(word.Version, 10) >= vOffice2013) |
70 | 72 | { |
@@ -2,7 +2,7 @@ | ||
2 | 2 | // |
3 | 3 | // TortoiseSVN Diff script for Powerpoint files |
4 | 4 | // |
5 | -// Copyright (C) 2004-2010, 2012-2013, 2015 the TortoiseSVN team | |
5 | +// Copyright (C) 2004-2010, 2012-2013, 2015, 2019 the TortoiseSVN team | |
6 | 6 | // This file is distributed under the same license as TortoiseSVN |
7 | 7 | // |
8 | 8 | // Last commit by: |
@@ -74,6 +74,8 @@ | ||
74 | 74 | try |
75 | 75 | { |
76 | 76 | powerpoint = WScript.CreateObject("Powerpoint.Application"); |
77 | + // disable macros | |
78 | + powerpoint.AutomationSecurity = 3; //msoAutomationSecurityForceDisable | |
77 | 79 | } |
78 | 80 | catch (e) |
79 | 81 | { |
@@ -86,6 +86,10 @@ | ||
86 | 86 | { |
87 | 87 | Abort("You must have Excel installed to perform this operation.", "Excel Instantiation Failed"); |
88 | 88 | } |
89 | + | |
90 | +// disable all macros | |
91 | +objExcelApp.AutomationSecurity = 3; //msoAutomationSecurityForceDisable | |
92 | + | |
89 | 93 | var fExcelVersion = parseInt(objExcelApp.Version, 10); |
90 | 94 | |
91 | 95 | // Open base Excel book |
@@ -2,7 +2,7 @@ | ||
2 | 2 | // |
3 | 3 | // TortoiseSVN Merge script for Word Doc files |
4 | 4 | // |
5 | -// Copyright (C) 2004-2008, 2011-2016 the TortoiseSVN team | |
5 | +// Copyright (C) 2004-2008, 2011-2016, 2019 the TortoiseSVN team | |
6 | 6 | // This file is distributed under the same license as TortoiseSVN |
7 | 7 | // |
8 | 8 | // Last commit by: |
@@ -68,6 +68,8 @@ | ||
68 | 68 | try |
69 | 69 | { |
70 | 70 | word = WScript.CreateObject("Word.Application"); |
71 | + // disable macros | |
72 | + word.AutomationSecurity = 3; //msoAutomationSecurityForceDisable | |
71 | 73 | } |
72 | 74 | catch (e) |
73 | 75 | { |