Skip to content

Commit

Permalink
Merge branch 'develop' into feature/charts-trendline
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Oct 11, 2023
2 parents e1d8e0a + 8b882f3 commit 9faab63
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
19 changes: 17 additions & 2 deletions cell/model/FormulaObjects/engineeringFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,24 @@ function (window, undefined) {
var res = [];
var hasImag = this.img != 0, hasReal = !hasImag || (this.real != 0);

let toLocalString = function (val) {
let _res = val;
if (val != null) {
val = val.toString();
if (val) {
val = val.replace(AscCommon.FormulaSeparators.digitSeparatorDef, AscCommon.FormulaSeparators.digitSeparator);

if (val) {
_res = val;
}
}
}
return _res;
};

if (hasReal) {

res.push(this.real);
res.push(toLocalString(this.real));
}
if (hasImag) {
if (this.img == 1) {
Expand All @@ -540,7 +555,7 @@ function (window, undefined) {
} else if (this.img == -1) {
res.push("-");
} else {
this.img > 0 && hasReal ? res.push("+" + this.img) : res.push(this.img);
this.img > 0 && hasReal ? res.push("+" + (toLocalString(this.img))) : res.push(toLocalString(this.img));
}
res.push(this.suffix ? this.suffix : "i");
}
Expand Down
2 changes: 1 addition & 1 deletion common/Drawings/Format/Format.js
Original file line number Diff line number Diff line change
Expand Up @@ -4106,7 +4106,7 @@
for(let nPrst = 0; nPrst < aPresets.length; ++nPrst) {
let oShd = new asc_CShadowProperty();
let sPrst = aPresets[nPrst];
oShd.changePreset(sPrst);
oShd.putPreset(sPrst);
if(this.IsIdentical(oShd)) {
return sPrst;
}
Expand Down
4 changes: 4 additions & 0 deletions common/apiBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -3724,6 +3724,10 @@
if (!this.macros)
return true;

// we shouldn't create a history point and update it if macros haven't been changed
if (this.macros.Data && this.macros.Data === sData)
return true;

if (true === AscCommon.CollaborativeEditing.Get_GlobalLock())
return true;

Expand Down
4 changes: 2 additions & 2 deletions common/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@

AscFonts.IsCheckSymbols = false;

if (task.recalculate === true)
if (task.recalculate === true && !AscCommon.History.Is_LastPointEmpty())
{
this.api._afterEvalCommand(function() {
window.g_asc_plugins.shiftCommand(commandReturnValue);
Expand All @@ -1278,7 +1278,7 @@
case AscCommon.c_oEditorId.Word:
case AscCommon.c_oEditorId.Presentation:
{
this.api.WordControl.m_oLogicDocument.FinalizeAction();
this.api.WordControl.m_oLogicDocument.FinalizeAction(true);
break;
}
case AscCommon.c_oEditorId.Spreadsheet:
Expand Down
5 changes: 4 additions & 1 deletion slide/Editor/Format/Presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12218,9 +12218,12 @@ CPresentation.prototype.StartAction = function (nDescription) {
this.Create_NewHistoryPoint(nDescription);
this.StopAnimationPreview();
};
CPresentation.prototype.FinalizeAction = function () {
CPresentation.prototype.FinalizeAction = function (isCheckEmptyAction) {
this.Recalculate();
this.Api.checkChangesSize();
if (true === isCheckEmptyAction && AscCommon.History.Is_LastPointEmpty()) {
AscCommon.History.RemoveLastPoint();
}
};

CPresentation.prototype.IsSplitPageBreakAndParaMark = function () {
Expand Down

0 comments on commit 9faab63

Please sign in to comment.