',
'',
'
',
- '<% if (type == c_oAscAdvancedOptionsID.CSV) { %>',
+ '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
'',
'
',
'<% } %>',
@@ -287,7 +287,7 @@ define([
});
this.cmbEncoding.setValue( (this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : encodedata[0][0]);
- if (this.type == c_oAscAdvancedOptionsID.CSV) {
+ if (this.type == Asc.c_oAscAdvancedOptionsID.CSV) {
this.cmbDelimiter = new Common.UI.ComboBox({
el: $('#id-delimiters-combo', this.$window),
menuStyle: 'min-width: 110px;',
diff --git a/apps/documenteditor/embed/index.html b/apps/documenteditor/embed/index.html
index b4c8929af..b8258b8be 100644
--- a/apps/documenteditor/embed/index.html
+++ b/apps/documenteditor/embed/index.html
@@ -433,6 +433,7 @@
+
diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js
index 2b0cce204..21378a978 100644
--- a/apps/documenteditor/embed/js/ApplicationController.js
+++ b/apps/documenteditor/embed/js/ApplicationController.js
@@ -216,7 +216,7 @@ var ApplicationController = new(function(){
var text = '';
switch (id)
{
- case c_oAscAsyncAction['Print']:
+ case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...';
break;
default:
@@ -224,7 +224,7 @@ var ApplicationController = new(function(){
break;
}
- if (type == c_oAscAsyncActionType['BlockInteraction']) {
+ if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text);
showMask();
}
@@ -355,19 +355,19 @@ var ApplicationController = new(function(){
switch (id)
{
- case c_oAscError.ID.Unknown:
+ case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText;
break;
- case c_oAscError.ID.ConvertationTimeout:
+ case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText;
break;
- case c_oAscError.ID.ConvertationError:
+ case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText;
break;
- case c_oAscError.ID.DownloadError:
+ case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText;
break;
@@ -376,7 +376,7 @@ var ApplicationController = new(function(){
break;
}
- if (level == c_oAscError.Level.Critical) {
+ if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, message);
@@ -427,7 +427,7 @@ var ApplicationController = new(function(){
}
function onDownloadAs() {
- if (api) api.asc_DownloadAs(c_oAscFileType.DOCX, true);
+ if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
}
// Helpers
@@ -704,7 +704,7 @@ var ApplicationController = new(function(){
});
window["flat_desine"] = true;
- api = new asc_docs_api("editor_sdk");
+ api = new Asc.asc_docs_api("editor_sdk");
if (api){
api.CreateComponents();
diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js
index 96ecd76da..5d47539e6 100644
--- a/apps/documenteditor/main/app/controller/LeftMenu.js
+++ b/apps/documenteditor/main/app/controller/LeftMenu.js
@@ -238,7 +238,7 @@ define([
clickSaveAsFormat: function(menu, format) {
if (menu) {
- if (format == c_oAscFileType.TXT) {
+ if (format == Asc.c_oAscFileType.TXT) {
Common.UI.warning({
closable: false,
title: this.notcriticalErrorTitle,
@@ -273,10 +273,10 @@ define([
value = Common.localStorage.getItem((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
switch(value) {
- case 'all': value = c_oAscCollaborativeMarksShowType.All; break;
- case 'none': value = c_oAscCollaborativeMarksShowType.None; break;
- case 'last': value = c_oAscCollaborativeMarksShowType.LastChanges; break;
- default: value = (fast_coauth) ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges;
+ case 'all': value = Asc.c_oAscCollaborativeMarksShowType.All; break;
+ case 'none': value = Asc.c_oAscCollaborativeMarksShowType.None; break;
+ case 'last': value = Asc.c_oAscCollaborativeMarksShowType.LastChanges; break;
+ default: value = (fast_coauth) ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges;
}
this.api.SetCollaborativeMarksShowType(value);
}
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index d0ef62a31..85ae7ecc5 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -105,16 +105,13 @@ define([
return;
}
- var value = Common.localStorage.getItem('de-settings-unit');
- Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm);
-
- value = Common.localStorage.getItem("de-settings-fontrender");
+ var value = Common.localStorage.getItem("de-settings-fontrender");
if (value === null)
window.devicePixelRatio > 1 ? value = '1' : '0';
// Initialize api
- this.api = new asc_docs_api("editor_sdk");
+ this.api = new Asc.asc_docs_api("editor_sdk");
if (this.api){
switch (value) {
@@ -327,7 +324,7 @@ define([
onDownloadAs: function() {
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
- (type && typeof type[1] === 'string') ? this.api.asc_DownloadOrigin(true) : this.api.asc_DownloadAs(c_oAscFileType.DOCX, true);
+ (type && typeof type[1] === 'string') ? this.api.asc_DownloadOrigin(true) : this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
},
onProcessMouse: function(data) {
@@ -380,8 +377,8 @@ define([
user = new Common.Models.User({
id : version.user.id,
username : version.user.name,
- colorval : c_oAscArrUserColors[usersCnt],
- color : this.generateUserColor(c_oAscArrUserColors[usersCnt++])
+ colorval : Asc.c_oAscArrUserColors[usersCnt],
+ color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
});
usersStore.add(user);
}
@@ -423,8 +420,8 @@ define([
user = new Common.Models.User({
id : change.user.id,
username : change.user.name,
- colorval : c_oAscArrUserColors[usersCnt],
- color : this.generateUserColor(c_oAscArrUserColors[usersCnt++])
+ colorval : Asc.c_oAscArrUserColors[usersCnt],
+ color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
});
usersStore.add(user);
}
@@ -536,11 +533,11 @@ define([
this.updateWindowTitle(true);
- action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information});
+ action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
if (action) {
this.setLongActionView(action)
} else {
- if (this._state.fastCoauth && this._state.usersCount>1 && id==c_oAscAsyncAction['Save']) {
+ if (this._state.fastCoauth && this._state.usersCount>1 && id==Asc.c_oAscAsyncAction['Save']) {
var me = this;
if (me._state.timerSave===undefined)
me._state.timerSave = setInterval(function(){
@@ -554,15 +551,15 @@ define([
this.getApplication().getController('Statusbar').setStatusCaption('');
}
- action = this.stackLongActions.get({type: c_oAscAsyncActionType.BlockInteraction});
+ action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction});
action ? this.setLongActionView(action) : this.loadMask && this.loadMask.hide();
- if (id==c_oAscAsyncAction['Save'] && (!this._state.fastCoauth || this._state.usersCount<2))
+ if (id==Asc.c_oAscAsyncAction['Save'] && (!this._state.fastCoauth || this._state.usersCount<2))
this.synchronizeChanges();
- if ( type == c_oAscAsyncActionType.BlockInteraction &&
+ if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
- !( id == c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) {
+ !( id == Asc.c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) {
this.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true);
}
@@ -572,73 +569,73 @@ define([
var title = '', text = '';
switch (action.id) {
- case c_oAscAsyncAction['Open']:
+ case Asc.c_oAscAsyncAction['Open']:
title = this.openTitleText;
text = this.openTextText;
break;
- case c_oAscAsyncAction['Save']:
+ case Asc.c_oAscAsyncAction['Save']:
this._state.isSaving = new Date();
title = this.saveTitleText;
text = this.saveTextText;
break;
- case c_oAscAsyncAction['LoadDocumentFonts']:
+ case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
title = this.loadFontsTitleText;
text = this.loadFontsTextText;
break;
- case c_oAscAsyncAction['LoadDocumentImages']:
+ case Asc.c_oAscAsyncAction['LoadDocumentImages']:
title = this.loadImagesTitleText;
text = this.loadImagesTextText;
break;
- case c_oAscAsyncAction['LoadFont']:
+ case Asc.c_oAscAsyncAction['LoadFont']:
title = this.loadFontTitleText;
text = this.loadFontTextText;
break;
- case c_oAscAsyncAction['LoadImage']:
+ case Asc.c_oAscAsyncAction['LoadImage']:
title = this.loadImageTitleText;
text = this.loadImageTextText;
break;
- case c_oAscAsyncAction['DownloadAs']:
+ case Asc.c_oAscAsyncAction['DownloadAs']:
title = this.downloadTitleText;
text = this.downloadTextText;
break;
- case c_oAscAsyncAction['Print']:
+ case Asc.c_oAscAsyncAction['Print']:
title = this.printTitleText;
text = this.printTextText;
break;
- case c_oAscAsyncAction['UploadImage']:
+ case Asc.c_oAscAsyncAction['UploadImage']:
title = this.uploadImageTitleText;
text = this.uploadImageTextText;
break;
- case c_oAscAsyncAction['ApplyChanges']:
+ case Asc.c_oAscAsyncAction['ApplyChanges']:
title = this.applyChangesTitleText;
text = this.applyChangesTextText;
break;
- case c_oAscAsyncAction['PrepareToSave']:
+ case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText;
text = this.savePreparingTitle;
break;
- case c_oAscAsyncAction['MailMergeLoadFile']:
+ case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
title = this.mailMergeLoadFileText;
text = this.mailMergeLoadFileTitle;
break;
- case c_oAscAsyncAction['DownloadMerge']:
+ case Asc.c_oAscAsyncAction['DownloadMerge']:
title = this.downloadMergeTitle;
text = this.downloadMergeText;
break;
- case c_oAscAsyncAction['SendMailMerge']:
+ case Asc.c_oAscAsyncAction['SendMailMerge']:
title = this.sendMergeTitle;
text = this.sendMergeText;
break;
@@ -654,7 +651,7 @@ define([
break;
}
- if (action.type == c_oAscAsyncActionType['BlockInteraction']) {
+ if (action.type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
if (!this.loadMask)
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
@@ -677,7 +674,7 @@ define([
data.requestrights = true;
this.appOptions.isEdit= true;
- this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
+ this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
var me = this;
setTimeout(function(){
@@ -741,7 +738,7 @@ define([
me.api.SetDrawingFreeze(false);
me.hidePreloader();
- me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
/** coauthoring begin **/
value = Common.localStorage.getItem("de-settings-livecomment");
@@ -802,14 +799,14 @@ define([
value = Common.localStorage.getItem((me._state.fastCoauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
if (value !== null)
- me.api.SetCollaborativeMarksShowType(value == 'all' ? c_oAscCollaborativeMarksShowType.All :
- value == 'none' ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges);
+ me.api.SetCollaborativeMarksShowType(value == 'all' ? Asc.c_oAscCollaborativeMarksShowType.All :
+ value == 'none' ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
else
- me.api.SetCollaborativeMarksShowType(me._state.fastCoauth ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges);
+ me.api.SetCollaborativeMarksShowType(me._state.fastCoauth ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
} else {
me._state.fastCoauth = false;
me.api.asc_SetFastCollaborative(me._state.fastCoauth);
- me.api.SetCollaborativeMarksShowType(c_oAscCollaborativeMarksShowType.None);
+ me.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None);
}
/** coauthoring end **/
@@ -958,7 +955,7 @@ define([
if (!this.appOptions.isEdit) {
this.hidePreloader();
- this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
},
@@ -1050,7 +1047,12 @@ define([
toolbarView.on('insertchart', _.bind(me.onInsertChart, me));
}
- var value = Common.localStorage.getItem('de-hidden-rulers');
+ var value = Common.localStorage.getItem('de-settings-unit');
+ value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm;
+ Common.Utils.Metric.setCurrentMetric(value);
+ me.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter));
+
+ value = Common.localStorage.getItem('de-hidden-rulers');
me.api.asc_SetViewRulers(value===null || parseInt(value) === 0);
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
@@ -1064,11 +1066,11 @@ define([
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/
- if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) {
- me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
+ if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
+ me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) {
me.hidePreloader();
- me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}
// Message on window close
@@ -1088,7 +1090,7 @@ define([
onError: function(id, level, errData) {
this.hidePreloader();
- this.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
var config = {
closable: false
@@ -1096,79 +1098,79 @@ define([
switch (id)
{
- case c_oAscError.ID.Unknown:
+ case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText;
break;
- case c_oAscError.ID.ConvertationTimeout:
+ case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText;
break;
- case c_oAscError.ID.ConvertationError:
+ case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText;
break;
- case c_oAscError.ID.DownloadError:
+ case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText;
break;
- case c_oAscError.ID.UplImageSize:
+ case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage;
break;
- case c_oAscError.ID.UplImageExt:
+ case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage;
break;
- case c_oAscError.ID.UplImageFileCount:
+ case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage;
break;
- case c_oAscError.ID.SplitCellMaxRows:
+ case Asc.c_oAscError.ID.SplitCellMaxRows:
config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break;
- case c_oAscError.ID.SplitCellMaxCols:
+ case Asc.c_oAscError.ID.SplitCellMaxCols:
config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break;
- case c_oAscError.ID.SplitCellRowsDivider:
+ case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value());
break;
- case c_oAscError.ID.VKeyEncrypt:
+ case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt;
break;
- case c_oAscError.ID.KeyExpire:
+ case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire;
break;
- case c_oAscError.ID.UserCountExceed:
+ case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed;
break;
- case c_oAscError.ID.CoAuthoringDisconnect:
+ case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect;
break;
- case c_oAscError.ID.ConvertationPassword:
+ case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect;
break;
- case c_oAscError.ID.StockChartError:
+ case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart;
break;
- case c_oAscError.ID.DataRangeError:
+ case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange;
break;
- case c_oAscError.ID.Database:
+ case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection;
break;
- case c_oAscError.ID.UserDrop:
+ case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) {
this._state.lostEditingRights = false;
return;
@@ -1177,15 +1179,15 @@ define([
config.msg = this.errorUserDrop;
break;
- case c_oAscError.ID.MailMergeLoadFile:
+ case Asc.c_oAscError.ID.MailMergeLoadFile:
config.msg = this.errorMailMergeLoadFile;
break;
- case c_oAscError.ID.MailMergeSaveFile:
+ case Asc.c_oAscError.ID.MailMergeSaveFile:
config.msg = this.errorMailMergeSaveFile;
break;
- case c_oAscError.ID.Warning:
+ case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer;
break;
@@ -1195,7 +1197,7 @@ define([
}
- if (level == c_oAscError.Level.Critical) {
+ if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
Common.Gateway.reportError(id, config.msg);
@@ -1216,7 +1218,7 @@ define([
config.iconCls = 'warn';
config.buttons = ['ok'];
config.callback = _.bind(function(btn){
- if (id == c_oAscError.ID.Warning && btn == 'ok' && (this.appOptions.canDownload || this.appOptions.canDownloadOrigin)) {
+ if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && (this.appOptions.canDownload || this.appOptions.canDownloadOrigin)) {
Common.UI.Menu.Manager.hideAll();
if (this.appOptions.isDesktopApp && this.appOptions.isOffline)
this.api.asc_DownloadAs();
@@ -1408,7 +1410,7 @@ define([
onUpdateVersion: function(callback) {
var me = this;
me.needToUpdateVersion = true;
- me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.warning({
title: me.titleUpdateVersion,
msg: this.errorUpdateVersion,
@@ -1416,7 +1418,7 @@ define([
_.defer(function() {
Common.Gateway.updateVersion();
if (callback) callback.call(me);
- me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
})
}
});
@@ -1585,13 +1587,16 @@ define([
unitsChanged: function(m) {
var value = Common.localStorage.getItem("de-settings-unit");
- Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm);
+ value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm;
+ Common.Utils.Metric.setCurrentMetric(value);
+ this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter));
this.getApplication().getController('RightMenu').updateMetricUnit();
+ this.getApplication().getController('Toolbar').getView('Toolbar').updateMetricUnit();
},
onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId();
- if (type == c_oAscAdvancedOptionsID.TXT) {
+ if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
var me = this;
var dlg = new Common.Views.OpenDialog({
type: type,
@@ -1608,7 +1613,7 @@ define([
this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide();
- this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
+ this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show();
}
@@ -1632,7 +1637,7 @@ define([
this.api.asc_SetFastCollaborative(false);
this._state.fastCoauth = false;
Common.localStorage.setItem("de-settings-showchanges-strict", 'last');
- this.api.SetCollaborativeMarksShowType(c_oAscCollaborativeMarksShowType.LastChanges);
+ this.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.LastChanges);
}
this.fireEvent('editcomplete', this);
}, this)
diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js
index 0f1876998..f9072dcdc 100644
--- a/apps/documenteditor/main/app/controller/RightMenu.js
+++ b/apps/documenteditor/main/app/controller/RightMenu.js
@@ -125,7 +125,7 @@ define([
{
var eltype = SelectedObjects[i].get_ObjectType(),
settingsType = this.getDocumentSettingsType(eltype);
- if (eltype === c_oAscTypeSelectElement.Math)
+ if (eltype === Asc.c_oAscTypeSelectElement.Math)
in_equation = true;
if (settingsType===undefined || settingsType>=this._settings.length || this._settings[settingsType]===undefined)
@@ -314,7 +314,7 @@ define([
},
onError: function(id, level, errData) {
- if (id==c_oAscError.ID.MailMergeLoadFile) {
+ if (id==Asc.c_oAscError.ID.MailMergeLoadFile) {
this._settings[Common.Utils.documentSettingsType.MailMerge].hidden = 1;
this._settings[Common.Utils.documentSettingsType.MailMerge].btn.setDisabled(true);
var selectedElements = this.api.getSelectedElements();
@@ -357,13 +357,13 @@ define([
getDocumentSettingsType: function(type) {
switch (type) {
- case c_oAscTypeSelectElement.Paragraph:
+ case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph;
- case c_oAscTypeSelectElement.Table:
+ case Asc.c_oAscTypeSelectElement.Table:
return Common.Utils.documentSettingsType.Table;
- case c_oAscTypeSelectElement.Image:
+ case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image;
- case c_oAscTypeSelectElement.Header:
+ case Asc.c_oAscTypeSelectElement.Header:
return Common.Utils.documentSettingsType.Header;
}
}
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 46779d914..a5977a564 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -73,7 +73,7 @@ define([
},
prstyle: undefined,
prcontrolsdisable:undefined,
- dropcap: c_oAscDropCap.None,
+ dropcap: Asc.c_oAscDropCap.None,
clrhighlight: undefined,
clrtext: undefined,
pgsize: [0, 0],
@@ -578,30 +578,30 @@ define([
type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue();
- if (type === c_oAscTypeSelectElement.Paragraph) {
+ if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked();
can_add_table = pr.get_CanAddTable();
can_add_image = pr.get_CanAddImage();
frame_pr = pr;
sh = pr.get_Shade();
- } else if (type === c_oAscTypeSelectElement.Header) {
+ } else if (type === Asc.c_oAscTypeSelectElement.Header) {
header_locked = pr.get_Locked();
in_header = true;
- } else if (type === c_oAscTypeSelectElement.Image) {
+ } else if (type === Asc.c_oAscTypeSelectElement.Image) {
in_image = in_header = true;
if (pr && pr.get_ChartProperties())
in_chart = true;
- } else if (type === c_oAscTypeSelectElement.Math) {
+ } else if (type === Asc.c_oAscTypeSelectElement.Math) {
in_equation = true;
- if (c_oAscMathInterfaceType.Common === pr.get_Type())
+ if (Asc.c_oAscMathInterfaceType.Common === pr.get_Type())
btn_eq_state = true;
}
- if (type === c_oAscTypeSelectElement.Table || type === c_oAscTypeSelectElement.Header || type === c_oAscTypeSelectElement.Image) {
+ if (type === Asc.c_oAscTypeSelectElement.Table || type === Asc.c_oAscTypeSelectElement.Header || type === Asc.c_oAscTypeSelectElement.Image) {
enable_dropcap = false;
}
- if (enable_dropcap!==false && type == c_oAscTypeSelectElement.Paragraph)
+ if (enable_dropcap!==false && type == Asc.c_oAscTypeSelectElement.Paragraph)
enable_dropcap = true;
}
@@ -631,11 +631,11 @@ define([
if (enable_dropcap && frame_pr) {
var value = frame_pr.get_FramePr(),
- drop_value = c_oAscDropCap.None;
+ drop_value = Asc.c_oAscDropCap.None;
if (value!==undefined) {
drop_value = value.get_DropCap();
- enable_dropcap = ( drop_value === c_oAscDropCap.Drop || drop_value === c_oAscDropCap.Margin);
+ enable_dropcap = ( drop_value === Asc.c_oAscDropCap.Drop || drop_value === Asc.c_oAscDropCap.Margin);
disable_dropcapadv = false;
} else {
enable_dropcap = frame_pr.get_CanAddDropCap();
@@ -1260,7 +1260,7 @@ define([
handler: handlerDlg
});
- props = new CHyperlinkProperty();
+ props = new Asc.CHyperlinkProperty();
props.put_Text(text);
win.show();
@@ -1269,7 +1269,7 @@ define([
var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(el, i) {
- if (selectedElements[i].get_ObjectType() == c_oAscTypeSelectElement.Hyperlink)
+ if (selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink)
props = selectedElements[i].get_ObjectValue();
});
}
@@ -1519,13 +1519,13 @@ define([
this._state.dropcap = undefined;
if (this.api && item.checked) {
- if (item.value === c_oAscDropCap.None) {
+ if (item.value === Asc.c_oAscDropCap.None) {
this.api.removeDropcap(true);
} else {
var SelectedObjects = this.api.getSelectedElements(),
i = -1;
while (++i < SelectedObjects.length) {
- if (SelectedObjects[i].get_ObjectType() == c_oAscTypeSelectElement.Paragraph) {
+ if (SelectedObjects[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Paragraph) {
var pr = SelectedObjects[i].get_ObjectValue();
var value = pr.get_FramePr();
if (!_.isUndefined(value)) {
@@ -1534,7 +1534,7 @@ define([
value.put_DropCap(item.value);
this.api.put_FramePr(value);
} else {
- this.api.asc_addDropCap((item.value === c_oAscDropCap.Drop));
+ this.api.asc_addDropCap((item.value === Asc.c_oAscDropCap.Drop));
}
break;
}
@@ -1552,9 +1552,9 @@ define([
var index = -1;
switch (v) {
- case c_oAscDropCap.None: index = 0; break;
- case c_oAscDropCap.Drop: index = 1; break;
- case c_oAscDropCap.Margin: index = 2; break;
+ case Asc.c_oAscDropCap.None: index = 0; break;
+ case Asc.c_oAscDropCap.Drop: index = 1; break;
+ case Asc.c_oAscDropCap.Margin: index = 2; break;
}
if (index < 0)
this._clearChecked(this.toolbar.btnDropCap.menu);
@@ -1586,7 +1586,7 @@ define([
if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i < selectedElementsLenght; i++) {
- if (selectedElements[i].get_ObjectType() == c_oAscTypeSelectElement.Paragraph) {
+ if (selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Paragraph) {
props = selectedElements[i].get_ObjectValue();
break;
}
@@ -1606,7 +1606,7 @@ define([
handler: function(result, value) {
if (result == 'ok') {
me.borderAdvancedProps = value.borderProps;
- if (value.paragraphProps && value.paragraphProps.get_DropCap() === c_oAscDropCap.None) {
+ if (value.paragraphProps && value.paragraphProps.get_DropCap() === Asc.c_oAscDropCap.None) {
me.api.removeDropcap(true);
} else
me.api.put_FramePr(value.paragraphProps);
@@ -1625,7 +1625,7 @@ define([
this._state.columns = undefined;
if (this.api && item.checked) {
- var props = new CDocumentColumnsProps(),
+ var props = new Asc.CDocumentColumnsProps(),
cols = item.value,
def_space = 12.5;
props.put_EqualWidth(cols<3);
@@ -1792,7 +1792,7 @@ define([
isParagraph = false;
if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i
')
});
@@ -370,17 +370,17 @@ define([
var props = new CImgProperty();
props.put_WrappingStyle((rawData.data));
- if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) {
- props.put_PositionH(new CImagePositionH());
+ if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
+ props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false);
- props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column);
- var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column);
+ props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
+ var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
props.get_PositionH().put_Value(val);
- props.put_PositionV(new CImagePositionV());
+ props.put_PositionV(new Asc.CImagePositionV());
props.get_PositionV().put_UseAlign(false);
- props.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph);
- val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph);
+ props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
+ val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val);
}
@@ -415,7 +415,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
- if (c_oAscTypeSelectElement.Image == elType) {
+ if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeMax = this.api.GetSectionInfo();
imgsizeMax = {width: imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft()+imgsizeMax.get_MarginRight()),
height:imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop()+imgsizeMax.get_MarginBottom())};
diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js
index 65c5aacd9..ae4723908 100644
--- a/apps/documenteditor/main/app/view/DocumentHolder.js
+++ b/apps/documenteditor/main/app/view/DocumentHolder.js
@@ -128,7 +128,7 @@ define([
for (var i = 0; i