Skip to content

Commit

Permalink
Fix compatibility with IE
Browse files Browse the repository at this point in the history
- fox for math and deleted-text-recovery
  • Loading branch information
IgolJack committed Sep 27, 2024
1 parent 9101cbe commit 8eafe3c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
16 changes: 8 additions & 8 deletions common/collaboration/deleted-text-recovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@
}
this.data[strCurrentKey] = newArrCurrentRunData;
}
const transformedObject = CollapsePositions(this.data);
let transformedObject = CollapsePositions(this.data);
return transformedObject
}
this.ResetData = function ()
Expand All @@ -617,20 +617,20 @@
}
function CollapsePositions (oInput)
{
const transformedObject = {};
for (const key in oInput)
let transformedObject = {};
for (let key in oInput)
{
if (oInput.hasOwnProperty(key))
{
const values = oInput[key];
const pairs = [];
let values = oInput[key];
let pairs = [];
let nStart = null;
let nEnd = null;
let decreasingSequence = false;

for (let i = 0; i < values.length; i++)
{
const value = values[i];
let value = values[i];

if (nStart === null)
{
Expand All @@ -649,15 +649,15 @@
}
else
{
pairs.push({ nStart, nEnd });
pairs.push({ nStart : nStart, nEnd: nEnd });
nStart = value;
nEnd = value;
decreasingSequence = false;
}
}

if (nStart !== null && nEnd !== null)
pairs.push({ nStart, nEnd });
pairs.push({ nStart : nStart, nEnd: nEnd });

transformedObject[key] = pairs;
}
Expand Down
54 changes: 27 additions & 27 deletions word/Math/NamesOfLiterals.js
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,7 @@
for (let i = 0; i < oTokens.length; i++) {
ConvertTokens(
oTokens[i],
oContext,
oContext
);
}
break;
Expand All @@ -2281,12 +2281,12 @@
{
ConvertTokens(
oTokens.left,
oContext,
oContext
);
oContext.Add_Text(oTokens.decimal)
ConvertTokens(
oTokens.right,
oContext,
oContext
);
}
else
Expand Down Expand Up @@ -2326,7 +2326,7 @@
if (oTokens.third) {
ConvertTokens(
oTokens.third,
oNary.getBase(),
oNary.getBase()
);

let oBase = oNary.getBase();
Expand Down Expand Up @@ -2518,7 +2518,7 @@

ConvertTokens(
oTokens.third,
oNary.getBase(),
oNary.getBase()
);

let oBase = oNary.getBase();
Expand Down Expand Up @@ -2639,7 +2639,7 @@
{
ConvertTokens(
oTokens.third,
MathFunc.getArgument(),
MathFunc.getArgument()
)
}

Expand All @@ -2664,7 +2664,7 @@
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
Group.getBase(),
Group.getBase()
);
}
else
Expand All @@ -2684,7 +2684,7 @@
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
Group.getBase(),
Group.getBase()
);
}
break;
Expand All @@ -2711,13 +2711,13 @@
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
oAccent.getBase(),
oAccent.getBase()
);

UnicodeArgument(
oTokens.up ? oTokens.up : oTokens.down,
MathStructures.bracket_block,
Limit.getIterator(),
Limit.getIterator()
);
}
else
Expand All @@ -2740,7 +2740,7 @@
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
oGroup.getBase(),
oGroup.getBase()
);
}
break;
Expand Down Expand Up @@ -2816,15 +2816,15 @@

ConvertTokens(
oTokens.value,
oFunc.getFName(),
oFunc.getFName()
);

let oName = oFunc.getFName();
oName.CtrPrp.SetItalic(false);

ConvertTokens(
oTokens.third,
oFunc.getArgument(),
oFunc.getArgument()
)
break;
case MathStructures.matrix:
Expand Down Expand Up @@ -2878,7 +2878,7 @@
let oContent = oMatrix.getContentElement(intRow, intCol);
ConvertTokens(
oTokens.value[intRow][intCol],
oContent,
oContent
);

let oPr = oTokens.style.cols[intRow]
Expand Down Expand Up @@ -2913,7 +2913,7 @@
let oMathContent = oEqArray.getElementMathContent(i);
ConvertTokens(
oTokens.value[i],
oMathContent,
oMathContent
);
}
break;
Expand All @@ -2927,28 +2927,28 @@
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
oBox.getBase(),
oBox.getBase()
)
break;
case MathStructures.rect:
let oBorderBox = oContext.Add_BorderBox({ctrPrp: oTokens.style.style}, null);
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
oBorderBox.getBase(),
oBorderBox.getBase()
)
break;
case MathStructures.limit:
let oLimit = oContext.Add_Limit({ctrPrp: oTokens.style.style, type: oTokens.isBelow});
UnicodeArgument(
oTokens.base,
MathStructures.bracket_block,
oLimit.getFName(),
oLimit.getFName()
);
UnicodeArgument(
oTokens.value,
MathStructures.bracket_block,
oLimit.getIterator(),
oLimit.getIterator()
);

break;
Expand Down Expand Up @@ -6339,10 +6339,10 @@
GetConvertContent(0, oMathContent, oMathCopy);
oMathCopy.Correct_Content(true);

return oMathCopy
return oMathCopy;
},
this,
[oRuleLast],
[oRuleLast]
);

if (!this.CompareMathContent(oMathContentTemp)) // если контент изменился, то преобразуем все после ▒
Expand Down Expand Up @@ -6428,9 +6428,9 @@
GetConvertContent(0, oMathContent, oMathContentCopy);
oMathContentCopy.Correct_Content(true);

return oMathContentCopy
return oMathContentCopy;
},
this,
this
);

if (!this.CompareMathContent(oMathContentCopy))
Expand Down Expand Up @@ -6465,7 +6465,7 @@
let oMathContentTemp = AscFormat.ExecuteNoHistory(
this.private_ProceedBeforeDivide,
this,
[oRuleLast, true],
[oRuleLast, true]
);

if (!this.CompareMathContent(oMathContentTemp, true))
Expand Down Expand Up @@ -6595,7 +6595,7 @@
if (strMathContent.split("_").length >= 2 && strMathContent.split("^").length >= 2)
return this.Tokens.brackets.Pairs.length > 0;
},
this,
this
);
}
};
Expand Down Expand Up @@ -7105,10 +7105,10 @@
GetConvertContent(0, oMathContent, oMathCopy);
oMathCopy.Correct_Content(true);

return oMathCopy
return oMathCopy;
},
this,
[oStartPos],
[oStartPos]
);

if (!this.CompareMathContent(oMathContentTemp))
Expand Down
4 changes: 2 additions & 2 deletions word/Math/mathContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3368,7 +3368,7 @@ CMathContent.prototype.AddGroupedByStyleText = function (text, paragraph, mathSt
{
oMathRun.SetReviewTypeWithInfo(
oAdditionalData.reviewData.reviewType,
oAdditionalData.reviewData.reviewInfo,
oAdditionalData.reviewData.reviewInfo
);
}
}
Expand Down Expand Up @@ -3425,7 +3425,7 @@ CMathContent.prototype.Add_Text = function(text, paragraph, mathStyle, oAddition
{
oMathRun.SetReviewTypeWithInfo(
oAdditionalData.reviewData.reviewType,
oAdditionalData.reviewData.reviewInfo,
oAdditionalData.reviewData.reviewInfo
);
}

Expand Down

0 comments on commit 8eafe3c

Please sign in to comment.