Skip to content

Commit

Permalink
CompareMSPowerPointFiles.sct: To avoid error 0x80048010 reported in #…
Browse files Browse the repository at this point in the history
…2615, release the PowerPoint application object when WinMerge exits.
  • Loading branch information
sdottaka committed Jan 26, 2025
1 parent 44b1ca5 commit 27f02b0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Plugins/dlls/CompareMSPowerPointFiles.sct
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var MsgCannotGetMacros = "${Cannot get Macros.\r\n" +
var fso = new ActiveXObject("Scripting.FileSystemObject");
var wsh = new ActiveXObject("WScript.Shell");
var mergeApp;
var ppObjList = new Array();

function isAccessibleVBAProject(prs) {
try {
Expand Down Expand Up @@ -174,6 +175,12 @@ function get_PluginExtendedProperties() {

function PluginOnEvent(eventType, obj) {
mergeApp = obj;
if (eventType == 1) {
for (var i = 0; i < ppObjList.length; i++) {
ppObjList[i].Quit();
ppObjList[i] = null;
}
}
}

function UnpackFile(fileSrc, fileDst, pbChanged, pSubcode) {
Expand Down Expand Up @@ -205,7 +212,7 @@ function UnpackFile(fileSrc, fileDst, pbChanged, pSubcode) {
}

for (var it = new Enumerator(prs.Slides); !it.atEnd(); it.moveNext()) {
var sld = it.item();
var sld = it.item();
if (regRead(REGKEY_PATH + "CompareTextsInShapes", true)) {
fo.WriteLine("[" + sld.Name + "]");
writeTextsInShapes(fo, sld);
Expand Down Expand Up @@ -238,8 +245,8 @@ function UnpackFile(fileSrc, fileDst, pbChanged, pSubcode) {
prs.Saved = true;
prs.Close();
prs = null;
pp.Quit();
pp = null;
pp.WindowState = 2; // ppWindowMinimized
ppObjList.push(pp);
fo.Close();
fo = null;

Expand Down Expand Up @@ -330,8 +337,8 @@ function UnpackFolder(fileSrc, folderDst, pbChanged, pSubcode) {
prs.Saved = true;
prs.Close();
prs = null;
pp.Quit();
pp = null;
pp.WindowState = 2; // ppWindowMinimized
ppObjList.push(pp);

pbChanged = true;
pSubcode = 0;
Expand Down

0 comments on commit 27f02b0

Please sign in to comment.