Fix Bug 59873

This commit is contained in:
Julia Radzhabova
2023-05-16 21:06:26 +03:00
parent 0361763320
commit 7357d1804c
3 changed files with 12 additions and 6 deletions

View File

@ -230,6 +230,7 @@ define([
this.api.asc_registerPlaceholderCallback(AscCommon.PlaceholderButtonType.Image, _.bind(this.onInsertImage, this));
this.api.asc_registerPlaceholderCallback(AscCommon.PlaceholderButtonType.ImageUrl, _.bind(this.onInsertImageUrl, this));
this.api.asc_registerCallback('asc_onHideEyedropper', _.bind(this.hideEyedropper, this));
this.api.asc_SetMathInputType(Common.localStorage.getBool("de-equation-input-latex") ? Asc.c_oAscMathInputType.LaTeX : Asc.c_oAscMathInputType.Unicode);
}
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
@ -2587,9 +2588,10 @@ define([
convertEquation: function(menu, item, e) {
if (this.api) {
if (item.options.type=='input')
if (item.options.type=='input') {
this.api.asc_SetMathInputType(item.value);
else if (item.options.type=='view')
Common.localStorage.setBool("de-equation-input-latex", item.value===Asc.c_oAscMathInputType.LaTeX)
} else if (item.options.type=='view')
this.api.asc_ConvertMathView(item.value.linear, item.value.all);
else if (item.options.type=='mode')
this.api.asc_ConvertMathDisplayMode(item.checked);

View File

@ -239,6 +239,7 @@ define([
me.api.asc_registerCallback('asc_onLockViewProps', _.bind(me.onLockViewProps, me, true));
me.api.asc_registerCallback('asc_onUnLockViewProps', _.bind(me.onLockViewProps, me, false));
me.api.asc_registerCallback('asc_onHideEyedropper', _.bind(me.hideEyedropper, me));
me.api.asc_SetMathInputType(Common.localStorage.getBool("pe-equation-input-latex") ? Asc.c_oAscMathInputType.LaTeX : Asc.c_oAscMathInputType.Unicode);
}
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect, me));
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
@ -2493,9 +2494,10 @@ define([
convertEquation: function(menu, item, e) {
if (this.api) {
if (item.options.type=='input')
if (item.options.type=='input') {
this.api.asc_SetMathInputType(item.value);
else if (item.options.type=='view')
Common.localStorage.setBool("pe-equation-input-latex", item.value === Asc.c_oAscMathInputType.LaTeX)
} else if (item.options.type=='view')
this.api.asc_ConvertMathView(item.value.linear, item.value.all);
}
},

View File

@ -397,6 +397,7 @@ define([
this.api.asc_registerCallback('asc_onShowMathTrack', _.bind(this.onShowMathTrack, this));
this.api.asc_registerCallback('asc_onHideMathTrack', _.bind(this.onHideMathTrack, this));
this.api.asc_registerCallback('asc_onHideEyedropper', _.bind(this.hideEyedropperTip, this));
this.api.asc_SetMathInputType(Common.localStorage.getBool("sse-equation-input-latex") ? Asc.c_oAscMathInputType.LaTeX : Asc.c_oAscMathInputType.Unicode);
}
this.api.asc_registerCallback('asc_onShowForeignCursorLabel', _.bind(this.onShowForeignCursorLabel, this));
this.api.asc_registerCallback('asc_onHideForeignCursorLabel', _.bind(this.onHideForeignCursorLabel, this));
@ -4868,9 +4869,10 @@ define([
convertEquation: function(menu, item, e) {
if (this.api) {
if (item.options.type=='input')
if (item.options.type=='input') {
this.api.asc_SetMathInputType(item.value);
else if (item.options.type=='view')
Common.localStorage.setBool("sse-equation-input-latex", item.value===Asc.c_oAscMathInputType.LaTeX)
} else if (item.options.type=='view')
this.api.asc_ConvertMathView(item.value.linear, item.value.all);
}
},