Skip to content

Commit 27f02b0

Browse files
committed
CompareMSPowerPointFiles.sct: To avoid error 0x80048010 reported in #2615, release the PowerPoint application object when WinMerge exits.
1 parent 44b1ca5 commit 27f02b0

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Plugins/dlls/CompareMSPowerPointFiles.sct

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ var MsgCannotGetMacros = "${Cannot get Macros.\r\n" +
5555
var fso = new ActiveXObject("Scripting.FileSystemObject");
5656
var wsh = new ActiveXObject("WScript.Shell");
5757
var mergeApp;
58+
var ppObjList = new Array();
5859

5960
function isAccessibleVBAProject(prs) {
6061
try {
@@ -174,6 +175,12 @@ function get_PluginExtendedProperties() {
174175

175176
function PluginOnEvent(eventType, obj) {
176177
mergeApp = obj;
178+
if (eventType == 1) {
179+
for (var i = 0; i < ppObjList.length; i++) {
180+
ppObjList[i].Quit();
181+
ppObjList[i] = null;
182+
}
183+
}
177184
}
178185

179186
function UnpackFile(fileSrc, fileDst, pbChanged, pSubcode) {
@@ -205,7 +212,7 @@ function UnpackFile(fileSrc, fileDst, pbChanged, pSubcode) {
205212
}
206213

207214
for (var it = new Enumerator(prs.Slides); !it.atEnd(); it.moveNext()) {
208-
var sld = it.item();
215+
var sld = it.item();
209216
if (regRead(REGKEY_PATH + "CompareTextsInShapes", true)) {
210217
fo.WriteLine("[" + sld.Name + "]");
211218
writeTextsInShapes(fo, sld);
@@ -238,8 +245,8 @@ function UnpackFile(fileSrc, fileDst, pbChanged, pSubcode) {
238245
prs.Saved = true;
239246
prs.Close();
240247
prs = null;
241-
pp.Quit();
242-
pp = null;
248+
pp.WindowState = 2; // ppWindowMinimized
249+
ppObjList.push(pp);
243250
fo.Close();
244251
fo = null;
245252

@@ -330,8 +337,8 @@ function UnpackFolder(fileSrc, folderDst, pbChanged, pSubcode) {
330337
prs.Saved = true;
331338
prs.Close();
332339
prs = null;
333-
pp.Quit();
334-
pp = null;
340+
pp.WindowState = 2; // ppWindowMinimized
341+
ppObjList.push(pp);
335342

336343
pbChanged = true;
337344
pSubcode = 0;

0 commit comments

Comments
 (0)