Merge branch 'develop' into feature/metric-translate

This commit is contained in:
Julia Radzhabova 2016-04-07 15:13:16 +03:00
commit 66771e0b0d
100 changed files with 2335 additions and 2251 deletions

View file

@ -16,7 +16,7 @@
<script type="text/javascript" src="../../../../sdkjs/word/sdk-all.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/sdk-all.js"></script>
<div id="editor_sdk"> <div id="editor_sdk">
<script type="text/javascript"> <script type="text/javascript">
var editor = new asc_docs_api("editor_sdk"); var editor = new Asc.asc_docs_api("editor_sdk");
editor.asc_SetFontsPath("../../../../sdkjs/fonts/"); editor.asc_SetFontsPath("../../../../sdkjs/fonts/");
editor.LoadFontsFromServer(); editor.LoadFontsFromServer();
</script> </script>

View file

@ -50,7 +50,7 @@ define([
Common.UI.ComboBoxFonts = Common.UI.ComboBox.extend((function() { Common.UI.ComboBoxFonts = Common.UI.ComboBox.extend((function() {
var iconWidth = 302, var iconWidth = 302,
iconHeight = FONT_THUMBNAIL_HEIGHT || 26, iconHeight = Asc.FONT_THUMBNAIL_HEIGHT || 26,
isRetina = window.devicePixelRatio > 1, isRetina = window.devicePixelRatio > 1,
thumbCanvas = document.createElement('canvas'), thumbCanvas = document.createElement('canvas'),
thumbContext = thumbCanvas.getContext('2d'), thumbContext = thumbCanvas.getContext('2d'),
@ -259,10 +259,10 @@ define([
if (isRetina) { if (isRetina) {
thumbContext.clearRect(0, 0, iconWidth * 2, iconHeight * 2); thumbContext.clearRect(0, 0, iconWidth * 2, iconHeight * 2);
thumbContext.drawImage(this.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * 2 * opts.imgidx); thumbContext.drawImage(this.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * 2 * opts.imgidx);
} else { } else {
thumbContext.clearRect(0, 0, iconWidth, iconHeight); thumbContext.clearRect(0, 0, iconWidth, iconHeight);
thumbContext.drawImage(this.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * opts.imgidx); thumbContext.drawImage(this.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * opts.imgidx);
} }
return thumbCanvas.toDataURL(); return thumbCanvas.toDataURL();
@ -474,10 +474,10 @@ define([
if (isRetina) { if (isRetina) {
context.clearRect(0, 0, iconWidth * 2, iconHeight * 2); context.clearRect(0, 0, iconWidth * 2, iconHeight * 2);
context.drawImage(me.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * 2 * index); context.drawImage(me.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * 2 * index);
} else { } else {
context.clearRect(0, 0, iconWidth, iconHeight); context.clearRect(0, 0, iconWidth, iconHeight);
context.drawImage(me.spriteThumbs, 0, -FONT_THUMBNAIL_HEIGHT * index); context.drawImage(me.spriteThumbs, 0, -Asc.FONT_THUMBNAIL_HEIGHT * index);
} }
me.tiles[j] = fontImage; me.tiles[j] = fontImage;

View file

@ -58,7 +58,7 @@
* *
* *
* @property {String} defaultUnit * @property {String} defaultUnit
* Name of the unit of measurement. Can be px|em|%|en|ex|pt|in|cm|mm|pc|s|ms|см|мм|пт|сек|мс. * Name of the unit of measurement. Can be px|em|%|en|ex|pt|"|cm|mm|pc|s|ms|см|мм|пт|сек|мс.
* *
* defaultUnit: 'px', * defaultUnit: 'px',
* *
@ -262,7 +262,7 @@ define([
var units = this.options.defaultUnit; var units = this.options.defaultUnit;
if ( typeof value.match !== 'undefined'){ if ( typeof value.match !== 'undefined'){
var searchUnits = value.match(/(px|em|%|en|ex|pt|in|cm|mm|pc|s|ms|см|мм|пт|сек|мс)$/i); var searchUnits = value.match(/(px|em|%|en|ex|pt|"|cm|mm|pc|s|ms|см|мм|пт|сек|мс)$/i);
if (null !== searchUnits && searchUnits[0]!=='undefined') { if (null !== searchUnits && searchUnits[0]!=='undefined') {
units = searchUnits[0].toLowerCase(); units = searchUnits[0].toLowerCase();
} }
@ -493,7 +493,7 @@ define([
return v_out; return v_out;
} }
if ( fromUnit.match(/(pt|in|cm|mm|pc|см|мм|пт)$/i)===null || this.options.defaultUnit.match(/(pt|in|cm|mm|pc|см|мм|пт)$/i)===null) if ( fromUnit.match(/(pt|"|cm|mm|pc|см|мм|пт)$/i)===null || this.options.defaultUnit.match(/(pt|"|cm|mm|pc|см|мм|пт)$/i)===null)
return value; return value;
var v_out = value; var v_out = value;
@ -502,7 +502,7 @@ define([
v_out = v_out*10; v_out = v_out*10;
else if (fromUnit=='pt' || fromUnit=='пт') else if (fromUnit=='pt' || fromUnit=='пт')
v_out = v_out * 25.4 / 72.0; v_out = v_out * 25.4 / 72.0;
else if (fromUnit=='in') else if (fromUnit=='\"')
v_out = v_out * 25.4; v_out = v_out * 25.4;
else if (fromUnit=='pc') else if (fromUnit=='pc')
v_out = v_out * 25.4 / 6.0; v_out = v_out * 25.4 / 6.0;
@ -512,8 +512,8 @@ define([
v_out = v_out/10.; v_out = v_out/10.;
else if (this.options.defaultUnit=='pt' || this.options.defaultUnit=='пт') else if (this.options.defaultUnit=='pt' || this.options.defaultUnit=='пт')
v_out = parseFloat((v_out * 72.0 / 25.4).toFixed(3)); v_out = parseFloat((v_out * 72.0 / 25.4).toFixed(3));
else if (this.options.defaultUnit=='in') else if (this.options.defaultUnit=='\"')
v_out = v_out / 25.4; v_out = parseFloat((v_out / 25.4).toFixed(3));
else if (this.options.defaultUnit=='pc') else if (this.options.defaultUnit=='pc')
v_out = v_out * 6.0 / 25.4; v_out = v_out * 6.0 / 25.4;

View file

@ -53,8 +53,8 @@ define([
// NOTE: временное решение // NOTE: временное решение
function buildCommentData () { function buildCommentData () {
if (typeof asc_CCommentDataWord !== 'undefined') { if (typeof Asc.asc_CCommentDataWord !== 'undefined') {
return new asc_CCommentDataWord(null); return new Asc.asc_CCommentDataWord(null);
} }
return new asc_CCommentData(null); return new asc_CCommentData(null);

View file

@ -196,7 +196,7 @@ define([
value = item.get_Value(), value = item.get_Value(),
settings = false; settings = false;
switch (item.get_Type()) { switch (item.get_Type()) {
case c_oAscRevisionsChangeType.TextAdd: case Asc.c_oAscRevisionsChangeType.TextAdd:
changetext = me.textInserted; changetext = me.textInserted;
if (typeof value == 'object') { if (typeof value == 'object') {
_.each(value, function(obj) { _.each(value, function(obj) {
@ -223,7 +223,7 @@ define([
changetext += (' ' + value); changetext += (' ' + value);
} }
break; break;
case c_oAscRevisionsChangeType.TextRem: case Asc.c_oAscRevisionsChangeType.TextRem:
changetext = me.textDeleted; changetext = me.textDeleted;
if (typeof value == 'object') { if (typeof value == 'object') {
_.each(value, function(obj) { _.each(value, function(obj) {
@ -250,13 +250,13 @@ define([
changetext += (' ' + value); changetext += (' ' + value);
} }
break; break;
case c_oAscRevisionsChangeType.ParaAdd: case Asc.c_oAscRevisionsChangeType.ParaAdd:
changetext = me.textParaInserted; changetext = me.textParaInserted;
break; break;
case c_oAscRevisionsChangeType.ParaRem: case Asc.c_oAscRevisionsChangeType.ParaRem:
changetext = me.textParaDeleted; changetext = me.textParaDeleted;
break; break;
case c_oAscRevisionsChangeType.TextPr: case Asc.c_oAscRevisionsChangeType.TextPr:
changetext = '<b>' + me.textFormatted; changetext = '<b>' + me.textFormatted;
if (value.Get_Bold() !== undefined) if (value.Get_Bold() !== undefined)
proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', '); proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', ');
@ -298,7 +298,7 @@ define([
changetext += '</b>'; changetext += '</b>';
changetext += proptext; changetext += proptext;
break; break;
case c_oAscRevisionsChangeType.ParaPr: case Asc.c_oAscRevisionsChangeType.ParaPr:
changetext = '<b>' + me.textParaFormatted; changetext = '<b>' + me.textParaFormatted;
if (value.Get_ContextualSpacing()) if (value.Get_ContextualSpacing())
proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', '); proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', ');

View file

@ -225,7 +225,7 @@ Common.Utils.ThemeColor = new(function() {
if(color.length==3) color=color.replace(/(.)/g,'$1$1'); if(color.length==3) color=color.replace(/(.)/g,'$1$1');
color=parseInt(color,16); color=parseInt(color,16);
var c = new CAscColor(); var c = new CAscColor();
c.put_type( (typeof(clr) == 'object' && clr.effectId !== undefined)? c_oAscColor.COLOR_TYPE_SCHEME : c_oAscColor.COLOR_TYPE_SRGB); c.put_type( (typeof(clr) == 'object' && clr.effectId !== undefined)? Asc.c_oAscColor.COLOR_TYPE_SCHEME : Asc.c_oAscColor.COLOR_TYPE_SRGB);
c.put_r(color>>16); c.put_r(color>>16);
c.put_g((color&0xff00)>>8); c.put_g((color&0xff00)>>8);
c.put_b(color&0xff); c.put_b(color&0xff);
@ -254,16 +254,18 @@ Common.Utils.Metric = _.extend( new(function() {
me.c_MetricUnits = { me.c_MetricUnits = {
cm: 0, cm: 0,
pt: 1 pt: 1,
inch: 2
}; };
me.currentMetric = me.c_MetricUnits.pt; me.currentMetric = me.c_MetricUnits.pt;
me.metricName = ['Cm', 'Pt']; me.metricName = ['Cm', 'Pt', 'Inch'];
return { return {
c_MetricUnits: me.c_MetricUnits, c_MetricUnits: me.c_MetricUnits,
txtCm : 'cm', txtCm : 'cm',
txtPt : 'pt', txtPt : 'pt',
txtInch : '\"',
setCurrentMetric: function(value) { setCurrentMetric: function(value) {
me.currentMetric = value; me.currentMetric = value;
@ -282,25 +284,29 @@ Common.Utils.Metric = _.extend( new(function() {
}, },
fnRecalcToMM: function(value) { fnRecalcToMM: function(value) {
// value in pt/cm. need to convert to mm // value in pt/cm/inch. need to convert to mm
if (value!==null && value!==undefined) { if (value!==null && value!==undefined) {
switch (me.currentMetric) { switch (me.currentMetric) {
case me.c_MetricUnits.cm: case me.c_MetricUnits.cm:
return value * 10; return value * 10;
case me.c_MetricUnits.pt: case me.c_MetricUnits.pt:
return value * 25.4 / 72.0; return value * 25.4 / 72.0;
case me.c_MetricUnits.inch:
return value * 25.4;
} }
} }
return value; return value;
}, },
fnRecalcFromMM: function(value) { fnRecalcFromMM: function(value) {
// value in mm. need to convert to pt/cm // value in mm. need to convert to pt/cm/inch
switch (me.currentMetric) { switch (me.currentMetric) {
case me.c_MetricUnits.cm: case me.c_MetricUnits.cm:
return parseFloat((value/10.).toFixed(4)); return parseFloat((value/10.).toFixed(4));
case me.c_MetricUnits.pt: case me.c_MetricUnits.pt:
return parseFloat((value * 72.0 / 25.4).toFixed(3)); return parseFloat((value * 72.0 / 25.4).toFixed(3));
case me.c_MetricUnits.inch:
return parseFloat((value / 25.4).toFixed(3));
} }
return value; return value;
} }

View file

@ -111,7 +111,7 @@ define([
render: function(el) { render: function(el) {
el = el || this.el; el = el || this.el;
$(el).html(this.template({scope: this, maxMsgLength: c_oAscMaxCellOrCommentLength})); $(el).html(this.template({scope: this, maxMsgLength: Asc.c_oAscMaxCellOrCommentLength}));
this.panelBox = $('#chat-box', this.el); this.panelBox = $('#chat-box', this.el);
this.panelUsers = $('#chat-users', this.el); this.panelUsers = $('#chat-users', this.el);

View file

@ -261,7 +261,7 @@ define([
textEdit: t.textEdit, textEdit: t.textEdit,
textReply: t.textReply, textReply: t.textReply,
textClose: t.textClose, textClose: t.textClose,
maxCommLength: c_oAscMaxCellOrCommentLength maxCommLength: Asc.c_oAscMaxCellOrCommentLength
}) })
) )
}); });
@ -837,7 +837,7 @@ define([
textAddComment: me.textAddComment, textAddComment: me.textAddComment,
textCancel: me.textCancel, textCancel: me.textCancel,
textEnterCommentHint: me.textEnterCommentHint, textEnterCommentHint: me.textEnterCommentHint,
maxCommLength: c_oAscMaxCellOrCommentLength maxCommLength: Asc.c_oAscMaxCellOrCommentLength
})); }));
this.buttonAddCommentToDoc = new Common.UI.Button({ this.buttonAddCommentToDoc = new Common.UI.Button({
@ -987,7 +987,7 @@ define([
textEdit: me.textEdit, textEdit: me.textEdit,
textReply: me.textReply, textReply: me.textReply,
textClose: me.textClose, textClose: me.textClose,
maxCommLength: c_oAscMaxCellOrCommentLength maxCommLength: Asc.c_oAscMaxCellOrCommentLength
})) }))
}); });

View file

@ -56,12 +56,12 @@ define([
_.extend(_options, { _.extend(_options, {
closable: false, closable: false,
width : 250, width : 250,
height : (options.type == c_oAscAdvancedOptionsID.CSV) ? 205 : 155, height : (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 205 : 155,
contentWidth : 390, contentWidth : 390,
header : true, header : true,
cls : 'open-dlg', cls : 'open-dlg',
contentTemplate : '', contentTemplate : '',
title : t.txtTitle.replace('%1', (options.type == c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT') title : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT')
}, options); }, options);
this.template = options.template || [ this.template = options.template || [
@ -69,7 +69,7 @@ define([
'<div class="content-panel" >', '<div class="content-panel" >',
'<label class="header">' + t.txtEncoding + '</label>', '<label class="header">' + t.txtEncoding + '</label>',
'<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>', '<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>',
'<% if (type == c_oAscAdvancedOptionsID.CSV) { %>', '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
'<label class="header">' + t.txtDelimiter + '</label>', '<label class="header">' + t.txtDelimiter + '</label>',
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>', '<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>',
'<% } %>', '<% } %>',
@ -287,7 +287,7 @@ define([
}); });
this.cmbEncoding.setValue( (this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : encodedata[0][0]); 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({ this.cmbDelimiter = new Common.UI.ComboBox({
el: $('#id-delimiters-combo', this.$window), el: $('#id-delimiters-combo', this.$window),
menuStyle: 'min-width: 110px;', menuStyle: 'min-width: 110px;',

View file

@ -433,6 +433,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>

View file

@ -216,7 +216,7 @@ var ApplicationController = new(function(){
var text = ''; var text = '';
switch (id) switch (id)
{ {
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...'; text = 'Downloading document...';
break; break;
default: default:
@ -224,7 +224,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text); $('#id-loadmask .cmd-loader-title').html(text);
showMask(); showMask();
} }
@ -355,19 +355,19 @@ var ApplicationController = new(function(){
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText; message = me.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText; message = me.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText; message = me.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText; message = me.downloadErrorText;
break; break;
@ -376,7 +376,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, message); Common.Gateway.reportError(id, message);
@ -427,7 +427,7 @@ var ApplicationController = new(function(){
} }
function onDownloadAs() { function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.DOCX, true); if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
} }
// Helpers // Helpers
@ -704,7 +704,7 @@ var ApplicationController = new(function(){
}); });
window["flat_desine"] = true; window["flat_desine"] = true;
api = new asc_docs_api("editor_sdk"); api = new Asc.asc_docs_api("editor_sdk");
if (api){ if (api){
api.CreateComponents(); api.CreateComponents();

View file

@ -238,7 +238,7 @@ define([
clickSaveAsFormat: function(menu, format) { clickSaveAsFormat: function(menu, format) {
if (menu) { if (menu) {
if (format == c_oAscFileType.TXT) { if (format == Asc.c_oAscFileType.TXT) {
Common.UI.warning({ Common.UI.warning({
closable: false, closable: false,
title: this.notcriticalErrorTitle, title: this.notcriticalErrorTitle,
@ -273,10 +273,10 @@ define([
value = Common.localStorage.getItem((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict"); value = Common.localStorage.getItem((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
switch(value) { switch(value) {
case 'all': value = c_oAscCollaborativeMarksShowType.All; break; case 'all': value = Asc.c_oAscCollaborativeMarksShowType.All; break;
case 'none': value = c_oAscCollaborativeMarksShowType.None; break; case 'none': value = Asc.c_oAscCollaborativeMarksShowType.None; break;
case 'last': value = c_oAscCollaborativeMarksShowType.LastChanges; break; case 'last': value = Asc.c_oAscCollaborativeMarksShowType.LastChanges; break;
default: value = (fast_coauth) ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges; default: value = (fast_coauth) ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges;
} }
this.api.SetCollaborativeMarksShowType(value); this.api.SetCollaborativeMarksShowType(value);
} }

View file

@ -105,16 +105,13 @@ define([
return; return;
} }
var value = Common.localStorage.getItem('de-settings-unit'); var value = Common.localStorage.getItem("de-settings-fontrender");
Common.Utils.Metric.setCurrentMetric((value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm);
value = Common.localStorage.getItem("de-settings-fontrender");
if (value === null) if (value === null)
window.devicePixelRatio > 1 ? value = '1' : '0'; window.devicePixelRatio > 1 ? value = '1' : '0';
// Initialize api // Initialize api
this.api = new asc_docs_api("editor_sdk"); this.api = new Asc.asc_docs_api("editor_sdk");
if (this.api){ if (this.api){
switch (value) { switch (value) {
@ -327,7 +324,7 @@ define([
onDownloadAs: function() { onDownloadAs: function() {
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType); 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) { onProcessMouse: function(data) {
@ -380,8 +377,8 @@ define([
user = new Common.Models.User({ user = new Common.Models.User({
id : version.user.id, id : version.user.id,
username : version.user.name, username : version.user.name,
colorval : c_oAscArrUserColors[usersCnt], colorval : Asc.c_oAscArrUserColors[usersCnt],
color : this.generateUserColor(c_oAscArrUserColors[usersCnt++]) color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
}); });
usersStore.add(user); usersStore.add(user);
} }
@ -423,8 +420,8 @@ define([
user = new Common.Models.User({ user = new Common.Models.User({
id : change.user.id, id : change.user.id,
username : change.user.name, username : change.user.name,
colorval : c_oAscArrUserColors[usersCnt], colorval : Asc.c_oAscArrUserColors[usersCnt],
color : this.generateUserColor(c_oAscArrUserColors[usersCnt++]) color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
}); });
usersStore.add(user); usersStore.add(user);
} }
@ -536,11 +533,11 @@ define([
this.updateWindowTitle(true); this.updateWindowTitle(true);
action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
if (action) { if (action) {
this.setLongActionView(action) this.setLongActionView(action)
} else { } 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; var me = this;
if (me._state.timerSave===undefined) if (me._state.timerSave===undefined)
me._state.timerSave = setInterval(function(){ me._state.timerSave = setInterval(function(){
@ -554,15 +551,15 @@ define([
this.getApplication().getController('Statusbar').setStatusCaption(''); 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(); 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(); this.synchronizeChanges();
if ( type == c_oAscAsyncActionType.BlockInteraction && if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) && (!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.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true); this.api.asc_enableKeyEvents(true);
} }
@ -572,73 +569,73 @@ define([
var title = '', text = ''; var title = '', text = '';
switch (action.id) { switch (action.id) {
case c_oAscAsyncAction['Open']: case Asc.c_oAscAsyncAction['Open']:
title = this.openTitleText; title = this.openTitleText;
text = this.openTextText; text = this.openTextText;
break; break;
case c_oAscAsyncAction['Save']: case Asc.c_oAscAsyncAction['Save']:
this._state.isSaving = new Date(); this._state.isSaving = new Date();
title = this.saveTitleText; title = this.saveTitleText;
text = this.saveTextText; text = this.saveTextText;
break; break;
case c_oAscAsyncAction['LoadDocumentFonts']: case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
title = this.loadFontsTitleText; title = this.loadFontsTitleText;
text = this.loadFontsTextText; text = this.loadFontsTextText;
break; break;
case c_oAscAsyncAction['LoadDocumentImages']: case Asc.c_oAscAsyncAction['LoadDocumentImages']:
title = this.loadImagesTitleText; title = this.loadImagesTitleText;
text = this.loadImagesTextText; text = this.loadImagesTextText;
break; break;
case c_oAscAsyncAction['LoadFont']: case Asc.c_oAscAsyncAction['LoadFont']:
title = this.loadFontTitleText; title = this.loadFontTitleText;
text = this.loadFontTextText; text = this.loadFontTextText;
break; break;
case c_oAscAsyncAction['LoadImage']: case Asc.c_oAscAsyncAction['LoadImage']:
title = this.loadImageTitleText; title = this.loadImageTitleText;
text = this.loadImageTextText; text = this.loadImageTextText;
break; break;
case c_oAscAsyncAction['DownloadAs']: case Asc.c_oAscAsyncAction['DownloadAs']:
title = this.downloadTitleText; title = this.downloadTitleText;
text = this.downloadTextText; text = this.downloadTextText;
break; break;
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
title = this.printTitleText; title = this.printTitleText;
text = this.printTextText; text = this.printTextText;
break; break;
case c_oAscAsyncAction['UploadImage']: case Asc.c_oAscAsyncAction['UploadImage']:
title = this.uploadImageTitleText; title = this.uploadImageTitleText;
text = this.uploadImageTextText; text = this.uploadImageTextText;
break; break;
case c_oAscAsyncAction['ApplyChanges']: case Asc.c_oAscAsyncAction['ApplyChanges']:
title = this.applyChangesTitleText; title = this.applyChangesTitleText;
text = this.applyChangesTextText; text = this.applyChangesTextText;
break; break;
case c_oAscAsyncAction['PrepareToSave']: case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText; title = this.savePreparingText;
text = this.savePreparingTitle; text = this.savePreparingTitle;
break; break;
case c_oAscAsyncAction['MailMergeLoadFile']: case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
title = this.mailMergeLoadFileText; title = this.mailMergeLoadFileText;
text = this.mailMergeLoadFileTitle; text = this.mailMergeLoadFileTitle;
break; break;
case c_oAscAsyncAction['DownloadMerge']: case Asc.c_oAscAsyncAction['DownloadMerge']:
title = this.downloadMergeTitle; title = this.downloadMergeTitle;
text = this.downloadMergeText; text = this.downloadMergeText;
break; break;
case c_oAscAsyncAction['SendMailMerge']: case Asc.c_oAscAsyncAction['SendMailMerge']:
title = this.sendMergeTitle; title = this.sendMergeTitle;
text = this.sendMergeText; text = this.sendMergeText;
break; break;
@ -654,7 +651,7 @@ define([
break; break;
} }
if (action.type == c_oAscAsyncActionType['BlockInteraction']) { if (action.type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
if (!this.loadMask) if (!this.loadMask)
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
@ -677,7 +674,7 @@ define([
data.requestrights = true; data.requestrights = true;
this.appOptions.isEdit= true; this.appOptions.isEdit= true;
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights); this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
var me = this; var me = this;
setTimeout(function(){ setTimeout(function(){
@ -741,7 +738,7 @@ define([
me.api.SetDrawingFreeze(false); me.api.SetDrawingFreeze(false);
me.hidePreloader(); me.hidePreloader();
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
/** coauthoring begin **/ /** coauthoring begin **/
value = Common.localStorage.getItem("de-settings-livecomment"); 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"); value = Common.localStorage.getItem((me._state.fastCoauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
if (value !== null) if (value !== null)
me.api.SetCollaborativeMarksShowType(value == 'all' ? c_oAscCollaborativeMarksShowType.All : me.api.SetCollaborativeMarksShowType(value == 'all' ? Asc.c_oAscCollaborativeMarksShowType.All :
value == 'none' ? c_oAscCollaborativeMarksShowType.None : c_oAscCollaborativeMarksShowType.LastChanges); value == 'none' ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges);
else 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 { } else {
me._state.fastCoauth = false; me._state.fastCoauth = false;
me.api.asc_SetFastCollaborative(me._state.fastCoauth); me.api.asc_SetFastCollaborative(me._state.fastCoauth);
me.api.SetCollaborativeMarksShowType(c_oAscCollaborativeMarksShowType.None); me.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None);
} }
/** coauthoring end **/ /** coauthoring end **/
@ -958,7 +955,7 @@ define([
if (!this.appOptions.isEdit) { if (!this.appOptions.isEdit) {
this.hidePreloader(); 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)); 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_SetViewRulers(value===null || parseInt(value) === 0);
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me)); 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)); me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/ /** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) { if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) { } else if (!this._isDocReady) {
me.hidePreloader(); me.hidePreloader();
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
} }
// Message on window close // Message on window close
@ -1088,7 +1090,7 @@ define([
onError: function(id, level, errData) { onError: function(id, level, errData) {
this.hidePreloader(); this.hidePreloader();
this.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
var config = { var config = {
closable: false closable: false
@ -1096,79 +1098,79 @@ define([
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText; config.msg = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText; config.msg = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText; config.msg = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText; config.msg = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage; config.msg = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage; config.msg = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage; config.msg = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.SplitCellMaxRows: case Asc.c_oAscError.ID.SplitCellMaxRows:
config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value()); config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellMaxCols: case Asc.c_oAscError.ID.SplitCellMaxCols:
config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value()); config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellRowsDivider: case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value()); config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt; config.msg = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire; config.msg = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed; config.msg = this.errorUsersExceed;
break; break;
case c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect; config.msg = this.errorCoAuthoringDisconnect;
break; break;
case c_oAscError.ID.ConvertationPassword: case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect; config.msg = this.errorFilePassProtect;
break; break;
case c_oAscError.ID.StockChartError: case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart; config.msg = this.errorStockChart;
break; break;
case c_oAscError.ID.DataRangeError: case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange; config.msg = this.errorDataRange;
break; break;
case c_oAscError.ID.Database: case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection; config.msg = this.errorDatabaseConnection;
break; break;
case c_oAscError.ID.UserDrop: case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) { if (this._state.lostEditingRights) {
this._state.lostEditingRights = false; this._state.lostEditingRights = false;
return; return;
@ -1177,15 +1179,15 @@ define([
config.msg = this.errorUserDrop; config.msg = this.errorUserDrop;
break; break;
case c_oAscError.ID.MailMergeLoadFile: case Asc.c_oAscError.ID.MailMergeLoadFile:
config.msg = this.errorMailMergeLoadFile; config.msg = this.errorMailMergeLoadFile;
break; break;
case c_oAscError.ID.MailMergeSaveFile: case Asc.c_oAscError.ID.MailMergeSaveFile:
config.msg = this.errorMailMergeSaveFile; config.msg = this.errorMailMergeSaveFile;
break; break;
case c_oAscError.ID.Warning: case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer; config.msg = this.errorConnectToServer;
break; break;
@ -1195,7 +1197,7 @@ define([
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, config.msg); Common.Gateway.reportError(id, config.msg);
@ -1216,7 +1218,7 @@ define([
config.iconCls = 'warn'; config.iconCls = 'warn';
config.buttons = ['ok']; config.buttons = ['ok'];
config.callback = _.bind(function(btn){ 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(); Common.UI.Menu.Manager.hideAll();
if (this.appOptions.isDesktopApp && this.appOptions.isOffline) if (this.appOptions.isDesktopApp && this.appOptions.isOffline)
this.api.asc_DownloadAs(); this.api.asc_DownloadAs();
@ -1408,7 +1410,7 @@ define([
onUpdateVersion: function(callback) { onUpdateVersion: function(callback) {
var me = this; var me = this;
me.needToUpdateVersion = true; me.needToUpdateVersion = true;
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.warning({ Common.UI.warning({
title: me.titleUpdateVersion, title: me.titleUpdateVersion,
msg: this.errorUpdateVersion, msg: this.errorUpdateVersion,
@ -1416,7 +1418,7 @@ define([
_.defer(function() { _.defer(function() {
Common.Gateway.updateVersion(); Common.Gateway.updateVersion();
if (callback) callback.call(me); 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) { unitsChanged: function(m) {
var value = Common.localStorage.getItem("de-settings-unit"); 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('RightMenu').updateMetricUnit();
this.getApplication().getController('Toolbar').getView('Toolbar').updateMetricUnit();
}, },
onAdvancedOptions: function(advOptions) { onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId(); var type = advOptions.asc_getOptionId();
if (type == c_oAscAdvancedOptionsID.TXT) { if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
var me = this; var me = this;
var dlg = new Common.Views.OpenDialog({ var dlg = new Common.Views.OpenDialog({
type: type, type: type,
@ -1608,7 +1613,7 @@ define([
this.isShowOpenDialog = true; this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide(); this.loadMask && this.loadMask.hide();
this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument); this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show(); dlg.show();
} }
@ -1632,7 +1637,7 @@ define([
this.api.asc_SetFastCollaborative(false); this.api.asc_SetFastCollaborative(false);
this._state.fastCoauth = false; this._state.fastCoauth = false;
Common.localStorage.setItem("de-settings-showchanges-strict", 'last'); 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.fireEvent('editcomplete', this);
}, this) }, this)

View file

@ -125,7 +125,7 @@ define([
{ {
var eltype = SelectedObjects[i].get_ObjectType(), var eltype = SelectedObjects[i].get_ObjectType(),
settingsType = this.getDocumentSettingsType(eltype); settingsType = this.getDocumentSettingsType(eltype);
if (eltype === c_oAscTypeSelectElement.Math) if (eltype === Asc.c_oAscTypeSelectElement.Math)
in_equation = true; in_equation = true;
if (settingsType===undefined || settingsType>=this._settings.length || this._settings[settingsType]===undefined) if (settingsType===undefined || settingsType>=this._settings.length || this._settings[settingsType]===undefined)
@ -314,7 +314,7 @@ define([
}, },
onError: function(id, level, errData) { 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].hidden = 1;
this._settings[Common.Utils.documentSettingsType.MailMerge].btn.setDisabled(true); this._settings[Common.Utils.documentSettingsType.MailMerge].btn.setDisabled(true);
var selectedElements = this.api.getSelectedElements(); var selectedElements = this.api.getSelectedElements();
@ -357,13 +357,13 @@ define([
getDocumentSettingsType: function(type) { getDocumentSettingsType: function(type) {
switch (type) { switch (type) {
case c_oAscTypeSelectElement.Paragraph: case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph; return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Table: case Asc.c_oAscTypeSelectElement.Table:
return Common.Utils.documentSettingsType.Table; return Common.Utils.documentSettingsType.Table;
case c_oAscTypeSelectElement.Image: case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image; return Common.Utils.documentSettingsType.Image;
case c_oAscTypeSelectElement.Header: case Asc.c_oAscTypeSelectElement.Header:
return Common.Utils.documentSettingsType.Header; return Common.Utils.documentSettingsType.Header;
} }
} }

View file

@ -73,7 +73,7 @@ define([
}, },
prstyle: undefined, prstyle: undefined,
prcontrolsdisable:undefined, prcontrolsdisable:undefined,
dropcap: c_oAscDropCap.None, dropcap: Asc.c_oAscDropCap.None,
clrhighlight: undefined, clrhighlight: undefined,
clrtext: undefined, clrtext: undefined,
pgsize: [0, 0], pgsize: [0, 0],
@ -578,30 +578,30 @@ define([
type = selectedObjects[i].get_ObjectType(); type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue(); pr = selectedObjects[i].get_ObjectValue();
if (type === c_oAscTypeSelectElement.Paragraph) { if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked(); paragraph_locked = pr.get_Locked();
can_add_table = pr.get_CanAddTable(); can_add_table = pr.get_CanAddTable();
can_add_image = pr.get_CanAddImage(); can_add_image = pr.get_CanAddImage();
frame_pr = pr; frame_pr = pr;
sh = pr.get_Shade(); sh = pr.get_Shade();
} else if (type === c_oAscTypeSelectElement.Header) { } else if (type === Asc.c_oAscTypeSelectElement.Header) {
header_locked = pr.get_Locked(); header_locked = pr.get_Locked();
in_header = true; in_header = true;
} else if (type === c_oAscTypeSelectElement.Image) { } else if (type === Asc.c_oAscTypeSelectElement.Image) {
in_image = in_header = true; in_image = in_header = true;
if (pr && pr.get_ChartProperties()) if (pr && pr.get_ChartProperties())
in_chart = true; in_chart = true;
} else if (type === c_oAscTypeSelectElement.Math) { } else if (type === Asc.c_oAscTypeSelectElement.Math) {
in_equation = true; in_equation = true;
if (c_oAscMathInterfaceType.Common === pr.get_Type()) if (Asc.c_oAscMathInterfaceType.Common === pr.get_Type())
btn_eq_state = true; 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; enable_dropcap = false;
} }
if (enable_dropcap!==false && type == c_oAscTypeSelectElement.Paragraph) if (enable_dropcap!==false && type == Asc.c_oAscTypeSelectElement.Paragraph)
enable_dropcap = true; enable_dropcap = true;
} }
@ -631,11 +631,11 @@ define([
if (enable_dropcap && frame_pr) { if (enable_dropcap && frame_pr) {
var value = frame_pr.get_FramePr(), var value = frame_pr.get_FramePr(),
drop_value = c_oAscDropCap.None; drop_value = Asc.c_oAscDropCap.None;
if (value!==undefined) { if (value!==undefined) {
drop_value = value.get_DropCap(); 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; disable_dropcapadv = false;
} else { } else {
enable_dropcap = frame_pr.get_CanAddDropCap(); enable_dropcap = frame_pr.get_CanAddDropCap();
@ -1260,7 +1260,7 @@ define([
handler: handlerDlg handler: handlerDlg
}); });
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
props.put_Text(text); props.put_Text(text);
win.show(); win.show();
@ -1269,7 +1269,7 @@ define([
var selectedElements = me.api.getSelectedElements(); var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(el, i) { _.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(); props = selectedElements[i].get_ObjectValue();
}); });
} }
@ -1519,13 +1519,13 @@ define([
this._state.dropcap = undefined; this._state.dropcap = undefined;
if (this.api && item.checked) { if (this.api && item.checked) {
if (item.value === c_oAscDropCap.None) { if (item.value === Asc.c_oAscDropCap.None) {
this.api.removeDropcap(true); this.api.removeDropcap(true);
} else { } else {
var SelectedObjects = this.api.getSelectedElements(), var SelectedObjects = this.api.getSelectedElements(),
i = -1; i = -1;
while (++i < SelectedObjects.length) { 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 pr = SelectedObjects[i].get_ObjectValue();
var value = pr.get_FramePr(); var value = pr.get_FramePr();
if (!_.isUndefined(value)) { if (!_.isUndefined(value)) {
@ -1534,7 +1534,7 @@ define([
value.put_DropCap(item.value); value.put_DropCap(item.value);
this.api.put_FramePr(value); this.api.put_FramePr(value);
} else { } else {
this.api.asc_addDropCap((item.value === c_oAscDropCap.Drop)); this.api.asc_addDropCap((item.value === Asc.c_oAscDropCap.Drop));
} }
break; break;
} }
@ -1552,9 +1552,9 @@ define([
var index = -1; var index = -1;
switch (v) { switch (v) {
case c_oAscDropCap.None: index = 0; break; case Asc.c_oAscDropCap.None: index = 0; break;
case c_oAscDropCap.Drop: index = 1; break; case Asc.c_oAscDropCap.Drop: index = 1; break;
case c_oAscDropCap.Margin: index = 2; break; case Asc.c_oAscDropCap.Margin: index = 2; break;
} }
if (index < 0) if (index < 0)
this._clearChecked(this.toolbar.btnDropCap.menu); this._clearChecked(this.toolbar.btnDropCap.menu);
@ -1586,7 +1586,7 @@ define([
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i < selectedElementsLenght; i++) { 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(); props = selectedElements[i].get_ObjectValue();
break; break;
} }
@ -1606,7 +1606,7 @@ define([
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {
me.borderAdvancedProps = value.borderProps; 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); me.api.removeDropcap(true);
} else } else
me.api.put_FramePr(value.paragraphProps); me.api.put_FramePr(value.paragraphProps);
@ -1625,7 +1625,7 @@ define([
this._state.columns = undefined; this._state.columns = undefined;
if (this.api && item.checked) { if (this.api && item.checked) {
var props = new CDocumentColumnsProps(), var props = new Asc.CDocumentColumnsProps(),
cols = item.value, cols = item.value,
def_space = 12.5; def_space = 12.5;
props.put_EqualWidth(cols<3); props.put_EqualWidth(cols<3);
@ -1792,7 +1792,7 @@ define([
isParagraph = false; isParagraph = false;
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i <selectedElements.length; i++) { for (var i = 0; i <selectedElements.length; i++) {
if (c_oAscTypeSelectElement.Paragraph == selectedElements[i].get_ObjectType()) { if (Asc.c_oAscTypeSelectElement.Paragraph == selectedElements[i].get_ObjectType()) {
isParagraph = true; break; isParagraph = true; break;
} }
} }
@ -2068,10 +2068,10 @@ define([
onParagraphColor: function(shd) { onParagraphColor: function(shd) {
var picker = this.toolbar.mnuParagraphColorPicker, clr; var picker = this.toolbar.mnuParagraphColorPicker, clr;
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -2118,7 +2118,7 @@ define([
var picker = this.toolbar.mnuFontColorPicker, clr; var picker = this.toolbar.mnuFontColorPicker, clr;
if (color) { if (color) {
color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME ? color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME ?
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()} : clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()} :
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
} }

View file

@ -67,7 +67,7 @@ define([
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
WrappingStyle: c_oAscWrapStyle2.Inline, WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true, CanBeFlow: true,
Width: 0, Width: 0,
Height: 0, Height: 0,
@ -86,13 +86,13 @@ define([
this.render(); this.render();
var viewData = [ var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconCls:'wrap-inline', tip: this.txtInline, selected: true }, { offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconCls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconCls:'wrap-square', tip: this.txtSquare }, { offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconCls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconCls:'wrap-tight', tip: this.txtTight }, { offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconCls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconCls:'wrap-through', tip: this.txtThrough }, { offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconCls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconCls:'wrap-topAndBottom', tip: this.txtTopAndBottom }, { offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconCls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconCls:'wrap-inFront', tip: this.txtInFront }, { offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconCls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconCls:'wrap-behind', tip: this.txtBehind } { offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconCls:'wrap-behind', tip: this.txtBehind }
]; ];
this.btnWrapType = new Common.UI.Button({ this.btnWrapType = new Common.UI.Button({
@ -141,31 +141,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });
@ -370,17 +370,17 @@ define([
var props = new CImgProperty(); var props = new CImgProperty();
props.put_WrappingStyle((rawData.data)); props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) { if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH()); props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false); props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column); props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column); var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
props.get_PositionH().put_Value(val); 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_UseAlign(false);
props.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph); props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph); val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val); props.get_PositionV().put_Value(val);
} }
@ -415,7 +415,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeMax = this.api.GetSectionInfo(); var imgsizeMax = this.api.GetSectionInfo();
imgsizeMax = {width: imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft()+imgsizeMax.get_MarginRight()), imgsizeMax = {width: imgsizeMax.get_PageWidth() - (imgsizeMax.get_MarginLeft()+imgsizeMax.get_MarginRight()),
height:imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop()+imgsizeMax.get_MarginBottom())}; height:imgsizeMax.get_PageHeight() - (imgsizeMax.get_MarginTop()+imgsizeMax.get_MarginBottom())};

View file

@ -128,7 +128,7 @@ define([
for (var i = 0; i <selectedElements.length; i++) { for (var i = 0; i <selectedElements.length; i++) {
var elType = selectedElements[i].get_ObjectType(); var elType = selectedElements[i].get_ObjectType();
var elValue = selectedElements[i].get_ObjectValue(); var elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
//image //image
menu_to_show = me.pictureMenu; menu_to_show = me.pictureMenu;
if (menu_props.imgProps===undefined) if (menu_props.imgProps===undefined)
@ -151,14 +151,14 @@ define([
noobject = false; noobject = false;
if ( (shapeprops===undefined || shapeprops===null) && (chartprops===undefined || chartprops===null) ) // not shape and chart if ( (shapeprops===undefined || shapeprops===null) && (chartprops===undefined || chartprops===null) ) // not shape and chart
break; break;
} else if (c_oAscTypeSelectElement.Table == elType) } else if (Asc.c_oAscTypeSelectElement.Table == elType)
{ {
menu_to_show = me.tableMenu; menu_to_show = me.tableMenu;
menu_props.tableProps = {}; menu_props.tableProps = {};
menu_props.tableProps.value = elValue; menu_props.tableProps.value = elValue;
menu_props.tableProps.locked = (elValue) ? elValue.get_Locked() : false; menu_props.tableProps.locked = (elValue) ? elValue.get_Locked() : false;
noobject = false; noobject = false;
} else if (c_oAscTypeSelectElement.Paragraph == elType) } else if (Asc.c_oAscTypeSelectElement.Paragraph == elType)
{ {
menu_props.paraProps = {}; menu_props.paraProps = {};
menu_props.paraProps.value = elValue; menu_props.paraProps.value = elValue;
@ -167,20 +167,20 @@ define([
menu_props.tableProps===undefined ) menu_props.tableProps===undefined )
menu_to_show = me.textMenu; menu_to_show = me.textMenu;
noobject = false; noobject = false;
} else if (c_oAscTypeSelectElement.Hyperlink == elType) { } else if (Asc.c_oAscTypeSelectElement.Hyperlink == elType) {
if (menu_props.hyperProps) if (menu_props.hyperProps)
menu_props.hyperProps.isSeveralLinks = true; menu_props.hyperProps.isSeveralLinks = true;
else else
menu_props.hyperProps = {}; menu_props.hyperProps = {};
menu_props.hyperProps.value = elValue; menu_props.hyperProps.value = elValue;
} else if (c_oAscTypeSelectElement.Header == elType) { } else if (Asc.c_oAscTypeSelectElement.Header == elType) {
menu_props.headerProps = {}; menu_props.headerProps = {};
menu_props.headerProps.locked = (elValue) ? elValue.get_Locked() : false; menu_props.headerProps.locked = (elValue) ? elValue.get_Locked() : false;
} else if (c_oAscTypeSelectElement.SpellCheck == elType) { } else if (Asc.c_oAscTypeSelectElement.SpellCheck == elType) {
menu_props.spellProps = {}; menu_props.spellProps = {};
menu_props.spellProps.value = elValue; menu_props.spellProps.value = elValue;
me._currentSpellObj = elValue; me._currentSpellObj = elValue;
} else if (c_oAscTypeSelectElement.Math == elType) { } else if (Asc.c_oAscTypeSelectElement.Math == elType) {
menu_props.mathProps = {}; menu_props.mathProps = {};
menu_props.mathProps.value = elValue; menu_props.mathProps.value = elValue;
me._currentMathObj = elValue; me._currentMathObj = elValue;
@ -571,7 +571,7 @@ define([
handler: handlerDlg handler: handlerDlg
}); });
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
props.put_Text(text); props.put_Text(text);
win.show(); win.show();
@ -580,7 +580,7 @@ define([
var selectedElements = me.api.getSelectedElements(); var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(el, i) { _.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(); props = selectedElements[i].get_ObjectValue();
}); });
} }
@ -640,7 +640,7 @@ define([
var props; var props;
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
for (var i = 0; i <selectedElements.length; i++) { for (var i = 0; i <selectedElements.length; i++) {
if ( selectedElements[i].get_ObjectType() == c_oAscTypeSelectElement.SpellCheck) { if ( selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.SpellCheck) {
props = selectedElements[i].get_ObjectValue(); props = selectedElements[i].get_ObjectValue();
me._currentSpellObj = props; me._currentSpellObj = props;
break; break;
@ -742,7 +742,7 @@ define([
mnu, arr = []; mnu, arr = [];
switch (type) { switch (type) {
case c_oAscMathInterfaceType.Accent: case Asc.c_oAscMathInterfaceType.Accent:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtRemoveAccentChar, caption : me.txtRemoveAccentChar,
equation : true, equation : true,
@ -751,7 +751,7 @@ define([
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.BorderBox: case Asc.c_oAscMathInterfaceType.BorderBox:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtBorderProps, caption : me.txtBorderProps,
equation : true, equation : true,
@ -796,7 +796,7 @@ define([
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.Bar: case Asc.c_oAscMathInterfaceType.Bar:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtRemoveBar, caption : me.txtRemoveBar,
equation : true, equation : true,
@ -805,116 +805,116 @@ define([
}); });
arr.push(mnu); arr.push(mnu);
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : (value.get_Pos()==c_oAscMathInterfaceBarPos.Top) ? me.txtUnderbar : me.txtOverbar, caption : (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? me.txtUnderbar : me.txtOverbar,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==c_oAscMathInterfaceBarPos.Top) ? c_oAscMathInterfaceBarPos.Bottom : c_oAscMathInterfaceBarPos.Top} equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? Asc.c_oAscMathInterfaceBarPos.Bottom : Asc.c_oAscMathInterfaceBarPos.Top}
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.Script: case Asc.c_oAscMathInterfaceType.Script:
var scripttype = value.get_ScriptType(); var scripttype = value.get_ScriptType();
if (scripttype == c_oAscMathInterfaceScript.PreSubSup) { if (scripttype == Asc.c_oAscMathInterfaceScript.PreSubSup) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtScriptsAfter, caption : me.txtScriptsAfter,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: c_oAscMathInterfaceScript.SubSup} equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.SubSup}
}); });
arr.push(mnu); arr.push(mnu);
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtRemScripts, caption : me.txtRemScripts,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: c_oAscMathInterfaceScript.None} equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.None}
}); });
arr.push(mnu); arr.push(mnu);
} else { } else {
if (scripttype == c_oAscMathInterfaceScript.SubSup) { if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtScriptsBefore, caption : me.txtScriptsBefore,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: c_oAscMathInterfaceScript.PreSubSup} equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.PreSubSup}
}); });
arr.push(mnu); arr.push(mnu);
} }
if (scripttype == c_oAscMathInterfaceScript.SubSup || scripttype == c_oAscMathInterfaceScript.Sub ) { if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sub ) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtRemSubscript, caption : me.txtRemSubscript,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == c_oAscMathInterfaceScript.SubSup) ? c_oAscMathInterfaceScript.Sup : c_oAscMathInterfaceScript.None } equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sup : Asc.c_oAscMathInterfaceScript.None }
}); });
arr.push(mnu); arr.push(mnu);
} }
if (scripttype == c_oAscMathInterfaceScript.SubSup || scripttype == c_oAscMathInterfaceScript.Sup ) { if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sup ) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtRemSuperscript, caption : me.txtRemSuperscript,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == c_oAscMathInterfaceScript.SubSup) ? c_oAscMathInterfaceScript.Sub : c_oAscMathInterfaceScript.None } equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sub : Asc.c_oAscMathInterfaceScript.None }
}); });
arr.push(mnu); arr.push(mnu);
} }
} }
break; break;
case c_oAscMathInterfaceType.Fraction: case Asc.c_oAscMathInterfaceType.Fraction:
var fraction = value.get_FractionType(); var fraction = value.get_FractionType();
if (fraction==c_oAscMathInterfaceFraction.Skewed || fraction==c_oAscMathInterfaceFraction.Linear) { if (fraction==Asc.c_oAscMathInterfaceFraction.Skewed || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtFractionStacked, caption : me.txtFractionStacked,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: c_oAscMathInterfaceFraction.Bar} equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Bar}
}); });
arr.push(mnu); arr.push(mnu);
} }
if (fraction==c_oAscMathInterfaceFraction.Bar || fraction==c_oAscMathInterfaceFraction.Linear) { if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtFractionSkewed, caption : me.txtFractionSkewed,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: c_oAscMathInterfaceFraction.Skewed} equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Skewed}
}); });
arr.push(mnu); arr.push(mnu);
} }
if (fraction==c_oAscMathInterfaceFraction.Bar || fraction==c_oAscMathInterfaceFraction.Skewed) { if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Skewed) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtFractionLinear, caption : me.txtFractionLinear,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: c_oAscMathInterfaceFraction.Linear} equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Linear}
}); });
arr.push(mnu); arr.push(mnu);
} }
if (fraction==c_oAscMathInterfaceFraction.Bar || fraction==c_oAscMathInterfaceFraction.NoBar) { if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.NoBar) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : (fraction==c_oAscMathInterfaceFraction.Bar) ? me.txtRemFractionBar : me.txtAddFractionBar, caption : (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? me.txtRemFractionBar : me.txtAddFractionBar,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_FractionType', value: (fraction==c_oAscMathInterfaceFraction.Bar) ? c_oAscMathInterfaceFraction.NoBar : c_oAscMathInterfaceFraction.Bar} equationProps: {type: type, callback: 'put_FractionType', value: (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? Asc.c_oAscMathInterfaceFraction.NoBar : Asc.c_oAscMathInterfaceFraction.Bar}
}); });
arr.push(mnu); arr.push(mnu);
} }
break; break;
case c_oAscMathInterfaceType.Limit: case Asc.c_oAscMathInterfaceType.Limit:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : (value.get_Pos()==c_oAscMathInterfaceLimitPos.Top) ? me.txtLimitUnder : me.txtLimitOver, caption : (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? me.txtLimitUnder : me.txtLimitOver,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==c_oAscMathInterfaceLimitPos.Top) ? c_oAscMathInterfaceLimitPos.Bottom : c_oAscMathInterfaceLimitPos.Top} equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? Asc.c_oAscMathInterfaceLimitPos.Bottom : Asc.c_oAscMathInterfaceLimitPos.Top}
}); });
arr.push(mnu); arr.push(mnu);
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtRemLimit, caption : me.txtRemLimit,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: c_oAscMathInterfaceLimitPos.None} equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceLimitPos.None}
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.Matrix: case Asc.c_oAscMathInterfaceType.Matrix:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : value.get_HidePlaceholder() ? me.txtShowPlaceholder : me.txtHidePlaceholder, caption : value.get_HidePlaceholder() ? me.txtShowPlaceholder : me.txtHidePlaceholder,
equation : true, equation : true,
@ -978,20 +978,20 @@ define([
{ {
caption: me.txtTop, caption: me.txtTop,
checkable : true, checkable : true,
checked : (value.get_MatrixAlign()==c_oAscMathInterfaceMatrixMatrixAlign.Top), checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top),
equationProps: {type: type, callback: 'put_MatrixAlign', value: c_oAscMathInterfaceMatrixMatrixAlign.Top} equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top}
}, },
{ {
caption: me.centerText, caption: me.centerText,
checkable : true, checkable : true,
checked : (value.get_MatrixAlign()==c_oAscMathInterfaceMatrixMatrixAlign.Center), checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center),
equationProps: {type: type, callback: 'put_MatrixAlign', value: c_oAscMathInterfaceMatrixMatrixAlign.Center} equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center}
}, },
{ {
caption: me.txtBottom, caption: me.txtBottom,
checkable : true, checkable : true,
checked : (value.get_MatrixAlign()==c_oAscMathInterfaceMatrixMatrixAlign.Bottom), checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom),
equationProps: {type: type, callback: 'put_MatrixAlign', value: c_oAscMathInterfaceMatrixMatrixAlign.Bottom} equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom}
} }
] ]
}) })
@ -1007,27 +1007,27 @@ define([
{ {
caption: me.leftText, caption: me.leftText,
checkable : true, checkable : true,
checked : (value.get_ColumnAlign()==c_oAscMathInterfaceMatrixColumnAlign.Left), checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Left),
equationProps: {type: type, callback: 'put_ColumnAlign', value: c_oAscMathInterfaceMatrixColumnAlign.Left} equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Left}
}, },
{ {
caption: me.centerText, caption: me.centerText,
checkable : true, checkable : true,
checked : (value.get_ColumnAlign()==c_oAscMathInterfaceMatrixColumnAlign.Center), checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Center),
equationProps: {type: type, callback: 'put_ColumnAlign', value: c_oAscMathInterfaceMatrixColumnAlign.Center} equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Center}
}, },
{ {
caption: me.rightText, caption: me.rightText,
checkable : true, checkable : true,
checked : (value.get_ColumnAlign()==c_oAscMathInterfaceMatrixColumnAlign.Right), checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Right),
equationProps: {type: type, callback: 'put_ColumnAlign', value: c_oAscMathInterfaceMatrixColumnAlign.Right} equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Right}
} }
] ]
}) })
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.EqArray: case Asc.c_oAscMathInterfaceType.EqArray:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtInsertEqBefore, caption : me.txtInsertEqBefore,
equation : true, equation : true,
@ -1059,32 +1059,32 @@ define([
{ {
caption: me.txtTop, caption: me.txtTop,
checkable : true, checkable : true,
checked : (value.get_Align()==c_oAscMathInterfaceEqArrayAlign.Top), checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Top),
equationProps: {type: type, callback: 'put_Align', value: c_oAscMathInterfaceEqArrayAlign.Top} equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Top}
}, },
{ {
caption: me.centerText, caption: me.centerText,
checkable : true, checkable : true,
checked : (value.get_Align()==c_oAscMathInterfaceEqArrayAlign.Center), checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Center),
equationProps: {type: type, callback: 'put_Align', value: c_oAscMathInterfaceEqArrayAlign.Center} equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Center}
}, },
{ {
caption: me.txtBottom, caption: me.txtBottom,
checkable : true, checkable : true,
checked : (value.get_Align()==c_oAscMathInterfaceEqArrayAlign.Bottom), checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Bottom),
equationProps: {type: type, callback: 'put_Align', value: c_oAscMathInterfaceEqArrayAlign.Bottom} equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Bottom}
} }
] ]
}) })
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.LargeOperator: case Asc.c_oAscMathInterfaceType.LargeOperator:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtLimitChange, caption : me.txtLimitChange,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_LimitLocation', value: (value.get_LimitLocation() == c_oAscMathInterfaceNaryLimitLocation.UndOvr) ? c_oAscMathInterfaceNaryLimitLocation.SubSup : c_oAscMathInterfaceNaryLimitLocation.UndOvr} equationProps: {type: type, callback: 'put_LimitLocation', value: (value.get_LimitLocation() == Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr) ? Asc.c_oAscMathInterfaceNaryLimitLocation.SubSup : Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr}
}); });
arr.push(mnu); arr.push(mnu);
if (value.get_HideUpper() !== undefined) { if (value.get_HideUpper() !== undefined) {
@ -1106,7 +1106,7 @@ define([
arr.push(mnu); arr.push(mnu);
} }
break; break;
case c_oAscMathInterfaceType.Delimiter: case Asc.c_oAscMathInterfaceType.Delimiter:
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtInsertArgBefore, caption : me.txtInsertArgBefore,
equation : true, equation : true,
@ -1170,25 +1170,25 @@ define([
}); });
arr.push(mnu); arr.push(mnu);
break; break;
case c_oAscMathInterfaceType.GroupChar: case Asc.c_oAscMathInterfaceType.GroupChar:
if (value.can_ChangePos()) { if (value.can_ChangePos()) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : (value.get_Pos()==c_oAscMathInterfaceGroupCharPos.Top) ? me.txtGroupCharUnder : me.txtGroupCharOver, caption : (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? me.txtGroupCharUnder : me.txtGroupCharOver,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==c_oAscMathInterfaceGroupCharPos.Top) ? c_oAscMathInterfaceGroupCharPos.Bottom : c_oAscMathInterfaceGroupCharPos.Top} equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? Asc.c_oAscMathInterfaceGroupCharPos.Bottom : Asc.c_oAscMathInterfaceGroupCharPos.Top}
}); });
arr.push(mnu); arr.push(mnu);
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : me.txtDeleteGroupChar, caption : me.txtDeleteGroupChar,
equation : true, equation : true,
disabled : me._currentParaObjDisabled, disabled : me._currentParaObjDisabled,
equationProps: {type: type, callback: 'put_Pos', value: c_oAscMathInterfaceGroupCharPos.None} equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceGroupCharPos.None}
}); });
arr.push(mnu); arr.push(mnu);
} }
break; break;
case c_oAscMathInterfaceType.Radical: case Asc.c_oAscMathInterfaceType.Radical:
if (value.get_HideDegree() !== undefined) { if (value.get_HideDegree() !== undefined) {
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
caption : value.get_HideDegree() ? me.txtShowDegree : me.txtHideDegree, caption : value.get_HideDegree() ? me.txtShowDegree : me.txtHideDegree,
@ -1301,46 +1301,46 @@ define([
if (eqProps) { if (eqProps) {
var eqObj; var eqObj;
switch (eqProps.type) { switch (eqProps.type) {
case c_oAscMathInterfaceType.Accent: case Asc.c_oAscMathInterfaceType.Accent:
eqObj = new CMathMenuAccent(); eqObj = new CMathMenuAccent();
break; break;
case c_oAscMathInterfaceType.BorderBox: case Asc.c_oAscMathInterfaceType.BorderBox:
eqObj = new CMathMenuBorderBox(); eqObj = new CMathMenuBorderBox();
break; break;
case c_oAscMathInterfaceType.Box: case Asc.c_oAscMathInterfaceType.Box:
eqObj = new CMathMenuBox(); eqObj = new CMathMenuBox();
break; break;
case c_oAscMathInterfaceType.Bar: case Asc.c_oAscMathInterfaceType.Bar:
eqObj = new CMathMenuBar(); eqObj = new CMathMenuBar();
break; break;
case c_oAscMathInterfaceType.Script: case Asc.c_oAscMathInterfaceType.Script:
eqObj = new CMathMenuScript(); eqObj = new CMathMenuScript();
break; break;
case c_oAscMathInterfaceType.Fraction: case Asc.c_oAscMathInterfaceType.Fraction:
eqObj = new CMathMenuFraction(); eqObj = new CMathMenuFraction();
break; break;
case c_oAscMathInterfaceType.Limit: case Asc.c_oAscMathInterfaceType.Limit:
eqObj = new CMathMenuLimit(); eqObj = new CMathMenuLimit();
break; break;
case c_oAscMathInterfaceType.Matrix: case Asc.c_oAscMathInterfaceType.Matrix:
eqObj = new CMathMenuMatrix(); eqObj = new CMathMenuMatrix();
break; break;
case c_oAscMathInterfaceType.EqArray: case Asc.c_oAscMathInterfaceType.EqArray:
eqObj = new CMathMenuEqArray(); eqObj = new CMathMenuEqArray();
break; break;
case c_oAscMathInterfaceType.LargeOperator: case Asc.c_oAscMathInterfaceType.LargeOperator:
eqObj = new CMathMenuNary(); eqObj = new CMathMenuNary();
break; break;
case c_oAscMathInterfaceType.Delimiter: case Asc.c_oAscMathInterfaceType.Delimiter:
eqObj = new CMathMenuDelimiter(); eqObj = new CMathMenuDelimiter();
break; break;
case c_oAscMathInterfaceType.GroupChar: case Asc.c_oAscMathInterfaceType.GroupChar:
eqObj = new CMathMenuGroupCharacter(); eqObj = new CMathMenuGroupCharacter();
break; break;
case c_oAscMathInterfaceType.Radical: case Asc.c_oAscMathInterfaceType.Radical:
eqObj = new CMathMenuRadical(); eqObj = new CMathMenuRadical();
break; break;
case c_oAscMathInterfaceType.Common: case Asc.c_oAscMathInterfaceType.Common:
eqObj = new CMathMenuBase(); eqObj = new CMathMenuBase();
break; break;
} }
@ -1450,25 +1450,25 @@ define([
onImgWrapStyleChanged: function(type){ onImgWrapStyleChanged: function(type){
switch (type) { switch (type) {
case c_oAscWrapStyle2.Inline: case Asc.c_oAscWrapStyle2.Inline:
this.menuImageWrap.menu.items[0].setChecked(true); this.menuImageWrap.menu.items[0].setChecked(true);
break; break;
case c_oAscWrapStyle2.Square: case Asc.c_oAscWrapStyle2.Square:
this.menuImageWrap.menu.items[1].setChecked(true); this.menuImageWrap.menu.items[1].setChecked(true);
break; break;
case c_oAscWrapStyle2.Tight: case Asc.c_oAscWrapStyle2.Tight:
this.menuImageWrap.menu.items[2].setChecked(true); this.menuImageWrap.menu.items[2].setChecked(true);
break; break;
case c_oAscWrapStyle2.Through: case Asc.c_oAscWrapStyle2.Through:
this.menuImageWrap.menu.items[3].setChecked(true); this.menuImageWrap.menu.items[3].setChecked(true);
break; break;
case c_oAscWrapStyle2.TopAndBottom: case Asc.c_oAscWrapStyle2.TopAndBottom:
this.menuImageWrap.menu.items[4].setChecked(true); this.menuImageWrap.menu.items[4].setChecked(true);
break; break;
case c_oAscWrapStyle2.Behind: case Asc.c_oAscWrapStyle2.Behind:
this.menuImageWrap.menu.items[6].setChecked(true); this.menuImageWrap.menu.items[6].setChecked(true);
break; break;
case c_oAscWrapStyle2.InFront: case Asc.c_oAscWrapStyle2.InFront:
this.menuImageWrap.menu.items[5].setChecked(true); this.menuImageWrap.menu.items[5].setChecked(true);
break; break;
} }
@ -1489,8 +1489,8 @@ define([
var elType, elValue; var elType, elValue;
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) { if (Asc.c_oAscTypeSelectElement.Table == elType) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_TableWrap(wrap); properties.put_TableWrap(wrap);
if (wrap == c_tableWrap.TABLE_WRAP_NONE) { if (wrap == c_tableWrap.TABLE_WRAP_NONE) {
properties.put_TableAlignment(align); properties.put_TableAlignment(align);
@ -1513,7 +1513,7 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
win = new DE.Views.ParagraphSettingsAdvanced({ win = new DE.Views.ParagraphSettingsAdvanced({
tableStylerRows : 2, tableStylerRows : 2,
tableStylerColumns : 1, tableStylerColumns : 1,
@ -1551,7 +1551,7 @@ define([
var elType, elValue; var elType, elValue;
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); // заменить на свойства рамки elValue = selectedElements[i].get_ObjectValue(); // заменить на свойства рамки
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
win = new DE.Views.DropcapSettingsAdvanced({ win = new DE.Views.DropcapSettingsAdvanced({
tableStylerRows : 2, tableStylerRows : 2,
tableStylerColumns : 1, tableStylerColumns : 1,
@ -1699,15 +1699,15 @@ define([
if (me.api) { if (me.api) {
var properties = new CImgProperty(); var properties = new CImgProperty();
if (!_.isUndefined(item.options.halign)) { if (!_.isUndefined(item.options.halign)) {
properties.put_PositionH(new CImagePositionH()); properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(true); properties.get_PositionH().put_UseAlign(true);
properties.get_PositionH().put_Align(item.options.halign); properties.get_PositionH().put_Align(item.options.halign);
properties.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Margin); properties.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Margin);
} else { } else {
properties.put_PositionV(new CImagePositionV()); properties.put_PositionV(new Asc.CImagePositionV());
properties.get_PositionV().put_UseAlign(true); properties.get_PositionV().put_UseAlign(true);
properties.get_PositionV().put_Align(item.options.valign); properties.get_PositionV().put_Align(item.options.valign);
properties.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Margin); properties.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Margin);
} }
me.api.ImgApply(properties); me.api.ImgApply(properties);
} }
@ -1720,32 +1720,32 @@ define([
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignLeft, caption : me.textShapeAlignLeft,
iconCls : 'mnu-img-align-left', iconCls : 'mnu-img-align-left',
halign : c_oAscAlignH.Left halign : Asc.c_oAscAlignH.Left
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignCenter, caption : me.textShapeAlignCenter,
iconCls : 'mnu-img-align-center', iconCls : 'mnu-img-align-center',
halign : c_oAscAlignH.Center halign : Asc.c_oAscAlignH.Center
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignRight, caption : me.textShapeAlignRight,
iconCls : 'mnu-img-align-right', iconCls : 'mnu-img-align-right',
halign : c_oAscAlignH.Right halign : Asc.c_oAscAlignH.Right
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignTop, caption : me.textShapeAlignTop,
iconCls : 'mnu-img-align-top', iconCls : 'mnu-img-align-top',
valign : c_oAscAlignV.Top valign : Asc.c_oAscAlignV.Top
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignMiddle, caption : me.textShapeAlignMiddle,
iconCls : 'mnu-img-align-middle', iconCls : 'mnu-img-align-middle',
valign : c_oAscAlignV.Center valign : Asc.c_oAscAlignV.Center
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignBottom, caption : me.textShapeAlignBottom,
iconCls : 'mnu-img-align-bottom', iconCls : 'mnu-img-align-bottom',
valign : c_oAscAlignV.Bottom valign : Asc.c_oAscAlignV.Bottom
}).on('click', onItemClick) }).on('click', onItemClick)
] ]
}) })
@ -1795,22 +1795,22 @@ define([
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textArrangeFront, caption : me.textArrangeFront,
iconCls : 'mnu-arrange-front', iconCls : 'mnu-arrange-front',
valign : c_oAscChangeLevel.BringToFront valign : Asc.c_oAscChangeLevel.BringToFront
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textArrangeBack, caption : me.textArrangeBack,
iconCls : 'mnu-arrange-back', iconCls : 'mnu-arrange-back',
valign : c_oAscChangeLevel.SendToBack valign : Asc.c_oAscChangeLevel.SendToBack
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textArrangeForward, caption : me.textArrangeForward,
iconCls : 'mnu-arrange-forward', iconCls : 'mnu-arrange-forward',
valign : c_oAscChangeLevel.BringForward valign : Asc.c_oAscChangeLevel.BringForward
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textArrangeBackward, caption : me.textArrangeBackward,
iconCls : 'mnu-arrange-backward', iconCls : 'mnu-arrange-backward',
valign : c_oAscChangeLevel.BringBackward valign : Asc.c_oAscChangeLevel.BringBackward
}).on('click', onItemClick), }).on('click', onItemClick),
{ caption: '--' }, { caption: '--' },
mnuGroup, mnuGroup,
@ -1838,17 +1838,17 @@ define([
var properties = new CImgProperty(); var properties = new CImgProperty();
properties.put_WrappingStyle(item.options.wrapType); properties.put_WrappingStyle(item.options.wrapType);
if (me.menuImageWrap._originalProps.get_WrappingStyle() === c_oAscWrapStyle2.Inline && item.wrapType !== c_oAscWrapStyle2.Inline ) { if (me.menuImageWrap._originalProps.get_WrappingStyle() === Asc.c_oAscWrapStyle2.Inline && item.wrapType !== Asc.c_oAscWrapStyle2.Inline ) {
properties.put_PositionH(new CImagePositionH()); properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(false); properties.get_PositionH().put_UseAlign(false);
properties.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column); properties.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = me.menuImageWrap._originalProps.get_Value_X(c_oAscRelativeFromH.Column); var val = me.menuImageWrap._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
properties.get_PositionH().put_Value(val); properties.get_PositionH().put_Value(val);
properties.put_PositionV(new CImagePositionV()); properties.put_PositionV(new Asc.CImagePositionV());
properties.get_PositionV().put_UseAlign(false); properties.get_PositionV().put_UseAlign(false);
properties.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph); properties.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = me.menuImageWrap._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph); val = me.menuImageWrap._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
properties.get_PositionV().put_Value(val); properties.get_PositionV().put_Value(val);
} }
me.api.ImgApply(properties); me.api.ImgApply(properties);
@ -1864,49 +1864,49 @@ define([
caption : me.txtInline, caption : me.txtInline,
iconCls : 'mnu-wrap-inline', iconCls : 'mnu-wrap-inline',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Inline, wrapType : Asc.c_oAscWrapStyle2.Inline,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.txtSquare, caption : me.txtSquare,
iconCls : 'mnu-wrap-square', iconCls : 'mnu-wrap-square',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Square, wrapType : Asc.c_oAscWrapStyle2.Square,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.txtTight, caption : me.txtTight,
iconCls : 'mnu-wrap-tight', iconCls : 'mnu-wrap-tight',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Tight, wrapType : Asc.c_oAscWrapStyle2.Tight,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.txtThrough, caption : me.txtThrough,
iconCls : 'mnu-wrap-through', iconCls : 'mnu-wrap-through',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Through, wrapType : Asc.c_oAscWrapStyle2.Through,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.txtTopAndBottom, caption : me.txtTopAndBottom,
iconCls : 'mnu-wrap-topAndBottom', iconCls : 'mnu-wrap-topAndBottom',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.TopAndBottom, wrapType : Asc.c_oAscWrapStyle2.TopAndBottom,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.txtInFront, caption : me.txtInFront,
iconCls : 'mnu-wrap-inFront', iconCls : 'mnu-wrap-inFront',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.InFront, wrapType : Asc.c_oAscWrapStyle2.InFront,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.txtBehind, caption : me.txtBehind,
iconCls : 'mnu-wrap-behind', iconCls : 'mnu-wrap-behind',
toggleGroup : 'popuppicturewrapping', toggleGroup : 'popuppicturewrapping',
wrapType : c_oAscWrapStyle2.Behind, wrapType : Asc.c_oAscWrapStyle2.Behind,
checkable : true checkable : true
}).on('click', onItemClick), }).on('click', onItemClick),
{ caption: '--' }, { caption: '--' },
@ -1929,7 +1929,7 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal; var imgsizeOriginal;
if ( !elValue.get_ChartProperties() && !elValue.get_ShapeProperties() && !me.menuOriginalSize.isDisabled() && me.menuOriginalSize.isVisible()) { if ( !elValue.get_ChartProperties() && !elValue.get_ShapeProperties() && !me.menuOriginalSize.isDisabled() && me.menuOriginalSize.isVisible()) {
imgsizeOriginal = me.api.get_OriginalSizeImage(); imgsizeOriginal = me.api.get_OriginalSizeImage();
@ -2017,25 +2017,25 @@ define([
} }
} else { } else {
switch (wrapping) { switch (wrapping) {
case c_oAscWrapStyle2.Inline: case Asc.c_oAscWrapStyle2.Inline:
me.menuImageWrap.menu.items[0].setChecked(true); me.menuImageWrap.menu.items[0].setChecked(true);
break; break;
case c_oAscWrapStyle2.Square: case Asc.c_oAscWrapStyle2.Square:
me.menuImageWrap.menu.items[1].setChecked(true); me.menuImageWrap.menu.items[1].setChecked(true);
break; break;
case c_oAscWrapStyle2.Tight: case Asc.c_oAscWrapStyle2.Tight:
me.menuImageWrap.menu.items[2].setChecked(true); me.menuImageWrap.menu.items[2].setChecked(true);
break; break;
case c_oAscWrapStyle2.Through: case Asc.c_oAscWrapStyle2.Through:
me.menuImageWrap.menu.items[3].setChecked(true); me.menuImageWrap.menu.items[3].setChecked(true);
break; break;
case c_oAscWrapStyle2.TopAndBottom: case Asc.c_oAscWrapStyle2.TopAndBottom:
me.menuImageWrap.menu.items[4].setChecked(true); me.menuImageWrap.menu.items[4].setChecked(true);
break; break;
case c_oAscWrapStyle2.Behind: case Asc.c_oAscWrapStyle2.Behind:
me.menuImageWrap.menu.items[6].setChecked(true); me.menuImageWrap.menu.items[6].setChecked(true);
break; break;
case c_oAscWrapStyle2.InFront: case Asc.c_oAscWrapStyle2.InFront:
me.menuImageWrap.menu.items[5].setChecked(true); me.menuImageWrap.menu.items[5].setChecked(true);
break; break;
default: default:
@ -2069,8 +2069,8 @@ define([
me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined); me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined);
menuImageAdvanced.setDisabled(islocked); menuImageAdvanced.setDisabled(islocked);
menuImageAlign.setDisabled( islocked || (wrapping == c_oAscWrapStyle2.Inline) ); menuImageAlign.setDisabled( islocked || (wrapping == Asc.c_oAscWrapStyle2.Inline) );
menuImageArrange.setDisabled( wrapping == c_oAscWrapStyle2.Inline ); menuImageArrange.setDisabled( wrapping == Asc.c_oAscWrapStyle2.Inline );
if (me.api) { if (me.api) {
mnuUnGroup.setDisabled(islocked || !me.api.CanUnGroup()); mnuUnGroup.setDisabled(islocked || !me.api.CanUnGroup());
@ -2179,7 +2179,7 @@ define([
var tableCellsVAlign = function(item, e) { var tableCellsVAlign = function(item, e) {
if (me.api) { if (me.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.options.valign); properties.put_CellsVAlign(item.options.valign);
me.api.tblApply(properties); me.api.tblApply(properties);
} }
@ -2195,21 +2195,21 @@ define([
toggleGroup : 'popuptablecellalign', toggleGroup : 'popuptablecellalign',
checkable : true, checkable : true,
checked : false, checked : false,
valign : c_oAscVertAlignJc.Top valign : Asc.c_oAscVertAlignJc.Top
}).on('click', _.bind(tableCellsVAlign, me)), }).on('click', _.bind(tableCellsVAlign, me)),
me.menuTableCellCenter = new Common.UI.MenuItem({ me.menuTableCellCenter = new Common.UI.MenuItem({
caption : me.centerCellText, caption : me.centerCellText,
toggleGroup : 'popuptablecellalign', toggleGroup : 'popuptablecellalign',
checkable : true, checkable : true,
checked : false, checked : false,
valign : c_oAscVertAlignJc.Center valign : Asc.c_oAscVertAlignJc.Center
}).on('click', _.bind(tableCellsVAlign, me)), }).on('click', _.bind(tableCellsVAlign, me)),
me.menuTableCellBottom = new Common.UI.MenuItem({ me.menuTableCellBottom = new Common.UI.MenuItem({
caption : me.bottomCellText, caption : me.bottomCellText,
toggleGroup : 'popuptablecellalign', toggleGroup : 'popuptablecellalign',
checkable : true, checkable : true,
checked : false, checked : false,
valign : c_oAscVertAlignJc.Bottom valign : Asc.c_oAscVertAlignJc.Bottom
}).on('click', _.bind(tableCellsVAlign, me)) }).on('click', _.bind(tableCellsVAlign, me))
] ]
}) })
@ -2229,7 +2229,7 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) { if (Asc.c_oAscTypeSelectElement.Table == elType) {
win = new DE.Views.TableSettingsAdvanced({ win = new DE.Views.TableSettingsAdvanced({
tableStylerRows : (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2, tableStylerRows : (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2,
tableStylerColumns : (elValue.get_CellBorders().get_InsideV()===null && elValue.get_CellSelect()==true) ? 1 : 2, tableStylerColumns : (elValue.get_CellBorders().get_InsideV()===null && elValue.get_CellSelect()==true) ? 1 : 2,
@ -2401,7 +2401,7 @@ define([
var tableDirection = function(item, e) { var tableDirection = function(item, e) {
if (me.api) { if (me.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellsTextDirection(item.options.direction); properties.put_CellsTextDirection(item.options.direction);
me.api.tblApply(properties); me.api.tblApply(properties);
} }
@ -2419,7 +2419,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popuptabledirect', toggleGroup : 'popuptabledirect',
direction : c_oAscCellTextDirection.LRTB direction : Asc.c_oAscCellTextDirection.LRTB
}).on('click', _.bind(tableDirection, me)), }).on('click', _.bind(tableDirection, me)),
me.menuTableDirect90 = new Common.UI.MenuItem({ me.menuTableDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text, caption : me.direct90Text,
@ -2427,7 +2427,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popuptabledirect', toggleGroup : 'popuptabledirect',
direction : c_oAscCellTextDirection.TBRL direction : Asc.c_oAscCellTextDirection.TBRL
}).on('click', _.bind(tableDirection, me)), }).on('click', _.bind(tableDirection, me)),
me.menuTableDirect270 = new Common.UI.MenuItem({ me.menuTableDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text, caption : me.direct270Text,
@ -2435,7 +2435,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popuptabledirect', toggleGroup : 'popuptabledirect',
direction : c_oAscCellTextDirection.BTLR direction : Asc.c_oAscCellTextDirection.BTLR
}).on('click', _.bind(tableDirection, me)) }).on('click', _.bind(tableDirection, me))
] ]
}) })
@ -2454,9 +2454,9 @@ define([
} }
var align = value.tableProps.value.get_CellsVAlign(); var align = value.tableProps.value.get_CellsVAlign();
me.menuTableCellTop.setChecked(align == c_oAscVertAlignJc.Top); me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == c_oAscVertAlignJc.Center); me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == c_oAscVertAlignJc.Bottom); me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
var flow = (value.tableProps.value.get_TableWrap() == c_tableWrap.TABLE_WRAP_PARALLEL); var flow = (value.tableProps.value.get_TableWrap() == c_tableWrap.TABLE_WRAP_PARALLEL);
(flow) ? menuTableWrapFlow.setChecked(true) : menuTableWrapInline.setChecked(true); (flow) ? menuTableWrapFlow.setChecked(true) : menuTableWrapInline.setChecked(true);
@ -2467,9 +2467,9 @@ define([
me.menuTableAlignRight.setChecked((flow) ? false : (align === c_tableAlign.TABLE_ALIGN_RIGHT)); me.menuTableAlignRight.setChecked((flow) ? false : (align === c_tableAlign.TABLE_ALIGN_RIGHT));
var dir = value.tableProps.value.get_CellsTextDirection(); var dir = value.tableProps.value.get_CellsTextDirection();
me.menuTableDirectH.setChecked(dir == c_oAscCellTextDirection.LRTB); me.menuTableDirectH.setChecked(dir == Asc.c_oAscCellTextDirection.LRTB);
me.menuTableDirect90.setChecked(dir == c_oAscCellTextDirection.TBRL); me.menuTableDirect90.setChecked(dir == Asc.c_oAscCellTextDirection.TBRL);
me.menuTableDirect270.setChecked(dir == c_oAscCellTextDirection.BTLR); me.menuTableDirect270.setChecked(dir == Asc.c_oAscCellTextDirection.BTLR);
var disabled = value.tableProps.locked || (value.headerProps!==undefined && value.headerProps.locked); var disabled = value.tableProps.locked || (value.headerProps!==undefined && value.headerProps.locked);
me.tableMenu.items[8].setDisabled(disabled); me.tableMenu.items[8].setDisabled(disabled);
@ -2505,7 +2505,7 @@ define([
if (text!==false) { if (text!==false) {
menuAddHyperlinkTable.hyperProps = {}; menuAddHyperlinkTable.hyperProps = {};
menuAddHyperlinkTable.hyperProps.value = new CHyperlinkProperty(); menuAddHyperlinkTable.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkTable.hyperProps.value.put_Text(text); menuAddHyperlinkTable.hyperProps.value.put_Text(text);
} }
/** coauthoring begin **/ /** coauthoring begin **/
@ -2706,21 +2706,21 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
valign : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}).on('click', _.bind(paragraphVAlign, me)), }).on('click', _.bind(paragraphVAlign, me)),
me.menuParagraphCenter = new Common.UI.MenuItem({ me.menuParagraphCenter = new Common.UI.MenuItem({
caption : me.centerCellText, caption : me.centerCellText,
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
valign : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
}).on('click', _.bind(paragraphVAlign, me)), }).on('click', _.bind(paragraphVAlign, me)),
me.menuParagraphBottom = new Common.UI.MenuItem({ me.menuParagraphBottom = new Common.UI.MenuItem({
caption : me.bottomCellText, caption : me.bottomCellText,
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
valign : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
}).on('click', _.bind(paragraphVAlign, me)) }).on('click', _.bind(paragraphVAlign, me))
] ]
}) })
@ -2746,7 +2746,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.normal direction : Asc.c_oAscVertDrawingText.normal
}).on('click', _.bind(paragraphDirection, me)), }).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect90 = new Common.UI.MenuItem({ me.menuParagraphDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text, caption : me.direct90Text,
@ -2754,7 +2754,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert direction : Asc.c_oAscVertDrawingText.vert
}).on('click', _.bind(paragraphDirection, me)), }).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect270 = new Common.UI.MenuItem({ me.menuParagraphDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text, caption : me.direct270Text,
@ -2762,7 +2762,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert270 direction : Asc.c_oAscVertDrawingText.vert270
}).on('click', _.bind(paragraphDirection, me)) }).on('click', _.bind(paragraphDirection, me))
] ]
}) })
@ -2925,14 +2925,14 @@ define([
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !! menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if ( isInShape || isInChart ) { if ( isInShape || isInChart ) {
var align = value.imgProps.value.get_VerticalTextAlign(); var align = value.imgProps.value.get_VerticalTextAlign();
me.menuParagraphTop.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_TOP); me.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
me.menuParagraphCenter.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_CTR); me.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
me.menuParagraphBottom.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM); me.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
var dir = value.imgProps.value.get_Vert(); var dir = value.imgProps.value.get_Vert();
me.menuParagraphDirectH.setChecked(dir == c_oAscVertDrawingText.normal); me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == c_oAscVertDrawingText.vert); me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == c_oAscVertDrawingText.vert270); me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
} }
menuParagraphAdvanced.isChart = (value.imgProps && value.imgProps.isChart); menuParagraphAdvanced.isChart = (value.imgProps && value.imgProps.isChart);
menuParagraphBreakBefore.setVisible(!isInShape && !isInChart && !isEquation); menuParagraphBreakBefore.setVisible(!isInShape && !isInChart && !isEquation);
@ -2958,7 +2958,7 @@ define([
menuEditHyperlinkPara.hyperProps = value.hyperProps; menuEditHyperlinkPara.hyperProps = value.hyperProps;
if (text!==false) { if (text!==false) {
menuAddHyperlinkPara.hyperProps = {}; menuAddHyperlinkPara.hyperProps = {};
menuAddHyperlinkPara.hyperProps.value = new CHyperlinkProperty(); menuAddHyperlinkPara.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkPara.hyperProps.value.put_Text(text); menuAddHyperlinkPara.hyperProps.value.put_Text(text);
} }
var disabled = value.paraProps.locked || (value.headerProps!==undefined && value.headerProps.locked); var disabled = value.paraProps.locked || (value.headerProps!==undefined && value.headerProps.locked);

View file

@ -247,9 +247,9 @@ define([
me._changedProps.put_Shade(new CParagraphShd()); me._changedProps.put_Shade(new CParagraphShd());
} }
if (color=='transparent') { if (color=='transparent') {
me._changedProps.get_Shade().put_Value(shd_Nil); me._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
} else { } else {
me._changedProps.get_Shade().put_Value(shd_Clear); me._changedProps.get_Shade().put_Value(Asc.c_oAscShdClear);
me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color)); me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color));
} }
} }
@ -342,8 +342,8 @@ define([
}) })
.on('toggle', _.bind(function(btn, pressed) { .on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) { if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.None); me._DisableElem(Asc.c_oAscDropCap.None);
me._changedProps.put_DropCap(c_oAscDropCap.None); me._changedProps.put_DropCap(Asc.c_oAscDropCap.None);
} }
}, me)); }, me));
@ -357,8 +357,8 @@ define([
}) })
.on('toggle', _.bind(function(btn, pressed) { .on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) { if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.Drop); me._DisableElem(Asc.c_oAscDropCap.Drop);
me._changedProps.put_DropCap(c_oAscDropCap.Drop); me._changedProps.put_DropCap(Asc.c_oAscDropCap.Drop);
} }
}, me)); }, me));
@ -372,8 +372,8 @@ define([
}) })
.on('toggle', _.bind(function(btn, pressed) { .on('toggle', _.bind(function(btn, pressed) {
if (me._changedProps && pressed) { if (me._changedProps && pressed) {
me._DisableElem(c_oAscDropCap.Margin); me._DisableElem(Asc.c_oAscDropCap.Margin);
me._changedProps.put_DropCap(c_oAscDropCap.Margin); me._changedProps.put_DropCap(Asc.c_oAscDropCap.Margin);
} }
}, me)); }, me));
@ -591,9 +591,9 @@ define([
}, me)); }, me));
this._arrHAlign = [ this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscXAlign.Left}, {displayValue: this.textLeft, value: Asc.c_oAscXAlign.Left},
{displayValue: this.textCenter, value: c_oAscXAlign.Center}, {displayValue: this.textCenter, value: Asc.c_oAscXAlign.Center},
{displayValue: this.textRight, value: c_oAscXAlign.Right} {displayValue: this.textRight, value: Asc.c_oAscXAlign.Right}
]; ];
this.cmbHAlign = new Common.UI.ComboBox({ this.cmbHAlign = new Common.UI.ComboBox({
el : $('#frame-advanced-input-hposition'), el : $('#frame-advanced-input-hposition'),
@ -615,9 +615,9 @@ define([
this.cmbHAlign.setValue(this._arrHAlign[0].value); this.cmbHAlign.setValue(this._arrHAlign[0].value);
this._arrHRelative = [ this._arrHRelative = [
{displayValue: this.textMargin, value: c_oAscHAnchor.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: c_oAscHAnchor.Page}, {displayValue: this.textPage, value: Asc.c_oAscHAnchor.Page},
{displayValue: this.textColumn, value: c_oAscHAnchor.Text} {displayValue: this.textColumn, value: Asc.c_oAscHAnchor.Text}
]; ];
this.cmbHRelative = new Common.UI.ComboBox({ this.cmbHRelative = new Common.UI.ComboBox({
el : $('#frame-advanced-input-hrelative'), el : $('#frame-advanced-input-hrelative'),
@ -634,9 +634,9 @@ define([
this.cmbHRelative.setValue(this._arrHRelative[1].value); this.cmbHRelative.setValue(this._arrHRelative[1].value);
this._arrVAlign = [ this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscYAlign.Top}, {displayValue: this.textTop, value: Asc.c_oAscYAlign.Top},
{displayValue: this.textCenter, value: c_oAscYAlign.Center}, {displayValue: this.textCenter, value: Asc.c_oAscYAlign.Center},
{displayValue: this.textBottom, value: c_oAscYAlign.Bottom} {displayValue: this.textBottom, value: Asc.c_oAscYAlign.Bottom}
]; ];
this.cmbVAlign = new Common.UI.ComboBox({ this.cmbVAlign = new Common.UI.ComboBox({
el : $('#frame-advanced-input-vposition'), el : $('#frame-advanced-input-vposition'),
@ -658,9 +658,9 @@ define([
this.cmbVAlign.setValue(this._arrVAlign[0].value); this.cmbVAlign.setValue(this._arrVAlign[0].value);
this._arrVRelative = [ this._arrVRelative = [
{displayValue: this.textMargin, value: c_oAscVAnchor.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: c_oAscVAnchor.Page}, {displayValue: this.textPage, value: Asc.c_oAscVAnchor.Page},
{displayValue: this.textParagraph, value: c_oAscVAnchor.Text} {displayValue: this.textParagraph, value: Asc.c_oAscVAnchor.Text}
]; ];
this.cmbVRelative = new Common.UI.ComboBox({ this.cmbVRelative = new Common.UI.ComboBox({
el : $('#frame-advanced-input-vrelative'), el : $('#frame-advanced-input-vrelative'),
@ -672,7 +672,7 @@ define([
.on('selected', _.bind(function(combo, record) { .on('selected', _.bind(function(combo, record) {
if (me._changedProps) { if (me._changedProps) {
me._changedProps.put_VAnchor(record.value); me._changedProps.put_VAnchor(record.value);
this.chMove.setValue(record.value == c_oAscVAnchor.Text, true); this.chMove.setValue(record.value == Asc.c_oAscVAnchor.Text, true);
} }
}, me)); }, me));
this.cmbVRelative.setValue(this._arrVRelative[2].value); this.cmbVRelative.setValue(this._arrVRelative[2].value);
@ -816,7 +816,7 @@ define([
onShowDialog: function(dlg) { onShowDialog: function(dlg) {
if (!this.isFrame && this.btnNone.pressed) if (!this.isFrame && this.btnNone.pressed)
this._DisableElem(c_oAscDropCap.None); this._DisableElem(Asc.c_oAscDropCap.None);
else if (this.isFrame && this.btnFrameNone.pressed) else if (this.isFrame && this.btnFrameNone.pressed)
this._DisableElem(c_oAscFrameWrap.None); this._DisableElem(c_oAscFrameWrap.None);
}, },
@ -824,7 +824,7 @@ define([
onBtnBordersClick: function(btn, eOpts){ onBtnBordersClick: function(btn, eOpts){
this.updateBordersStyle(btn.options.strId, true); this.updateBordersStyle(btn.options.strId, true);
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders); properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true); properties.put_CellSelect(true);
this.api.tblApply(properties); this.api.tblApply(properties);
@ -852,7 +852,7 @@ define([
me.spnY me.spnY
], function(spinner) { ], function(spinner) {
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
}); });
}, },
@ -912,7 +912,7 @@ define([
break; break;
} }
} }
this.chMove.setValue(value==c_oAscVAnchor.Text); this.chMove.setValue(value==Asc.c_oAscVAnchor.Text);
value = frame_props.get_YAlign(); value = frame_props.get_YAlign();
if (value!==undefined) { if (value!==undefined) {
@ -937,9 +937,9 @@ define([
this.spnRowHeight.setValue((frame_props.get_Lines() !== null) ? frame_props.get_Lines() : ''); this.spnRowHeight.setValue((frame_props.get_Lines() !== null) ? frame_props.get_Lines() : '');
this.numDistance.setValue((frame_props.get_HSpace() !== null) ? Common.Utils.Metric.fnRecalcFromMM(frame_props.get_HSpace()) : ''); this.numDistance.setValue((frame_props.get_HSpace() !== null) ? Common.Utils.Metric.fnRecalcFromMM(frame_props.get_HSpace()) : '');
value = frame_props.get_DropCap(); value = frame_props.get_DropCap();
if (value==c_oAscDropCap.Drop) if (value==Asc.c_oAscDropCap.Drop)
this.btnInText.toggle(true, false); this.btnInText.toggle(true, false);
else if (value==c_oAscDropCap.Margin) else if (value==Asc.c_oAscDropCap.Margin)
this.btnInMargin.toggle(true, false); this.btnInMargin.toggle(true, false);
else else
this.btnNone.toggle(true, false); this.btnNone.toggle(true, false);
@ -972,10 +972,10 @@ define([
} }
var shd = frame_props.get_Shade(); var shd = frame_props.get_Shade();
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
} else { } else {
this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1014,7 +1014,7 @@ define([
}, },
_DisableElem: function(btnId){ _DisableElem: function(btnId){
var disabled = (btnId === c_oAscDropCap.None || btnId === c_oAscFrameWrap.None); var disabled = (btnId === Asc.c_oAscDropCap.None || btnId === c_oAscFrameWrap.None);
_.each(this.btnsCategory, function(btn) { _.each(this.btnsCategory, function(btn) {
if (btn.options.contentTarget == 'id-adv-dropcap-borders' || if (btn.options.contentTarget == 'id-adv-dropcap-borders' ||
@ -1036,7 +1036,7 @@ define([
this.spnWidth.setDisabled(disabled); this.spnWidth.setDisabled(disabled);
this.spnHeight.setDisabled(disabled); this.spnHeight.setDisabled(disabled);
} else { } else {
disabled = (btnId == c_oAscDropCap.None); disabled = (btnId == Asc.c_oAscDropCap.None);
this.spnRowHeight.setDisabled(disabled); this.spnRowHeight.setDisabled(disabled);
this.numDistance.setDisabled(disabled); this.numDistance.setDisabled(disabled);
this.cmbFonts.setDisabled(disabled); this.cmbFonts.setDisabled(disabled);

View file

@ -52,15 +52,15 @@ define([
menu: undefined, menu: undefined,
formats: [[ formats: [[
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF}, {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'TXT', imgCls: 'txt', type: c_oAscFileType.TXT}, {name: 'TXT', imgCls: 'txt', type: Asc.c_oAscFileType.TXT},
{name: 'DOCX', imgCls: 'docx', type: c_oAscFileType.DOCX} {name: 'DOCX', imgCls: 'docx', type: Asc.c_oAscFileType.DOCX}
],[ ],[
// {name: 'DOC', imgCls: 'doc-format btn-doc', type: c_oAscFileType.DOC}, // {name: 'DOC', imgCls: 'doc-format btn-doc', type: Asc.c_oAscFileType.DOC},
{name: 'ODT', imgCls: 'odt', type: c_oAscFileType.ODT}, {name: 'ODT', imgCls: 'odt', type: Asc.c_oAscFileType.ODT},
// {name: 'RTF', imgCls: 'doc-format btn-rtf', type: c_oAscFileType.RTF}, // {name: 'RTF', imgCls: 'doc-format btn-rtf', type: Asc.c_oAscFileType.RTF},
{name: 'HTML (Zipped)', imgCls: 'html', type: c_oAscFileType.HTML} {name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
// {name: 'EPUB', imgCls: 'doc-format btn-epub', type: c_oAscFileType.EPUB} // {name: 'EPUB', imgCls: 'doc-format btn-epub', type: Asc.c_oAscFileType.EPUB}
]], ]],
@ -275,7 +275,8 @@ define([
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm }, { value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm },
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt } { value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt },
{ value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch }
] ]
}); });
@ -430,7 +431,8 @@ define([
strFast: 'Fast', strFast: 'Fast',
strStrict: 'Strict', strStrict: 'Strict',
textAutoRecover: 'Autorecover', textAutoRecover: 'Autorecover',
strAutoRecover: 'Turn on autorecover' strAutoRecover: 'Turn on autorecover',
txtInch: 'Inch'
}, DE.Views.FileMenuPanels.Settings || {})); }, DE.Views.FileMenuPanels.Settings || {}));
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -235,7 +235,7 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
}, },

View file

@ -118,7 +118,7 @@ define([
me.inputTip = new Common.UI.InputField({ me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'), el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;', style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength maxLength : Asc.c_oAscMaxTooltipLength
}); });
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
@ -160,7 +160,7 @@ define([
getSettings: function () { getSettings: function () {
var me = this, var me = this,
props = new CHyperlinkProperty(), props = new Asc.CHyperlinkProperty(),
url = $.trim(me.inputUrl.getValue()); url = $.trim(me.inputUrl.getValue());
if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) ) if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) )

View file

@ -68,7 +68,7 @@ define([
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
WrappingStyle: c_oAscWrapStyle2.Inline, WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true, CanBeFlow: true,
Width: 0, Width: 0,
Height: 0, Height: 0,
@ -84,13 +84,13 @@ define([
this.render(); this.render();
var viewData = [ var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true }, { offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare }, { offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight }, { offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough }, { offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom }, { offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront }, { offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind } { offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
]; ];
this.btnWrapType = new Common.UI.Button({ this.btnWrapType = new Common.UI.Button({
@ -252,17 +252,17 @@ define([
if (this.api) { if (this.api) {
var props = new CImgProperty(); var props = new CImgProperty();
props.put_WrappingStyle((rawData.data)); props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) { if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH()); props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false); props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column); props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column); var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
props.get_PositionH().put_Value(val); 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_UseAlign(false);
props.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph); props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph); val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val); props.get_PositionV().put_Value(val);
} }
@ -320,7 +320,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal; var imgsizeOriginal;
if (!me.btnOriginalSize.isDisabled()) { if (!me.btnOriginalSize.isDisabled()) {
imgsizeOriginal = me.api.get_OriginalSizeImage(); imgsizeOriginal = me.api.get_OriginalSizeImage();

View file

@ -76,20 +76,20 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spinners = []; this.spinners = [];
this._state = { this._state = {
HAlignType: c_oAscAlignH.Left, HAlignType: Asc.c_oAscAlignH.Left,
HAlignFrom: c_oAscRelativeFromH.Character, HAlignFrom: Asc.c_oAscRelativeFromH.Character,
HPositionFrom: c_oAscRelativeFromH.Character, HPositionFrom: Asc.c_oAscRelativeFromH.Character,
HPositionPcFrom: c_oAscRelativeFromH.Page, HPositionPcFrom: Asc.c_oAscRelativeFromH.Page,
VAlignType: c_oAscAlignV.Top, VAlignType: Asc.c_oAscAlignV.Top,
VAlignFrom: c_oAscRelativeFromV.Line, VAlignFrom: Asc.c_oAscRelativeFromV.Line,
VPositionFrom: c_oAscRelativeFromV.Line, VPositionFrom: Asc.c_oAscRelativeFromV.Line,
VPositionPcFrom: c_oAscRelativeFromV.Page, VPositionPcFrom: Asc.c_oAscRelativeFromV.Page,
spnXChanged: false, spnXChanged: false,
spnYChanged: false, spnYChanged: false,
spnXPcChanged: false, spnXPcChanged: false,
spnYPcChanged: false spnYPcChanged: false
}; };
this._objectType = c_oAscTypeSelectElement.Image; this._objectType = Asc.c_oAscTypeSelectElement.Image;
this.Margins = undefined; this.Margins = undefined;
this._nRatio = 1; this._nRatio = 1;
@ -191,7 +191,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapInline = new Common.UI.Button({ this.btnWrapInline = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-inline', iconCls: 'icon-advanced-wrap btn-wrap-inline',
posId: c_oAscWrapStyle2.Inline, posId: Asc.c_oAscWrapStyle2.Inline,
hint: this.textWrapInlineTooltip, hint: this.textWrapInlineTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -203,7 +203,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapSquare = new Common.UI.Button({ this.btnWrapSquare = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-square', iconCls: 'icon-advanced-wrap btn-wrap-square',
posId: c_oAscWrapStyle2.Square, posId: Asc.c_oAscWrapStyle2.Square,
hint: this.textWrapSquareTooltip, hint: this.textWrapSquareTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -215,7 +215,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapTight = new Common.UI.Button({ this.btnWrapTight = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-tight', iconCls: 'icon-advanced-wrap btn-wrap-tight',
posId: c_oAscWrapStyle2.Tight, posId: Asc.c_oAscWrapStyle2.Tight,
hint: this.textWrapTightTooltip, hint: this.textWrapTightTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -227,7 +227,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapThrough = new Common.UI.Button({ this.btnWrapThrough = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-through', iconCls: 'icon-advanced-wrap btn-wrap-through',
posId: c_oAscWrapStyle2.Through, posId: Asc.c_oAscWrapStyle2.Through,
hint: this.textWrapThroughTooltip, hint: this.textWrapThroughTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -239,7 +239,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapTopBottom = new Common.UI.Button({ this.btnWrapTopBottom = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-topbottom', iconCls: 'icon-advanced-wrap btn-wrap-topbottom',
posId: c_oAscWrapStyle2.TopAndBottom, posId: Asc.c_oAscWrapStyle2.TopAndBottom,
hint: this.textWrapTopbottomTooltip, hint: this.textWrapTopbottomTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -251,7 +251,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapBehind = new Common.UI.Button({ this.btnWrapBehind = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-behind', iconCls: 'icon-advanced-wrap btn-wrap-behind',
posId: c_oAscWrapStyle2.Behind, posId: Asc.c_oAscWrapStyle2.Behind,
hint: this.textWrapBehindTooltip, hint: this.textWrapBehindTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -263,7 +263,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapInFront = new Common.UI.Button({ this.btnWrapInFront = new Common.UI.Button({
cls: 'btn-options x-huge', cls: 'btn-options x-huge',
iconCls: 'icon-advanced-wrap btn-wrap-infront', iconCls: 'icon-advanced-wrap btn-wrap-infront',
posId: c_oAscWrapStyle2.InFront, posId: Asc.c_oAscWrapStyle2.InFront,
hint: this.textWrapInFrontTooltip, hint: this.textWrapInFrontTooltip,
enableToggle: true, enableToggle: true,
allowDepress: false, allowDepress: false,
@ -364,7 +364,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnX.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.spnX.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
this._changedProps.get_PositionH().put_Percent(false); this._changedProps.get_PositionH().put_Percent(false);
@ -389,7 +389,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnY.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.spnY.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
this._changedProps.get_PositionV().put_Percent(false); this._changedProps.get_PositionV().put_Percent(false);
@ -402,9 +402,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
// Horizontal // Horizontal
this._arrHAlign = [ this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscAlignH.Left}, {displayValue: this.textLeft, value: Asc.c_oAscAlignH.Left},
{displayValue: this.textCenter, value: c_oAscAlignH.Center}, {displayValue: this.textCenter, value: Asc.c_oAscAlignH.Center},
{displayValue: this.textRight, value: c_oAscAlignH.Right} {displayValue: this.textRight, value: Asc.c_oAscAlignH.Right}
]; ];
this.cmbHAlign = new Common.UI.ComboBox({ this.cmbHAlign = new Common.UI.ComboBox({
@ -418,12 +418,12 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbHAlign.on('selected', _.bind(this.onHAlignSelect, this)); this.cmbHAlign.on('selected', _.bind(this.onHAlignSelect, this));
this._arrHRelative = [ this._arrHRelative = [
{displayValue: this.textCharacter, value: c_oAscRelativeFromH.Character}, {displayValue: this.textCharacter, value: Asc.c_oAscRelativeFromH.Character},
{displayValue: this.textColumn, value: c_oAscRelativeFromH.Column}, {displayValue: this.textColumn, value: Asc.c_oAscRelativeFromH.Column},
{displayValue: this.textLeftMargin, value: c_oAscRelativeFromH.LeftMargin}, {displayValue: this.textLeftMargin, value: Asc.c_oAscRelativeFromH.LeftMargin},
{displayValue: this.textMargin, value: c_oAscRelativeFromH.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscRelativeFromH.Margin},
{displayValue: this.textPage, value: c_oAscRelativeFromH.Page}, {displayValue: this.textPage, value: Asc.c_oAscRelativeFromH.Page},
{displayValue: this.textRightMargin, value: c_oAscRelativeFromH.RightMargin} {displayValue: this.textRightMargin, value: Asc.c_oAscRelativeFromH.RightMargin}
]; ];
this.cmbHRelative = new Common.UI.ComboBox({ this.cmbHRelative = new Common.UI.ComboBox({
@ -461,7 +461,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnXPc.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.spnXPc.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
this._changedProps.get_PositionH().put_Percent(true); this._changedProps.get_PositionH().put_Percent(true);
@ -472,10 +472,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, this)); }, this));
this._arrHRelativePc = [ this._arrHRelativePc = [
{displayValue: this.textLeftMargin, value: c_oAscRelativeFromH.LeftMargin}, {displayValue: this.textLeftMargin, value: Asc.c_oAscRelativeFromH.LeftMargin},
{displayValue: this.textMargin, value: c_oAscRelativeFromH.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscRelativeFromH.Margin},
{displayValue: this.textPage, value: c_oAscRelativeFromH.Page}, {displayValue: this.textPage, value: Asc.c_oAscRelativeFromH.Page},
{displayValue: this.textRightMargin, value: c_oAscRelativeFromH.RightMargin} {displayValue: this.textRightMargin, value: Asc.c_oAscRelativeFromH.RightMargin}
]; ];
this.cmbHPositionPc = new Common.UI.ComboBox({ this.cmbHPositionPc = new Common.UI.ComboBox({
@ -491,9 +491,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
// Vertical // Vertical
this._arrVAlign = [ this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscAlignV.Top}, {displayValue: this.textTop, value: Asc.c_oAscAlignV.Top},
{displayValue: this.textCenter, value: c_oAscAlignV.Center}, {displayValue: this.textCenter, value: Asc.c_oAscAlignV.Center},
{displayValue: this.textBottom, value: c_oAscAlignV.Bottom} {displayValue: this.textBottom, value: Asc.c_oAscAlignV.Bottom}
]; ];
this.cmbVAlign = new Common.UI.ComboBox({ this.cmbVAlign = new Common.UI.ComboBox({
@ -507,12 +507,12 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbVAlign.on('selected', _.bind(this.onVAlignSelect, this)); this.cmbVAlign.on('selected', _.bind(this.onVAlignSelect, this));
this._arrVRelative = [ this._arrVRelative = [
{displayValue: this.textLine, value: c_oAscRelativeFromV.Line}, {displayValue: this.textLine, value: Asc.c_oAscRelativeFromV.Line},
{displayValue: this.textMargin, value: c_oAscRelativeFromV.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscRelativeFromV.Margin},
{displayValue: this.textBottomMargin, value: c_oAscRelativeFromV.BottomMargin}, {displayValue: this.textBottomMargin, value: Asc.c_oAscRelativeFromV.BottomMargin},
{displayValue: this.textParagraph, value: c_oAscRelativeFromV.Paragraph}, {displayValue: this.textParagraph, value: Asc.c_oAscRelativeFromV.Paragraph},
{displayValue: this.textPage, value: c_oAscRelativeFromV.Page}, {displayValue: this.textPage, value: Asc.c_oAscRelativeFromV.Page},
{displayValue: this.textTopMargin, value: c_oAscRelativeFromV.TopMargin} {displayValue: this.textTopMargin, value: Asc.c_oAscRelativeFromV.TopMargin}
]; ];
this.cmbVRelative = new Common.UI.ComboBox({ this.cmbVRelative = new Common.UI.ComboBox({
@ -550,7 +550,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnYPc.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.spnYPc.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
this._changedProps.get_PositionV().put_Percent(true); this._changedProps.get_PositionV().put_Percent(true);
@ -561,10 +561,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, this)); }, this));
this._arrVRelativePc = [ this._arrVRelativePc = [
{displayValue: this.textMargin, value: c_oAscRelativeFromV.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscRelativeFromV.Margin},
{displayValue: this.textBottomMargin, value: c_oAscRelativeFromV.BottomMargin}, {displayValue: this.textBottomMargin, value: Asc.c_oAscRelativeFromV.BottomMargin},
{displayValue: this.textPage, value: c_oAscRelativeFromV.Page}, {displayValue: this.textPage, value: Asc.c_oAscRelativeFromV.Page},
{displayValue: this.textTopMargin, value: c_oAscRelativeFromV.TopMargin} {displayValue: this.textTopMargin, value: Asc.c_oAscRelativeFromV.TopMargin}
]; ];
this.cmbVPositionPc = new Common.UI.ComboBox({ this.cmbVPositionPc = new Common.UI.ComboBox({
@ -720,9 +720,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
// Shape // Shape
this._arrCapType = [ this._arrCapType = [
{displayValue: this.textFlat, value: c_oAscLineCapType.Flat}, {displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: c_oAscLineCapType.Round}, {displayValue: this.textRound, value: Asc.c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: c_oAscLineCapType.Square} {displayValue: this.textSquare, value: Asc.c_oAscLineCapType.Square}
]; ];
this.cmbCapType = new Common.UI.ComboBox({ this.cmbCapType = new Common.UI.ComboBox({
@ -732,7 +732,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
editable: false, editable: false,
data: this._arrCapType data: this._arrCapType
}); });
this.cmbCapType.setValue(c_oAscLineCapType.Flat); this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat);
this.cmbCapType.on('selected', _.bind(function(combo, record){ this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedShapeProps) { if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null) if (this._changedShapeProps.get_stroke()===null)
@ -743,9 +743,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, this)); }, this));
this._arrJoinType = [ this._arrJoinType = [
{displayValue: this.textRound, value: c_oAscLineJoinType.Round}, {displayValue: this.textRound, value: Asc.c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: c_oAscLineJoinType.Bevel}, {displayValue: this.textBevel, value: Asc.c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: c_oAscLineJoinType.Miter} {displayValue: this.textMiter, value: Asc.c_oAscLineJoinType.Miter}
]; ];
this.cmbJoinType = new Common.UI.ComboBox({ this.cmbJoinType = new Common.UI.ComboBox({
el: $('#shape-advanced-join-type'), el: $('#shape-advanced-join-type'),
@ -754,7 +754,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
editable: false, editable: false,
data: this._arrJoinType data: this._arrJoinType
}); });
this.cmbJoinType.setValue(c_oAscLineJoinType.Round); this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round);
this.cmbJoinType.on('selected', _.bind(function(combo, record){ this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedShapeProps) { if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null) if (this._changedShapeProps.get_stroke()===null)
@ -769,25 +769,25 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
for ( var i=0; i<6; i++ ) for ( var i=0; i<6; i++ )
_arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0}); _arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0});
_arrStyles[0].type = c_oAscLineBeginType.None; _arrStyles[0].type = Asc.c_oAscLineBeginType.None;
_arrStyles[1].type = c_oAscLineBeginType.Triangle; _arrStyles[1].type = Asc.c_oAscLineBeginType.Triangle;
_arrStyles[2].type = c_oAscLineBeginType.Arrow; _arrStyles[2].type = Asc.c_oAscLineBeginType.Arrow;
_arrStyles[3].type = c_oAscLineBeginType.Stealth; _arrStyles[3].type = Asc.c_oAscLineBeginType.Stealth;
_arrStyles[4].type = c_oAscLineBeginType.Diamond; _arrStyles[4].type = Asc.c_oAscLineBeginType.Diamond;
_arrStyles[5].type = c_oAscLineBeginType.Oval; _arrStyles[5].type = Asc.c_oAscLineBeginType.Oval;
for ( i=0; i<9; i++ ) for ( i=0; i<9; i++ )
_arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)}); _arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)});
_arrSize[0].type = c_oAscLineBeginSize.small_small; _arrSize[0].type = Asc.c_oAscLineBeginSize.small_small;
_arrSize[1].type = c_oAscLineBeginSize.small_mid; _arrSize[1].type = Asc.c_oAscLineBeginSize.small_mid;
_arrSize[2].type = c_oAscLineBeginSize.small_large; _arrSize[2].type = Asc.c_oAscLineBeginSize.small_large;
_arrSize[3].type = c_oAscLineBeginSize.mid_small; _arrSize[3].type = Asc.c_oAscLineBeginSize.mid_small;
_arrSize[4].type = c_oAscLineBeginSize.mid_mid; _arrSize[4].type = Asc.c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = c_oAscLineBeginSize.mid_large; _arrSize[5].type = Asc.c_oAscLineBeginSize.mid_large;
_arrSize[6].type = c_oAscLineBeginSize.large_small; _arrSize[6].type = Asc.c_oAscLineBeginSize.large_small;
_arrSize[7].type = c_oAscLineBeginSize.large_mid; _arrSize[7].type = Asc.c_oAscLineBeginSize.large_mid;
_arrSize[8].type = c_oAscLineBeginSize.large_large; _arrSize[8].type = Asc.c_oAscLineBeginSize.large_large;
this.btnBeginStyle = new Common.UI.ComboBox({ this.btnBeginStyle = new Common.UI.ComboBox({
@ -910,30 +910,30 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
_setDefaults: function(props) { _setDefaults: function(props) {
if (props ){ if (props ){
this._objectType = c_oAscTypeSelectElement.Image; this._objectType = Asc.c_oAscTypeSelectElement.Image;
var value = props.get_WrappingStyle(); var value = props.get_WrappingStyle();
if ( props.get_CanBeFlow() ) { if ( props.get_CanBeFlow() ) {
switch (value) { switch (value) {
case c_oAscWrapStyle2.Inline: case Asc.c_oAscWrapStyle2.Inline:
this.btnWrapInline.toggle(true); this.btnWrapInline.toggle(true);
break; break;
case c_oAscWrapStyle2.Square: case Asc.c_oAscWrapStyle2.Square:
this.btnWrapSquare.toggle(true); this.btnWrapSquare.toggle(true);
break; break;
case c_oAscWrapStyle2.Tight: case Asc.c_oAscWrapStyle2.Tight:
this.btnWrapTight.toggle(true); this.btnWrapTight.toggle(true);
break; break;
case c_oAscWrapStyle2.Through: case Asc.c_oAscWrapStyle2.Through:
this.btnWrapThrough.toggle(true); this.btnWrapThrough.toggle(true);
break; break;
case c_oAscWrapStyle2.TopAndBottom: case Asc.c_oAscWrapStyle2.TopAndBottom:
this.btnWrapTopBottom.toggle(true); this.btnWrapTopBottom.toggle(true);
break; break;
case c_oAscWrapStyle2.Behind: case Asc.c_oAscWrapStyle2.Behind:
this.btnWrapBehind.toggle(true); this.btnWrapBehind.toggle(true);
break; break;
case c_oAscWrapStyle2.InFront: case Asc.c_oAscWrapStyle2.InFront:
this.btnWrapInFront.toggle(true); this.btnWrapInFront.toggle(true);
break; break;
default: default:
@ -955,7 +955,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnWrapTopBottom.setDisabled(true); this.btnWrapTopBottom.setDisabled(true);
this.btnWrapBehind.setDisabled(true); this.btnWrapBehind.setDisabled(true);
this.btnWrapInFront.setDisabled(true); this.btnWrapInFront.setDisabled(true);
this._DisableElem(c_oAscWrapStyle2.Inline); this._DisableElem(Asc.c_oAscWrapStyle2.Inline);
} }
this.spnWidth.setMaxValue(this.sizeMax.width); this.spnWidth.setMaxValue(this.sizeMax.width);
@ -1067,7 +1067,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
} }
} }
} }
this.chMove.setValue((value==c_oAscRelativeFromV.Line || value==c_oAscRelativeFromV.Paragraph), true); this.chMove.setValue((value==Asc.c_oAscRelativeFromV.Line || value==Asc.c_oAscRelativeFromV.Paragraph), true);
this.chMove.setDisabled(!Position.get_UseAlign() && Position.get_Percent()); this.chMove.setDisabled(!Position.get_UseAlign() && Position.get_Percent());
} }
@ -1086,7 +1086,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnsCategory[1].setDisabled(props.get_FromGroup()); // Wrapping this.btnsCategory[1].setDisabled(props.get_FromGroup()); // Wrapping
if (shapeprops) { if (shapeprops) {
this._objectType = c_oAscTypeSelectElement.Shape; this._objectType = Asc.c_oAscTypeSelectElement.Shape;
this._setShapeDefaults(shapeprops); this._setShapeDefaults(shapeprops);
this.setTitle(this.textTitleShape); this.setTitle(this.textTitleShape);
value = Common.localStorage.getItem("de-settings-shaperatio"); value = Common.localStorage.getItem("de-settings-shaperatio");
@ -1106,7 +1106,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnsCategory[4].setDisabled(null === margins); // Margins this.btnsCategory[4].setDisabled(null === margins); // Margins
} }
else if (chartprops) { else if (chartprops) {
this._objectType = c_oAscTypeSelectElement.Chart; this._objectType = Asc.c_oAscTypeSelectElement.Chart;
this.setTitle(this.textTitleChart); this.setTitle(this.textTitleChart);
value = Common.localStorage.getItem("de-settings-chartratio"); value = Common.localStorage.getItem("de-settings-chartratio");
} }
@ -1126,10 +1126,10 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
getSettings: function() { getSettings: function() {
var value = (this.btnRatio.pressed) ? 1 : 0; var value = (this.btnRatio.pressed) ? 1 : 0;
if (this._objectType==c_oAscTypeSelectElement.Shape) { if (this._objectType==Asc.c_oAscTypeSelectElement.Shape) {
Common.localStorage.setItem("de-settings-shaperatio", value); Common.localStorage.setItem("de-settings-shaperatio", value);
} }
else if (this._objectType==c_oAscTypeSelectElement.Chart) { else if (this._objectType==Asc.c_oAscTypeSelectElement.Chart) {
Common.localStorage.setItem("de-settings-chartratio", value); Common.localStorage.setItem("de-settings-chartratio", value);
} }
else { else {
@ -1138,7 +1138,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
var properties = this._changedProps; var properties = this._changedProps;
if (this._objectType == c_oAscTypeSelectElement.Shape) { if (this._objectType == Asc.c_oAscTypeSelectElement.Shape) {
properties.put_ShapeProperties(this._changedShapeProps); properties.put_ShapeProperties(this._changedShapeProps);
if (this.Margins) { if (this.Margins) {
if (properties.get_ShapeProperties()===null || properties.get_ShapeProperties()===undefined) if (properties.get_ShapeProperties()===null || properties.get_ShapeProperties()===undefined)
@ -1147,22 +1147,22 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
} }
} }
if (this._originalProps.get_WrappingStyle()===c_oAscWrapStyle2.Inline && properties.get_WrappingStyle() !== undefined && properties.get_WrappingStyle()!==c_oAscWrapStyle2.Inline ) { if (this._originalProps.get_WrappingStyle()===Asc.c_oAscWrapStyle2.Inline && properties.get_WrappingStyle() !== undefined && properties.get_WrappingStyle()!==Asc.c_oAscWrapStyle2.Inline ) {
if ( properties.get_PositionH()===null || properties.get_PositionH()===undefined ) { if ( properties.get_PositionH()===null || properties.get_PositionH()===undefined ) {
properties.put_PositionH(new CImagePositionH()); properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(false); properties.get_PositionH().put_UseAlign(false);
properties.get_PositionH().put_Percent(false); properties.get_PositionH().put_Percent(false);
properties.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column); properties.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column); var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
properties.get_PositionH().put_Value(val); properties.get_PositionH().put_Value(val);
} }
if ( properties.get_PositionV()===null || properties.get_PositionV()===undefined ) { if ( properties.get_PositionV()===null || properties.get_PositionV()===undefined ) {
properties.put_PositionV(new CImagePositionV()); properties.put_PositionV(new Asc.CImagePositionV());
properties.get_PositionV().put_UseAlign(false); properties.get_PositionV().put_UseAlign(false);
properties.get_PositionV().put_Percent(false); properties.get_PositionV().put_Percent(false);
properties.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph); properties.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph); val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
properties.get_PositionV().put_Value(val); properties.get_PositionV().put_Value(val);
} }
} }
@ -1249,7 +1249,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
this.sizeMax = { this.sizeMax = {
@ -1270,22 +1270,22 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, },
_DisableElem: function(btnId){ _DisableElem: function(btnId){
var disabledLR = (btnId == c_oAscWrapStyle2.Inline || btnId == c_oAscWrapStyle2.Behind || btnId == c_oAscWrapStyle2.InFront || btnId == c_oAscWrapStyle2.TopAndBottom); var disabledLR = (btnId == Asc.c_oAscWrapStyle2.Inline || btnId == Asc.c_oAscWrapStyle2.Behind || btnId == Asc.c_oAscWrapStyle2.InFront || btnId == Asc.c_oAscWrapStyle2.TopAndBottom);
var disabledTB = (btnId == c_oAscWrapStyle2.Inline || btnId == c_oAscWrapStyle2.Behind || btnId == c_oAscWrapStyle2.InFront var disabledTB = (btnId == Asc.c_oAscWrapStyle2.Inline || btnId == Asc.c_oAscWrapStyle2.Behind || btnId == Asc.c_oAscWrapStyle2.InFront
|| btnId == c_oAscWrapStyle2.Tight || btnId == c_oAscWrapStyle2.Through); || btnId == Asc.c_oAscWrapStyle2.Tight || btnId == Asc.c_oAscWrapStyle2.Through);
this.spnLeft.setDisabled(disabledLR); this.spnLeft.setDisabled(disabledLR);
this.spnRight.setDisabled(disabledLR); this.spnRight.setDisabled(disabledLR);
this.spnTop.setDisabled(disabledTB); this.spnTop.setDisabled(disabledTB);
this.spnBottom.setDisabled(disabledTB); this.spnBottom.setDisabled(disabledTB);
this.btnsCategory[2].setDisabled(btnId == c_oAscWrapStyle2.Inline); this.btnsCategory[2].setDisabled(btnId == Asc.c_oAscWrapStyle2.Inline);
}, },
onHAlignSelect: function(combo, record){ onHAlignSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HAlignType = record.value; this._state.HAlignType = record.value;
this._changedProps.get_PositionH().put_UseAlign(true); this._changedProps.get_PositionH().put_UseAlign(true);
@ -1298,7 +1298,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onHRelativeSelect: function(combo, record){ onHRelativeSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HAlignFrom = record.value; this._state.HAlignFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(true); this._changedProps.get_PositionH().put_UseAlign(true);
@ -1311,7 +1311,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onHPositionSelect: function(combo, record){ onHPositionSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HPositionFrom = record.value; this._state.HPositionFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
@ -1328,7 +1328,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onHPositionPcSelect: function(combo, record){ onHPositionPcSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._state.HPositionPcFrom = record.value; this._state.HPositionPcFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
@ -1345,7 +1345,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onVAlignSelect: function(combo, record){ onVAlignSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VAlignType = record.value; this._state.VAlignType = record.value;
this._changedProps.get_PositionV().put_UseAlign(true); this._changedProps.get_PositionV().put_UseAlign(true);
@ -1358,7 +1358,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onVRelativeSelect: function(combo, record){ onVRelativeSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VAlignFrom = record.value; this._state.VAlignFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(true); this._changedProps.get_PositionV().put_UseAlign(true);
@ -1366,14 +1366,14 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom); this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom);
this._changedProps.get_PositionV().put_Align(this._state.VAlignType); this._changedProps.get_PositionV().put_Align(this._state.VAlignType);
this.chMove.setValue(this._state.VAlignFrom==c_oAscRelativeFromV.Line || this._state.VAlignFrom==c_oAscRelativeFromV.Paragraph, true); this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Line || this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
} }
}, },
onVPositionSelect: function(combo, record){ onVPositionSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VPositionFrom = record.value; this._state.VPositionFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
@ -1384,7 +1384,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(val), true); this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(val), true);
} }
this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue())); this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue()));
this.chMove.setValue(this._state.VPositionFrom==c_oAscRelativeFromV.Line || this._state.VPositionFrom==c_oAscRelativeFromV.Paragraph, true); this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Line || this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
} }
}, },
@ -1392,7 +1392,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onVPositionPcSelect: function(combo, record){ onVPositionPcSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._state.VPositionPcFrom = record.value; this._state.VPositionPcFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
@ -1409,7 +1409,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioHAlignChange: function(field, newValue, eOpts) { onRadioHAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_UseAlign(newValue); this._changedProps.get_PositionH().put_UseAlign(newValue);
if (newValue) { if (newValue) {
@ -1431,7 +1431,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioHPositionChange: function(field, newValue, eOpts) { onRadioHPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
if (newValue) { if (newValue) {
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
@ -1453,7 +1453,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioHPositionPcChange: function(field, newValue, eOpts) { onRadioHPositionPcChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CImagePositionH()); this._changedProps.put_PositionH(new Asc.CImagePositionH());
this._changedProps.get_PositionH().put_Percent(newValue); this._changedProps.get_PositionH().put_Percent(newValue);
if (newValue) { if (newValue) {
@ -1475,7 +1475,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioVAlignChange: function(field, newValue, eOpts) { onRadioVAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_UseAlign(newValue); this._changedProps.get_PositionV().put_UseAlign(newValue);
if (newValue) { if (newValue) {
@ -1489,7 +1489,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbVRelative.setDisabled(false); this.cmbVRelative.setDisabled(false);
this.spnY.setDisabled(true); this.spnY.setDisabled(true);
this.cmbVPosition.setDisabled(true); this.cmbVPosition.setDisabled(true);
this.chMove.setValue(this._state.VAlignFrom==c_oAscRelativeFromV.Line || this._state.VAlignFrom==c_oAscRelativeFromV.Paragraph, true); this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Line || this._state.VAlignFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
this.chMove.setDisabled(false); this.chMove.setDisabled(false);
this.spnYPc.setDisabled(true); this.spnYPc.setDisabled(true);
this.cmbVPositionPc.setDisabled(true); this.cmbVPositionPc.setDisabled(true);
@ -1499,7 +1499,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioVPositionChange: function(field, newValue, eOpts) { onRadioVPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
if (newValue) { if (newValue) {
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
@ -1513,7 +1513,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbVRelative.setDisabled(true); this.cmbVRelative.setDisabled(true);
this.spnY.setDisabled(false); this.spnY.setDisabled(false);
this.cmbVPosition.setDisabled(false); this.cmbVPosition.setDisabled(false);
this.chMove.setValue(this._state.VPositionFrom==c_oAscRelativeFromV.Line || this._state.VPositionFrom==c_oAscRelativeFromV.Paragraph, true); this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Line || this._state.VPositionFrom==Asc.c_oAscRelativeFromV.Paragraph, true);
this.chMove.setDisabled(false); this.chMove.setDisabled(false);
this.spnYPc.setDisabled(true); this.spnYPc.setDisabled(true);
this.cmbVPositionPc.setDisabled(true); this.cmbVPositionPc.setDisabled(true);
@ -1523,7 +1523,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onRadioVPositionPcChange: function(field, newValue, eOpts) { onRadioVPositionPcChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CImagePositionV()); this._changedProps.put_PositionV(new Asc.CImagePositionV());
this._changedProps.get_PositionV().put_Percent(newValue); this._changedProps.get_PositionV().put_Percent(newValue);
if (newValue) { if (newValue) {

View file

@ -100,9 +100,9 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
}); });
this._arrFormat = [ this._arrFormat = [
{displayValue: this.textHTML, value: c_oAscFileType.HTML}, {displayValue: this.textHTML, value: Asc.c_oAscFileType.HTML},
{displayValue: this.textAttachDocx,value: c_oAscFileType.DOCX}, {displayValue: this.textAttachDocx,value: Asc.c_oAscFileType.DOCX},
{displayValue: this.textAttachPdf,value: c_oAscFileType.PDF} {displayValue: this.textAttachPdf,value: Asc.c_oAscFileType.PDF}
]; ];
this.cmbFormat = new Common.UI.ComboBox({ this.cmbFormat = new Common.UI.ComboBox({
el: $('#merge-email-dlg-format'), el: $('#merge-email-dlg-format'),
@ -111,7 +111,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
editable: false, editable: false,
data: this._arrFormat data: this._arrFormat
}); });
this.cmbFormat.setValue(c_oAscFileType.HTML); this.cmbFormat.setValue(Asc.c_oAscFileType.HTML);
this.cmbFormat.on('selected', _.bind(this.onCmbFormatSelect, this)); this.cmbFormat.on('selected', _.bind(this.onCmbFormatSelect, this));
this.inputFileName = new Common.UI.InputField({ this.inputFileName = new Common.UI.InputField({
@ -183,13 +183,13 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
getSettings: function() { getSettings: function() {
var filename = this.inputFileName.getValue(), var filename = this.inputFileName.getValue(),
mailformat = this.cmbFormat.getValue(); mailformat = this.cmbFormat.getValue();
if (mailformat!==c_oAscFileType.HTML) { if (mailformat!==Asc.c_oAscFileType.HTML) {
if (_.isEmpty(filename)) filename = 'attach'; if (_.isEmpty(filename)) filename = 'attach';
var idx = filename.lastIndexOf('.'), var idx = filename.lastIndexOf('.'),
ext = (idx>0) ? filename.substring(idx, filename.length).toLowerCase() : ''; ext = (idx>0) ? filename.substring(idx, filename.length).toLowerCase() : '';
if (mailformat==c_oAscFileType.PDF && ext!=='.pdf') if (mailformat==Asc.c_oAscFileType.PDF && ext!=='.pdf')
filename += '.pdf'; filename += '.pdf';
else if (mailformat==c_oAscFileType.DOCX && ext!=='.docx') else if (mailformat==Asc.c_oAscFileType.DOCX && ext!=='.docx')
filename += '.docx'; filename += '.docx';
} }
@ -244,7 +244,7 @@ define([ 'text!documenteditor/main/app/template/MailMergeEmailDlg.template',
}, },
onCmbFormatSelect: function(combo, record) { onCmbFormatSelect: function(combo, record) {
var attachDisable = (record.value == c_oAscFileType.HTML); var attachDisable = (record.value == Asc.c_oAscFileType.HTML);
this.inputFileName.setDisabled(attachDisable); this.inputFileName.setDisabled(attachDisable);
this.lblFileName.toggleClass('disabled', attachDisable); this.lblFileName.toggleClass('disabled', attachDisable);
(attachDisable) ? this.textareaMessage.attr('disabled', 'disabled') : this.textareaMessage.removeAttr('disabled'); (attachDisable) ? this.textareaMessage.attr('disabled', 'disabled') : this.textareaMessage.removeAttr('disabled');

View file

@ -209,9 +209,9 @@ define([
this.emptyDBControls.push(this.btnLast); this.emptyDBControls.push(this.btnLast);
this._arrMergeSrc = [ this._arrMergeSrc = [
{displayValue: this.textPdf, value: c_oAscFileType.PDF}, {displayValue: this.textPdf, value: Asc.c_oAscFileType.PDF},
{displayValue: this.textDocx, value: c_oAscFileType.DOCX}, {displayValue: this.textDocx, value: Asc.c_oAscFileType.DOCX},
{displayValue: this.textEmail, value: c_oAscFileType.HTML} {displayValue: this.textEmail, value: Asc.c_oAscFileType.HTML}
]; ];
this.cmbMergeTo = new Common.UI.ComboBox({ this.cmbMergeTo = new Common.UI.ComboBox({
el: $('#mmerge-combo-merge-to', me.$el), el: $('#mmerge-combo-merge-to', me.$el),
@ -524,11 +524,11 @@ define([
if (this._mailMergeDlg) return; if (this._mailMergeDlg) return;
var me = this; var me = this;
if (this.cmbMergeTo.getValue() != c_oAscFileType.HTML) { if (this.cmbMergeTo.getValue() != Asc.c_oAscFileType.HTML) {
me._mailMergeDlg = new DE.Views.MailMergeSaveDlg({ me._mailMergeDlg = new DE.Views.MailMergeSaveDlg({
mergeFolderUrl: me.mode.mergeFolderUrl, mergeFolderUrl: me.mode.mergeFolderUrl,
mergedFileUrl: url, mergedFileUrl: url,
defFileName: me.defFileName + ((this.cmbMergeTo.getValue() == c_oAscFileType.PDF) ? '.pdf' : '.docx') defFileName: me.defFileName + ((this.cmbMergeTo.getValue() == Asc.c_oAscFileType.PDF) ? '.pdf' : '.docx')
}); });
me._mailMergeDlg.on('mailmergefolder', function(obj, folder){ // save last folder me._mailMergeDlg.on('mailmergefolder', function(obj, folder){ // save last folder
}).on('mailmergeerror', function(obj, err){ // save last folder }).on('mailmergeerror', function(obj, err){ // save last folder
@ -659,14 +659,14 @@ define([
from = parseInt(this.txtFieldFrom.getValue())-1; from = parseInt(this.txtFieldFrom.getValue())-1;
to = parseInt(this.txtFieldTo.getValue())-1; to = parseInt(this.txtFieldTo.getValue())-1;
} }
var mmdata = new CMailMergeSendData(); var mmdata = new Asc.CMailMergeSendData();
mmdata.put_RecordFrom(from); mmdata.put_RecordFrom(from);
mmdata.put_RecordTo(to); mmdata.put_RecordTo(to);
mmdata.put_From(this.mergeMailData.from); mmdata.put_From(this.mergeMailData.from);
mmdata.put_To(this.mergeMailData.to); mmdata.put_To(this.mergeMailData.to);
mmdata.put_Subject(this.mergeMailData.subject); mmdata.put_Subject(this.mergeMailData.subject);
mmdata.put_MailFormat(this.mergeMailData.mailFormat); mmdata.put_MailFormat(this.mergeMailData.mailFormat);
if (this.mergeMailData.mailFormat!==c_oAscFileType.HTML) { if (this.mergeMailData.mailFormat!==Asc.c_oAscFileType.HTML) {
mmdata.put_FileName(this.mergeMailData.fileName); mmdata.put_FileName(this.mergeMailData.fileName);
mmdata.put_Message(this.mergeMailData.message); mmdata.put_Message(this.mergeMailData.message);
} }
@ -677,7 +677,7 @@ define([
}, },
onLongActionEnd: function(type, id) { onLongActionEnd: function(type, id) {
if (id == c_oAscAsyncAction['SendMailMerge']) { if (id == Asc.c_oAscAsyncAction['SendMailMerge']) {
Common.UI.info({ Common.UI.info({
closable: false, closable: false,
width: 500, width: 500,
@ -752,7 +752,7 @@ define([
}, },
onCmbMergeToSelect: function(combo, record) { onCmbMergeToSelect: function(combo, record) {
var mergeVisible = (record.value == c_oAscFileType.HTML); var mergeVisible = (record.value == Asc.c_oAscFileType.HTML);
this.btnMerge.setVisible(mergeVisible); this.btnMerge.setVisible(mergeVisible);
this.btnPortal.setVisible(!mergeVisible && this.mode.mergeFolderUrl); this.btnPortal.setVisible(!mergeVisible && this.mode.mergeFolderUrl);
this.btnDownload.setVisible(!mergeVisible); this.btnDownload.setVisible(!mergeVisible);

View file

@ -149,7 +149,7 @@ define([
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
$window.find('input').on('keypress', _.bind(this.onKeyPress, this)); $window.find('input').on('keypress', _.bind(this.onKeyPress, this));
// this.updateMetricUnit(); this.updateMetricUnit();
}, },
_handleInput: function(state) { _handleInput: function(state) {
@ -186,26 +186,26 @@ define([
setSettings: function (props) { setSettings: function (props) {
if (props) { if (props) {
this.maxMarginsH = parseFloat((props.get_H()/10. - 0.26).toFixed(4)); this.maxMarginsH = Common.Utils.Metric.fnRecalcFromMM(props.get_H() - 2.6);
this.maxMarginsW = parseFloat((props.get_W()/10. - 1.27).toFixed(4)); this.maxMarginsW = Common.Utils.Metric.fnRecalcFromMM(props.get_W() - 12.7);
this.spnTop.setMaxValue(this.maxMarginsH); this.spnTop.setMaxValue(this.maxMarginsH);
this.spnBottom.setMaxValue(this.maxMarginsH); this.spnBottom.setMaxValue(this.maxMarginsH);
this.spnLeft.setMaxValue(this.maxMarginsW); this.spnLeft.setMaxValue(this.maxMarginsW);
this.spnRight.setMaxValue(this.maxMarginsW); this.spnRight.setMaxValue(this.maxMarginsW);
this.spnTop.setValue(props.get_TopMargin()/10, true); // this.spnTop.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_TopMargin()), true); this.spnTop.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_TopMargin()), true);
this.spnBottom.setValue(props.get_BottomMargin()/10, true); this.spnBottom.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_BottomMargin()), true);
this.spnLeft.setValue(props.get_LeftMargin()/10, true); this.spnLeft.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_LeftMargin()), true);
this.spnRight.setValue(props.get_RightMargin()/10, true); this.spnRight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_RightMargin()), true);
} }
}, },
getSettings: function() { getSettings: function() {
var props = new CDocumentSectionProps(); var props = new CDocumentSectionProps();
props.put_TopMargin(this.spnTop.getNumberValue()*10); // props.put_TopMargin(Common.Utils.Metric.fnRecalcToMM(this.spnTop.getNumberValue())); props.put_TopMargin(Common.Utils.Metric.fnRecalcToMM(this.spnTop.getNumberValue()));
props.put_BottomMargin(this.spnBottom.getNumberValue()*10); props.put_BottomMargin(Common.Utils.Metric.fnRecalcToMM(this.spnBottom.getNumberValue()));
props.put_LeftMargin(this.spnLeft.getNumberValue()*10); props.put_LeftMargin(Common.Utils.Metric.fnRecalcToMM(this.spnLeft.getNumberValue()));
props.put_RightMargin(this.spnRight.getNumberValue()*10); props.put_RightMargin(Common.Utils.Metric.fnRecalcToMM(this.spnRight.getNumberValue()));
return props; return props;
}, },
@ -214,10 +214,9 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
}, },
textTitle: 'Margins', textTitle: 'Margins',

View file

@ -116,7 +116,7 @@ define([
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
$window.find('input').on('keypress', _.bind(this.onKeyPress, this)); $window.find('input').on('keypress', _.bind(this.onKeyPress, this));
// this.updateMetricUnit(); this.updateMetricUnit();
}, },
_handleInput: function(state) { _handleInput: function(state) {
@ -139,15 +139,15 @@ define([
setSettings: function (props) { setSettings: function (props) {
if (props) { if (props) {
this.spnWidth.setMinValue(parseFloat((props.get_LeftMargin()/10+props.get_RightMargin()/10.).toFixed(4)) + 1.27); this.spnWidth.setMinValue(Common.Utils.Metric.fnRecalcFromMM(props.get_LeftMargin() + props.get_RightMargin() + 12.7));
this.spnWidth.setValue(props.get_W()/10, true); // this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props[0]), true); this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_W()), true);
this.spnHeight.setMinValue(parseFloat((props.get_TopMargin()/10+props.get_BottomMargin()/10.).toFixed(4)) + 0.26); this.spnHeight.setMinValue(Common.Utils.Metric.fnRecalcFromMM(props.get_TopMargin() + props.get_BottomMargin() + 2.6));
this.spnHeight.setValue(props.get_H()/10, true); this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_H()), true);
} }
}, },
getSettings: function() { getSettings: function() {
return [this.spnWidth.getNumberValue()*10, this.spnHeight.getNumberValue()*10]; //Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()) return [Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()), Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue())];
}, },
updateMetricUnit: function() { updateMetricUnit: function() {
@ -155,7 +155,7 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }

View file

@ -364,10 +364,10 @@ define([
} }
var shd = prop.get_Shade(); var shd = prop.get_Shade();
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BackColor = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; this.BackColor = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
this.BackColor = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); this.BackColor = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -408,12 +408,12 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
this._arrLineRule[2].defaultUnit = this._arrLineRule[0].defaultUnit = Common.Utils.Metric.getCurrentMetricName(); this._arrLineRule[2].defaultUnit = this._arrLineRule[0].defaultUnit = Common.Utils.Metric.getCurrentMetricName();
this._arrLineRule[2].minValue = this._arrLineRule[0].minValue = parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)); this._arrLineRule[2].minValue = this._arrLineRule[0].minValue = parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2));
this._arrLineRule[2].step = this._arrLineRule[0].step = (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm) ? 0.01: 1; this._arrLineRule[2].step = this._arrLineRule[0].step = (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt) ? 1 : 0.01;
if (this._state.LineRuleIdx !== null) { if (this._state.LineRuleIdx !== null) {
this.numLineHeight.setDefaultUnit(this._arrLineRule[this._state.LineRuleIdx].defaultUnit); this.numLineHeight.setDefaultUnit(this._arrLineRule[this._state.LineRuleIdx].defaultUnit);
this.numLineHeight.setStep(this._arrLineRule[this._state.LineRuleIdx].step); this.numLineHeight.setStep(this._arrLineRule[this._state.LineRuleIdx].step);
@ -436,7 +436,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new DE.Views.ParagraphSettingsAdvanced( (new DE.Views.ParagraphSettingsAdvanced(
{ {
tableStylerRows: 2, tableStylerRows: 2,

View file

@ -641,10 +641,10 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
// Borders // Borders
var shd = props.get_Shade(); var shd = props.get_Shade();
if (shd!==null && shd!==undefined && shd.get_Value()===shd_Clear) { if (shd!==null && shd!==undefined && shd.get_Value()===Asc.c_oAscShdClear) {
var color = shd.get_Color(); var color = shd.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.paragraphShade = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
} else { } else {
this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); this.paragraphShade = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -721,9 +721,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' ) if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' )
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
else else
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
@ -913,9 +913,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._changedProps.put_Shade(new CParagraphShd()); this._changedProps.put_Shade(new CParagraphShd());
} }
if (this.paragraphShade=='transparent') { if (this.paragraphShade=='transparent') {
this._changedProps.get_Shade().put_Value(shd_Nil); this._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
} else { } else {
this._changedProps.get_Shade().put_Value(shd_Clear); this._changedProps.get_Shade().put_Value(Asc.c_oAscShdClear);
this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade)); this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade));
} }
} }

View file

@ -83,17 +83,17 @@ define([
this._state = { this._state = {
Transparency: null, Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent', ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH, BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
WrappingStyle: c_oAscWrapStyle2.Inline, WrappingStyle: Asc.c_oAscWrapStyle2.Inline,
CanBeFlow: true, CanBeFlow: true,
FromGroup: false, FromGroup: false,
DisabledFillPanels: false, DisabledFillPanels: false,
@ -104,10 +104,10 @@ define([
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH; this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -126,11 +126,11 @@ define([
this.render(); this.render();
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT}, {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -311,8 +311,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [ this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH}, {displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE} {displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
]; ];
this.cmbFillType = new Common.UI.ComboBox({ this.cmbFillType = new Common.UI.ComboBox({
@ -371,8 +371,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end'); this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -541,13 +541,13 @@ define([
$(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor)); $(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
var viewData = [ var viewData = [
{ offsetx: 0, data: c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true }, { offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare }, { offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight }, { offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough }, { offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom }, { offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront }, { offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind } { offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
]; ];
this.btnWrapType = new Common.UI.Button({ this.btnWrapType = new Common.UI.Button({
@ -618,12 +618,12 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.put_fill(fill); props.put_fill(fill);
@ -631,19 +631,19 @@ define([
this.api.ImgApply(this.imgprops); this.api.ImgApply(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -661,15 +661,15 @@ define([
this.api.ImgApply(this.imgprops); this.api.ImgApply(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_BLIP: case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break; break;
case c_oAscFill.FILL_TYPE_PATT: case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
@ -689,12 +689,12 @@ define([
this.api.ImgApply(this.imgprops); this.api.ImgApply(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
props.put_fill(fill); props.put_fill(fill);
this.imgprops.put_ShapeProperties(props); this.imgprops.put_ShapeProperties(props);
@ -714,10 +714,10 @@ define([
var fill = new CAscFill(); var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') { if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
} else { } else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
} }
@ -738,10 +738,10 @@ define([
this.PatternFillType = record.get('type'); this.PatternFillType = record.get('type');
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -758,10 +758,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -778,9 +778,9 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
} }
@ -795,10 +795,10 @@ define([
onFillTypeSelect: function(combo, record) { onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value; this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) { if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType); fill.get_fill().put_type(this.BlipFillType);
@ -858,7 +858,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -868,7 +868,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -882,10 +882,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -915,12 +915,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000); fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -943,13 +943,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -986,13 +986,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -1014,13 +1014,13 @@ define([
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1; this._state.StrokeType = this._state.StrokeWidth = -1;
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent') if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -1066,9 +1066,9 @@ define([
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -1114,17 +1114,17 @@ define([
var props = new CImgProperty(); var props = new CImgProperty();
props.put_WrappingStyle((rawData.data)); props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===c_oAscWrapStyle2.Inline && rawData.data!==c_oAscWrapStyle2.Inline ) { if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new CImagePositionH()); props.put_PositionH(new Asc.CImagePositionH());
props.get_PositionH().put_UseAlign(false); props.get_PositionH().put_UseAlign(false);
props.get_PositionH().put_RelativeFrom(c_oAscRelativeFromH.Column); props.get_PositionH().put_RelativeFrom(Asc.c_oAscRelativeFromH.Column);
var val = this._originalProps.get_Value_X(c_oAscRelativeFromH.Column); var val = this._originalProps.get_Value_X(Asc.c_oAscRelativeFromH.Column);
props.get_PositionH().put_Value(val); 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_UseAlign(false);
props.get_PositionV().put_RelativeFrom(c_oAscRelativeFromV.Paragraph); props.get_PositionV().put_RelativeFrom(Asc.c_oAscRelativeFromV.Paragraph);
val = this._originalProps.get_Value_Y(c_oAscRelativeFromV.Paragraph); val = this._originalProps.get_Value_Y(Asc.c_oAscRelativeFromV.Paragraph);
props.get_PositionV().put_Value(val); props.get_PositionV().put_Value(val);
} }
@ -1145,7 +1145,7 @@ define([
if (me.BlipFillType !== null) { if (me.BlipFillType !== null) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType); fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl); fill.get_fill().put_url(checkUrl);
@ -1174,7 +1174,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
(new DE.Views.ImageSettingsAdvanced( (new DE.Views.ImageSettingsAdvanced(
{ {
imageProps: elValue, imageProps: elValue,
@ -1257,13 +1257,13 @@ define([
if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null; this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill(); fill = fill.get_fill();
color = fill.get_color(); color = fill.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1271,23 +1271,23 @@ define([
} else } else
this.ShapeColor = {Value: 0, Color: 'transparent'}; this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'}; this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000'; this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill(); fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) { if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) { if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType); this.cmbFillType.setValue(this.BlipFillType);
} else } else
this.cmbFillType.setValue(''); this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType; this._state.BlipFillType = this.BlipFillType;
} }
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill(); fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) { if (this._state.PatternFillType !== this.PatternFillType) {
@ -1302,7 +1302,7 @@ define([
color = fill.get_color_fg(); color = fill.get_color_fg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1312,7 +1312,7 @@ define([
color = fill.get_color_bg(); color = fill.get_color_bg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1320,17 +1320,17 @@ define([
} else } else
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color); this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill(); fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1341,7 +1341,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000); var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -1358,7 +1358,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -1369,7 +1369,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -1397,7 +1397,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]}; this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]}; this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1440,10 +1440,10 @@ define([
var strokeType = stroke.get_type(); var strokeType = stroke.get_type();
if (stroke) { if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color(); color = stroke.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} }
else else
@ -1483,8 +1483,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color; this._state.StrokeColor = this.BorderColor.Color;
} }
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) { if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width(); var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1504,7 +1504,7 @@ define([
} }
this.BorderSize = w; this.BorderSize = w;
} }
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) { } else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0; this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value'); this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize); this.cmbBorderSize.setValue(this.BorderSize);
@ -1664,9 +1664,9 @@ define([
if (this.api) { if (this.api) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE); fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type')); fill.get_fill().put_texture_id(record.get('type'));
props.put_fill(fill); props.put_fill(fill);
this.imgprops.put_ShapeProperties(props); this.imgprops.put_ShapeProperties(props);
@ -1741,11 +1741,11 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP); this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT); this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null)); this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
}, },
setLocked: function (locked) { setLocked: function (locked) {

View file

@ -89,7 +89,7 @@ define([
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this._originalLook = new CTablePropLook(); this._originalLook = new Asc.CTablePropLook();
var fullwidth = 218; var fullwidth = 218;
this._originalProps = null; this._originalProps = null;
@ -353,8 +353,8 @@ define([
onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) { onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) {
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
var look = (this._originalLook) ? this._originalLook : new CTablePropLook(); var look = (this._originalLook) ? this._originalLook : new Asc.CTablePropLook();
switch (type) { switch (type) {
case 0: case 0:
look.put_FirstRow(field.getValue()=='checked'); look.put_FirstRow(field.getValue()=='checked');
@ -383,7 +383,7 @@ define([
onTableTemplateSelect: function(combo, record){ onTableTemplateSelect: function(combo, record){
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_TableStyle(record.get('templateId')); properties.put_TableStyle(record.get('templateId'));
this.api.tblApply(properties); this.api.tblApply(properties);
} }
@ -392,7 +392,7 @@ define([
onBtnWrapClick: function(btn, e) { onBtnWrapClick: function(btn, e) {
if (this.api && btn.pressed && !this._noApply) { if (this.api && btn.pressed && !this._noApply) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_TableWrap(btn.options.posId); properties.put_TableWrap(btn.options.posId);
if (btn.options.posId == c_tableWrap.TABLE_WRAP_NONE) { if (btn.options.posId == c_tableWrap.TABLE_WRAP_NONE) {
if (this._state.TableAlignment<0) if (this._state.TableAlignment<0)
@ -410,7 +410,7 @@ define([
onCheckRepeatRowChange: function(field, newValue, oldValue, eOpts) { onCheckRepeatRowChange: function(field, newValue, oldValue, eOpts) {
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_RowsInHeader((field.getValue()=='checked') ? 1 : 0 ); properties.put_RowsInHeader((field.getValue()=='checked') ? 1 : 0 );
this.api.tblApply(properties); this.api.tblApply(properties);
} }
@ -422,8 +422,8 @@ define([
this.CellColor = {Value: 1, Color: color}; this.CellColor = {Value: 1, Color: color};
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
var background = new CBackground(); var background = new Asc.CBackground();
properties.put_CellsBackground(background); properties.put_CellsBackground(background);
if (this.CellColor.Color=='transparent') { if (this.CellColor.Color=='transparent') {
@ -451,7 +451,7 @@ define([
onBtnBordersClick: function(btn, eOpts){ onBtnBordersClick: function(btn, eOpts){
this._UpdateBordersStyle(btn.options.strId, true); this._UpdateBordersStyle(btn.options.strId, true);
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders); properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true); properties.put_CellSelect(true);
this.api.tblApply(properties); this.api.tblApply(properties);
@ -522,7 +522,7 @@ define([
if (props ) if (props )
{ {
this._originalProps = new CTableProp(props); this._originalProps = new Asc.CTableProp(props);
this._originalProps.put_CellSelect(true); this._originalProps.put_CellSelect(true);
this._TblWrapStyleChanged(props.get_TableWrap()); this._TblWrapStyleChanged(props.get_TableWrap());
@ -608,7 +608,7 @@ define([
if (background.get_Value()==0) { if (background.get_Value()==0) {
var color = background.get_Color(); var color = background.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -655,7 +655,7 @@ define([
}, },
_UpdateBordersStyle: function(border) { _UpdateBordersStyle: function(border) {
this.CellBorders = new CBorders(); this.CellBorders = new Asc.CBorders();
var updateBorders = this.CellBorders; var updateBorders = this.CellBorders;
var visible = (border != ''); var visible = (border != '');
@ -765,7 +765,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) { if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new DE.Views.TableSettingsAdvanced( (new DE.Views.TableSettingsAdvanced(
{ {
tableStylerRows: (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2, tableStylerRows: (elValue.get_CellBorders().get_InsideH()===null && elValue.get_CellSelect()==true) ? 1 : 2,

View file

@ -80,12 +80,12 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._cellBackground = null; this._cellBackground = null;
this._state = { this._state = {
HAlignType: c_oAscXAlign.Left, HAlignType: Asc.c_oAscXAlign.Left,
HAlignFrom: c_oAscHAnchor.Margin, HAlignFrom: Asc.c_oAscHAnchor.Margin,
HPositionFrom: c_oAscHAnchor.Margin, HPositionFrom: Asc.c_oAscHAnchor.Margin,
VAlignType: c_oAscYAlign.Top, VAlignType: Asc.c_oAscYAlign.Top,
VAlignFrom: c_oAscVAnchor.Margin, VAlignFrom: Asc.c_oAscVAnchor.Margin,
VPositionFrom: c_oAscVAnchor.Margin, VPositionFrom: Asc.c_oAscVAnchor.Margin,
spnXChanged: false, spnXChanged: false,
spnYChanged: false, spnYChanged: false,
fromWrapInline: false, fromWrapInline: false,
@ -124,7 +124,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.tableStylerColumns = this.options.tableStylerColumns; this.tableStylerColumns = this.options.tableStylerColumns;
this.borderProps = this.options.borderProps; this.borderProps = this.options.borderProps;
this.pageWidth = (this.options.sectionProps) ? this.options.sectionProps.get_W() - this.options.sectionProps.get_LeftMargin() - this.options.sectionProps.get_RightMargin() : 210; this.pageWidth = (this.options.sectionProps) ? this.options.sectionProps.get_W() - this.options.sectionProps.get_LeftMargin() - this.options.sectionProps.get_RightMargin() : 210;
this._originalProps = new CTableProp(this.options.tableProps); this._originalProps = new Asc.CTableProp(this.options.tableProps);
}, },
render: function() { render: function() {
@ -170,6 +170,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._changedProps.put_Width(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); this._changedProps.put_Width(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}, this)); }, this));
var currmetric = Common.Utils.Metric.getCurrentMetric();
this.cmbUnit = new Common.UI.ComboBox({ this.cmbUnit = new Common.UI.ComboBox({
el : $('#tableadv-cmb-unit'), el : $('#tableadv-cmb-unit'),
style : 'width: 85px;', style : 'width: 85px;',
@ -177,7 +178,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: 0, displayValue: (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm }, { value: 0, displayValue: (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm) },
{ value: 1, displayValue: this.txtPercent } { value: 1, displayValue: this.txtPercent }
] ]
}); });
@ -234,7 +235,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
}); });
this.chAutofit.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.chAutofit.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
this._changedProps.put_TableLayout((field.getValue()=='checked') ? c_oAscTableLayout.AutoFit : c_oAscTableLayout. Fixed); this._changedProps.put_TableLayout((field.getValue()=='checked') ? Asc.c_oAscTableLayout.AutoFit : Asc.c_oAscTableLayout. Fixed);
} }
}, this)); }, this));
@ -342,7 +343,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.CellMargins.Flag = field.getValue(); this.CellMargins.Flag = field.getValue();
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left( ( this.CellMargins.Left!== null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null); this._changedProps.get_CellMargins().put_Left( ( this.CellMargins.Left!== null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null); this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null); this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
@ -364,7 +365,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Top'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Top');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null); this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
setCellFlag(); setCellFlag();
} }
@ -384,7 +385,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Bottom'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Bottom');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null); this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
setCellFlag(); setCellFlag();
} }
@ -404,7 +405,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Left'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Left');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left((this.CellMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null); this._changedProps.get_CellMargins().put_Left((this.CellMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
setCellFlag(); setCellFlag();
} }
@ -424,7 +425,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Right'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Right');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Right((this.CellMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right) : null); this._changedProps.get_CellMargins().put_Right((this.CellMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right) : null);
setCellFlag(); setCellFlag();
} }
@ -470,7 +471,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: 0, displayValue: (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm }, { value: 0, displayValue: (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm) },
{ value: 1, displayValue: this.txtPercent } { value: 1, displayValue: this.txtPercent }
] ]
}); });
@ -684,7 +685,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnX.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.spnX.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionFrom); this._changedProps.get_PositionH().put_RelativeFrom(this._state.HPositionFrom);
@ -708,7 +709,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnY.on('change', _.bind(function(field, newValue, oldValue, eOpts){ this.spnY.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV()); this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
this._changedProps.get_PositionV().put_RelativeFrom(this._state.VPositionFrom); this._changedProps.get_PositionV().put_RelativeFrom(this._state.VPositionFrom);
@ -720,9 +721,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
// Horizontal // Horizontal
this._arrHAlign = [ this._arrHAlign = [
{displayValue: this.textLeft, value: c_oAscXAlign.Left}, {displayValue: this.textLeft, value: Asc.c_oAscXAlign.Left},
{displayValue: this.textCenter, value: c_oAscXAlign.Center}, {displayValue: this.textCenter, value: Asc.c_oAscXAlign.Center},
{displayValue: this.textRight, value: c_oAscXAlign.Right} {displayValue: this.textRight, value: Asc.c_oAscXAlign.Right}
]; ];
this.cmbHAlign = new Common.UI.ComboBox({ this.cmbHAlign = new Common.UI.ComboBox({
@ -736,9 +737,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbHAlign.on('selected', _.bind(this.onHAlignSelect, this)); this.cmbHAlign.on('selected', _.bind(this.onHAlignSelect, this));
this._arrHRelative = [ this._arrHRelative = [
{displayValue: this.textMargin, value: c_oAscHAnchor.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscHAnchor.Margin},
{displayValue: this.textPage, value: c_oAscHAnchor.Page}, {displayValue: this.textPage, value: Asc.c_oAscHAnchor.Page},
{displayValue: this.textAnchorText, value: c_oAscHAnchor.Text} {displayValue: this.textAnchorText, value: Asc.c_oAscHAnchor.Text}
]; ];
this.cmbHRelative = new Common.UI.ComboBox({ this.cmbHRelative = new Common.UI.ComboBox({
@ -764,9 +765,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
// Vertical // Vertical
this._arrVAlign = [ this._arrVAlign = [
{displayValue: this.textTop, value: c_oAscYAlign.Top}, {displayValue: this.textTop, value: Asc.c_oAscYAlign.Top},
{displayValue: this.textCenter, value: c_oAscYAlign.Center}, {displayValue: this.textCenter, value: Asc.c_oAscYAlign.Center},
{displayValue: this.textBottom, value: c_oAscYAlign.Bottom} {displayValue: this.textBottom, value: Asc.c_oAscYAlign.Bottom}
]; ];
this.cmbVAlign = new Common.UI.ComboBox({ this.cmbVAlign = new Common.UI.ComboBox({
@ -780,9 +781,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbVAlign.on('selected', _.bind(this.onVAlignSelect, this)); this.cmbVAlign.on('selected', _.bind(this.onVAlignSelect, this));
this._arrVRelative = [ this._arrVRelative = [
{displayValue: this.textMargin, value: c_oAscVAnchor.Margin}, {displayValue: this.textMargin, value: Asc.c_oAscVAnchor.Margin},
{displayValue: this.textPage, value: c_oAscVAnchor.Page}, {displayValue: this.textPage, value: Asc.c_oAscVAnchor.Page},
{displayValue: this.textAnchorText, value: c_oAscVAnchor.Text} {displayValue: this.textAnchorText, value: Asc.c_oAscVAnchor.Text}
]; ];
this.cmbVRelative = new Common.UI.ComboBox({ this.cmbVRelative = new Common.UI.ComboBox({
@ -1091,7 +1092,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
for (var j=0; j<this.tableBordersImageSpacing.columns; j++) { for (var j=0; j<this.tableBordersImageSpacing.columns; j++) {
this.tableBordersImageSpacing.getCell(j, i).on('borderclick', function(ct, border, size, color){ this.tableBordersImageSpacing.getCell(j, i).on('borderclick', function(ct, border, size, color){
if (this.ChangedCellBorders===undefined) { if (this.ChangedCellBorders===undefined) {
this.ChangedCellBorders = new CBorders(); this.ChangedCellBorders = new Asc.CBorders();
} }
this._UpdateCellBordersStyle(ct, border, size, color, this.CellBorders, this.ChangedCellBorders); this._UpdateCellBordersStyle(ct, border, size, color, this.CellBorders, this.ChangedCellBorders);
}, this); }, this);
@ -1099,7 +1100,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
} }
this.tableBordersImageSpacing.on('borderclick', function(ct, border, size, color){ this.tableBordersImageSpacing.on('borderclick', function(ct, border, size, color){
if (this.ChangedTableBorders===undefined) { if (this.ChangedTableBorders===undefined) {
this.ChangedTableBorders = new CBorders(); this.ChangedTableBorders = new Asc.CBorders();
} }
this._UpdateTableBordersStyle(ct, border, size, color, this.TableBorders, this.ChangedTableBorders); this._UpdateTableBordersStyle(ct, border, size, color, this.TableBorders, this.ChangedTableBorders);
}, this); }, this);
@ -1109,11 +1110,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.tableBordersImage.getCell(j, i).on('borderclick', function(ct, border, size, color){ this.tableBordersImage.getCell(j, i).on('borderclick', function(ct, border, size, color){
if (this._allTable) { if (this._allTable) {
if (this.ChangedTableBorders===undefined) { if (this.ChangedTableBorders===undefined) {
this.ChangedTableBorders = new CBorders(); this.ChangedTableBorders = new Asc.CBorders();
} }
} else { } else {
if (this.ChangedCellBorders===undefined) { if (this.ChangedCellBorders===undefined) {
this.ChangedCellBorders = new CBorders(); this.ChangedCellBorders = new Asc.CBorders();
} }
} }
this._UpdateCellBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders); this._UpdateCellBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders);
@ -1123,11 +1124,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.tableBordersImage.on('borderclick', function(ct, border, size, color){ this.tableBordersImage.on('borderclick', function(ct, border, size, color){
if (this._allTable) { if (this._allTable) {
if (this.ChangedTableBorders===undefined) { if (this.ChangedTableBorders===undefined) {
this.ChangedTableBorders = new CBorders(); this.ChangedTableBorders = new Asc.CBorders();
} }
} else { } else {
if (this.ChangedCellBorders===undefined) { if (this.ChangedCellBorders===undefined) {
this.ChangedCellBorders = new CBorders(); this.ChangedCellBorders = new Asc.CBorders();
} }
} }
this._UpdateTableBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders); this._UpdateTableBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders);
@ -1164,11 +1165,12 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (props ){ if (props ){
this._allTable = !props.get_CellSelect(); this._allTable = !props.get_CellSelect();
var value; var value,
// main props TableWidth = props.get_Width(),
var TableWidth = props.get_Width(); currmetric = Common.Utils.Metric.getCurrentMetric();
this.cmbUnit.store.at(0).set('displayValue', (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm); // main props
this.cmbUnit.store.at(0).set('displayValue', (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm));
this.cmbUnit.setValue(TableWidth<0 ? 1 : 0); this.cmbUnit.setValue(TableWidth<0 ? 1 : 0);
this.nfWidth.setDefaultUnit(TableWidth<0 ? '%' : Common.Utils.Metric.getCurrentMetricName()); this.nfWidth.setDefaultUnit(TableWidth<0 ? '%' : Common.Utils.Metric.getCurrentMetricName());
if (TableWidth<0) //% if (TableWidth<0) //%
@ -1192,7 +1194,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
var autoFit = props.get_TableLayout(); var autoFit = props.get_TableLayout();
this.chAutofit.setDisabled(autoFit===undefined); this.chAutofit.setDisabled(autoFit===undefined);
this.chAutofit.setValue(autoFit===c_oAscTableLayout.AutoFit, true); this.chAutofit.setValue(autoFit===Asc.c_oAscTableLayout.AutoFit, true);
// margins // margins
var margins = props.get_DefaultMargins(); var margins = props.get_DefaultMargins();
@ -1232,7 +1234,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
// Cell Size // Cell Size
var cellWidth = props.get_CellsWidth(); var cellWidth = props.get_CellsWidth();
this.cmbPrefWidthUnit.store.at(0).set('displayValue', (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm); this.cmbPrefWidthUnit.store.at(0).set('displayValue', (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm));
this.cmbPrefWidthUnit.setValue(cellWidth<0 ? 1 : 0); this.cmbPrefWidthUnit.setValue(cellWidth<0 ? 1 : 0);
this.nfPrefWidth.setDefaultUnit(cellWidth<0 ? '%' : Common.Utils.Metric.getCurrentMetricName()); this.nfPrefWidth.setDefaultUnit(cellWidth<0 ? '%' : Common.Utils.Metric.getCurrentMetricName());
if (cellWidth<0) //% if (cellWidth<0) //%
@ -1317,7 +1319,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
break; break;
} }
} }
if (value==c_oAscVAnchor.Text) if (value==Asc.c_oAscVAnchor.Text)
this.chMove.setValue(true, true); this.chMove.setValue(true, true);
if (Position.get_UseAlign()) { if (Position.get_UseAlign()) {
@ -1346,9 +1348,9 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._state.horizontalPropChanged = false; this._state.horizontalPropChanged = false;
// borders // borders
this.TableBorders = new CBorders(props.get_TableBorders()); this.TableBorders = new Asc.CBorders(props.get_TableBorders());
this.CellBorders = new CBorders(props.get_CellBorders()); this.CellBorders = new Asc.CBorders(props.get_CellBorders());
this._UpdateBordersNoSpacing_(); this._UpdateBordersNoSpacing_();
this._UpdateBordersSpacing_(); this._UpdateBordersSpacing_();
@ -1363,7 +1365,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (background && background.get_Value()==0) { if (background && background.get_Value()==0) {
var color = background.get_Color(); var color = background.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.TableColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.TableColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.TableColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.TableColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1378,7 +1380,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (background.get_Value()==0) { if (background.get_Value()==0) {
var color = background.get_Color(); var color = background.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1421,7 +1423,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.ShowHideSpacing(this.chAllowSpacing.getValue()==='checked'); this.ShowHideSpacing(this.chAllowSpacing.getValue()==='checked');
} }
this._changedProps = new CTableProp(); this._changedProps = new Asc.CTableProp();
this._cellBackground = null; this._cellBackground = null;
this.ChangedTableBorders = undefined; this.ChangedTableBorders = undefined;
this.ChangedCellBorders = undefined; this.ChangedCellBorders = undefined;
@ -1464,11 +1466,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.ShowHideWrap(true); this.ShowHideWrap(true);
if (this._changedProps && btn.pressed) { if (this._changedProps && btn.pressed) {
if (this._state.alignChanged) { if (this._state.alignChanged) {
if (this._state.HAlignType===c_oAscXAlign.Left) if (this._state.HAlignType===Asc.c_oAscXAlign.Left)
this.btnAlignLeft.toggle(true, true); this.btnAlignLeft.toggle(true, true);
else if (this._state.HAlignType==c_oAscXAlign.Center) else if (this._state.HAlignType==Asc.c_oAscXAlign.Center)
this.btnAlignCenter.toggle(true, true); this.btnAlignCenter.toggle(true, true);
else if (this._state.HAlignType==c_oAscXAlign.Right) else if (this._state.HAlignType==Asc.c_oAscXAlign.Right)
this.btnAlignRight.toggle(true, true); this.btnAlignRight.toggle(true, true);
this._state.alignChanged = false; this._state.alignChanged = false;
} }
@ -1492,13 +1494,13 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.radioVPosition.setValue(true); this.radioVPosition.setValue(true);
} }
if (this._state.alignChanged) { if (this._state.alignChanged) {
if (this.btnAlignLeft.pressed) this._state.HAlignType = c_oAscXAlign.Left; if (this.btnAlignLeft.pressed) this._state.HAlignType = Asc.c_oAscXAlign.Left;
else if (this.btnAlignCenter.pressed) this._state.HAlignType = c_oAscXAlign.Center; else if (this.btnAlignCenter.pressed) this._state.HAlignType = Asc.c_oAscXAlign.Center;
else this._state.HAlignType = c_oAscXAlign.Right; else this._state.HAlignType = Asc.c_oAscXAlign.Right;
this.cmbHAlign.setValue(this._state.HAlignType); this.cmbHAlign.setValue(this._state.HAlignType);
this.radioHAlign.setValue(true); this.radioHAlign.setValue(true);
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(true); this._changedProps.get_PositionH().put_UseAlign(true);
this._changedProps.get_PositionH().put_Align(this._state.HAlignType); this._changedProps.get_PositionH().put_Align(this._state.HAlignType);
@ -1514,7 +1516,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onHAlignSelect: function(combo, record){ onHAlignSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._state.HAlignType = record.value; this._state.HAlignType = record.value;
this._changedProps.get_PositionH().put_UseAlign(true); this._changedProps.get_PositionH().put_UseAlign(true);
@ -1527,7 +1529,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onHRelativeSelect: function(combo, record){ onHRelativeSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._state.HAlignFrom = record.value; this._state.HAlignFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(true); this._changedProps.get_PositionH().put_UseAlign(true);
@ -1539,7 +1541,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onHPositionSelect: function(combo, record){ onHPositionSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._state.HPositionFrom = record.value; this._state.HPositionFrom = record.value;
this._changedProps.get_PositionH().put_UseAlign(false); this._changedProps.get_PositionH().put_UseAlign(false);
@ -1555,7 +1557,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onVAlignSelect: function(combo, record){ onVAlignSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV()); this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._state.VAlignType = record.value; this._state.VAlignType = record.value;
this._changedProps.get_PositionV().put_UseAlign(true); this._changedProps.get_PositionV().put_UseAlign(true);
@ -1567,21 +1569,21 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onVRelativeSelect: function(combo, record){ onVRelativeSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV()); this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._state.VAlignFrom = record.value; this._state.VAlignFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(true); this._changedProps.get_PositionV().put_UseAlign(true);
this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom); this._changedProps.get_PositionV().put_RelativeFrom(this._state.VAlignFrom);
this._changedProps.get_PositionV().put_Align(this._state.VAlignType); this._changedProps.get_PositionV().put_Align(this._state.VAlignType);
this.chMove.setValue(this._state.VAlignFrom==c_oAscVAnchor.Text, true); this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscVAnchor.Text, true);
} }
}, },
onVPositionSelect: function(combo, record){ onVPositionSelect: function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV()); this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._state.VPositionFrom = record.value; this._state.VPositionFrom = record.value;
this._changedProps.get_PositionV().put_UseAlign(false); this._changedProps.get_PositionV().put_UseAlign(false);
@ -1591,14 +1593,14 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(val), true); this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(val), true);
} }
this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue())); this._changedProps.get_PositionV().put_Value(Common.Utils.Metric.fnRecalcToMM(this.spnY.getNumberValue()));
this.chMove.setValue(this._state.VPositionFrom==c_oAscVAnchor.Text, true); this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscVAnchor.Text, true);
} }
}, },
onRadioHAlignChange: function(field, newValue, eOpts) { onRadioHAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(newValue); this._changedProps.get_PositionH().put_UseAlign(newValue);
if (newValue) { if (newValue) {
@ -1619,7 +1621,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onRadioHPositionChange: function(field, newValue, eOpts) { onRadioHPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined) if (this._changedProps.get_PositionH()===null || this._changedProps.get_PositionH()===undefined)
this._changedProps.put_PositionH(new CTablePositionH()); this._changedProps.put_PositionH(new Asc.CTablePositionH());
this._changedProps.get_PositionH().put_UseAlign(!newValue); this._changedProps.get_PositionH().put_UseAlign(!newValue);
if (newValue) { if (newValue) {
@ -1643,7 +1645,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
onRadioVAlignChange: function(field, newValue, eOpts) { onRadioVAlignChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV()); this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._changedProps.get_PositionV().put_UseAlign(newValue); this._changedProps.get_PositionV().put_UseAlign(newValue);
if (newValue) { if (newValue) {
@ -1657,14 +1659,14 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbVRelative.setDisabled(false); this.cmbVRelative.setDisabled(false);
this.spnY.setDisabled(true); this.spnY.setDisabled(true);
this.cmbVPosition.setDisabled(true); this.cmbVPosition.setDisabled(true);
this.chMove.setValue(this._state.VAlignFrom==c_oAscVAnchor.Text, true); this.chMove.setValue(this._state.VAlignFrom==Asc.c_oAscVAnchor.Text, true);
} }
}, },
onRadioVPositionChange: function(field, newValue, eOpts) { onRadioVPositionChange: function(field, newValue, eOpts) {
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined) if (this._changedProps.get_PositionV()===null || this._changedProps.get_PositionV()===undefined)
this._changedProps.put_PositionV(new CTablePositionV()); this._changedProps.put_PositionV(new Asc.CTablePositionV());
this._changedProps.get_PositionV().put_UseAlign(!newValue); this._changedProps.get_PositionV().put_UseAlign(!newValue);
if (newValue) { if (newValue) {
@ -1681,7 +1683,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.cmbVRelative.setDisabled(true); this.cmbVRelative.setDisabled(true);
this.spnY.setDisabled(false); this.spnY.setDisabled(false);
this.cmbVPosition.setDisabled(false); this.cmbVPosition.setDisabled(false);
this.chMove.setValue(this._state.VPositionFrom==c_oAscVAnchor.Text, true); this.chMove.setValue(this._state.VPositionFrom==Asc.c_oAscVAnchor.Text, true);
} }
}, },
@ -1707,7 +1709,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.CellColor = {Value: 1, Color: color}; this.CellColor = {Value: 1, Color: color};
if (this._cellBackground === null) if (this._cellBackground === null)
this._cellBackground = new CBackground(); this._cellBackground = new Asc.CBackground();
if (this.CellColor.Color=='transparent') { if (this.CellColor.Color=='transparent') {
this._cellBackground.put_Value(1); this._cellBackground.put_Value(1);
@ -1725,7 +1727,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (this._changedProps) { if (this._changedProps) {
var background = this._changedProps.get_TableBackground(); var background = this._changedProps.get_TableBackground();
if (background===undefined) { if (background===undefined) {
background = new CBackground(); background = new Asc.CBackground();
this._changedProps.put_TableBackground(background); this._changedProps.put_TableBackground(background);
} }
if (this.TableColor.Color=='transparent') { if (this.TableColor.Color=='transparent') {
@ -2070,7 +2072,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
this.pageWidth = Common.Utils.Metric.fnRecalcFromMM(this.pageWidth); this.pageWidth = Common.Utils.Metric.fnRecalcFromMM(this.pageWidth);
@ -2160,6 +2162,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
txtPercent: 'Percent', txtPercent: 'Percent',
txtCm: 'Centimeter', txtCm: 'Centimeter',
txtPt: 'Point', txtPt: 'Point',
txtInch: 'Inch',
textCellSize: 'Cell Size', textCellSize: 'Cell Size',
textPrefWidth: 'Preferred width', textPrefWidth: 'Preferred width',
textMeasure: 'Measure in', textMeasure: 'Measure in',

View file

@ -81,22 +81,22 @@ define([
this._state = { this._state = {
Transparency: null, Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent', ShapeColor: 'transparent',
StrokeType: c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null, FormId: null,
DisabledControls: false DisabledControls: false
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -126,9 +126,9 @@ define([
this.lockedControls.push(this.cmbTextArt); this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -211,8 +211,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end'); this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -417,12 +417,12 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill); props.asc_putFill(fill);
@ -430,19 +430,19 @@ define([
this.api.ImgApply(this.imgprops); this.api.ImgApply(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -460,12 +460,12 @@ define([
this.api.ImgApply(this.imgprops); this.api.ImgApply(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
props.asc_putFill(fill); props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -485,10 +485,10 @@ define([
var fill = new CAscFill(); var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') { if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
} else { } else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
} }
@ -552,7 +552,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -562,7 +562,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -576,10 +576,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -609,12 +609,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000); fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -637,13 +637,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -680,13 +680,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -708,13 +708,13 @@ define([
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1; this._state.StrokeType = this._state.StrokeWidth = -1;
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent') if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -760,9 +760,9 @@ define([
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -814,13 +814,13 @@ define([
if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null; this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill(); fill = fill.get_fill();
color = fill.get_color(); color = fill.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -828,16 +828,16 @@ define([
} else } else
this.ShapeColor = {Value: 0, Color: 'transparent'}; this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000'; this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill(); fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -848,7 +848,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000); var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -865,7 +865,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -876,7 +876,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -904,7 +904,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]}; this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
} }
@ -943,10 +943,10 @@ define([
strokeType = (stroke) ? stroke.get_type() : null; strokeType = (stroke) ? stroke.get_type() : null;
if (stroke) { if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color(); color = stroke.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} }
else else
@ -985,8 +985,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color; this._state.StrokeColor = this.BorderColor.Color;
} }
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) { if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width(); var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1006,7 +1006,7 @@ define([
} }
this.BorderSize = w; this.BorderSize = w;
} }
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) { } else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0; this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value'); this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize); this.cmbBorderSize.setValue(this.BorderSize);
@ -1137,9 +1137,9 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null)); this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
}, },
setLocked: function (locked) { setLocked: function (locked) {

View file

@ -569,10 +569,10 @@ define([
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
menuAlign: 'tl-tr', menuAlign: 'tl-tr',
items : [ items : [
{caption: this.textNextPage, value: c_oAscSectionBreakType.NextPage}, {caption: this.textNextPage, value: Asc.c_oAscSectionBreakType.NextPage},
{caption: this.textContPage, value: c_oAscSectionBreakType.Continuous}, {caption: this.textContPage, value: Asc.c_oAscSectionBreakType.Continuous},
{caption: this.textEvenPage, value: c_oAscSectionBreakType.EvenPage}, {caption: this.textEvenPage, value: Asc.c_oAscSectionBreakType.EvenPage},
{caption: this.textOddPage, value: c_oAscSectionBreakType.OddPage} {caption: this.textOddPage, value: Asc.c_oAscSectionBreakType.OddPage}
] ]
}) })
}) })
@ -646,9 +646,9 @@ define([
menu : new Common.UI.Menu({ menu : new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
items: [ items: [
{ caption: this.textNone, iconCls: 'mnu-dropcap-none', checkable: true, toggleGroup: 'menuDropCap', value: c_oAscDropCap.None, checked: true }, { caption: this.textNone, iconCls: 'mnu-dropcap-none', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.None, checked: true },
{ caption: this.textInText, iconCls: 'mnu-dropcap-intext', checkable: true, toggleGroup: 'menuDropCap', value: c_oAscDropCap.Drop }, { caption: this.textInText, iconCls: 'mnu-dropcap-intext', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.Drop },
{ caption: this.textInMargin, iconCls: 'mnu-dropcap-inmargin', checkable: true, toggleGroup: 'menuDropCap', value: c_oAscDropCap.Margin }, { caption: this.textInMargin, iconCls: 'mnu-dropcap-inmargin', checkable: true, toggleGroup: 'menuDropCap', value: Asc.c_oAscDropCap.Margin },
{ caption: '--' }, { caption: '--' },
this.mnuDropCapAdvanced = new Common.UI.MenuItem({ caption: this.mniEditDropCap }) this.mnuDropCapAdvanced = new Common.UI.MenuItem({ caption: this.mniEditDropCap })
] ]
@ -686,10 +686,10 @@ define([
var pageMarginsTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div><b><%= caption %></b></div>' + var pageMarginsTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div><b><%= caption %></b></div>' +
'<% if (options.value !== null) { %><div style="display: inline-block;margin-right: 20px;min-width: 80px;">' + '<% if (options.value !== null) { %><div style="display: inline-block;margin-right: 20px;min-width: 80px;">' +
'<label style="display: block;">'+ this.textTop +'<%= parseFloat((options.value[0]/10.).toFixed(2)) %> <%= Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.cm) %></label>' + '<label style="display: block;">'+ this.textTop +'<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[0]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %></label>' +
'<label style="display: block;">'+ this.textLeft +'<%= parseFloat((options.value[1]/10.).toFixed(2)) %> <%= Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.cm) %></label></div><div style="display: inline-block;">' + '<label style="display: block;">'+ this.textLeft +'<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[1]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %></label></div><div style="display: inline-block;">' +
'<label style="display: block;">'+ this.textBottom +'<%= parseFloat((options.value[2]/10.).toFixed(2)) %> <%= Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.cm) %></label>'+ '<label style="display: block;">'+ this.textBottom +'<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[2]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %></label>'+
'<label style="display: block;">'+ this.textRight +'<%= parseFloat((options.value[3]/10.).toFixed(2)) %> <%= Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.cm) %></label></div>'+ '<label style="display: block;">'+ this.textRight +'<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[3]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %></label></div>'+
'<% } %></a>'); '<% } %></a>');
this.btnPageMargins = new Common.UI.Button({ this.btnPageMargins = new Common.UI.Button({
@ -711,7 +711,10 @@ define([
}); });
this.toolbarControls.push(this.btnPageMargins); this.toolbarControls.push(this.btnPageMargins);
var pageSizeTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div><b><%= caption %></b></div><div><%= options.subtitle %></div></a>'); var pageSizeTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div><b><%= caption %></b></div>' +
'<div><%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[0]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %> x '+
'<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(options.value[1]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %></div></a>');
this.btnPageSize = new Common.UI.Button({ this.btnPageSize = new Common.UI.Button({
id : 'id-toolbar-btn-pagesize', id : 'id-toolbar-btn-pagesize',
cls : 'btn-toolbar', cls : 'btn-toolbar',
@ -1045,31 +1048,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}) })
@ -1374,6 +1377,29 @@ define([
this.mnuNonPrinting.items[0].setChecked(this.api.get_ShowParaMarks(), true); this.mnuNonPrinting.items[0].setChecked(this.api.get_ShowParaMarks(), true);
this.mnuNonPrinting.items[1].setChecked(this.api.get_ShowTableEmptyLine(), true); this.mnuNonPrinting.items[1].setChecked(this.api.get_ShowTableEmptyLine(), true);
this.btnShowHidenChars.toggle(this.mnuNonPrinting.items[0].checked, true); this.btnShowHidenChars.toggle(this.mnuNonPrinting.items[0].checked, true);
this.updateMetricUnit();
}
},
updateMetricUnit: function() {
var items = this.btnPageMargins.menu.items;
for (var i=0; i<items.length; i++) {
var mnu = items[i];
if (mnu.checkable) {
var checked = mnu.checked;
$(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options}));
if (checked) mnu.setChecked(checked);
}
}
items = this.btnPageSize.menu.items;
for (var i=0; i<items.length; i++) {
var mnu = items[i];
if (mnu.checkable) {
var checked = mnu.checked;
$(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options}));
if (checked) mnu.setChecked(checked);
}
} }
}, },

View file

@ -369,6 +369,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>

View file

@ -917,6 +917,7 @@
"DE.Views.FileMenuPanels.Settings.txtPt": "Point", "DE.Views.FileMenuPanels.Settings.txtPt": "Point",
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking", "DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
"DE.Views.FileMenuPanels.Settings.txtWin": "as Windows", "DE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
"DE.Views.FileMenuPanels.Settings.txtInch": "Inch",
"DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom Center", "DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom Center",
"DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom Left", "DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom Left",
"DE.Views.HeaderFooterSettings.textBottomRight": "Bottom Right", "DE.Views.HeaderFooterSettings.textBottomRight": "Bottom Right",
@ -1361,6 +1362,7 @@
"DE.Views.TableSettingsAdvanced.txtNoBorders": "No borders", "DE.Views.TableSettingsAdvanced.txtNoBorders": "No borders",
"DE.Views.TableSettingsAdvanced.txtPercent": "Percent", "DE.Views.TableSettingsAdvanced.txtPercent": "Percent",
"DE.Views.TableSettingsAdvanced.txtPt": "Point", "DE.Views.TableSettingsAdvanced.txtPt": "Point",
"DE.Views.TableSettingsAdvanced.txtInch": "Inch",
"DE.Views.TableSettingsAdvanced.textCellSize": "Cell Size", "DE.Views.TableSettingsAdvanced.textCellSize": "Cell Size",
"DE.Views.TableSettingsAdvanced.textPrefWidth": "Preferred width", "DE.Views.TableSettingsAdvanced.textPrefWidth": "Preferred width",
"DE.Views.TableSettingsAdvanced.textMeasure": "Measure in", "DE.Views.TableSettingsAdvanced.textMeasure": "Measure in",

View file

@ -917,6 +917,7 @@
"DE.Views.FileMenuPanels.Settings.txtPt": "Пункт", "DE.Views.FileMenuPanels.Settings.txtPt": "Пункт",
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Проверка орфографии", "DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Проверка орфографии",
"DE.Views.FileMenuPanels.Settings.txtWin": "как Windows", "DE.Views.FileMenuPanels.Settings.txtWin": "как Windows",
"DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",
"DE.Views.HeaderFooterSettings.textBottomCenter": "Снизу по центру", "DE.Views.HeaderFooterSettings.textBottomCenter": "Снизу по центру",
"DE.Views.HeaderFooterSettings.textBottomLeft": "Снизу слева", "DE.Views.HeaderFooterSettings.textBottomLeft": "Снизу слева",
"DE.Views.HeaderFooterSettings.textBottomRight": "Снизу справа", "DE.Views.HeaderFooterSettings.textBottomRight": "Снизу справа",
@ -1361,6 +1362,7 @@
"DE.Views.TableSettingsAdvanced.txtNoBorders": "Без границ", "DE.Views.TableSettingsAdvanced.txtNoBorders": "Без границ",
"DE.Views.TableSettingsAdvanced.txtPercent": "Процент", "DE.Views.TableSettingsAdvanced.txtPercent": "Процент",
"DE.Views.TableSettingsAdvanced.txtPt": "Пункт", "DE.Views.TableSettingsAdvanced.txtPt": "Пункт",
"DE.Views.TableSettingsAdvanced.txtInch": "Дюйм",
"DE.Views.TextArtSettings.strColor": "Цвет", "DE.Views.TextArtSettings.strColor": "Цвет",
"DE.Views.TextArtSettings.strFill": "Заливка", "DE.Views.TextArtSettings.strFill": "Заливка",
"DE.Views.TextArtSettings.strSize": "Толщина", "DE.Views.TextArtSettings.strSize": "Толщина",

View file

@ -58,7 +58,7 @@ Ext.define('DE.controller.Main', {
var api = this.api, var api = this.api,
app = this.getApplication(); app = this.getApplication();
api = new asc_docs_api("id-sdkeditor"); api = new Asc.asc_docs_api("id-sdkeditor");
api.SetMobileVersion(true); api.SetMobileVersion(true);
api.CreateComponents(); api.CreateComponents();
api.asc_SetFontsPath("../../../../sdkjs/fonts/"); api.asc_SetFontsPath("../../../../sdkjs/fonts/");
@ -190,15 +190,15 @@ Ext.define('DE.controller.Main', {
var text = ''; var text = '';
switch (id) { switch (id) {
case c_oAscAsyncAction['Save']: case Asc.c_oAscAsyncAction['Save']:
text = this.saveText; text = this.saveText;
break; break;
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = this.printText; text = this.printText;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
Ext.Viewport.setMasked({ Ext.Viewport.setMasked({
xtype : 'loadmask', xtype : 'loadmask',
message : text message : text
@ -220,63 +220,63 @@ Ext.define('DE.controller.Main', {
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText; config.message = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText; config.message = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText; config.message = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText; config.message = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage; config.message = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage; config.message = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage; config.message = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.SplitCellMaxRows: case Asc.c_oAscError.ID.SplitCellMaxRows:
config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value()); config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellMaxCols: case Asc.c_oAscError.ID.SplitCellMaxCols:
config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value()); config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellRowsDivider: case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.message = this.splitDividerErrorText.replace('%1', errData.get_Value()); config.message = this.splitDividerErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.message = this.errorKeyEncrypt; config.message = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.message = this.errorKeyExpire; config.message = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.message = this.errorUsersExceed; config.message = this.errorUsersExceed;
break; break;
case c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.message = this.errorCoAuthoringDisconnect; config.message = this.errorCoAuthoringDisconnect;
break; break;
case c_oAscError.ID.MobileUnexpectedCharCount: case Asc.c_oAscError.ID.MobileUnexpectedCharCount:
config.message = this.errorDocTooBig; config.message = this.errorDocTooBig;
config.out = true; config.out = true;
break; break;
@ -288,7 +288,7 @@ Ext.define('DE.controller.Main', {
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, config.message); Common.Gateway.reportError(id, config.message);
@ -348,7 +348,7 @@ Ext.define('DE.controller.Main', {
}, },
onDownloadAs: function() { onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.DOCX, true); this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
}, },
_hideLoadSplash: function(){ _hideLoadSplash: function(){

View file

@ -88,7 +88,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
imgProperty = new CImgProperty(); imgProperty = new CImgProperty();
mpImg.render(canvas, { maxWidth: 1024, maxHeight: 1024 }); mpImg.render(canvas, { maxWidth: 1024, maxHeight: 1024 });
imgProperty.put_WrappingStyle((input == inputInlineMedia) ? c_oAscWrapStyle2.Inline : c_oAscWrapStyle2.Square); imgProperty.put_WrappingStyle((input == inputInlineMedia) ? Asc.c_oAscWrapStyle2.Inline : Asc.c_oAscWrapStyle2.Square);
me.api.AddImageUrl(canvas.toDataURL(), imgProperty); me.api.AddImageUrl(canvas.toDataURL(), imgProperty);
@ -239,7 +239,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
if (selectedElements && selectedElements.length > 0) { if (selectedElements && selectedElements.length > 0) {
var elementType = selectedElements[0].get_ObjectType(); var elementType = selectedElements[0].get_ObjectType();
if (c_oAscTypeSelectElement.Table == elementType) { if (Asc.c_oAscTypeSelectElement.Table == elementType) {
type === 'row' type === 'row'
? this.api.addRowBelow() ? this.api.addRowBelow()
: type === 'column' : type === 'column'

View file

@ -350,6 +350,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/document/empty.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>

View file

@ -413,6 +413,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>

View file

@ -214,7 +214,7 @@ var ApplicationController = new(function(){
var text = ''; var text = '';
switch (id) switch (id)
{ {
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...'; text = 'Downloading document...';
break; break;
default: default:
@ -222,7 +222,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text); $('#id-loadmask .cmd-loader-title').html(text);
showMask(); showMask();
} }
@ -359,19 +359,19 @@ var ApplicationController = new(function(){
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText; message = me.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText; message = me.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText; message = me.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText; message = me.downloadErrorText;
break; break;
@ -380,7 +380,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, message); Common.Gateway.reportError(id, message);
@ -431,7 +431,7 @@ var ApplicationController = new(function(){
} }
function onDownloadAs() { function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.PPTX, true); if (api) api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
} }
// Helpers // Helpers
// ------------------------- // -------------------------
@ -712,7 +712,7 @@ var ApplicationController = new(function(){
}, 2000); }, 2000);
}); });
api = new asc_docs_api("editor_sdk"); api = new Asc.asc_docs_api("editor_sdk");
if (api){ if (api){
api.CreateComponents(); api.CreateComponents();

View file

@ -105,7 +105,7 @@ define([
// Initialize api // Initialize api
this.api = new asc_docs_api("editor_sdk"); this.api = new Asc.asc_docs_api("editor_sdk");
if (this.api){ if (this.api){
window["flat_desine"] = true; window["flat_desine"] = true;
@ -303,7 +303,7 @@ define([
}, },
onDownloadAs: function() { onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.PPTX, true); this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
}, },
onProcessMouse: function(data) { onProcessMouse: function(data) {
@ -359,11 +359,11 @@ define([
this.updateWindowTitle(true); this.updateWindowTitle(true);
action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
if (action) { if (action) {
this.setLongActionView(action) this.setLongActionView(action)
} else { } 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; var me = this;
if (me._state.timerSave===undefined) if (me._state.timerSave===undefined)
me._state.timerSave = setInterval(function(){ me._state.timerSave = setInterval(function(){
@ -377,13 +377,13 @@ define([
this.getApplication().getController('Statusbar').setStatusCaption(''); 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(); 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(); this.synchronizeChanges();
if (type == c_oAscAsyncActionType.BlockInteraction && !((id == c_oAscAsyncAction['LoadDocumentFonts'] || id == c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) { if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) {
this.onEditComplete(this.loadMask); this.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true); this.api.asc_enableKeyEvents(true);
} }
@ -393,63 +393,63 @@ define([
var title = '', text = ''; var title = '', text = '';
switch (action.id) { switch (action.id) {
case c_oAscAsyncAction['Open']: case Asc.c_oAscAsyncAction['Open']:
title = this.openTitleText; title = this.openTitleText;
text = this.openTextText; text = this.openTextText;
break; break;
case c_oAscAsyncAction['Save']: case Asc.c_oAscAsyncAction['Save']:
this._state.isSaving = new Date(); this._state.isSaving = new Date();
title = this.saveTitleText; title = this.saveTitleText;
text = this.saveTextText; text = this.saveTextText;
break; break;
case c_oAscAsyncAction['LoadDocumentFonts']: case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
title = this.loadFontsTitleText; title = this.loadFontsTitleText;
text = this.loadFontsTextText; text = this.loadFontsTextText;
break; break;
case c_oAscAsyncAction['LoadDocumentImages']: case Asc.c_oAscAsyncAction['LoadDocumentImages']:
title = this.loadImagesTitleText; title = this.loadImagesTitleText;
text = this.loadImagesTextText; text = this.loadImagesTextText;
break; break;
case c_oAscAsyncAction['LoadFont']: case Asc.c_oAscAsyncAction['LoadFont']:
title = this.loadFontTitleText; title = this.loadFontTitleText;
text = this.loadFontTextText; text = this.loadFontTextText;
break; break;
case c_oAscAsyncAction['LoadImage']: case Asc.c_oAscAsyncAction['LoadImage']:
title = this.loadImageTitleText; title = this.loadImageTitleText;
text = this.loadImageTextText; text = this.loadImageTextText;
break; break;
case c_oAscAsyncAction['DownloadAs']: case Asc.c_oAscAsyncAction['DownloadAs']:
title = this.downloadTitleText; title = this.downloadTitleText;
text = this.downloadTextText; text = this.downloadTextText;
break; break;
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
title = this.printTitleText; title = this.printTitleText;
text = this.printTextText; text = this.printTextText;
break; break;
case c_oAscAsyncAction['UploadImage']: case Asc.c_oAscAsyncAction['UploadImage']:
title = this.uploadImageTitleText; title = this.uploadImageTitleText;
text = this.uploadImageTextText; text = this.uploadImageTextText;
break; break;
case c_oAscAsyncAction['LoadTheme']: case Asc.c_oAscAsyncAction['LoadTheme']:
title = this.loadThemeTitleText; title = this.loadThemeTitleText;
text = this.loadThemeTextText; text = this.loadThemeTextText;
break; break;
case c_oAscAsyncAction['ApplyChanges']: case Asc.c_oAscAsyncAction['ApplyChanges']:
title = this.applyChangesTitleText; title = this.applyChangesTitleText;
text = this.applyChangesTextText; text = this.applyChangesTextText;
break; break;
case c_oAscAsyncAction['PrepareToSave']: case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText; title = this.savePreparingText;
text = this.savePreparingTitle; text = this.savePreparingTitle;
break; break;
@ -465,7 +465,7 @@ define([
break; break;
} }
if (action.type == c_oAscAsyncActionType['BlockInteraction']) { if (action.type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
if (!this.loadMask) if (!this.loadMask)
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
@ -486,7 +486,7 @@ define([
data.requestrights = true; data.requestrights = true;
this.appOptions.isEdit= true; this.appOptions.isEdit= true;
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights); this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
var me = this; var me = this;
setTimeout(function(){ setTimeout(function(){
@ -554,7 +554,7 @@ define([
me.api.SetDrawingFreeze(false); me.api.SetDrawingFreeze(false);
me.hidePreloader(); me.hidePreloader();
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
value = Common.localStorage.getItem("pe-settings-zoom"); value = Common.localStorage.getItem("pe-settings-zoom");
var zf = (value!==null) ? parseInt(value) : -1; var zf = (value!==null) ? parseInt(value) : -1;
@ -727,7 +727,7 @@ define([
if (!this.appOptions.isEdit) { if (!this.appOptions.isEdit) {
this.hidePreloader(); this.hidePreloader();
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
} }
}, },
@ -816,7 +816,9 @@ define([
} }
var value = Common.localStorage.getItem('pe-settings-unit'); var value = Common.localStorage.getItem('pe-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);
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('pe-hidden-rulers'); value = Common.localStorage.getItem('pe-hidden-rulers');
if (me.api.asc_SetViewRulers) me.api.asc_SetViewRulers(value===null || parseInt(value) === 0); if (me.api.asc_SetViewRulers) me.api.asc_SetViewRulers(value===null || parseInt(value) === 0);
@ -833,11 +835,11 @@ define([
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/ /** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) { if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) { } else if (!this._isDocReady) {
me.hidePreloader(); me.hidePreloader();
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
} }
// Message on window close // Message on window close
@ -857,7 +859,7 @@ define([
onError: function(id, level, errData) { onError: function(id, level, errData) {
this.hidePreloader(); this.hidePreloader();
this.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
var config = { var config = {
closable: false closable: false
@ -865,79 +867,79 @@ define([
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText; config.msg = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText; config.msg = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText; config.msg = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText; config.msg = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage; config.msg = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage; config.msg = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage; config.msg = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.SplitCellMaxRows: case Asc.c_oAscError.ID.SplitCellMaxRows:
config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value()); config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellMaxCols: case Asc.c_oAscError.ID.SplitCellMaxCols:
config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value()); config.msg = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellRowsDivider: case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value()); config.msg = this.splitDividerErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt; config.msg = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire; config.msg = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed; config.msg = this.errorUsersExceed;
break; break;
case c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect; config.msg = this.errorCoAuthoringDisconnect;
break; break;
case c_oAscError.ID.ConvertationPassword: case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect; config.msg = this.errorFilePassProtect;
break; break;
case c_oAscError.ID.StockChartError: case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart; config.msg = this.errorStockChart;
break; break;
case c_oAscError.ID.DataRangeError: case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange; config.msg = this.errorDataRange;
break; break;
case c_oAscError.ID.Database: case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection; config.msg = this.errorDatabaseConnection;
break; break;
case c_oAscError.ID.UserDrop: case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) { if (this._state.lostEditingRights) {
this._state.lostEditingRights = false; this._state.lostEditingRights = false;
return; return;
@ -946,7 +948,7 @@ define([
config.msg = this.errorUserDrop; config.msg = this.errorUserDrop;
break; break;
case c_oAscError.ID.Warning: case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer; config.msg = this.errorConnectToServer;
break; break;
@ -956,7 +958,7 @@ define([
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, config.msg); Common.Gateway.reportError(id, config.msg);
@ -978,7 +980,7 @@ define([
config.iconCls = 'warn'; config.iconCls = 'warn';
config.buttons = ['ok']; config.buttons = ['ok'];
config.callback = _.bind(function(btn){ config.callback = _.bind(function(btn){
if (id == c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) { if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
Common.UI.Menu.Manager.hideAll(); Common.UI.Menu.Manager.hideAll();
(this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas'); (this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas');
} }
@ -1167,14 +1169,14 @@ define([
onUpdateVersion: function(callback) { onUpdateVersion: function(callback) {
var me = this; var me = this;
me.needToUpdateVersion = true; me.needToUpdateVersion = true;
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.error({ Common.UI.error({
msg: this.errorUpdateVersion, msg: this.errorUpdateVersion,
callback: function() { callback: function() {
_.defer(function() { _.defer(function() {
Common.Gateway.updateVersion(); Common.Gateway.updateVersion();
if (callback) callback.call(me); if (callback) callback.call(me);
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}) })
} }
}); });
@ -1256,7 +1258,9 @@ define([
unitsChanged: function(m) { unitsChanged: function(m) {
var value = Common.localStorage.getItem("pe-settings-unit"); var value = Common.localStorage.getItem("pe-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('RightMenu').updateMetricUnit();
}, },

View file

@ -280,17 +280,17 @@ define([
getDocumentSettingsType: function(type) { getDocumentSettingsType: function(type) {
switch (type) { switch (type) {
case c_oAscTypeSelectElement.Paragraph: case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph; return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Table: case Asc.c_oAscTypeSelectElement.Table:
return Common.Utils.documentSettingsType.Table; return Common.Utils.documentSettingsType.Table;
case c_oAscTypeSelectElement.Image: case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image; return Common.Utils.documentSettingsType.Image;
case c_oAscTypeSelectElement.Shape: case Asc.c_oAscTypeSelectElement.Shape:
return Common.Utils.documentSettingsType.Shape; return Common.Utils.documentSettingsType.Shape;
case c_oAscTypeSelectElement.Slide: case Asc.c_oAscTypeSelectElement.Slide:
return Common.Utils.documentSettingsType.Slide; return Common.Utils.documentSettingsType.Slide;
case c_oAscTypeSelectElement.Chart: case Asc.c_oAscTypeSelectElement.Chart:
return Common.Utils.documentSettingsType.Chart; return Common.Utils.documentSettingsType.Chart;
} }
} }

View file

@ -461,9 +461,9 @@ define([
btnVerticalAlign = this.toolbar.btnVerticalAlign; btnVerticalAlign = this.toolbar.btnVerticalAlign;
switch (v) { switch (v) {
case c_oAscVerticalTextAlign.TEXT_ALIGN_TOP: index = 0; align = 'btn-align-top'; break; case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP: index = 0; align = 'btn-align-top'; break;
case c_oAscVerticalTextAlign.TEXT_ALIGN_CTR: index = 1; align = 'btn-align-middle'; break; case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR: index = 1; align = 'btn-align-middle'; break;
case c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM: index = 2; align = 'btn-align-bottom'; break; case Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM: index = 2; align = 'btn-align-bottom'; break;
default: index = -255; align = 'btn-align-middle'; break; default: index = -255; align = 'btn-align-middle'; break;
} }
@ -567,14 +567,14 @@ define([
while (++i < selectedObjects.length) { while (++i < selectedObjects.length) {
type = selectedObjects[i].get_ObjectType(); type = selectedObjects[i].get_ObjectType();
pr = selectedObjects[i].get_ObjectValue(); pr = selectedObjects[i].get_ObjectValue();
if (type == c_oAscTypeSelectElement.Paragraph) { if (type == Asc.c_oAscTypeSelectElement.Paragraph) {
paragraph_locked = pr.get_Locked(); paragraph_locked = pr.get_Locked();
no_paragraph = false; no_paragraph = false;
no_object = false; no_object = false;
} else if (type == c_oAscTypeSelectElement.Slide) { } else if (type == Asc.c_oAscTypeSelectElement.Slide) {
slide_deleted = pr.get_LockDelete(); slide_deleted = pr.get_LockDelete();
slide_layout_lock = pr.get_LockLayout(); slide_layout_lock = pr.get_LockLayout();
} else if (type == c_oAscTypeSelectElement.Image || type == c_oAscTypeSelectElement.Shape || type == c_oAscTypeSelectElement.Chart || type == c_oAscTypeSelectElement.Table) { } else if (type == Asc.c_oAscTypeSelectElement.Image || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) {
shape_locked = pr.get_Locked(); shape_locked = pr.get_Locked();
no_object = false; no_object = false;
} }
@ -1187,7 +1187,7 @@ define([
slides: _arr slides: _arr
}); });
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
props.put_Text(text); props.put_Text(text);
win.show(); win.show();
@ -1520,7 +1520,7 @@ define([
var picker = this.toolbar.mnuFontColorPicker; var picker = this.toolbar.mnuFontColorPicker;
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else } else
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());

View file

@ -108,31 +108,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });
@ -249,7 +249,7 @@ define([
this.disableControls(this._locked); this.disableControls(this._locked);
if (props){ if (props){
this._originalProps = new CAscChartProp(props); this._originalProps = new Asc.CAscChartProp(props);
this._noApply = true; this._noApply = true;
var value = props.get_SeveralCharts() || this._locked; var value = props.get_SeveralCharts() || this._locked;
@ -320,7 +320,7 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
}, },
@ -363,7 +363,7 @@ define([
this._state.ChartType = -1; this._state.ChartType = -1;
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.changeType(rawData.type); props.changeType(rawData.type);
this.api.ChartApply(props); this.api.ChartApply(props);
} }
@ -392,7 +392,7 @@ define([
btnIconEl.css('background-image', style); btnIconEl.css('background-image', style);
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.putStyle(rawData.data); props.putStyle(rawData.data);
this.api.ChartApply(props); this.api.ChartApply(props);
} }
@ -450,7 +450,7 @@ define([
this.spnHeight.setValue(h, true); this.spnHeight.setValue(h, true);
} }
if (this.api) { if (this.api) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.put_Width(Common.Utils.Metric.fnRecalcToMM(w)); props.put_Width(Common.Utils.Metric.fnRecalcToMM(w));
props.put_Height(Common.Utils.Metric.fnRecalcToMM(h)); props.put_Height(Common.Utils.Metric.fnRecalcToMM(h));
this.api.ChartApply(props); this.api.ChartApply(props);
@ -471,7 +471,7 @@ define([
this.spnWidth.setValue(w, true); this.spnWidth.setValue(w, true);
} }
if (this.api) { if (this.api) {
var props = new CAscChartProp(); var props = new Asc.CAscChartProp();
props.put_Width(Common.Utils.Metric.fnRecalcToMM(w)); props.put_Width(Common.Utils.Metric.fnRecalcToMM(w));
props.put_Height(Common.Utils.Metric.fnRecalcToMM(h)); props.put_Height(Common.Utils.Metric.fnRecalcToMM(h));
this.api.ChartApply(props); this.api.ChartApply(props);

View file

@ -73,7 +73,7 @@ define([
var showPoint = [event.get_X(), event.get_Y()], var showPoint = [event.get_X(), event.get_Y()],
menuContainer = $(me.el).find(Common.Utils.String.format('#menu-container-{0}', menu.id)); menuContainer = $(me.el).find(Common.Utils.String.format('#menu-container-{0}', menu.id));
if (event.get_Type() == c_oAscContextMenuTypes.Thumbnails) { if (event.get_Type() == Asc.c_oAscContextMenuTypes.Thumbnails) {
showPoint[0] -= 3; showPoint[0] -= 3;
showPoint[1] -= 3; showPoint[1] -= 3;
} }
@ -120,21 +120,21 @@ define([
var elType = element.get_ObjectType(), var elType = element.get_ObjectType(),
elValue = element.get_ObjectValue(); elValue = element.get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
menu_to_show = me.pictureMenu; menu_to_show = me.pictureMenu;
menu_props.imgProps = {}; menu_props.imgProps = {};
menu_props.imgProps.value = elValue; menu_props.imgProps.value = elValue;
menu_props.imgProps.locked = (elValue) ? elValue.get_Locked() : false; menu_props.imgProps.locked = (elValue) ? elValue.get_Locked() : false;
} else if (c_oAscTypeSelectElement.Table == elType) } else if (Asc.c_oAscTypeSelectElement.Table == elType)
{ {
menu_to_show = me.tableMenu; menu_to_show = me.tableMenu;
menu_props.tableProps = {}; menu_props.tableProps = {};
menu_props.tableProps.value = elValue; menu_props.tableProps.value = elValue;
menu_props.tableProps.locked = (elValue) ? elValue.get_Locked() : false; menu_props.tableProps.locked = (elValue) ? elValue.get_Locked() : false;
} else if (c_oAscTypeSelectElement.Hyperlink == elType) { } else if (Asc.c_oAscTypeSelectElement.Hyperlink == elType) {
menu_props.hyperProps = {}; menu_props.hyperProps = {};
menu_props.hyperProps.value = elValue; menu_props.hyperProps.value = elValue;
} else if (c_oAscTypeSelectElement.Shape == elType) { // shape } else if (Asc.c_oAscTypeSelectElement.Shape == elType) { // shape
menu_to_show = me.pictureMenu; menu_to_show = me.pictureMenu;
menu_props.shapeProps = {}; menu_props.shapeProps = {};
menu_props.shapeProps.value = elValue; menu_props.shapeProps.value = elValue;
@ -142,17 +142,17 @@ define([
if (elValue.get_FromChart()) if (elValue.get_FromChart())
menu_props.shapeProps.isChart = true; menu_props.shapeProps.isChart = true;
} }
else if (c_oAscTypeSelectElement.Chart == elType) { else if (Asc.c_oAscTypeSelectElement.Chart == elType) {
menu_to_show = me.pictureMenu; menu_to_show = me.pictureMenu;
menu_props.chartProps = {}; menu_props.chartProps = {};
menu_props.chartProps.value = elValue; menu_props.chartProps.value = elValue;
menu_props.chartProps.locked = (elValue) ? elValue.get_Locked() : false; menu_props.chartProps.locked = (elValue) ? elValue.get_Locked() : false;
} }
else if (c_oAscTypeSelectElement.Slide == elType) { else if (Asc.c_oAscTypeSelectElement.Slide == elType) {
menu_props.slideProps = {}; menu_props.slideProps = {};
menu_props.slideProps.value = elValue; menu_props.slideProps.value = elValue;
menu_props.slideProps.locked = (elValue) ? elValue.get_LockDelete() : false; menu_props.slideProps.locked = (elValue) ? elValue.get_LockDelete() : false;
} else if (c_oAscTypeSelectElement.Paragraph == elType) { } else if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
menu_props.paraProps = {}; menu_props.paraProps = {};
menu_props.paraProps.value = elValue; menu_props.paraProps.value = elValue;
menu_props.paraProps.locked = (elValue) ? elValue.get_Locked() : false; menu_props.paraProps.locked = (elValue) ? elValue.get_Locked() : false;
@ -181,7 +181,7 @@ define([
var onContextMenu = function(event){ var onContextMenu = function(event){
_.delay(function(){ _.delay(function(){
if (event.get_Type() == c_oAscContextMenuTypes.Thumbnails) { if (event.get_Type() == Asc.c_oAscContextMenuTypes.Thumbnails) {
showPopupMenu.call(me, me.slideMenu, {isSlideSelect: event.get_IsSlideSelect(), fromThumbs: true}, event); showPopupMenu.call(me, me.slideMenu, {isSlideSelect: event.get_IsSlideSelect(), fromThumbs: true}, event);
} else { } else {
showObjectMenu.call(me, event); showObjectMenu.call(me, event);
@ -552,7 +552,7 @@ define([
slides: _arr slides: _arr
}); });
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
props.put_Text(text); props.put_Text(text);
win.show(); win.show();
@ -561,7 +561,7 @@ define([
var selectedElements = me.api.getSelectedElements(); var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(el, i) { _.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(); props = selectedElements[i].get_ObjectValue();
}); });
} }
@ -981,7 +981,7 @@ define([
lockedLayout = false; lockedLayout = false;
if (selectedElements && _.isArray(selectedElements)){ if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(element, index) { _.each(selectedElements, function(element, index) {
if (c_oAscTypeSelectElement.Slide == element.get_ObjectType()) { if (Asc.c_oAscTypeSelectElement.Slide == element.get_ObjectType()) {
var elValue = element.get_ObjectValue(); var elValue = element.get_ObjectValue();
locked = elValue.get_LockDelete(); locked = elValue.get_LockDelete();
lockedDeleted = elValue.get_LockRemove(); lockedDeleted = elValue.get_LockRemove();
@ -1105,7 +1105,7 @@ define([
menu : (function(){ menu : (function(){
function onItemClick(item, e) { function onItemClick(item, e) {
if (me.api) { if (me.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.value); properties.put_CellsVAlign(item.value);
me.api.tblApply(properties); me.api.tblApply(properties);
} }
@ -1121,19 +1121,19 @@ define([
caption : me.topCellText, caption : me.topCellText,
checkable : true, checkable : true,
toggleGroup : 'popuptablecellalign', toggleGroup : 'popuptablecellalign',
value : c_oAscVertAlignJc.Top value : Asc.c_oAscVertAlignJc.Top
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
me.menuTableCellCenter = new Common.UI.MenuItem({ me.menuTableCellCenter = new Common.UI.MenuItem({
caption : me.centerCellText, caption : me.centerCellText,
checkable : true, checkable : true,
toggleGroup : 'popuptablecellalign', toggleGroup : 'popuptablecellalign',
value : c_oAscVertAlignJc.Center value : Asc.c_oAscVertAlignJc.Center
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
me.menuTableCellBottom = new Common.UI.MenuItem({ me.menuTableCellBottom = new Common.UI.MenuItem({
caption : me.bottomCellText, caption : me.bottomCellText,
checkable : true, checkable : true,
toggleGroup : 'popuptablecellalign', toggleGroup : 'popuptablecellalign',
value : c_oAscVertAlignJc.Bottom value : Asc.c_oAscVertAlignJc.Bottom
}).on('click', _.bind(onItemClick, me)) }).on('click', _.bind(onItemClick, me))
] ]
}) })
@ -1152,7 +1152,7 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) { if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new PE.Views.TableSettingsAdvanced( (new PE.Views.TableSettingsAdvanced(
{ {
tableProps: elValue, tableProps: elValue,
@ -1185,7 +1185,7 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal; var imgsizeOriginal;
if (!menuImgOriginalSize.isDisabled()) { if (!menuImgOriginalSize.isDisabled()) {
@ -1225,7 +1225,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Shape == elType) { if (Asc.c_oAscTypeSelectElement.Shape == elType) {
(new PE.Views.ShapeSettingsAdvanced( (new PE.Views.ShapeSettingsAdvanced(
{ {
shapeProps: elValue, shapeProps: elValue,
@ -1258,7 +1258,7 @@ define([
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new PE.Views.ParagraphSettingsAdvanced( (new PE.Views.ParagraphSettingsAdvanced(
{ {
paragraphProps: elValue, paragraphProps: elValue,
@ -1446,32 +1446,32 @@ define([
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignLeft, caption : me.textShapeAlignLeft,
iconCls : 'mnu-shape-align-left', iconCls : 'mnu-shape-align-left',
value : c_oAscAlignShapeType.ALIGN_LEFT value : Asc.c_oAscAlignShapeType.ALIGN_LEFT
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignCenter, caption : me.textShapeAlignCenter,
iconCls : 'mnu-shape-align-center', iconCls : 'mnu-shape-align-center',
value : c_oAscAlignShapeType.ALIGN_CENTER value : Asc.c_oAscAlignShapeType.ALIGN_CENTER
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignRight, caption : me.textShapeAlignRight,
iconCls : 'mnu-shape-align-right', iconCls : 'mnu-shape-align-right',
value : c_oAscAlignShapeType.ALIGN_RIGHT value : Asc.c_oAscAlignShapeType.ALIGN_RIGHT
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignTop, caption : me.textShapeAlignTop,
iconCls : 'mnu-shape-align-top', iconCls : 'mnu-shape-align-top',
value : c_oAscAlignShapeType.ALIGN_TOP value : Asc.c_oAscAlignShapeType.ALIGN_TOP
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignMiddle, caption : me.textShapeAlignMiddle,
iconCls : 'mnu-shape-align-middle', iconCls : 'mnu-shape-align-middle',
value : c_oAscAlignShapeType.ALIGN_MIDDLE value : Asc.c_oAscAlignShapeType.ALIGN_MIDDLE
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
caption : me.textShapeAlignBottom, caption : me.textShapeAlignBottom,
iconCls : 'mnu-shape-align-bottom', iconCls : 'mnu-shape-align-bottom',
value : c_oAscAlignShapeType.ALIGN_BOTTOM value : Asc.c_oAscAlignShapeType.ALIGN_BOTTOM
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
{caption : '--'}, {caption : '--'},
new Common.UI.MenuItem({ new Common.UI.MenuItem({
@ -1527,19 +1527,19 @@ define([
caption : me.topCellText, caption : me.topCellText,
checkable : true, checkable : true,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
me.menuParagraphCenter = new Common.UI.MenuItem({ me.menuParagraphCenter = new Common.UI.MenuItem({
caption : me.centerCellText, caption : me.centerCellText,
checkable : true, checkable : true,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
}).on('click', _.bind(onItemClick, me)), }).on('click', _.bind(onItemClick, me)),
me.menuParagraphBottom = new Common.UI.MenuItem({ me.menuParagraphBottom = new Common.UI.MenuItem({
caption : me.bottomCellText, caption : me.bottomCellText,
checkable : true, checkable : true,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
}).on('click', _.bind(onItemClick, me)) }).on('click', _.bind(onItemClick, me))
] ]
}) })
@ -1567,7 +1567,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.normal direction : Asc.c_oAscVertDrawingText.normal
}).on('click', _.bind(paragraphDirection, me)), }).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect90 = new Common.UI.MenuItem({ me.menuParagraphDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text, caption : me.direct90Text,
@ -1575,7 +1575,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert direction : Asc.c_oAscVertDrawingText.vert
}).on('click', _.bind(paragraphDirection, me)), }).on('click', _.bind(paragraphDirection, me)),
me.menuParagraphDirect270 = new Common.UI.MenuItem({ me.menuParagraphDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text, caption : me.direct270Text,
@ -1583,7 +1583,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert270 direction : Asc.c_oAscVertDrawingText.vert270
}).on('click', _.bind(paragraphDirection, me)) }).on('click', _.bind(paragraphDirection, me))
] ]
}) })
@ -1693,14 +1693,14 @@ define([
menuParagraphDirection.setVisible(isInShape && !isInChart); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !! menuParagraphDirection.setVisible(isInShape && !isInChart); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if (isInShape || isInChart) { if (isInShape || isInChart) {
var align = value.shapeProps.value.get_VerticalTextAlign(); var align = value.shapeProps.value.get_VerticalTextAlign();
me.menuParagraphTop.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_TOP); me.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
me.menuParagraphCenter.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_CTR); me.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
me.menuParagraphBottom.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM); me.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
var dir = value.shapeProps.value.get_Vert(); var dir = value.shapeProps.value.get_Vert();
me.menuParagraphDirectH.setChecked(dir == c_oAscVertDrawingText.normal); me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
me.menuParagraphDirect90.setChecked(dir == c_oAscVertDrawingText.vert); me.menuParagraphDirect90.setChecked(dir == Asc.c_oAscVertDrawingText.vert);
me.menuParagraphDirect270.setChecked(dir == c_oAscVertDrawingText.vert270); me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
} }
menuParagraphVAlign.setDisabled(disabled); menuParagraphVAlign.setDisabled(disabled);
menuParagraphDirection.setDisabled(disabled); menuParagraphDirection.setDisabled(disabled);
@ -1718,7 +1718,7 @@ define([
if (text!==false) { if (text!==false) {
menuAddHyperlinkPara.hyperProps = {}; menuAddHyperlinkPara.hyperProps = {};
menuAddHyperlinkPara.hyperProps.value = new CHyperlinkProperty(); menuAddHyperlinkPara.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkPara.hyperProps.value.put_Text(text); menuAddHyperlinkPara.hyperProps.value.put_Text(text);
} }
@ -1771,9 +1771,9 @@ define([
var disabled = (value.slideProps!==undefined && value.slideProps.locked); var disabled = (value.slideProps!==undefined && value.slideProps.locked);
me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == c_oAscVertAlignJc.Top); me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(value.tableProps.value.get_CellsVAlign() == c_oAscVertAlignJc.Center); me.menuTableCellCenter.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(value.tableProps.value.get_CellsVAlign() == c_oAscVertAlignJc.Bottom); me.menuTableCellBottom.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Bottom);
if (me.api) { if (me.api) {
mnuTableMerge.setDisabled(value.tableProps.locked || disabled || !me.api.CheckBeforeMergeCells()); mnuTableMerge.setDisabled(value.tableProps.locked || disabled || !me.api.CheckBeforeMergeCells());
@ -1802,7 +1802,7 @@ define([
if (text!==false) { if (text!==false) {
menuAddHyperlinkTable.hyperProps = {}; menuAddHyperlinkTable.hyperProps = {};
menuAddHyperlinkTable.hyperProps.value = new CHyperlinkProperty(); menuAddHyperlinkTable.hyperProps.value = new Asc.CHyperlinkProperty();
menuAddHyperlinkTable.hyperProps.value.put_Text(text); menuAddHyperlinkTable.hyperProps.value.put_Text(text);
} }
if (!_.isUndefined(value.paraProps)) { if (!_.isUndefined(value.paraProps)) {

View file

@ -53,8 +53,8 @@ define([
menu: undefined, menu: undefined,
formats: [[ formats: [[
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF}, {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'PPTX', imgCls: 'pptx', type: c_oAscFileType.PPTX} {name: 'PPTX', imgCls: 'pptx', type: Asc.c_oAscFileType.PPTX}
]], ]],
@ -222,7 +222,8 @@ define([
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm }, { value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm },
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt } { value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt },
{ value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch }
] ]
}); });
@ -335,7 +336,8 @@ define([
strFast: 'Fast', strFast: 'Fast',
strStrict: 'Strict', strStrict: 'Strict',
textAutoRecover: 'Autorecover', textAutoRecover: 'Autorecover',
strAutoRecover: 'Turn on autorecover' strAutoRecover: 'Turn on autorecover',
txtInch: 'Inch'
}, PE.Views.FileMenuPanels.Settings || {})); }, PE.Views.FileMenuPanels.Settings || {}));
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -159,7 +159,7 @@ define([
me.inputTip = new Common.UI.InputField({ me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'), el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;', style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength maxLength : Asc.c_oAscMaxTooltipLength
}); });
me.radioNext = new Common.UI.RadioBox({ me.radioNext = new Common.UI.RadioBox({
@ -237,7 +237,7 @@ define([
getSettings: function () { getSettings: function () {
var me = this, var me = this,
props = new CHyperlinkProperty(); props = new Asc.CHyperlinkProperty();
var def_display = ''; var def_display = '';
if (me.cmbLinkType.getValue() == c_oHyperlinkType.InternalLink) { if (me.cmbLinkType.getValue() == c_oHyperlinkType.InternalLink) {
var url = "ppaction://hlink"; var url = "ppaction://hlink";

View file

@ -207,7 +207,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
var imgsizeOriginal; var imgsizeOriginal;
if (!me.btnOriginalSize.isDisabled()) { if (!me.btnOriginalSize.isDisabled()) {
imgsizeOriginal = me.api.get_OriginalSizeImage(); imgsizeOriginal = me.api.get_OriginalSizeImage();

View file

@ -219,7 +219,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
if (this.spnWidth.getValue()!=='') if (this.spnWidth.getValue()!=='')
properties.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); properties.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue()));
var Position = new CPosition(); var Position = new Asc.CPosition();
if (this.spnX.getValue() !== '') if (this.spnX.getValue() !== '')
Position.put_X(Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue())); Position.put_X(Common.Utils.Metric.fnRecalcToMM(this.spnX.getNumberValue()));
if (this.spnY.getValue() !== '') if (this.spnY.getValue() !== '')
@ -234,7 +234,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
this.sizeMax = { this.sizeMax = {

View file

@ -294,13 +294,13 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
var rec = this.cmbLineRule.store.at(1); var rec = this.cmbLineRule.store.at(1);
rec.set({defaultUnit: Common.Utils.Metric.getCurrentMetricName(), rec.set({defaultUnit: Common.Utils.Metric.getCurrentMetricName(),
minValue: parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)), minValue: parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)),
step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm) ? 0.01: 1}); step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt) ? 1 : 0.01});
if (this._state.LineRule !== null) { if (this._state.LineRule !== null) {
var obj; var obj;
@ -327,7 +327,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new PE.Views.ParagraphSettingsAdvanced( (new PE.Views.ParagraphSettingsAdvanced(
{ {
paragraphProps: elValue, paragraphProps: elValue,

View file

@ -359,9 +359,9 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
if (spinner.el.id == 'paragraphadv-spin-spacing') if (spinner.el.id == 'paragraphadv-spin-spacing')
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
else else
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }

View file

@ -82,16 +82,16 @@ define([
this._state = { this._state = {
Transparency: null, Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent', ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH, BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
DisabledFillPanels: false, DisabledFillPanels: false,
DisabledControls: false, DisabledControls: false,
HideShapeOnlySettings: false, HideShapeOnlySettings: false,
@ -100,10 +100,10 @@ define([
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH; this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -122,11 +122,11 @@ define([
this.render(); this.render();
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT}, {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -306,8 +306,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [ this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH}, {displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE} {displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
]; ];
this.cmbFillType = new Common.UI.ComboBox({ this.cmbFillType = new Common.UI.ComboBox({
@ -366,8 +366,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end'); this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -580,31 +580,31 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.put_fill(fill); props.put_fill(fill);
this.api.ShapeApply(props); this.api.ShapeApply(props);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -621,15 +621,15 @@ define([
this.api.ShapeApply(props); this.api.ShapeApply(props);
} }
break; break;
case c_oAscFill.FILL_TYPE_BLIP: case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break; break;
case c_oAscFill.FILL_TYPE_PATT: case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
@ -649,12 +649,12 @@ define([
this.api.ShapeApply(props); this.api.ShapeApply(props);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
props.put_fill(fill); props.put_fill(fill);
this.api.ShapeApply(props); this.api.ShapeApply(props);
@ -673,10 +673,10 @@ define([
var fill = new CAscFill(); var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') { if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
} else { } else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
} }
@ -696,10 +696,10 @@ define([
this.PatternFillType = record.get('type'); this.PatternFillType = record.get('type');
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -715,10 +715,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -734,9 +734,9 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
} }
@ -750,10 +750,10 @@ define([
onFillTypeSelect: function(combo, record) { onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value; this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) { if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType); fill.get_fill().put_type(this.BlipFillType);
@ -810,7 +810,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -820,7 +820,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -834,10 +834,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -866,12 +866,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000); fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -893,13 +893,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -935,13 +935,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -962,13 +962,13 @@ define([
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1; this._state.StrokeType = this._state.StrokeWidth = -1;
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent') if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -1013,9 +1013,9 @@ define([
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -1036,7 +1036,7 @@ define([
if (me.BlipFillType !== null) { if (me.BlipFillType !== null) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType); fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl); fill.get_fill().put_url(checkUrl);
@ -1064,7 +1064,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Shape == elType) { if (Asc.c_oAscTypeSelectElement.Shape == elType) {
(new PE.Views.ShapeSettingsAdvanced( (new PE.Views.ShapeSettingsAdvanced(
{ {
shapeProps: elValue, shapeProps: elValue,
@ -1121,13 +1121,13 @@ define([
if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null; this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill(); fill = fill.get_fill();
color = fill.get_color(); color = fill.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1135,23 +1135,23 @@ define([
} else } else
this.ShapeColor = {Value: 0, Color: 'transparent'}; this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'}; this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000'; this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill(); fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) { if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) { if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType); this.cmbFillType.setValue(this.BlipFillType);
} else } else
this.cmbFillType.setValue(''); this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType; this._state.BlipFillType = this.BlipFillType;
} }
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill(); fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) { if (this._state.PatternFillType !== this.PatternFillType) {
@ -1166,7 +1166,7 @@ define([
color = fill.get_color_fg(); color = fill.get_color_fg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1176,7 +1176,7 @@ define([
color = fill.get_color_bg(); color = fill.get_color_bg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1184,17 +1184,17 @@ define([
} else } else
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color); this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill(); fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1205,7 +1205,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000); var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -1222,7 +1222,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -1233,7 +1233,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -1261,7 +1261,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]}; this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]}; this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1304,10 +1304,10 @@ define([
var strokeType = stroke.get_type(); var strokeType = stroke.get_type();
if (stroke) { if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color(); color = stroke.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} }
else else
@ -1347,8 +1347,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color; this._state.StrokeColor = this.BorderColor.Color;
} }
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) { if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width(); var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1368,7 +1368,7 @@ define([
} }
this.BorderSize = w; this.BorderSize = w;
} }
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) { } else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0; this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value'); this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize); this.cmbBorderSize.setValue(this.BorderSize);
@ -1528,9 +1528,9 @@ define([
if (this.api) { if (this.api) {
var props = new CAscShapeProp(); var props = new CAscShapeProp();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE); fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type')); fill.get_fill().put_texture_id(record.get('type'));
props.put_fill(fill); props.put_fill(fill);
this.api.ShapeApply(props); this.api.ShapeApply(props);
@ -1604,11 +1604,11 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP); this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT); this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null)); this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
}, },
setLocked: function (locked) { setLocked: function (locked) {

View file

@ -226,9 +226,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
// Shape // Shape
this._arrCapType = [ this._arrCapType = [
{displayValue: this.textFlat, value: c_oAscLineCapType.Flat}, {displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: c_oAscLineCapType.Round}, {displayValue: this.textRound, value: Asc.c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: c_oAscLineCapType.Square} {displayValue: this.textSquare, value: Asc.c_oAscLineCapType.Square}
]; ];
this.cmbCapType = new Common.UI.ComboBox({ this.cmbCapType = new Common.UI.ComboBox({
@ -238,7 +238,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
editable: false, editable: false,
data: this._arrCapType data: this._arrCapType
}); });
this.cmbCapType.setValue(c_oAscLineCapType.Flat); this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat);
this.cmbCapType.on('selected', _.bind(function(combo, record){ this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_stroke()===null) if (this._changedProps.get_stroke()===null)
@ -249,9 +249,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
}, this)); }, this));
this._arrJoinType = [ this._arrJoinType = [
{displayValue: this.textRound, value: c_oAscLineJoinType.Round}, {displayValue: this.textRound, value: Asc.c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: c_oAscLineJoinType.Bevel}, {displayValue: this.textBevel, value: Asc.c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: c_oAscLineJoinType.Miter} {displayValue: this.textMiter, value: Asc.c_oAscLineJoinType.Miter}
]; ];
this.cmbJoinType = new Common.UI.ComboBox({ this.cmbJoinType = new Common.UI.ComboBox({
el: $('#shape-advanced-join-type'), el: $('#shape-advanced-join-type'),
@ -260,7 +260,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
editable: false, editable: false,
data: this._arrJoinType data: this._arrJoinType
}); });
this.cmbJoinType.setValue(c_oAscLineJoinType.Round); this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round);
this.cmbJoinType.on('selected', _.bind(function(combo, record){ this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_stroke()===null) if (this._changedProps.get_stroke()===null)
@ -275,25 +275,25 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
for ( var i=0; i<6; i++ ) for ( var i=0; i<6; i++ )
_arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0}); _arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0});
_arrStyles[0].type = c_oAscLineBeginType.None; _arrStyles[0].type = Asc.c_oAscLineBeginType.None;
_arrStyles[1].type = c_oAscLineBeginType.Triangle; _arrStyles[1].type = Asc.c_oAscLineBeginType.Triangle;
_arrStyles[2].type = c_oAscLineBeginType.Arrow; _arrStyles[2].type = Asc.c_oAscLineBeginType.Arrow;
_arrStyles[3].type = c_oAscLineBeginType.Stealth; _arrStyles[3].type = Asc.c_oAscLineBeginType.Stealth;
_arrStyles[4].type = c_oAscLineBeginType.Diamond; _arrStyles[4].type = Asc.c_oAscLineBeginType.Diamond;
_arrStyles[5].type = c_oAscLineBeginType.Oval; _arrStyles[5].type = Asc.c_oAscLineBeginType.Oval;
for ( i=0; i<9; i++ ) for ( i=0; i<9; i++ )
_arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)}); _arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)});
_arrSize[0].type = c_oAscLineBeginSize.small_small; _arrSize[0].type = Asc.c_oAscLineBeginSize.small_small;
_arrSize[1].type = c_oAscLineBeginSize.small_mid; _arrSize[1].type = Asc.c_oAscLineBeginSize.small_mid;
_arrSize[2].type = c_oAscLineBeginSize.small_large; _arrSize[2].type = Asc.c_oAscLineBeginSize.small_large;
_arrSize[3].type = c_oAscLineBeginSize.mid_small; _arrSize[3].type = Asc.c_oAscLineBeginSize.mid_small;
_arrSize[4].type = c_oAscLineBeginSize.mid_mid; _arrSize[4].type = Asc.c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = c_oAscLineBeginSize.mid_large; _arrSize[5].type = Asc.c_oAscLineBeginSize.mid_large;
_arrSize[6].type = c_oAscLineBeginSize.large_small; _arrSize[6].type = Asc.c_oAscLineBeginSize.large_small;
_arrSize[7].type = c_oAscLineBeginSize.large_mid; _arrSize[7].type = Asc.c_oAscLineBeginSize.large_mid;
_arrSize[8].type = c_oAscLineBeginSize.large_large; _arrSize[8].type = Asc.c_oAscLineBeginSize.large_large;
this.btnBeginStyle = new Common.UI.ComboBox({ this.btnBeginStyle = new Common.UI.ComboBox({
@ -529,7 +529,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
this.sizeMax = { this.sizeMax = {

View file

@ -84,21 +84,21 @@ define([
}; };
this._state = { this._state = {
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
SlideColor: 'ffffff', SlideColor: 'ffffff',
BlipFillType: c_oAscFillBlipType.STRETCH, BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR
}; };
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.SlideColor = {Value: 1, Color: 'ffffff'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.SlideColor = {Value: 1, Color: 'ffffff'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH; this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.Effect = c_oAscSlideTransitionTypes.None; this.Effect = Asc.c_oAscSlideTransitionTypes.None;
this.EffectType = undefined; this.EffectType = undefined;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -112,11 +112,11 @@ define([
this.render(); this.render();
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT}, {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -291,8 +291,8 @@ define([
this.FillItems.push(this.btnInsertFromUrl); this.FillItems.push(this.btnInsertFromUrl);
this._arrFillType = [ this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH}, {displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE} {displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
]; ];
this.cmbFillType = new Common.UI.ComboBox({ this.cmbFillType = new Common.UI.ComboBox({
@ -325,8 +325,8 @@ define([
this.FillItems.push(this.btnTexture); this.FillItems.push(this.btnTexture);
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -445,15 +445,15 @@ define([
this.FillGradientContainer = $('#slide-panel-gradient-fill'); this.FillGradientContainer = $('#slide-panel-gradient-fill');
this._arrEffectName = [ this._arrEffectName = [
{displayValue: this.textNone, value: c_oAscSlideTransitionTypes.None}, {displayValue: this.textNone, value: Asc.c_oAscSlideTransitionTypes.None},
{displayValue: this.textFade, value: c_oAscSlideTransitionTypes.Fade}, {displayValue: this.textFade, value: Asc.c_oAscSlideTransitionTypes.Fade},
{displayValue: this.textPush, value: c_oAscSlideTransitionTypes.Push}, {displayValue: this.textPush, value: Asc.c_oAscSlideTransitionTypes.Push},
{displayValue: this.textWipe, value: c_oAscSlideTransitionTypes.Wipe}, {displayValue: this.textWipe, value: Asc.c_oAscSlideTransitionTypes.Wipe},
{displayValue: this.textSplit, value: c_oAscSlideTransitionTypes.Split}, {displayValue: this.textSplit, value: Asc.c_oAscSlideTransitionTypes.Split},
{displayValue: this.textUnCover, value: c_oAscSlideTransitionTypes.UnCover}, {displayValue: this.textUnCover, value: Asc.c_oAscSlideTransitionTypes.UnCover},
{displayValue: this.textCover, value: c_oAscSlideTransitionTypes.Cover}, {displayValue: this.textCover, value: Asc.c_oAscSlideTransitionTypes.Cover},
{displayValue: this.textClock, value: c_oAscSlideTransitionTypes.Clock}, {displayValue: this.textClock, value: Asc.c_oAscSlideTransitionTypes.Clock},
{displayValue: this.textZoom, value: c_oAscSlideTransitionTypes.Zoom} {displayValue: this.textZoom, value: Asc.c_oAscSlideTransitionTypes.Zoom}
]; ];
this.cmbEffectName = new Common.UI.ComboBox({ this.cmbEffectName = new Common.UI.ComboBox({
@ -468,26 +468,26 @@ define([
this.cmbEffectName.on('selected', _.bind(this.onEffectNameSelect, this)); this.cmbEffectName.on('selected', _.bind(this.onEffectNameSelect, this));
this._arrEffectType = [ this._arrEffectType = [
{displayValue: this.textSmoothly, value: c_oAscSlideTransitionParams.Fade_Smoothly}, {displayValue: this.textSmoothly, value: Asc.c_oAscSlideTransitionParams.Fade_Smoothly},
{displayValue: this.textBlack, value: c_oAscSlideTransitionParams.Fade_Through_Black}, {displayValue: this.textBlack, value: Asc.c_oAscSlideTransitionParams.Fade_Through_Black},
{displayValue: this.textLeft, value: c_oAscSlideTransitionParams.Param_Left}, {displayValue: this.textLeft, value: Asc.c_oAscSlideTransitionParams.Param_Left},
{displayValue: this.textTop, value: c_oAscSlideTransitionParams.Param_Top}, {displayValue: this.textTop, value: Asc.c_oAscSlideTransitionParams.Param_Top},
{displayValue: this.textRight, value: c_oAscSlideTransitionParams.Param_Right}, {displayValue: this.textRight, value: Asc.c_oAscSlideTransitionParams.Param_Right},
{displayValue: this.textBottom, value: c_oAscSlideTransitionParams.Param_Bottom}, {displayValue: this.textBottom, value: Asc.c_oAscSlideTransitionParams.Param_Bottom},
{displayValue: this.textTopLeft, value: c_oAscSlideTransitionParams.Param_TopLeft}, {displayValue: this.textTopLeft, value: Asc.c_oAscSlideTransitionParams.Param_TopLeft},
{displayValue: this.textTopRight, value: c_oAscSlideTransitionParams.Param_TopRight}, {displayValue: this.textTopRight, value: Asc.c_oAscSlideTransitionParams.Param_TopRight},
{displayValue: this.textBottomLeft, value: c_oAscSlideTransitionParams.Param_BottomLeft}, {displayValue: this.textBottomLeft, value: Asc.c_oAscSlideTransitionParams.Param_BottomLeft},
{displayValue: this.textBottomRight, value: c_oAscSlideTransitionParams.Param_BottomRight}, {displayValue: this.textBottomRight, value: Asc.c_oAscSlideTransitionParams.Param_BottomRight},
{displayValue: this.textVerticalIn, value: c_oAscSlideTransitionParams.Split_VerticalIn}, {displayValue: this.textVerticalIn, value: Asc.c_oAscSlideTransitionParams.Split_VerticalIn},
{displayValue: this.textVerticalOut, value: c_oAscSlideTransitionParams.Split_VerticalOut}, {displayValue: this.textVerticalOut, value: Asc.c_oAscSlideTransitionParams.Split_VerticalOut},
{displayValue: this.textHorizontalIn, value: c_oAscSlideTransitionParams.Split_HorizontalIn}, {displayValue: this.textHorizontalIn, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalIn},
{displayValue: this.textHorizontalOut, value: c_oAscSlideTransitionParams.Split_HorizontalOut}, {displayValue: this.textHorizontalOut, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalOut},
{displayValue: this.textClockwise, value: c_oAscSlideTransitionParams.Clock_Clockwise}, {displayValue: this.textClockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Clockwise},
{displayValue: this.textCounterclockwise, value: c_oAscSlideTransitionParams.Clock_Counterclockwise}, {displayValue: this.textCounterclockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Counterclockwise},
{displayValue: this.textWedge, value: c_oAscSlideTransitionParams.Clock_Wedge}, {displayValue: this.textWedge, value: Asc.c_oAscSlideTransitionParams.Clock_Wedge},
{displayValue: this.textZoomIn, value: c_oAscSlideTransitionParams.Zoom_In}, {displayValue: this.textZoomIn, value: Asc.c_oAscSlideTransitionParams.Zoom_In},
{displayValue: this.textZoomOut, value: c_oAscSlideTransitionParams.Zoom_Out}, {displayValue: this.textZoomOut, value: Asc.c_oAscSlideTransitionParams.Zoom_Out},
{displayValue: this.textZoomRotate, value: c_oAscSlideTransitionParams.Zoom_AndRotate} {displayValue: this.textZoomRotate, value: Asc.c_oAscSlideTransitionParams.Zoom_AndRotate}
]; ];
this.cmbEffectType = new Common.UI.ComboBox({ this.cmbEffectType = new Common.UI.ComboBox({
@ -574,31 +574,31 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.SlideColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.SlideColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.SlideColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.SlideColor.Color));
props.put_background(fill); props.put_background(fill);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -615,15 +615,15 @@ define([
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
} }
break; break;
case c_oAscFill.FILL_TYPE_BLIP: case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break; break;
case c_oAscFill.FILL_TYPE_PATT: case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
@ -642,12 +642,12 @@ define([
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
props.put_background(fill); props.put_background(fill);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
@ -666,10 +666,10 @@ define([
var fill = new CAscFill(); var fill = new CAscFill();
if (this.SlideColor.Color=='transparent') { if (this.SlideColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
} else { } else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.SlideColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.SlideColor.Color));
} }
@ -689,10 +689,10 @@ define([
this.PatternFillType = record.get('type'); this.PatternFillType = record.get('type');
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -708,10 +708,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -727,9 +727,9 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
} }
@ -743,10 +743,10 @@ define([
onFillTypeSelect: function(combo, record) { onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value; this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) { if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType); fill.get_fill().put_type(this.BlipFillType);
@ -760,7 +760,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -770,7 +770,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -784,10 +784,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -816,12 +816,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000); fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -843,13 +843,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -885,13 +885,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -914,7 +914,7 @@ define([
if (me.BlipFillType !== null) { if (me.BlipFillType !== null) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType); fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl); fill.get_fill().put_url(checkUrl);
@ -998,9 +998,9 @@ define([
if (this.api) { if (this.api) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE); fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type')); fill.get_fill().put_texture_id(record.get('type'));
props.put_background(fill); props.put_background(fill);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
@ -1012,28 +1012,28 @@ define([
fillEffectTypeCombo: function (type) { fillEffectTypeCombo: function (type) {
var arr = []; var arr = [];
switch (type) { switch (type) {
case c_oAscSlideTransitionTypes.Fade: case Asc.c_oAscSlideTransitionTypes.Fade:
arr.push(this._arrEffectType[0], this._arrEffectType[1]); arr.push(this._arrEffectType[0], this._arrEffectType[1]);
break; break;
case c_oAscSlideTransitionTypes.Push: case Asc.c_oAscSlideTransitionTypes.Push:
arr = this._arrEffectType.slice(2, 6); arr = this._arrEffectType.slice(2, 6);
break; break;
case c_oAscSlideTransitionTypes.Wipe: case Asc.c_oAscSlideTransitionTypes.Wipe:
arr = this._arrEffectType.slice(2, 10); arr = this._arrEffectType.slice(2, 10);
break; break;
case c_oAscSlideTransitionTypes.Split: case Asc.c_oAscSlideTransitionTypes.Split:
arr = this._arrEffectType.slice(10, 14); arr = this._arrEffectType.slice(10, 14);
break; break;
case c_oAscSlideTransitionTypes.UnCover: case Asc.c_oAscSlideTransitionTypes.UnCover:
arr = this._arrEffectType.slice(2, 10); arr = this._arrEffectType.slice(2, 10);
break; break;
case c_oAscSlideTransitionTypes.Cover: case Asc.c_oAscSlideTransitionTypes.Cover:
arr = this._arrEffectType.slice(2, 10); arr = this._arrEffectType.slice(2, 10);
break; break;
case c_oAscSlideTransitionTypes.Clock: case Asc.c_oAscSlideTransitionTypes.Clock:
arr = this._arrEffectType.slice(14, 17); arr = this._arrEffectType.slice(14, 17);
break; break;
case c_oAscSlideTransitionTypes.Zoom: case Asc.c_oAscSlideTransitionTypes.Zoom:
arr = this._arrEffectType.slice(17); arr = this._arrEffectType.slice(17);
break; break;
} }
@ -1052,13 +1052,13 @@ define([
onEffectNameSelect: function(combo, record) { onEffectNameSelect: function(combo, record) {
var type = record.value; var type = record.value;
if (this.Effect !== type && if (this.Effect !== type &&
!((this.Effect===c_oAscSlideTransitionTypes.Wipe || this.Effect===c_oAscSlideTransitionTypes.UnCover || this.Effect===c_oAscSlideTransitionTypes.Cover)&& !((this.Effect===Asc.c_oAscSlideTransitionTypes.Wipe || this.Effect===Asc.c_oAscSlideTransitionTypes.UnCover || this.Effect===Asc.c_oAscSlideTransitionTypes.Cover)&&
(type===c_oAscSlideTransitionTypes.Wipe || type===c_oAscSlideTransitionTypes.UnCover || type===c_oAscSlideTransitionTypes.Cover)) ) (type===Asc.c_oAscSlideTransitionTypes.Wipe || type===Asc.c_oAscSlideTransitionTypes.UnCover || type===Asc.c_oAscSlideTransitionTypes.Cover)) )
this.fillEffectTypeCombo(type); this.fillEffectTypeCombo(type);
this.Effect = type; this.Effect = type;
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var timing = new CAscSlideTiming(); var timing = new Asc.Asc.CAscSlideProps();
timing.put_TransitionType(type); timing.put_TransitionType(type);
timing.put_TransitionOption(this.EffectType); timing.put_TransitionOption(this.EffectType);
props.put_timing(timing); props.put_timing(timing);
@ -1071,7 +1071,7 @@ define([
this.EffectType = record.value; this.EffectType = record.value;
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var timing = new CAscSlideTiming(); var timing = new Asc.Asc.CAscSlideProps();
timing.put_TransitionType(this.Effect); timing.put_TransitionType(this.Effect);
timing.put_TransitionOption(this.EffectType); timing.put_TransitionOption(this.EffectType);
props.put_timing(timing); props.put_timing(timing);
@ -1083,7 +1083,7 @@ define([
onDurationChange: function(field, newValue, oldValue, eOpts){ onDurationChange: function(field, newValue, oldValue, eOpts){
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var timing = new CAscSlideTiming(); var timing = new Asc.Asc.CAscSlideProps();
timing.put_TransitionDuration(field.getNumberValue()*1000); timing.put_TransitionDuration(field.getNumberValue()*1000);
props.put_timing(timing); props.put_timing(timing);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
@ -1094,7 +1094,7 @@ define([
onDelayChange: function(field, newValue, oldValue, eOpts){ onDelayChange: function(field, newValue, oldValue, eOpts){
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var timing = new CAscSlideTiming(); var timing = new Asc.Asc.CAscSlideProps();
timing.put_SlideAdvanceDuration(field.getNumberValue()*1000); timing.put_SlideAdvanceDuration(field.getNumberValue()*1000);
props.put_timing(timing); props.put_timing(timing);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
@ -1105,7 +1105,7 @@ define([
onStartOnClickChange: function(field, newValue, oldValue, eOpts){ onStartOnClickChange: function(field, newValue, oldValue, eOpts){
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var timing = new CAscSlideTiming(); var timing = new Asc.Asc.CAscSlideProps();
timing.put_SlideAdvanceOnMouseClick(field.getValue()=='checked'); timing.put_SlideAdvanceOnMouseClick(field.getValue()=='checked');
props.put_timing(timing); props.put_timing(timing);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
@ -1117,7 +1117,7 @@ define([
this.numDelay.setDisabled(field.getValue()!=='checked'); this.numDelay.setDisabled(field.getValue()!=='checked');
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new CAscSlideProps(); var props = new CAscSlideProps();
var timing = new CAscSlideTiming(); var timing = new Asc.Asc.CAscSlideProps();
timing.put_SlideAdvanceAfter(field.getValue()=='checked'); timing.put_SlideAdvanceAfter(field.getValue()=='checked');
props.put_timing(timing); props.put_timing(timing);
this.api.SetSlideProps(props); this.api.SetSlideProps(props);
@ -1133,10 +1133,10 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP); this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT); this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
}, },
ChangeSettings: function(props) { ChangeSettings: function(props) {
@ -1155,13 +1155,13 @@ define([
var fill_type = fill.get_type(); var fill_type = fill.get_type();
var color = null; var color = null;
if (fill===null || fill_type===null || fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет или не совпадает у неск. фигур if (fill===null || fill_type===null || fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет или не совпадает у неск. фигур
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill(); fill = fill.get_fill();
color = fill.get_color(); color = fill.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.SlideColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.SlideColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1169,23 +1169,23 @@ define([
} else } else
this.SlideColor = {Value: 0, Color: 'transparent'}; this.SlideColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.SlideColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color)} : {Value: 1, Color: '000000'}; this.FGColor = (this.SlideColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.SlideColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color) : '000000'; this.GradColor.colors[0] = (this.SlideColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill(); fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) { if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) { if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType); this.cmbFillType.setValue(this.BlipFillType);
} else } else
this.cmbFillType.setValue(''); this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType; this._state.BlipFillType = this.BlipFillType;
} }
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill(); fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) { if (this._state.PatternFillType !== this.PatternFillType) {
@ -1200,7 +1200,7 @@ define([
color = fill.get_color_fg(); color = fill.get_color_fg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1210,7 +1210,7 @@ define([
color = fill.get_color_bg(); color = fill.get_color_bg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1218,17 +1218,17 @@ define([
} else } else
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)}; this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color); this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill(); fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1239,7 +1239,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000); var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -1256,7 +1256,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -1267,7 +1267,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -1295,7 +1295,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]}; this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.SlideColor = {Value: 1, Color: this.GradColor.colors[0]}; this.SlideColor = {Value: 1, Color: this.GradColor.colors[0]};

View file

@ -202,10 +202,9 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
}, },
textTitle: 'Slide Size Settings', textTitle: 'Slide Size Settings',

View file

@ -84,7 +84,7 @@ define([
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this._originalLook = new CTablePropLook(); this._originalLook = new Asc.CTablePropLook();
this._originalProps = null; this._originalProps = null;
this.CellBorders = {}; this.CellBorders = {};
@ -313,8 +313,8 @@ define([
onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) { onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) {
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
var look = (this._originalLook) ? this._originalLook : new CTablePropLook(); var look = (this._originalLook) ? this._originalLook : new Asc.CTablePropLook();
switch (type) { switch (type) {
case 0: case 0:
look.put_FirstRow(field.getValue()=='checked'); look.put_FirstRow(field.getValue()=='checked');
@ -343,7 +343,7 @@ define([
onTableTemplateSelect: function(combo, record){ onTableTemplateSelect: function(combo, record){
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_TableStyle(record.get('templateId')); properties.put_TableStyle(record.get('templateId'));
this.api.tblApply(properties); this.api.tblApply(properties);
} }
@ -355,8 +355,8 @@ define([
this.CellColor = {Value: 1, Color: color}; this.CellColor = {Value: 1, Color: color};
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
var background = new CBackground(); var background = new Asc.CBackground();
properties.put_CellsBackground(background); properties.put_CellsBackground(background);
if (this.CellColor.Color=='transparent') { if (this.CellColor.Color=='transparent') {
@ -383,7 +383,7 @@ define([
onBtnBordersClick: function(btn, eOpts){ onBtnBordersClick: function(btn, eOpts){
this._UpdateBordersStyle(btn.options.strId, true); this._UpdateBordersStyle(btn.options.strId, true);
if (this.api) { if (this.api) {
var properties = new CTableProp(); var properties = new Asc.CTableProp();
properties.put_CellBorders(this.CellBorders); properties.put_CellBorders(this.CellBorders);
properties.put_CellSelect(true); properties.put_CellSelect(true);
this.api.tblApply(properties); this.api.tblApply(properties);
@ -452,7 +452,7 @@ define([
if (props ) if (props )
{ {
this._originalProps = new CTableProp(props); this._originalProps = new Asc.CTableProp(props);
this._originalProps.put_CellSelect(true); this._originalProps.put_CellSelect(true);
//for table-template //for table-template
@ -526,7 +526,7 @@ define([
if (background.get_Value()==0) { if (background.get_Value()==0) {
var color = background.get_Color(); var color = background.get_Color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -564,7 +564,7 @@ define([
}, },
_UpdateBordersStyle: function(border) { _UpdateBordersStyle: function(border) {
this.CellBorders = new CBorders(); this.CellBorders = new Asc.CBorders();
var updateBorders = this.CellBorders; var updateBorders = this.CellBorders;
var visible = (border != ''); var visible = (border != '');
@ -659,7 +659,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType(); elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue(); elValue = selectedElements[i].get_ObjectValue();
if (c_oAscTypeSelectElement.Table == elType) { if (Asc.c_oAscTypeSelectElement.Table == elType) {
(new PE.Views.TableSettingsAdvanced( (new PE.Views.TableSettingsAdvanced(
{ {
tableProps: elValue, tableProps: elValue,

View file

@ -89,7 +89,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
}; };
this._initialMarginsDefault = false; // если для всех выделенных ячеек пришло одинаковое значение Flag=0 (Use Default Margins) this._initialMarginsDefault = false; // если для всех выделенных ячеек пришло одинаковое значение Flag=0 (Use Default Margins)
this._originalProps = new CTableProp(this.options.tableProps); this._originalProps = new Asc.CTableProp(this.options.tableProps);
}, },
render: function() { render: function() {
@ -208,7 +208,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this.CellMargins.Flag = field.getValue(); this.CellMargins.Flag = field.getValue();
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left( ( this.CellMargins.Left!== null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null); this._changedProps.get_CellMargins().put_Left( ( this.CellMargins.Left!== null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null); this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null); this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
@ -230,7 +230,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Top'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Top');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null); this._changedProps.get_CellMargins().put_Top((this.CellMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Top) : null);
setCellFlag(); setCellFlag();
} }
@ -250,7 +250,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Bottom'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Bottom');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null); this._changedProps.get_CellMargins().put_Bottom((this.CellMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Bottom) : null);
setCellFlag(); setCellFlag();
} }
@ -270,7 +270,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Left'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Left');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Left((this.CellMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null); this._changedProps.get_CellMargins().put_Left((this.CellMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Left) : null);
setCellFlag(); setCellFlag();
} }
@ -290,7 +290,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Right'); this._marginsChange( field, newValue, oldValue, eOpts, 'cell', 'Right');
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.get_CellMargins()===undefined) if (this._changedProps.get_CellMargins()===undefined)
this._changedProps.put_CellMargins(new CMargins()); this._changedProps.put_CellMargins(new Asc.CMargins());
this._changedProps.get_CellMargins().put_Right((this.CellMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right) : null); this._changedProps.get_CellMargins().put_Right((this.CellMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.CellMargins.Right) : null);
setCellFlag(); setCellFlag();
} }
@ -348,7 +348,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
} }
this.fillMargins(this.CellMargins.Flag); this.fillMargins(this.CellMargins.Flag);
this._changedProps = new CTableProp(); this._changedProps = new Asc.CTableProp();
} }
}, },
@ -381,7 +381,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
}, },

View file

@ -81,26 +81,26 @@ define([
this._state = { this._state = {
Transparency: null, Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent', ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH, BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null, FormId: null,
DisabledControls: false DisabledControls: false
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH; this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -136,11 +136,11 @@ define([
this.lockedControls.push(this.cmbTextArt); this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT}, {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -321,8 +321,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [ this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH}, {displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE} {displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
]; ];
this.cmbFillType = new Common.UI.ComboBox({ this.cmbFillType = new Common.UI.ComboBox({
@ -381,8 +381,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end'); this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -595,12 +595,12 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill); props.asc_putFill(fill);
@ -608,19 +608,19 @@ define([
this.api.ShapeApply(this.shapeprops); this.api.ShapeApply(this.shapeprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -638,15 +638,15 @@ define([
this.api.ShapeApply(this.shapeprops); this.api.ShapeApply(this.shapeprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_BLIP: case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break; break;
case c_oAscFill.FILL_TYPE_PATT: case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
@ -666,12 +666,12 @@ define([
this.api.ShapeApply(this.shapeprops); this.api.ShapeApply(this.shapeprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
props.asc_putFill(fill); props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -691,10 +691,10 @@ define([
var fill = new CAscFill(); var fill = new CAscFill();
if (this.ShapeColor.Color=='transparent') { if (this.ShapeColor.Color=='transparent') {
fill.put_type(c_oAscFill.FILL_TYPE_NOFILL); fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null); fill.put_fill(null);
} else { } else {
fill.put_type(c_oAscFill.FILL_TYPE_SOLID); fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid()); fill.put_fill( new CAscFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color)); fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
} }
@ -715,10 +715,10 @@ define([
this.PatternFillType = record.get('type'); this.PatternFillType = record.get('type');
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -735,10 +735,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.get_fill().put_color_bg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -755,9 +755,9 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_PATT); fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch()); fill.put_fill( new CAscFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType); fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
} }
@ -772,10 +772,10 @@ define([
onFillTypeSelect: function(combo, record) { onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value; this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) { if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(this.BlipFillType); fill.get_fill().put_type(this.BlipFillType);
@ -835,7 +835,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -845,7 +845,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -859,10 +859,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -892,12 +892,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000); fill.get_fill().put_linear_angle(rawData.type * 60000);
@ -920,13 +920,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -963,13 +963,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_GRAD); fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad()); fill.put_fill( new CAscFillGrad());
fill.get_fill().put_grad_type(this.GradFillType); fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000); fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
fill.get_fill().put_linear_scale(true); fill.get_fill().put_linear_scale(true);
} }
@ -991,13 +991,13 @@ define([
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1; this._state.StrokeType = this._state.StrokeWidth = -1;
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent') if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -1043,9 +1043,9 @@ define([
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var stroke = new CAscStroke(); var stroke = new CAscStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.put_type( c_oAscStrokeType.STROKE_NONE); stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else { } else {
stroke.put_type( c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
@ -1067,7 +1067,7 @@ define([
if (me.BlipFillType !== null) { if (me.BlipFillType !== null) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(me.BlipFillType); fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl); fill.get_fill().put_url(checkUrl);
@ -1121,13 +1121,13 @@ define([
if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null; this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill(); fill = fill.get_fill();
color = fill.get_color(); color = fill.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1135,23 +1135,23 @@ define([
} else } else
this.ShapeColor = {Value: 0, Color: 'transparent'}; this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'}; this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000'; this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.get_fill(); fill = fill.get_fill();
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) { if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) { if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType); this.cmbFillType.setValue(this.BlipFillType);
} else } else
this.cmbFillType.setValue(''); this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType; this._state.BlipFillType = this.BlipFillType;
} }
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.get_fill(); fill = fill.get_fill();
this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур this.PatternFillType = fill.get_pattern_type(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) { if (this._state.PatternFillType !== this.PatternFillType) {
@ -1166,7 +1166,7 @@ define([
color = fill.get_color_fg(); color = fill.get_color_fg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1176,7 +1176,7 @@ define([
color = fill.get_color_bg(); color = fill.get_color_bg();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} else { } else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())}; this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b())};
@ -1184,17 +1184,17 @@ define([
} else } else
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color); this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.get_fill(); fill = fill.get_fill();
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1205,7 +1205,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.get_linear_angle()/60000); var value = Math.floor(fill.get_linear_angle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -1222,7 +1222,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -1233,7 +1233,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -1261,7 +1261,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]}; this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]}; this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1304,10 +1304,10 @@ define([
strokeType = (stroke) ? stroke.get_type() : null; strokeType = (stroke) ? stroke.get_type() : null;
if (stroke) { if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.get_color(); color = stroke.get_color();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }}; this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }};
} }
else else
@ -1346,8 +1346,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color; this._state.StrokeColor = this.BorderColor.Color;
} }
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) { if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.get_width(); var w = stroke.get_width();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1367,7 +1367,7 @@ define([
} }
this.BorderSize = w; this.BorderSize = w;
} }
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) { } else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0; this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value'); this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize); this.cmbBorderSize.setValue(this.BorderSize);
@ -1535,9 +1535,9 @@ define([
if (this.api) { if (this.api) {
var props = new asc_TextArtProperties(); var props = new asc_TextArtProperties();
var fill = new CAscFill(); var fill = new CAscFill();
fill.put_type(c_oAscFill.FILL_TYPE_BLIP); fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip()); fill.put_fill( new CAscFillBlip());
fill.get_fill().put_type(c_oAscFillBlipType.TILE); fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type')); fill.get_fill().put_texture_id(record.get('type'));
props.asc_putFill(fill); props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -1623,11 +1623,11 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP); this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT); this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null)); this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
}, },
setLocked: function (locked) { setLocked: function (locked) {

View file

@ -568,7 +568,7 @@ define([
icls : 'btn-align-top', icls : 'btn-align-top',
checkable : true, checkable : true,
toggleGroup : 'valignGroup', toggleGroup : 'valignGroup',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}, },
{ {
caption : me.textAlignMiddle, caption : me.textAlignMiddle,
@ -576,7 +576,7 @@ define([
icls : 'btn-align-middle', icls : 'btn-align-middle',
checkable : true, checkable : true,
toggleGroup : 'valignGroup', toggleGroup : 'valignGroup',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR, value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR,
checked : true checked : true
}, },
{ {
@ -585,7 +585,7 @@ define([
icls : 'btn-align-bottom', icls : 'btn-align-bottom',
checkable : true, checkable : true,
toggleGroup : 'valignGroup', toggleGroup : 'valignGroup',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
} }
] ]
}) })
@ -696,31 +696,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, allowSelected: true, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, allowSelected: true, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, allowSelected: true, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, allowSelected: true, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, allowSelected: true, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, allowSelected: true, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, allowSelected: true, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, allowSelected: true, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, allowSelected: true, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, allowSelected: true, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, allowSelected: true, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, allowSelected: true, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, allowSelected: true, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, allowSelected: true, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, allowSelected: true, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, allowSelected: true, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, allowSelected: true, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, allowSelected: true, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, allowSelected: true, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, allowSelected: true, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}) })
@ -897,32 +897,32 @@ define([
{ {
caption : me.textShapeAlignLeft, caption : me.textShapeAlignLeft,
iconCls : 'mnu-shape-align-left', iconCls : 'mnu-shape-align-left',
value : c_oAscAlignShapeType.ALIGN_LEFT value : Asc.c_oAscAlignShapeType.ALIGN_LEFT
}, },
{ {
caption : me.textShapeAlignCenter, caption : me.textShapeAlignCenter,
iconCls : 'mnu-shape-align-center', iconCls : 'mnu-shape-align-center',
value : c_oAscAlignShapeType.ALIGN_CENTER value : Asc.c_oAscAlignShapeType.ALIGN_CENTER
}, },
{ {
caption : me.textShapeAlignRight, caption : me.textShapeAlignRight,
iconCls : 'mnu-shape-align-right', iconCls : 'mnu-shape-align-right',
value : c_oAscAlignShapeType.ALIGN_RIGHT value : Asc.c_oAscAlignShapeType.ALIGN_RIGHT
}, },
{ {
caption : me.textShapeAlignTop, caption : me.textShapeAlignTop,
iconCls : 'mnu-shape-align-top', iconCls : 'mnu-shape-align-top',
value : c_oAscAlignShapeType.ALIGN_TOP value : Asc.c_oAscAlignShapeType.ALIGN_TOP
}, },
{ {
caption : me.textShapeAlignMiddle, caption : me.textShapeAlignMiddle,
iconCls : 'mnu-shape-align-middle', iconCls : 'mnu-shape-align-middle',
value : c_oAscAlignShapeType.ALIGN_MIDDLE value : Asc.c_oAscAlignShapeType.ALIGN_MIDDLE
}, },
{ {
caption : me.textShapeAlignBottom, caption : me.textShapeAlignBottom,
iconCls : 'mnu-shape-align-bottom', iconCls : 'mnu-shape-align-bottom',
value : c_oAscAlignShapeType.ALIGN_BOTTOM value : Asc.c_oAscAlignShapeType.ALIGN_BOTTOM
}, },
{caption: '--' }, {caption: '--' },
{ {

View file

@ -354,6 +354,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>

View file

@ -373,6 +373,7 @@
"PE.Views.FileMenuPanels.Settings.txtInput": "Alternate Input", "PE.Views.FileMenuPanels.Settings.txtInput": "Alternate Input",
"PE.Views.FileMenuPanels.Settings.txtLast": "View Last", "PE.Views.FileMenuPanels.Settings.txtLast": "View Last",
"PE.Views.FileMenuPanels.Settings.txtPt": "Point", "PE.Views.FileMenuPanels.Settings.txtPt": "Point",
"PE.Views.FileMenuPanels.Settings.txtInch": "Inch",
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel", "PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK", "PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Display", "PE.Views.HyperlinkSettingsDialog.strDisplay": "Display",

View file

@ -373,6 +373,7 @@
"PE.Views.FileMenuPanels.Settings.txtInput": "Альтернативный ввод", "PE.Views.FileMenuPanels.Settings.txtInput": "Альтернативный ввод",
"PE.Views.FileMenuPanels.Settings.txtLast": "Последние", "PE.Views.FileMenuPanels.Settings.txtLast": "Последние",
"PE.Views.FileMenuPanels.Settings.txtPt": "Пункт", "PE.Views.FileMenuPanels.Settings.txtPt": "Пункт",
"PE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Отмена", "PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Отмена",
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK", "PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Отображать", "PE.Views.HyperlinkSettingsDialog.strDisplay": "Отображать",

View file

@ -60,7 +60,7 @@ Ext.define('PE.controller.Main', {
app = this.getApplication(), app = this.getApplication(),
profile = app.getCurrentProfile(); profile = app.getCurrentProfile();
api = new asc_docs_api("id-sdkeditor"); api = new Asc.asc_docs_api("id-sdkeditor");
api.SetMobileVersion(true); api.SetMobileVersion(true);
api.CreateComponents(); api.CreateComponents();
api.asc_SetFontsPath("../../../../sdkjs/fonts/"); api.asc_SetFontsPath("../../../../sdkjs/fonts/");
@ -172,11 +172,11 @@ Ext.define('PE.controller.Main', {
var text = ''; var text = '';
switch (id) { switch (id) {
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = this.printText; text = this.printText;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
Ext.Viewport.setMasked({ Ext.Viewport.setMasked({
xtype : 'loadmask', xtype : 'loadmask',
message : text message : text
@ -198,55 +198,55 @@ Ext.define('PE.controller.Main', {
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText; config.message = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText; config.message = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText; config.message = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText; config.message = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage; config.message = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage; config.message = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage; config.message = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.SplitCellMaxRows: case Asc.c_oAscError.ID.SplitCellMaxRows:
config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value()); config.message = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellMaxCols: case Asc.c_oAscError.ID.SplitCellMaxCols:
config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value()); config.message = this.splitMaxColsErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.SplitCellRowsDivider: case Asc.c_oAscError.ID.SplitCellRowsDivider:
config.message = this.splitDividerErrorText.replace('%1', errData.get_Value()); config.message = this.splitDividerErrorText.replace('%1', errData.get_Value());
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt; config.msg = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire; config.msg = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed; config.msg = this.errorUsersExceed;
break; break;
@ -257,7 +257,7 @@ Ext.define('PE.controller.Main', {
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, config.message); Common.Gateway.reportError(id, config.message);
@ -305,7 +305,7 @@ Ext.define('PE.controller.Main', {
}, },
onDownloadAs: function() { onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.PPTX, true); this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true);
}, },
_hideLoadSplash: function(){ _hideLoadSplash: function(){

View file

@ -328,6 +328,7 @@
<script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/apiBase.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/api.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/apiExport.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/Private/license.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/Private/comments.js"></script>

View file

@ -316,7 +316,7 @@ var ApplicationController = new(function(){
var text = ''; var text = '';
switch (id) switch (id)
{ {
case c_oAscAsyncAction['Print']: case Asc.c_oAscAsyncAction['Print']:
text = 'Downloading document...'; text = 'Downloading document...';
break; break;
default: default:
@ -324,16 +324,16 @@ var ApplicationController = new(function(){
break; break;
} }
if (type == c_oAscAsyncActionType['BlockInteraction']) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) {
$('#id-loadmask .cmd-loader-title').html(text); $('#id-loadmask .cmd-loader-title').html(text);
showMask(); showMask();
} }
} }
function onLongActionEnd(type, id){ function onLongActionEnd(type, id){
if (type === c_oAscAsyncActionType.BlockInteraction) { if (type === Asc.c_oAscAsyncActionType.BlockInteraction) {
switch (id) { switch (id) {
case c_oAscAsyncAction.Open: case Asc.c_oAscAsyncAction.Open:
if (api) { if (api) {
api.asc_Resize(); api.asc_Resize();
} }
@ -354,19 +354,19 @@ var ApplicationController = new(function(){
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
message = me.unknownErrorText; message = me.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
message = me.convertationTimeoutText; message = me.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
message = me.convertationErrorText; message = me.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
message = me.downloadErrorText; message = me.downloadErrorText;
break; break;
@ -375,7 +375,7 @@ var ApplicationController = new(function(){
break; break;
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, message); Common.Gateway.reportError(id, message);
@ -424,7 +424,7 @@ var ApplicationController = new(function(){
} }
function onDownloadAs() { function onDownloadAs() {
if (api) api.asc_DownloadAs(c_oAscFileType.XLSX, true); if (api) api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
} }
// Helpers // Helpers

View file

@ -121,9 +121,9 @@ define([
}, },
onApiEditCell: function(state) { onApiEditCell: function(state) {
if (state == c_oAscCellEditorState.editStart) if (state == Asc.c_oAscCellEditorState.editStart)
this.api.isCellEdited = true; this.api.isCellEdited = true;
else if (state == c_oAscCellEditorState.editEnd) { else if (state == Asc.c_oAscCellEditorState.editEnd) {
this.api.isCellEdited = false; this.api.isCellEdited = false;
this.api.isCEditorFocused = false; this.api.isCEditorFocused = false;
} }
@ -148,7 +148,7 @@ define([
}, },
onCellsRange: function(status) { onCellsRange: function(status) {
var isRangeSelection = (status != c_oAscSelectionDialogType.None); var isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None);
if (isRangeSelection) { if (isRangeSelection) {
this.editor.$cellname.attr('disabled', 'disabled'); this.editor.$cellname.attr('disabled', 'disabled');
@ -244,7 +244,7 @@ define([
locked: this.namedrange_locked, locked: this.namedrange_locked,
sheets: items, sheets: items,
sheetNames: sheetNames, sheetNames: sheetNames,
ranges: this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.All), ranges: this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.All),
props : this.api.asc_getDefaultDefinedName(), props : this.api.asc_getDefaultDefinedName(),
sort : this.rangeListSort sort : this.rangeListSort
})).on('close', function(win){ })).on('close', function(win){
@ -257,7 +257,7 @@ define([
}, },
onNameBeforeShow: function() { onNameBeforeShow: function() {
var names = this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.WorksheetWorkbook), var names = this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.WorksheetWorkbook),
rangesMenu = this.editor.btnNamedRanges.menu, rangesMenu = this.editor.btnNamedRanges.menu,
prev_name=''; prev_name='';
@ -281,7 +281,7 @@ define([
}, },
onLockDefNameManager: function(state) { onLockDefNameManager: function(state) {
this.namedrange_locked = (state == c_oAscDefinedNameReason.LockDefNameManager); this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
} }
}); });
}); });

View file

@ -284,11 +284,11 @@ define([
onInsertEntire: function(item) { onInsertEntire: function(item) {
if (this.api) { if (this.api) {
switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) { switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) {
case c_oAscSelectionType.RangeRow: case Asc.c_oAscSelectionType.RangeRow:
this.api.asc_insertCells(c_oAscInsertOptions.InsertRows); this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertRows);
break; break;
case c_oAscSelectionType.RangeCol: case Asc.c_oAscSelectionType.RangeCol:
this.api.asc_insertCells(c_oAscInsertOptions.InsertColumns); this.api.asc_insertCells(Asc.c_oAscInsertOptions.InsertColumns);
break; break;
} }
@ -309,11 +309,11 @@ define([
onDeleteEntire: function(item) { onDeleteEntire: function(item) {
if (this.api) { if (this.api) {
switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) { switch (this.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()) {
case c_oAscSelectionType.RangeRow: case Asc.c_oAscSelectionType.RangeRow:
this.api.asc_deleteCells(c_oAscDeleteOptions.DeleteRows); this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteRows);
break; break;
case c_oAscSelectionType.RangeCol: case Asc.c_oAscSelectionType.RangeCol:
this.api.asc_deleteCells(c_oAscDeleteOptions.DeleteColumns); this.api.asc_deleteCells(Asc.c_oAscDeleteOptions.DeleteColumns);
break; break;
} }
@ -418,7 +418,7 @@ define([
(new SSE.Views.SetValueDialog({ (new SSE.Views.SetValueDialog({
title: item.caption, title: item.caption,
startvalue: item.options.action == 'row-height' ? me.api.asc_getRowHeight() : me.api.asc_getColumnWidth(), startvalue: item.options.action == 'row-height' ? me.api.asc_getRowHeight() : me.api.asc_getColumnWidth(),
maxvalue: item.options.action == 'row-height' ? c_oAscMaxRowHeight : c_oAscMaxColumnWidth, maxvalue: item.options.action == 'row-height' ? Asc.c_oAscMaxRowHeight : Asc.c_oAscMaxColumnWidth,
step: item.options.action == 'row-height' ? 0.75 : 1, step: item.options.action == 'row-height' ? 0.75 : 1,
defaultUnit: item.options.action == 'row-height' ? Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt) : me.textSym, defaultUnit: item.options.action == 'row-height' ? Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt) : me.textSym,
handler: function(dlg, result) { handler: function(dlg, result) {
@ -640,21 +640,21 @@ define([
index_column, index_row; index_column, index_row;
for (var i = dataarray.length; i > 0; i--) { for (var i = dataarray.length; i > 0; i--) {
switch (dataarray[i-1].asc_getType()) { switch (dataarray[i-1].asc_getType()) {
case c_oAscMouseMoveType.Hyperlink: case Asc.c_oAscMouseMoveType.Hyperlink:
index_hyperlink = i; index_hyperlink = i;
break; break;
/** coauthoring begin **/ /** coauthoring begin **/
case c_oAscMouseMoveType.Comment: case Asc.c_oAscMouseMoveType.Comment:
index_comments = i; index_comments = i;
break; break;
/** coauthoring end **/ /** coauthoring end **/
case c_oAscMouseMoveType.LockedObject: case Asc.c_oAscMouseMoveType.LockedObject:
index_locked = i; index_locked = i;
break; break;
case c_oAscMouseMoveType.ResizeColumn: case Asc.c_oAscMouseMoveType.ResizeColumn:
index_column = i; index_column = i;
break; break;
case c_oAscMouseMoveType.ResizeRow: case Asc.c_oAscMouseMoveType.ResizeRow:
index_row = i; index_row = i;
break; break;
} }
@ -692,7 +692,7 @@ define([
var data = dataarray[index_hyperlink-1], var data = dataarray[index_hyperlink-1],
props = data.asc_getHyperlink(); props = data.asc_getHyperlink();
if (props.asc_getType() == c_oAscHyperlinkType.WebLink) { if (props.asc_getType() == Asc.c_oAscHyperlinkType.WebLink) {
var linkstr = props.asc_getTooltip(); var linkstr = props.asc_getTooltip();
if (linkstr) { if (linkstr) {
linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>'; linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>';
@ -842,8 +842,8 @@ define([
coAuthTip.y_point = data.asc_getY(); coAuthTip.y_point = data.asc_getY();
var src = $(document.createElement("div")), var src = $(document.createElement("div")),
is_sheet_lock = data.asc_getLockedObjectType() == c_oAscMouseMoveLockedObjectType.Sheet || is_sheet_lock = data.asc_getLockedObjectType() == Asc.c_oAscMouseMoveLockedObjectType.Sheet ||
data.asc_getLockedObjectType() == c_oAscMouseMoveLockedObjectType.TableProperties; data.asc_getLockedObjectType() == Asc.c_oAscMouseMoveLockedObjectType.TableProperties;
coAuthTip.ref = src; coAuthTip.ref = src;
@ -1045,21 +1045,21 @@ define([
cansort = false; cansort = false;
if (this.permissions.isEditMailMerge) { if (this.permissions.isEditMailMerge) {
cansort = (seltype==c_oAscSelectionType.RangeCells); cansort = (seltype==Asc.c_oAscSelectionType.RangeCells);
} else if (this.permissions.isEditDiagram) { } else if (this.permissions.isEditDiagram) {
insfunc = (seltype==c_oAscSelectionType.RangeCells); insfunc = (seltype==Asc.c_oAscSelectionType.RangeCells);
} }
else { else {
switch (seltype) { switch (seltype) {
case c_oAscSelectionType.RangeCells: iscellmenu = true; break; case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
case c_oAscSelectionType.RangeRow: isrowmenu = true; break; case Asc.c_oAscSelectionType.RangeRow: isrowmenu = true; break;
case c_oAscSelectionType.RangeCol: iscolmenu = true; break; case Asc.c_oAscSelectionType.RangeCol: iscolmenu = true; break;
case c_oAscSelectionType.RangeMax: isallmenu = true; break; case Asc.c_oAscSelectionType.RangeMax: isallmenu = true; break;
case c_oAscSelectionType.RangeImage: isimagemenu = true; break; case Asc.c_oAscSelectionType.RangeImage: isimagemenu = true; break;
case c_oAscSelectionType.RangeShape: isshapemenu = true; break; case Asc.c_oAscSelectionType.RangeShape: isshapemenu = true; break;
case c_oAscSelectionType.RangeChart: ischartmenu = true; break; case Asc.c_oAscSelectionType.RangeChart: ischartmenu = true; break;
case c_oAscSelectionType.RangeChartText:istextchartmenu = true; break; case Asc.c_oAscSelectionType.RangeChartText:istextchartmenu = true; break;
case c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break; case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break;
} }
} }
@ -1070,7 +1070,7 @@ define([
var has_chartprops = false; var has_chartprops = false;
var selectedObjects = this.api.asc_getGraphicObjectProps(); var selectedObjects = this.api.asc_getGraphicObjectProps();
for (var i = 0; i < selectedObjects.length; i++) { for (var i = 0; i < selectedObjects.length; i++) {
if (selectedObjects[i].asc_getObjectType() == c_oAscTypeSelectElement.Image) { if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
var elValue = selectedObjects[i].asc_getObjectValue(); var elValue = selectedObjects[i].asc_getObjectValue();
isObjLocked = isObjLocked || elValue.asc_getLocked(); isObjLocked = isObjLocked || elValue.asc_getLocked();
var shapeprops = elValue.asc_getShapeProperties(); var shapeprops = elValue.asc_getShapeProperties();
@ -1109,19 +1109,19 @@ define([
for (var i = 0; i < selectedObjects.length; i++) { for (var i = 0; i < selectedObjects.length; i++) {
var elType = selectedObjects[i].asc_getObjectType(); var elType = selectedObjects[i].asc_getObjectType();
if (elType == c_oAscTypeSelectElement.Image) { if (elType == Asc.c_oAscTypeSelectElement.Image) {
var value = selectedObjects[i].asc_getObjectValue(), var value = selectedObjects[i].asc_getObjectValue(),
align = value.asc_getVerticalTextAlign(), align = value.asc_getVerticalTextAlign(),
direct = value.asc_getVert(); direct = value.asc_getVert();
isObjLocked = isObjLocked || value.asc_getLocked(); isObjLocked = isObjLocked || value.asc_getLocked();
documentHolder.menuParagraphTop.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_TOP); documentHolder.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
documentHolder.menuParagraphCenter.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_CTR); documentHolder.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
documentHolder.menuParagraphBottom.setChecked(align == c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM); documentHolder.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
documentHolder.menuParagraphDirectH.setChecked(direct == c_oAscVertDrawingText.normal); documentHolder.menuParagraphDirectH.setChecked(direct == Asc.c_oAscVertDrawingText.normal);
documentHolder.menuParagraphDirect90.setChecked(direct == c_oAscVertDrawingText.vert); documentHolder.menuParagraphDirect90.setChecked(direct == Asc.c_oAscVertDrawingText.vert);
documentHolder.menuParagraphDirect270.setChecked(direct == c_oAscVertDrawingText.vert270); documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270);
} else if (elType == c_oAscTypeSelectElement.Paragraph) { } else if (elType == Asc.c_oAscTypeSelectElement.Paragraph) {
documentHolder.pmiTextAdvanced.textInfo = selectedObjects[i].asc_getObjectValue(); documentHolder.pmiTextAdvanced.textInfo = selectedObjects[i].asc_getObjectValue();
isObjLocked = isObjLocked || documentHolder.pmiTextAdvanced.textInfo.asc_getLocked(); isObjLocked = isObjLocked || documentHolder.pmiTextAdvanced.textInfo.asc_getLocked();
} }
@ -1143,8 +1143,8 @@ define([
documentHolder.textInShapeMenu.items[3].setVisible( documentHolder.menuHyperlinkShape.isVisible() || documentHolder.textInShapeMenu.items[3].setVisible( documentHolder.menuHyperlinkShape.isVisible() ||
documentHolder.menuAddHyperlinkShape.isVisible() || documentHolder.menuAddHyperlinkShape.isVisible() ||
documentHolder.menuParagraphVAlign.isVisible()); documentHolder.menuParagraphVAlign.isVisible());
} else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== c_oAscSelectionType.RangeImage && seltype !== c_oAscSelectionType.RangeShape && } else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== Asc.c_oAscSelectionType.RangeImage && seltype !== Asc.c_oAscSelectionType.RangeShape &&
seltype !== c_oAscSelectionType.RangeChart && seltype !== c_oAscSelectionType.RangeChartText && seltype !== c_oAscSelectionType.RangeShapeText)) { seltype !== Asc.c_oAscSelectionType.RangeChart && seltype !== Asc.c_oAscSelectionType.RangeChartText && seltype !== Asc.c_oAscSelectionType.RangeShapeText)) {
if (!showMenu && !documentHolder.ssMenu.isVisible()) return; if (!showMenu && !documentHolder.ssMenu.isVisible()) return;
var iscelledit = this.api.isCellEdited; var iscelledit = this.api.isCellEdited;
@ -1199,7 +1199,7 @@ define([
}); });
documentHolder.pmiCopy.setDisabled(false); documentHolder.pmiCopy.setDisabled(false);
if (showMenu) this.showPopupMenu(documentHolder.ssMenu, {}, event); if (showMenu) this.showPopupMenu(documentHolder.ssMenu, {}, event);
} else if (this.permissions.isEditDiagram && seltype == c_oAscSelectionType.RangeChartText) { } else if (this.permissions.isEditDiagram && seltype == Asc.c_oAscSelectionType.RangeChartText) {
if (!showMenu && !documentHolder.textInShapeMenu.isVisible()) return; if (!showMenu && !documentHolder.textInShapeMenu.isVisible()) return;
documentHolder.pmiTextAdvanced.textInfo = undefined; documentHolder.pmiTextAdvanced.textInfo = undefined;
@ -1278,7 +1278,7 @@ define([
var mnu = new Common.UI.MenuItem({ var mnu = new Common.UI.MenuItem({
caption : menuItem caption : menuItem
}).on('click', function(item, e) { }).on('click', function(item, e) {
me.api.asc_insertFormula(item.caption, c_oAscPopUpSelectorType.None, false ); me.api.asc_insertFormula(item.caption, Asc.c_oAscPopUpSelectorType.None, false );
}); });
menu.addItem(mnu); menu.addItem(mnu);
}); });
@ -1327,7 +1327,7 @@ define([
_.each(funcarr, function(menuItem, index) { _.each(funcarr, function(menuItem, index) {
var type = menuItem.asc_getType(), var type = menuItem.asc_getType(),
mnu = new Common.UI.MenuItem({ mnu = new Common.UI.MenuItem({
iconCls: (type==c_oAscPopUpSelectorType.Func) ? 'mnu-popup-func': ((type==c_oAscPopUpSelectorType.Table) ? 'mnu-popup-table' : 'mnu-popup-range') , iconCls: (type==Asc.c_oAscPopUpSelectorType.Func) ? 'mnu-popup-func': ((type==Asc.c_oAscPopUpSelectorType.Table) ? 'mnu-popup-table' : 'mnu-popup-range') ,
caption: menuItem.asc_getName() caption: menuItem.asc_getName()
}).on('click', function(item, e) { }).on('click', function(item, e) {
setTimeout(function(){ me.api.asc_insertFormula(item.caption, type, false ); }, 10); setTimeout(function(){ me.api.asc_insertFormula(item.caption, type, false ); }, 10);
@ -1417,16 +1417,16 @@ define([
}, },
onCellsRange: function(status) { onCellsRange: function(status) {
this.rangeSelectionMode = (status != c_oAscSelectionDialogType.None); this.rangeSelectionMode = (status != Asc.c_oAscSelectionDialogType.None);
}, },
onApiEditCell: function(state) { onApiEditCell: function(state) {
this.isEditFormula = (state == c_oAscCellEditorState.editFormula); this.isEditFormula = (state == Asc.c_oAscCellEditorState.editFormula);
this.isEditCell = (state != c_oAscCellEditorState.editEnd); this.isEditCell = (state != Asc.c_oAscCellEditorState.editEnd);
}, },
onLockDefNameManager: function(state) { onLockDefNameManager: function(state) {
this.namedrange_locked = (state == c_oAscDefinedNameReason.LockDefNameManager); this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
}, },
guestText : 'Guest', guestText : 'Guest',

View file

@ -83,7 +83,7 @@ define([
formulasGroups : this.formulasGroups, formulasGroups : this.formulasGroups,
handler : function (func) { handler : function (func) {
if (func && me.api) { if (func && me.api) {
me.api.asc_insertFormula(func, c_oAscPopUpSelectorType.Func); me.api.asc_insertFormula(func, Asc.c_oAscPopUpSelectorType.Func);
} }
} }
}); });

View file

@ -207,7 +207,7 @@ define([
}, },
clickSaveAsFormat: function(menu, format) { clickSaveAsFormat: function(menu, format) {
if (format == c_oAscFileType.CSV) { if (format == Asc.c_oAscFileType.CSV) {
Common.UI.warning({ Common.UI.warning({
closable: false, closable: false,
title: this.textWarning, title: this.textWarning,
@ -312,7 +312,7 @@ define([
options.asc_setIsWholeCell(opts.matchword); options.asc_setIsWholeCell(opts.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value); options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
if (!this.api.asc_findText(options)) { if (!this.api.asc_findText(options)) {
var me = this; var me = this;
@ -337,7 +337,7 @@ define([
options.asc_setIsWholeCell(opts.matchword); options.asc_setIsWholeCell(opts.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value); options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
options.asc_setIsReplaceAll(false); options.asc_setIsReplaceAll(false);
this.api.asc_replaceText(options); this.api.asc_replaceText(options);
@ -355,7 +355,7 @@ define([
options.asc_setIsWholeCell(opts.matchword); options.asc_setIsWholeCell(opts.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value); options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
options.asc_setIsReplaceAll(true); options.asc_setIsReplaceAll(true);
this.api.asc_replaceText(options); this.api.asc_replaceText(options);
@ -474,7 +474,7 @@ define([
options.asc_setIsWholeCell(sett.matchword); options.asc_setIsWholeCell(sett.matchword);
options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked);
options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked);
options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?c_oAscFindLookIn.Formulas:c_oAscFindLookIn.Value); options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value);
if (!me.api.asc_findText(options)) { if (!me.api.asc_findText(options)) {
@ -638,7 +638,7 @@ define([
}, },
onCellsRange: function(status) { onCellsRange: function(status) {
var isRangeSelection = (status != c_oAscSelectionDialogType.None); var isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None);
this.leftMenu.btnFile.setDisabled(isRangeSelection); this.leftMenu.btnFile.setDisabled(isRangeSelection);
this.leftMenu.btnAbout.setDisabled(isRangeSelection); this.leftMenu.btnAbout.setDisabled(isRangeSelection);
@ -647,7 +647,7 @@ define([
onApiEditCell: function(state) { onApiEditCell: function(state) {
var isEditFormula = (state == c_oAscCellEditorState.editFormula); var isEditFormula = (state == Asc.c_oAscCellEditorState.editFormula);
this.leftMenu.btnFile.setDisabled(isEditFormula); this.leftMenu.btnFile.setDisabled(isEditFormula);
this.leftMenu.btnAbout.setDisabled(isEditFormula); this.leftMenu.btnAbout.setDisabled(isEditFormula);

View file

@ -132,7 +132,7 @@ define([
weakCompare : this._compareActionWeak weakCompare : this._compareActionWeak
}); });
this.stackLongActions.push({id: InitApplication, type: c_oAscAsyncActionType.BlockInteraction}); this.stackLongActions.push({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction});
this.isShowOpenDialog = false; this.isShowOpenDialog = false;
@ -334,7 +334,7 @@ define([
}, },
onDownloadAs: function() { onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.XLSX, true); this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
}, },
onProcessMouse: function(data) { onProcessMouse: function(data) {
@ -380,19 +380,19 @@ define([
this.headerView.setDocumentCaption(this.api.asc_getDocumentName()); this.headerView.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(this.api.asc_isDocumentModified(), true); this.updateWindowTitle(this.api.asc_isDocumentModified(), true);
if (type === c_oAscAsyncActionType.BlockInteraction && id == c_oAscAsyncAction.Open) { if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) {
Common.Gateway.internalMessage('documentReady', {}); Common.Gateway.internalMessage('documentReady', {});
this.onDocumentReady(); this.onDocumentReady();
} }
action = this.stackLongActions.get({type: c_oAscAsyncActionType.Information}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
action && this.setLongActionView(action); action && this.setLongActionView(action);
if (id == c_oAscAsyncAction.Save) { if (id == Asc.c_oAscAsyncAction.Save) {
this.toolbarView.synchronizeChanges(); this.toolbarView.synchronizeChanges();
} }
action = this.stackLongActions.get({type: c_oAscAsyncActionType.BlockInteraction}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction});
if (action) { if (action) {
this.setLongActionView(action); this.setLongActionView(action);
} else { } else {
@ -402,7 +402,7 @@ define([
this.loadMask.hide(); this.loadMask.hide();
} }
if (type == c_oAscAsyncActionType.BlockInteraction && !( (id == c_oAscAsyncAction['LoadDocumentFonts'] || id == c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment ))
this.onEditComplete(this.loadMask, {restorefocus:true}); this.onEditComplete(this.loadMask, {restorefocus:true});
} }
}, },
@ -411,51 +411,51 @@ define([
var title = ''; var title = '';
switch (action.id) { switch (action.id) {
case c_oAscAsyncAction.Open: case Asc.c_oAscAsyncAction.Open:
title = this.openTitleText; title = this.openTitleText;
break; break;
case c_oAscAsyncAction.Save: case Asc.c_oAscAsyncAction.Save:
title = this.saveTitleText; title = this.saveTitleText;
break; break;
case c_oAscAsyncAction.LoadDocumentFonts: case Asc.c_oAscAsyncAction.LoadDocumentFonts:
title = this.loadFontsTitleText; title = this.loadFontsTitleText;
break; break;
case c_oAscAsyncAction.LoadDocumentImages: case Asc.c_oAscAsyncAction.LoadDocumentImages:
title = this.loadImagesTitleText; title = this.loadImagesTitleText;
break; break;
case c_oAscAsyncAction.LoadFont: case Asc.c_oAscAsyncAction.LoadFont:
title = this.loadFontTitleText; title = this.loadFontTitleText;
break; break;
case c_oAscAsyncAction.LoadImage: case Asc.c_oAscAsyncAction.LoadImage:
title = this.loadImageTitleText; title = this.loadImageTitleText;
break; break;
case c_oAscAsyncAction.DownloadAs: case Asc.c_oAscAsyncAction.DownloadAs:
title = this.downloadTitleText; title = this.downloadTitleText;
break; break;
case c_oAscAsyncAction.Print: case Asc.c_oAscAsyncAction.Print:
title = this.printTitleText; title = this.printTitleText;
break; break;
case c_oAscAsyncAction.UploadImage: case Asc.c_oAscAsyncAction.UploadImage:
title = this.uploadImageTitleText; title = this.uploadImageTitleText;
break; break;
case c_oAscAsyncAction.Recalc: case Asc.c_oAscAsyncAction.Recalc:
title = this.titleRecalcFormulas; title = this.titleRecalcFormulas;
break; break;
case c_oAscAsyncAction.SlowOperation: case Asc.c_oAscAsyncAction.SlowOperation:
title = this.textPleaseWait; title = this.textPleaseWait;
break; break;
case c_oAscAsyncAction['PrepareToSave']: case Asc.c_oAscAsyncAction['PrepareToSave']:
title = this.savePreparingText; title = this.savePreparingText;
break; break;
@ -468,7 +468,7 @@ define([
break; break;
} }
if (action.type == c_oAscAsyncActionType.BlockInteraction) { if (action.type == Asc.c_oAscAsyncActionType.BlockInteraction) {
!this.loadMask && (this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')})); !this.loadMask && (this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}));
this.loadMask.setTitle(title); this.loadMask.setTitle(title);
@ -482,7 +482,7 @@ define([
onApplyEditRights: function(data) { onApplyEditRights: function(data) {
if (data) { if (data) {
if (data.allowed) { if (data.allowed) {
this.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights); this.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'],ApplyEditRights);
this.appOptions.isEdit = true; this.appOptions.isEdit = true;
var me = this; var me = this;
@ -542,7 +542,7 @@ define([
me._isDocReady = true; me._isDocReady = true;
me.hidePreloader(); me.hidePreloader();
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
value = (this.appOptions.isEditMailMerge || this.appOptions.isEditDiagram) ? 100 : Common.localStorage.getItem("sse-settings-zoom"); value = (this.appOptions.isEditMailMerge || this.appOptions.isEditDiagram) ? 100 : Common.localStorage.getItem("sse-settings-zoom");
this.api.asc_setZoom(!value?1:parseInt(value)/100); this.api.asc_setZoom(!value?1:parseInt(value)/100);
@ -736,7 +736,7 @@ define([
if (!this.appOptions.isEdit) { if (!this.appOptions.isEdit) {
this.hidePreloader(); this.hidePreloader();
this.onLongActionBegin(c_oAscAsyncActionType.BlockInteraction, LoadingDocument); this.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
} }
}, },
@ -883,11 +883,11 @@ define([
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
/** coauthoring end **/ /** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: c_oAscAsyncActionType['BlockInteraction']})) { if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], ApplyEditRights);
} else if (!this._isDocReady) { } else if (!this._isDocReady) {
me.hidePreloader(); me.hidePreloader();
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
} }
// Message on window close // Message on window close
@ -907,148 +907,148 @@ define([
onError: function(id, level, errData) { onError: function(id, level, errData) {
this.hidePreloader(); this.hidePreloader();
this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument); this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
var config = {closable: false}; var config = {closable: false};
switch (id) { switch (id) {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.msg = this.unknownErrorText; config.msg = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.msg = this.convertationTimeoutText; config.msg = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.msg = this.convertationErrorText; config.msg = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.msg = this.downloadErrorText; config.msg = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.msg = this.uploadImageSizeMessage; config.msg = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.msg = this.uploadImageExtMessage; config.msg = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.msg = this.uploadImageFileCountMessage; config.msg = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.PastInMergeAreaError: case Asc.c_oAscError.ID.PastInMergeAreaError:
config.msg = this.pastInMergeAreaError; config.msg = this.pastInMergeAreaError;
break; break;
case c_oAscError.ID.FrmlWrongCountParentheses: case Asc.c_oAscError.ID.FrmlWrongCountParentheses:
config.msg = this.errorWrongBracketsCount; config.msg = this.errorWrongBracketsCount;
break; break;
case c_oAscError.ID.FrmlWrongOperator: case Asc.c_oAscError.ID.FrmlWrongOperator:
config.msg = this.errorWrongOperator; config.msg = this.errorWrongOperator;
break; break;
case c_oAscError.ID.FrmlWrongMaxArgument: case Asc.c_oAscError.ID.FrmlWrongMaxArgument:
config.msg = this.errorCountArgExceed; config.msg = this.errorCountArgExceed;
break; break;
case c_oAscError.ID.FrmlWrongCountArgument: case Asc.c_oAscError.ID.FrmlWrongCountArgument:
config.msg = this.errorCountArg; config.msg = this.errorCountArg;
break; break;
case c_oAscError.ID.FrmlWrongFunctionName: case Asc.c_oAscError.ID.FrmlWrongFunctionName:
config.msg = this.errorFormulaName; config.msg = this.errorFormulaName;
break; break;
case c_oAscError.ID.FrmlAnotherParsingError: case Asc.c_oAscError.ID.FrmlAnotherParsingError:
config.msg = this.errorFormulaParsing; config.msg = this.errorFormulaParsing;
break; break;
case c_oAscError.ID.FrmlWrongArgumentRange: case Asc.c_oAscError.ID.FrmlWrongArgumentRange:
config.msg = this.errorArgsRange; config.msg = this.errorArgsRange;
break; break;
case c_oAscError.ID.UnexpectedGuid: case Asc.c_oAscError.ID.UnexpectedGuid:
config.msg = this.errorUnexpectedGuid; config.msg = this.errorUnexpectedGuid;
break; break;
case c_oAscError.ID.Database: case Asc.c_oAscError.ID.Database:
config.msg = this.errorDatabaseConnection; config.msg = this.errorDatabaseConnection;
break; break;
case c_oAscError.ID.FileRequest: case Asc.c_oAscError.ID.FileRequest:
config.msg = this.errorFileRequest; config.msg = this.errorFileRequest;
break; break;
case c_oAscError.ID.FileVKey: case Asc.c_oAscError.ID.FileVKey:
config.msg = this.errorFileVKey; config.msg = this.errorFileVKey;
break; break;
case c_oAscError.ID.StockChartError: case Asc.c_oAscError.ID.StockChartError:
config.msg = this.errorStockChart; config.msg = this.errorStockChart;
break; break;
case c_oAscError.ID.DataRangeError: case Asc.c_oAscError.ID.DataRangeError:
config.msg = this.errorDataRange; config.msg = this.errorDataRange;
break; break;
case c_oAscError.ID.FrmlOperandExpected: case Asc.c_oAscError.ID.FrmlOperandExpected:
config.msg = this.errorOperandExpected; config.msg = this.errorOperandExpected;
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt; config.msg = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire; config.msg = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed; config.msg = this.errorUsersExceed;
break; break;
case c_oAscError.ID.CannotMoveRange: case Asc.c_oAscError.ID.CannotMoveRange:
config.msg = this.errorMoveRange; config.msg = this.errorMoveRange;
break; break;
case c_oAscError.ID.UplImageUrl: case Asc.c_oAscError.ID.UplImageUrl:
config.msg = this.errorBadImageUrl; config.msg = this.errorBadImageUrl;
break; break;
case c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect; config.msg = this.errorCoAuthoringDisconnect;
break; break;
case c_oAscError.ID.ConvertationPassword: case Asc.c_oAscError.ID.ConvertationPassword:
config.msg = this.errorFilePassProtect; config.msg = this.errorFilePassProtect;
break; break;
case c_oAscError.ID.AutoFilterDataRangeError: case Asc.c_oAscError.ID.AutoFilterDataRangeError:
config.msg = this.errorAutoFilterDataRange; config.msg = this.errorAutoFilterDataRange;
break; break;
case c_oAscError.ID.AutoFilterChangeFormatTableError: case Asc.c_oAscError.ID.AutoFilterChangeFormatTableError:
config.msg = this.errorAutoFilterChangeFormatTable; config.msg = this.errorAutoFilterChangeFormatTable;
break; break;
case c_oAscError.ID.AutoFilterChangeError: case Asc.c_oAscError.ID.AutoFilterChangeError:
config.msg = this.errorAutoFilterChange; config.msg = this.errorAutoFilterChange;
break; break;
case c_oAscError.ID.AutoFilterMoveToHiddenRangeError: case Asc.c_oAscError.ID.AutoFilterMoveToHiddenRangeError:
config.msg = this.errorAutoFilterHiddenRange; config.msg = this.errorAutoFilterHiddenRange;
break; break;
case c_oAscError.ID.CannotFillRange: case Asc.c_oAscError.ID.CannotFillRange:
config.msg = this.errorFillRange; config.msg = this.errorFillRange;
break; break;
case c_oAscError.ID.UserDrop: case Asc.c_oAscError.ID.UserDrop:
if (this._state.lostEditingRights) { if (this._state.lostEditingRights) {
this._state.lostEditingRights = false; this._state.lostEditingRights = false;
return; return;
@ -1057,35 +1057,35 @@ define([
config.msg = this.errorUserDrop; config.msg = this.errorUserDrop;
break; break;
case c_oAscError.ID.InvalidReferenceOrName: case Asc.c_oAscError.ID.InvalidReferenceOrName:
config.msg = this.errorInvalidRef; config.msg = this.errorInvalidRef;
break; break;
case c_oAscError.ID.LockCreateDefName: case Asc.c_oAscError.ID.LockCreateDefName:
config.msg = this.errorCreateDefName; config.msg = this.errorCreateDefName;
break; break;
case c_oAscError.ID.PasteMaxRangeError: case Asc.c_oAscError.ID.PasteMaxRangeError:
config.msg = this.errorPasteMaxRange; config.msg = this.errorPasteMaxRange;
break; break;
case c_oAscError.ID.LockedAllError: case Asc.c_oAscError.ID.LockedAllError:
config.msg = this.errorLockedAll; config.msg = this.errorLockedAll;
break; break;
case c_oAscError.ID.Warning: case Asc.c_oAscError.ID.Warning:
config.msg = this.errorConnectToServer; config.msg = this.errorConnectToServer;
break; break;
case c_oAscError.ID.LockedWorksheetRename: case Asc.c_oAscError.ID.LockedWorksheetRename:
config.msg = this.errorLockedWorksheetRename; config.msg = this.errorLockedWorksheetRename;
break; break;
case c_oAscError.ID.OpenWarning: case Asc.c_oAscError.ID.OpenWarning:
config.msg = this.errorOpenWarning; config.msg = this.errorOpenWarning;
break; break;
case c_oAscError.ID.FrmlWrongReferences: case Asc.c_oAscError.ID.FrmlWrongReferences:
config.msg = this.errorFrmlWrongReferences; config.msg = this.errorFrmlWrongReferences;
break; break;
@ -1095,7 +1095,7 @@ define([
} }
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
Common.Gateway.reportError(id, config.msg); Common.Gateway.reportError(id, config.msg);
config.title = this.criticalErrorTitle; config.title = this.criticalErrorTitle;
@ -1114,7 +1114,7 @@ define([
config.iconCls = 'warn'; config.iconCls = 'warn';
config.buttons = ['ok']; config.buttons = ['ok'];
config.callback = _.bind(function(btn){ config.callback = _.bind(function(btn){
if (id == c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) { if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
Common.UI.Menu.Manager.hideAll(); Common.UI.Menu.Manager.hideAll();
(this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas'); (this.appOptions.isDesktopApp && this.appOptions.isOffline) ? this.api.asc_DownloadAs() : this.getApplication().getController('LeftMenu').leftMenu.showMenu('file:saveas');
} }
@ -1262,7 +1262,7 @@ define([
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
} }
this.stackLongActions.pop({id: InitApplication, type: c_oAscAsyncActionType.BlockInteraction}); this.stackLongActions.pop({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction});
Common.NotificationCenter.trigger('layout:changed', 'main'); Common.NotificationCenter.trigger('layout:changed', 'main');
$('#loading-mask').hide().remove(); $('#loading-mask').hide().remove();
}, },
@ -1278,14 +1278,14 @@ define([
onUpdateVersion: function(callback) { onUpdateVersion: function(callback) {
var me = this; var me = this;
me.needToUpdateVersion = true; me.needToUpdateVersion = true;
me.onLongActionEnd(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
Common.UI.error({ Common.UI.error({
msg: this.errorUpdateVersion, msg: this.errorUpdateVersion,
callback: function() { callback: function() {
_.defer(function() { _.defer(function() {
Common.Gateway.updateVersion(); Common.Gateway.updateVersion();
if (callback) callback.call(me); if (callback) callback.call(me);
me.onLongActionBegin(c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
}) })
} }
}); });
@ -1293,7 +1293,7 @@ define([
onAdvancedOptions: function(advOptions) { onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId(); var type = advOptions.asc_getOptionId();
if (type == c_oAscAdvancedOptionsID.CSV) { if (type == Asc.c_oAscAdvancedOptionsID.CSV) {
var me = this; var me = this;
var dlg = new Common.Views.OpenDialog({ var dlg = new Common.Views.OpenDialog({
type: type, type: type,
@ -1310,7 +1310,7 @@ define([
this.isShowOpenDialog = true; this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide(); this.loadMask && this.loadMask.hide();
this.onLongActionEnd(c_oAscAsyncActionType.BlockInteraction, LoadingDocument); this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show(); dlg.show();
} }
@ -1333,7 +1333,7 @@ define([
}, },
onConfirmAction: function(id, apiCallback) { onConfirmAction: function(id, apiCallback) {
if (id == c_oAscConfirm.ConfirmReplaceRange) { if (id == Asc.c_oAscConfirm.ConfirmReplaceRange) {
var me = this; var me = this;
Common.UI.warning({ Common.UI.warning({
closable: false, closable: false,

View file

@ -44,7 +44,7 @@ define([
initialize: function() { initialize: function() {
var value = Common.localStorage.getItem("sse-print-settings-range"); var value = Common.localStorage.getItem("sse-print-settings-range");
value = (value!==null) ? parseInt(value) : c_oAscPrintType.ActiveSheets; value = (value!==null) ? parseInt(value) : Asc.c_oAscPrintType.ActiveSheets;
this.adjPrintParams = new Asc.asc_CAdjustPrint(); this.adjPrintParams = new Asc.asc_CAdjustPrint();
this.adjPrintParams.asc_setPrintType(value); this.adjPrintParams.asc_setPrintType(value);
@ -154,12 +154,12 @@ define([
onChangeRange: function() { onChangeRange: function() {
var printtype = this.printSettingsDlg.getRange(), var printtype = this.printSettingsDlg.getRange(),
store = this.printSettingsDlg.cmbSheet.store, store = this.printSettingsDlg.cmbSheet.store,
item = (printtype !== c_oAscPrintType.EntireWorkbook) ? store.findWhere({value: this.api.asc_getActiveWorksheetIndex()}) : store.at(0); item = (printtype !== Asc.c_oAscPrintType.EntireWorkbook) ? store.findWhere({value: this.api.asc_getActiveWorksheetIndex()}) : store.at(0);
if (item) { if (item) {
this.printSettingsDlg.cmbSheet.setValue(item.get('value')); this.printSettingsDlg.cmbSheet.setValue(item.get('value'));
this.comboSheetsChange(this.printSettingsDlg, this.printSettingsDlg.cmbSheet, item.toJSON()); this.comboSheetsChange(this.printSettingsDlg, this.printSettingsDlg.cmbSheet, item.toJSON());
} }
this.printSettingsDlg.cmbSheet.setDisabled(printtype !== c_oAscPrintType.EntireWorkbook); this.printSettingsDlg.cmbSheet.setDisabled(printtype !== Asc.c_oAscPrintType.EntireWorkbook);
}, },
getPageOptions: function(panel) { getPageOptions: function(panel) {
@ -264,7 +264,7 @@ define([
}, },
checkMargins: function(panel) { checkMargins: function(panel) {
if (panel.cmbPaperOrientation.getValue() == c_oAscPageOrientation.PagePortrait) { if (panel.cmbPaperOrientation.getValue() == Asc.c_oAscPageOrientation.PagePortrait) {
var pagewidth = /^\d{3}\.?\d*/.exec(panel.cmbPaperSize.getValue()); var pagewidth = /^\d{3}\.?\d*/.exec(panel.cmbPaperSize.getValue());
var pageheight = /\d{3}\.?\d*$/.exec(panel.cmbPaperSize.getValue()); var pageheight = /\d{3}\.?\d*$/.exec(panel.cmbPaperSize.getValue());
} else { } else {

View file

@ -105,8 +105,8 @@ define([
var SelectedObjects = [], var SelectedObjects = [],
selectType = info.asc_getFlags().asc_getSelectionType(); selectType = info.asc_getFlags().asc_getSelectionType();
if (selectType == c_oAscSelectionType.RangeImage || selectType == c_oAscSelectionType.RangeShape || if (selectType == Asc.c_oAscSelectionType.RangeImage || selectType == Asc.c_oAscSelectionType.RangeShape ||
selectType == c_oAscSelectionType.RangeChart || selectType == c_oAscSelectionType.RangeChartText || selectType == c_oAscSelectionType.RangeShapeText) { selectType == Asc.c_oAscSelectionType.RangeChart || selectType == Asc.c_oAscSelectionType.RangeChartText || selectType == Asc.c_oAscSelectionType.RangeShapeText) {
SelectedObjects = this.api.asc_getGraphicObjectProps(); SelectedObjects = this.api.asc_getGraphicObjectProps();
} }
@ -283,9 +283,9 @@ define([
getDocumentSettingsType: function(type) { getDocumentSettingsType: function(type) {
switch (type) { switch (type) {
case c_oAscTypeSelectElement.Paragraph: case Asc.c_oAscTypeSelectElement.Paragraph:
return Common.Utils.documentSettingsType.Paragraph; return Common.Utils.documentSettingsType.Paragraph;
case c_oAscTypeSelectElement.Image: case Asc.c_oAscTypeSelectElement.Image:
return Common.Utils.documentSettingsType.Image; return Common.Utils.documentSettingsType.Image;
} }
} }

View file

@ -159,8 +159,8 @@ define([
/** coauthoring begin **/ /** coauthoring begin **/
onWorkbookLocked: function(locked) { onWorkbookLocked: function(locked) {
this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked'); this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked');
this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==c_oAscSelectionDialogType.Chart || this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==c_oAscSelectionDialogType.FormatTable); this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
var item, i = this.statusbar.tabbar.getCount(); var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) { while (i-- > 0) {
item = this.statusbar.tabbar.getAt(i); item = this.statusbar.tabbar.getAt(i);
@ -179,7 +179,7 @@ define([
tab = this.statusbar.tabbar.getAt(i); tab = this.statusbar.tabbar.getAt(i);
if (index == tab.sheetindex) { if (index == tab.sheetindex) {
tab[locked?'addClass':'removeClass']('coauth-locked'); tab[locked?'addClass':'removeClass']('coauth-locked');
tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==c_oAscSelectionDialogType.FormatTable); tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
break; break;
} }
} }
@ -200,8 +200,8 @@ define([
}, },
onApiEditCell: function(state) { onApiEditCell: function(state) {
var disableAdd = (state == c_oAscCellEditorState.editFormula), var disableAdd = (state == Asc.c_oAscCellEditorState.editFormula),
disable = (state != c_oAscCellEditorState.editEnd), disable = (state != Asc.c_oAscCellEditorState.editEnd),
mask = $('.statusbar-mask'), mask = $('.statusbar-mask'),
statusbar = this.statusbar; statusbar = this.statusbar;
@ -235,15 +235,15 @@ define([
onRangeDialogMode: function (mode) { onRangeDialogMode: function (mode) {
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'), var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
currentIdx = this.api.asc_getActiveWorksheetIndex(); currentIdx = this.api.asc_getActiveWorksheetIndex();
this.statusbar.btnAddWorksheet.setDisabled(islocked || mode!=c_oAscSelectionDialogType.None); this.statusbar.btnAddWorksheet.setDisabled(islocked || mode!=Asc.c_oAscSelectionDialogType.None);
var item, i = this.statusbar.tabbar.getCount(); var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) { while (i-- > 0) {
item = this.statusbar.tabbar.getAt(i); item = this.statusbar.tabbar.getAt(i);
if (item.sheetindex !== currentIdx) { if (item.sheetindex !== currentIdx) {
item.disable(mode==c_oAscSelectionDialogType.FormatTable); item.disable(mode==Asc.c_oAscSelectionDialogType.FormatTable);
} }
item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=c_oAscSelectionDialogType.None)); item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=Asc.c_oAscSelectionDialogType.None));
} }
this.statusbar.rangeSelectionMode = mode; this.statusbar.rangeSelectionMode = mode;
}, },
@ -550,7 +550,7 @@ define([
color = this.api.asc_getWorksheetTabColor(sindex); color = this.api.asc_getWorksheetTabColor(sindex);
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -630,7 +630,7 @@ define([
onError: function(id, level, errData) { onError: function(id, level, errData) {
if (id == c_oAscError.ID.LockedWorksheetRename) if (id == Asc.c_oAscError.ID.LockedWorksheetRename)
this.statusbar.update(); this.statusbar.update();
}, },

View file

@ -490,20 +490,20 @@ define([
btnBorders.options.borderId = item.options.borderId; btnBorders.options.borderId = item.options.borderId;
if (item.options.borderId == 'inner') { if (item.options.borderId == 'inner') {
new_borders[c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} else if (item.options.borderId == 'all') { } else if (item.options.borderId == 'all') {
new_borders[c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.InnerV] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.InnerH] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} else if (item.options.borderId == 'outer') { } else if (item.options.borderId == 'outer') {
new_borders[c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Left] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Top] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Right] = new Asc.asc_CBorder(bordersWidth, bordersColor);
new_borders[c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[Asc.c_oAscBorderOptions.Bottom] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} else if (item.options.borderId != 'none') { } else if (item.options.borderId != 'none') {
new_borders[item.options.borderId] = new Asc.asc_CBorder(bordersWidth, bordersColor); new_borders[item.options.borderId] = new Asc.asc_CBorder(bordersWidth, bordersColor);
} }
@ -733,9 +733,9 @@ define([
props : props, props : props,
text : cell.asc_getText(), text : cell.asc_getText(),
isLock : cell.asc_getFlags().asc_getLockText(), isLock : cell.asc_getFlags().asc_getLockText(),
allowInternal: (seltype!==c_oAscSelectionType.RangeImage && seltype!==c_oAscSelectionType.RangeShape && allowInternal: (seltype!==Asc.c_oAscSelectionType.RangeImage && seltype!==Asc.c_oAscSelectionType.RangeShape &&
seltype!==c_oAscSelectionType.RangeShapeText && seltype!==c_oAscSelectionType.RangeChart && seltype!==Asc.c_oAscSelectionType.RangeShapeText && seltype!==Asc.c_oAscSelectionType.RangeChart &&
seltype!==c_oAscSelectionType.RangeChartText) seltype!==Asc.c_oAscSelectionType.RangeChartText)
}); });
} }
@ -745,12 +745,12 @@ define([
onInsertChart: function(btn) { onInsertChart: function(btn) {
if (!this.editMode) return; if (!this.editMode) return;
var me = this, info = me.api.asc_getCellInfo(); var me = this, info = me.api.asc_getCellInfo();
if (info.asc_getFlags().asc_getSelectionType()!=c_oAscSelectionType.RangeImage) { if (info.asc_getFlags().asc_getSelectionType()!=Asc.c_oAscSelectionType.RangeImage) {
var win, props; var win, props;
if (me.api){ if (me.api){
props = me.api.asc_getChartObject(); props = me.api.asc_getChartObject();
if (props) { if (props) {
var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == c_oAscSelectionType.RangeChartText); var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText);
(new SSE.Views.ChartSettingsDlg( (new SSE.Views.ChartSettingsDlg(
{ {
@ -817,7 +817,7 @@ define([
this._state.filter = undefined; this._state.filter = undefined;
if (this.api){ if (this.api){
if (this._state.tablename || state) if (this._state.tablename || state)
this.api.asc_changeAutoFilter(this._state.tablename, c_oAscChangeFilterOptions.filter, !state); this.api.asc_changeAutoFilter(this._state.tablename, Asc.c_oAscChangeFilterOptions.filter, !state);
else else
this.api.asc_addAutoFilter(); this.api.asc_addAutoFilter();
} }
@ -885,7 +885,7 @@ define([
item.value = item.value || 'SUM'; item.value = item.value || 'SUM';
this.api.asc_insertFormula(this.api.asc_getFormulaLocaleName(item.value), c_oAscPopUpSelectorType.Func, true); this.api.asc_insertFormula(this.api.asc_getFormulaLocaleName(item.value), Asc.c_oAscPopUpSelectorType.Func, true);
Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Insert formula'); Common.component.Analytics.trackEvent('ToolBar', 'Insert formula');
@ -900,12 +900,12 @@ define([
(new SSE.Views.NamedRangePasteDlg({ (new SSE.Views.NamedRangePasteDlg({
handler: function(result, settings) { handler: function(result, settings) {
if (result == 'ok' && settings) { if (result == 'ok' && settings) {
me.api.asc_insertFormula(settings.asc_getName(), settings.asc_getIsTable() ? c_oAscPopUpSelectorType.Table : c_oAscPopUpSelectorType.Range, false); me.api.asc_insertFormula(settings.asc_getName(), settings.asc_getIsTable() ? Asc.c_oAscPopUpSelectorType.Table : Asc.c_oAscPopUpSelectorType.Range, false);
Common.component.Analytics.trackEvent('ToolBar', 'Paste Named Range'); Common.component.Analytics.trackEvent('ToolBar', 'Paste Named Range');
} }
Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}, },
ranges: me.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.WorksheetWorkbook) // names only for current sheet and workbook ranges: me.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.WorksheetWorkbook) // names only for current sheet and workbook
})).show(); })).show();
Common.component.Analytics.trackEvent('ToolBar', 'Paste Named Range'); Common.component.Analytics.trackEvent('ToolBar', 'Paste Named Range');
} else { } else {
@ -956,7 +956,7 @@ define([
locked: me._state.namedrange_locked, locked: me._state.namedrange_locked,
sheets: items, sheets: items,
sheetNames: sheetNames, sheetNames: sheetNames,
ranges: me.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.All), ranges: me.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.All),
props : me.api.asc_getDefaultDefinedName(), props : me.api.asc_getDefaultDefinedName(),
sort : cellEditor.rangeListSort sort : cellEditor.rangeListSort
})).on('close', function(win){ })).on('close', function(win){
@ -969,7 +969,7 @@ define([
onNamedRangeMenuOpen: function() { onNamedRangeMenuOpen: function() {
if (this.api) { if (this.api) {
var names = this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.WorksheetWorkbook); var names = this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.WorksheetWorkbook);
this.toolbar.btnNamedRange.menu.items[2].setDisabled(names.length<1); this.toolbar.btnNamedRange.menu.items[2].setDisabled(names.length<1);
} }
}, },
@ -1195,7 +1195,7 @@ define([
me._state.filter = undefined; me._state.filter = undefined;
if (me.editMode && me.api) { if (me.editMode && me.api) {
if (me._state.tablename || state) if (me._state.tablename || state)
me.api.asc_changeAutoFilter(me._state.tablename, c_oAscChangeFilterOptions.filter, !state); me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.filter, !state);
else else
me.api.asc_addAutoFilter(); me.api.asc_addAutoFilter();
} }
@ -1413,11 +1413,11 @@ define([
onApiEditCell: function(state) { onApiEditCell: function(state) {
var toolbar = this.toolbar; var toolbar = this.toolbar;
if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) { if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) {
is_cell_edited = (state == c_oAscCellEditorState.editStart); is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
toolbar.lockToolbar(SSE.enumLock.editCell, state == c_oAscCellEditorState.editStart, {array: [toolbar.btnDecDecimal,toolbar.btnIncDecimal,toolbar.btnNumberFormat]}); toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {array: [toolbar.btnDecDecimal,toolbar.btnIncDecimal,toolbar.btnNumberFormat]});
} else } else
if (state == c_oAscCellEditorState.editStart || state == c_oAscCellEditorState.editEnd) { if (state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd) {
toolbar.lockToolbar(SSE.enumLock.editCell, state == c_oAscCellEditorState.editStart, { toolbar.lockToolbar(SSE.enumLock.editCell, state == Asc.c_oAscCellEditorState.editStart, {
array: [ array: [
toolbar.btnClearStyle.menu.items[1], toolbar.btnClearStyle.menu.items[1],
toolbar.btnClearStyle.menu.items[2], toolbar.btnClearStyle.menu.items[2],
@ -1431,7 +1431,7 @@ define([
clear: [SSE.enumLock.editFormula, SSE.enumLock.editText] clear: [SSE.enumLock.editFormula, SSE.enumLock.editText]
}); });
var is_cell_edited = (state == c_oAscCellEditorState.editStart); var is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
(is_cell_edited) ? Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h') : (is_cell_edited) ? Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h') :
Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h'); Common.util.Shortcuts.resumeEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, alt+h');
@ -1442,9 +1442,9 @@ define([
this._state.prstyle = undefined; this._state.prstyle = undefined;
} }
} else { } else {
if (state == c_oAscCellEditorState.editText) var is_text = true, is_formula = false; else if (state == Asc.c_oAscCellEditorState.editText) var is_text = true, is_formula = false; else
if (state == c_oAscCellEditorState.editFormula) is_text = !(is_formula = true); else if (state == Asc.c_oAscCellEditorState.editFormula) is_text = !(is_formula = true); else
if (state == c_oAscCellEditorState.editEmptyCell) is_text = is_formula = false; if (state == Asc.c_oAscCellEditorState.editEmptyCell) is_text = is_formula = false;
toolbar.lockToolbar(SSE.enumLock.editFormula, is_formula, toolbar.lockToolbar(SSE.enumLock.editFormula, is_formula,
{ array: [toolbar.cmbFontName, toolbar.cmbFontSize, toolbar.btnIncFontSize, toolbar.btnDecFontSize, { array: [toolbar.cmbFontName, toolbar.cmbFontSize, toolbar.btnIncFontSize, toolbar.btnDecFontSize,
@ -1525,7 +1525,7 @@ define([
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) { if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
color = fontobj.asc_getColor(); color = fontobj.asc_getColor();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1612,7 +1612,7 @@ define([
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) { if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
color = fontobj.asc_getColor(); color = fontobj.asc_getColor();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1646,7 +1646,7 @@ define([
if (!toolbar.btnBackColor.ischanged && !paragraphColorPicker.isDummy) { if (!toolbar.btnBackColor.ischanged && !paragraphColorPicker.isDummy) {
color = info.asc_getFill().asc_getColor(); color = info.asc_getFill().asc_getColor();
if (color) { if (color) {
if (color.get_type() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else { } else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
@ -1679,7 +1679,7 @@ define([
this._state.clrshd_asccolor = color; this._state.clrshd_asccolor = color;
} }
if (selectionType == c_oAscSelectionType.RangeChart || selectionType == c_oAscSelectionType.RangeChartText) if (selectionType == Asc.c_oAscSelectionType.RangeChart || selectionType == Asc.c_oAscSelectionType.RangeChartText)
return; return;
if (!toolbar.mode.isEditDiagram) if (!toolbar.mode.isEditDiagram)
@ -1850,13 +1850,13 @@ define([
} }
} }
val = (selectionType==c_oAscSelectionType.RangeRow); val = (selectionType==Asc.c_oAscSelectionType.RangeRow);
if ( this._state.controlsdisabled.rows!==val ) { if ( this._state.controlsdisabled.rows!==val ) {
this._state.controlsdisabled.rows=val; this._state.controlsdisabled.rows=val;
toolbar.btnAddCell.menu.items[3].setDisabled(val); toolbar.btnAddCell.menu.items[3].setDisabled(val);
toolbar.btnDeleteCell.menu.items[3].setDisabled(val); toolbar.btnDeleteCell.menu.items[3].setDisabled(val);
} }
val = (selectionType==c_oAscSelectionType.RangeCol); val = (selectionType==Asc.c_oAscSelectionType.RangeCol);
if ( this._state.controlsdisabled.cols!==val ) { if ( this._state.controlsdisabled.cols!==val ) {
this._state.controlsdisabled.cols=val; this._state.controlsdisabled.cols=val;
toolbar.btnAddCell.menu.items[2].setDisabled(val); toolbar.btnAddCell.menu.items[2].setDisabled(val);
@ -2098,14 +2098,14 @@ define([
_disableEditOptions: function(seltype, coauth_disable) { _disableEditOptions: function(seltype, coauth_disable) {
if (this.api.isCellEdited) return true; if (this.api.isCellEdited) return true;
if (this.api.isRangeSelection) return true; if (this.api.isRangeSelection) return true;
if (this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===c_oAscSelectionType.RangeImage); if (this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage);
var toolbar = this.toolbar, var toolbar = this.toolbar,
is_chart_text = seltype == c_oAscSelectionType.RangeChartText, is_chart_text = seltype == Asc.c_oAscSelectionType.RangeChartText,
is_chart = seltype == c_oAscSelectionType.RangeChart, is_chart = seltype == Asc.c_oAscSelectionType.RangeChart,
is_shape_text = seltype == c_oAscSelectionType.RangeShapeText, is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText,
is_shape = seltype == c_oAscSelectionType.RangeShape, is_shape = seltype == Asc.c_oAscSelectionType.RangeShape,
is_image = seltype == c_oAscSelectionType.RangeImage, is_image = seltype == Asc.c_oAscSelectionType.RangeImage,
is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart; is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart;
if ( coauth_disable ) { if ( coauth_disable ) {
@ -2114,11 +2114,11 @@ define([
var _set = SSE.enumLock; var _set = SSE.enumLock;
var type = seltype; var type = seltype;
switch (seltype) { switch (seltype) {
case c_oAscSelectionType.RangeImage: type = _set.selImage; break; case Asc.c_oAscSelectionType.RangeImage: type = _set.selImage; break;
case c_oAscSelectionType.RangeShape: type = _set.selShape; break; case Asc.c_oAscSelectionType.RangeShape: type = _set.selShape; break;
case c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break; case Asc.c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break;
case c_oAscSelectionType.RangeChart: type = _set.selChart; break; case Asc.c_oAscSelectionType.RangeChart: type = _set.selChart; break;
case c_oAscSelectionType.RangeChartText: type = _set.selChartText; break; case Asc.c_oAscSelectionType.RangeChartText: type = _set.selChartText; break;
} }
toolbar.lockToolbar(type, type != seltype, { toolbar.lockToolbar(type, type != seltype, {
@ -2173,10 +2173,10 @@ define([
var handlerDlg = function(dlg, result) { var handlerDlg = function(dlg, result) {
if (result == 'ok') { if (result == 'ok') {
me._state.filter = undefined; me._state.filter = undefined;
me.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.None); me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
if (me._state.tablename) if (me._state.tablename)
me.api.asc_changeAutoFilter(me._state.tablename, c_oAscChangeFilterOptions.style, fmtname); me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
else else
me.api.asc_addAutoFilter(fmtname, dlg.getSettings()); me.api.asc_addAutoFilter(fmtname, dlg.getSettings());
} }
@ -2195,7 +2195,7 @@ define([
} else { } else {
me._state.filter = undefined; me._state.filter = undefined;
if (me._state.tablename) if (me._state.tablename)
me.api.asc_changeAutoFilter(me._state.tablename, c_oAscChangeFilterOptions.style, fmtname); me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
else else
me.api.asc_addAutoFilter(fmtname); me.api.asc_addAutoFilter(fmtname);
} }
@ -2237,8 +2237,8 @@ define([
}, },
onCellsRange: function(status) { onCellsRange: function(status) {
this.api.isRangeSelection = (status != c_oAscSelectionDialogType.None); this.api.isRangeSelection = (status != Asc.c_oAscSelectionDialogType.None);
this.onApiEditCell(this.api.isRangeSelection ? c_oAscCellEditorState.editStart : c_oAscCellEditorState.editEnd); this.onApiEditCell(this.api.isRangeSelection ? Asc.c_oAscCellEditorState.editStart : Asc.c_oAscCellEditorState.editEnd);
var toolbar = this.toolbar; var toolbar = this.toolbar;
toolbar.lockToolbar(SSE.enumLock.selRange, this.api.isRangeSelection); toolbar.lockToolbar(SSE.enumLock.selRange, this.api.isRangeSelection);
@ -2250,7 +2250,7 @@ define([
}, },
onLockDefNameManager: function(state) { onLockDefNameManager: function(state) {
this._state.namedrange_locked = (state == c_oAscDefinedNameReason.LockDefNameManager); this._state.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
}, },
DisableToolbar: function(disable) { DisableToolbar: function(disable) {

View file

@ -106,18 +106,18 @@ define([
Common.UI.Window.prototype.render.call(this); Common.UI.Window.prototype.render.call(this);
var conditions = [ var conditions = [
{value: c_oAscCustomAutoFilter.equals, displayValue: this.capCondition1}, {value: Asc.c_oAscCustomAutoFilter.equals, displayValue: this.capCondition1},
{value: c_oAscCustomAutoFilter.doesNotEqual, displayValue: this.capCondition2}, {value: Asc.c_oAscCustomAutoFilter.doesNotEqual, displayValue: this.capCondition2},
{value: c_oAscCustomAutoFilter.isGreaterThan, displayValue: this.capCondition3}, {value: Asc.c_oAscCustomAutoFilter.isGreaterThan, displayValue: this.capCondition3},
{value: c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, displayValue: this.capCondition4}, {value: Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo, displayValue: this.capCondition4},
{value: c_oAscCustomAutoFilter.isLessThan, displayValue: this.capCondition5}, {value: Asc.c_oAscCustomAutoFilter.isLessThan, displayValue: this.capCondition5},
{value: c_oAscCustomAutoFilter.isLessThanOrEqualTo, displayValue: this.capCondition6}, {value: Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo, displayValue: this.capCondition6},
{value: c_oAscCustomAutoFilter.beginsWith, displayValue: this.capCondition7}, {value: Asc.c_oAscCustomAutoFilter.beginsWith, displayValue: this.capCondition7},
{value: c_oAscCustomAutoFilter.doesNotBeginWith, displayValue: this.capCondition8}, {value: Asc.c_oAscCustomAutoFilter.doesNotBeginWith, displayValue: this.capCondition8},
{value: c_oAscCustomAutoFilter.endsWith, displayValue: this.capCondition9}, {value: Asc.c_oAscCustomAutoFilter.endsWith, displayValue: this.capCondition9},
{value: c_oAscCustomAutoFilter.doesNotEndWith, displayValue: this.capCondition10}, {value: Asc.c_oAscCustomAutoFilter.doesNotEndWith, displayValue: this.capCondition10},
{value: c_oAscCustomAutoFilter.contains, displayValue: this.capCondition11}, {value: Asc.c_oAscCustomAutoFilter.contains, displayValue: this.capCondition11},
{value: c_oAscCustomAutoFilter.doesNotContain, displayValue: this.capCondition12} {value: Asc.c_oAscCustomAutoFilter.doesNotContain, displayValue: this.capCondition12}
]; ];
this.cmbCondition1 = new Common.UI.ComboBox({ this.cmbCondition1 = new Common.UI.ComboBox({
@ -127,7 +127,7 @@ define([
data : conditions, data : conditions,
editable : false editable : false
}); });
this.cmbCondition1.setValue(c_oAscCustomAutoFilter.equals); this.cmbCondition1.setValue(Asc.c_oAscCustomAutoFilter.equals);
conditions.splice(0, 0, {value: 0, displayValue: this.textNoFilter}); conditions.splice(0, 0, {value: 0, displayValue: this.textNoFilter});
@ -227,13 +227,13 @@ define([
this.cmbCondition1 && this.cmbCondition2 && this.txtValue1 && this.txtValue2) { this.cmbCondition1 && this.cmbCondition2 && this.txtValue1 && this.txtValue2) {
var filterObj = this.properties.asc_getFilterObj(); var filterObj = this.properties.asc_getFilterObj();
if (filterObj.asc_getType() == c_oAscAutoFilterTypes.CustomFilters) { if (filterObj.asc_getType() == Asc.c_oAscAutoFilterTypes.CustomFilters) {
var customFilter = filterObj.asc_getFilter(), var customFilter = filterObj.asc_getFilter(),
customFilters = customFilter.asc_getCustomFilters(); customFilters = customFilter.asc_getCustomFilters();
(customFilter.asc_getAnd()) ? this.rbAnd.setValue(true) : this.rbOr.setValue(true); (customFilter.asc_getAnd()) ? this.rbAnd.setValue(true) : this.rbOr.setValue(true);
this.cmbCondition1.setValue(customFilters[0].asc_getOperator() || c_oAscCustomAutoFilter.equals); this.cmbCondition1.setValue(customFilters[0].asc_getOperator() || Asc.c_oAscCustomAutoFilter.equals);
this.cmbCondition2.setValue((customFilters.length>1) ? (customFilters[1].asc_getOperator() || 0) : 0); this.cmbCondition2.setValue((customFilters.length>1) ? (customFilters[1].asc_getOperator() || 0) : 0);
this.txtValue1.setValue(null === customFilters[0].asc_getVal() ? '' : customFilters[0].asc_getVal()); this.txtValue1.setValue(null === customFilters[0].asc_getVal() ? '' : customFilters[0].asc_getVal());
@ -247,7 +247,7 @@ define([
var filterObj = this.properties.asc_getFilterObj(); var filterObj = this.properties.asc_getFilterObj();
filterObj.asc_setFilter(new Asc.CustomFilters()); filterObj.asc_setFilter(new Asc.CustomFilters());
filterObj.asc_setType(c_oAscAutoFilterTypes.CustomFilters); filterObj.asc_setType(Asc.c_oAscAutoFilterTypes.CustomFilters);
var customFilter = filterObj.asc_getFilter(); var customFilter = filterObj.asc_getFilter();
customFilter.asc_setCustomFilters((this.cmbCondition2.getValue() == 0) ? [new Asc.CustomFilter()] : [new Asc.CustomFilter(), new Asc.CustomFilter()]); customFilter.asc_setCustomFilters((this.cmbCondition2.getValue() == 0) ? [new Asc.CustomFilter()] : [new Asc.CustomFilter(), new Asc.CustomFilter()]);
@ -564,7 +564,7 @@ define([
this.btnOk.setDisabled(false); this.btnOk.setDisabled(false);
this.chCustomFilter.setValue(false); this.chCustomFilter.setValue(false);
this.configTo.asc_getFilterObj().asc_setType(c_oAscAutoFilterTypes.Filters); this.configTo.asc_getFilterObj().asc_setType(Asc.c_oAscAutoFilterTypes.Filters);
listView.isSuspendEvents = false; listView.isSuspendEvents = false;
listView.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true}); listView.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});
@ -585,7 +585,7 @@ define([
var me = this, isnumber, value, index = 0, haveUnselectedCell = false, var me = this, isnumber, value, index = 0, haveUnselectedCell = false,
throughIndex = 1, throughIndex = 1,
isCustomFilter = (this.configTo.asc_getFilterObj().asc_getType() === c_oAscAutoFilterTypes.CustomFilters); isCustomFilter = (this.configTo.asc_getFilterObj().asc_getType() === Asc.c_oAscAutoFilterTypes.CustomFilters);
if (_.isUndefined(this.config)) { if (_.isUndefined(this.config)) {
return; return;
@ -726,7 +726,7 @@ define([
this.filterExcludeCells.reset(arrEx); this.filterExcludeCells.reset(arrEx);
if (this.cells.length) { if (this.cells.length) {
this.chCustomFilter.setValue(this.configTo.asc_getFilterObj().asc_getType() === c_oAscAutoFilterTypes.CustomFilters); this.chCustomFilter.setValue(this.configTo.asc_getFilterObj().asc_getType() === Asc.c_oAscAutoFilterTypes.CustomFilters);
} }
this.cellsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true}); this.cellsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true});

View file

@ -112,15 +112,15 @@ define([
if (settings.api) { if (settings.api) {
me.api = settings.api; me.api = settings.api;
me.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.Chart, settings.range ? settings.range : ''); me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.Chart, settings.range ? settings.range : '');
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me)); me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me)); me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.Chart); Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.Chart);
} }
me.inputRange.validation = function(value) { me.inputRange.validation = function(value) {
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, value, false); var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false);
return (isvalid==c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true; return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true;
}; };
}, },
@ -140,8 +140,8 @@ define([
onClose: function(event) { onClose: function(event) {
if (this.api) if (this.api)
this.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.None); this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.None); Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
}, },
onKeyPress: function(event) { onKeyPress: function(event) {

View file

@ -110,31 +110,31 @@ define([
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });
@ -322,7 +322,7 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
}, },

View file

@ -79,7 +79,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this._state = { this._state = {
ChartStyle: 1, ChartStyle: 1,
ChartType: c_oAscChartTypeSettings.barNormal ChartType: Asc.c_oAscChartTypeSettings.barNormal
}; };
this._noApply = true; this._noApply = true;
@ -140,31 +140,31 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
{ id: 'menu-chart-group-stock', caption: me.textStock } { id: 'menu-chart-group-stock', caption: me.textStock }
]), ]),
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'}, { group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'}, { group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'}, { group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'}, { group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'}, { group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'}, { group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'} { group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]), ]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>') itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
}); });
@ -231,9 +231,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscChartTitleShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartTitleShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartTitleShowSettings.overlay, displayValue: this.textOverlay }, { value: Asc.c_oAscChartTitleShowSettings.overlay, displayValue: this.textOverlay },
{ value: c_oAscChartTitleShowSettings.noOverlay, displayValue: this.textNoOverlay } { value: Asc.c_oAscChartTitleShowSettings.noOverlay, displayValue: this.textNoOverlay }
] ]
}); });
@ -243,13 +243,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscChartLegendShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartLegendShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartLegendShowSettings.bottom, displayValue: this.textLegendBottom }, { value: Asc.c_oAscChartLegendShowSettings.bottom, displayValue: this.textLegendBottom },
{ value: c_oAscChartLegendShowSettings.top, displayValue: this.textLegendTop }, { value: Asc.c_oAscChartLegendShowSettings.top, displayValue: this.textLegendTop },
{ value: c_oAscChartLegendShowSettings.right, displayValue: this.textLegendRight }, { value: Asc.c_oAscChartLegendShowSettings.right, displayValue: this.textLegendRight },
{ value: c_oAscChartLegendShowSettings.left, displayValue: this.textLegendLeft }, { value: Asc.c_oAscChartLegendShowSettings.left, displayValue: this.textLegendLeft },
{ value: c_oAscChartLegendShowSettings.leftOverlay, displayValue: this.textLeftOverlay }, { value: Asc.c_oAscChartLegendShowSettings.leftOverlay, displayValue: this.textLeftOverlay },
{ value: c_oAscChartLegendShowSettings.rightOverlay, displayValue: this.textRightOverlay } { value: Asc.c_oAscChartLegendShowSettings.rightOverlay, displayValue: this.textRightOverlay }
] ]
}); });
@ -259,8 +259,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscChartHorAxisLabelShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartHorAxisLabelShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: this.textNoOverlay } { value: Asc.c_oAscChartHorAxisLabelShowSettings.noOverlay, displayValue: this.textNoOverlay }
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.chartSettings) if (this.chartSettings)
@ -273,9 +273,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscChartVertAxisLabelShowSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscChartVertAxisLabelShowSettings.none, displayValue: this.textNone },
{ value: c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: this.textRotated }, { value: Asc.c_oAscChartVertAxisLabelShowSettings.rotated, displayValue: this.textRotated },
{ value: c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: this.textHorizontal } { value: Asc.c_oAscChartVertAxisLabelShowSettings.horizontal, displayValue: this.textHorizontal }
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.chartSettings) if (this.chartSettings)
@ -316,10 +316,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscGridLinesSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscGridLinesSettings.none, displayValue: this.textNone },
{ value: c_oAscGridLinesSettings.major, displayValue: this.textMajor }, { value: Asc.c_oAscGridLinesSettings.major, displayValue: this.textMajor },
{ value: c_oAscGridLinesSettings.minor, displayValue: this.textMinor }, { value: Asc.c_oAscGridLinesSettings.minor, displayValue: this.textMinor },
{ value: c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor } { value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor }
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.chartSettings) if (this.chartSettings)
@ -332,10 +332,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscGridLinesSettings.none, displayValue: this.textNone }, { value: Asc.c_oAscGridLinesSettings.none, displayValue: this.textNone },
{ value: c_oAscGridLinesSettings.major, displayValue: this.textMajor }, { value: Asc.c_oAscGridLinesSettings.major, displayValue: this.textMajor },
{ value: c_oAscGridLinesSettings.minor, displayValue: this.textMinor }, { value: Asc.c_oAscGridLinesSettings.minor, displayValue: this.textMinor },
{ value: c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor } { value: Asc.c_oAscGridLinesSettings.majorMinor, displayValue: this.textMajorMinor }
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.chartSettings) if (this.chartSettings)
@ -348,11 +348,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscChartDataLabelsPos.none, displayValue: this.textNone }, { value: Asc.c_oAscChartDataLabelsPos.none, displayValue: this.textNone },
{ value: c_oAscChartDataLabelsPos.ctr, displayValue: this.textCenter }, { value: Asc.c_oAscChartDataLabelsPos.ctr, displayValue: this.textCenter },
{ value: c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom }, { value: Asc.c_oAscChartDataLabelsPos.inBase, displayValue: this.textInnerBottom },
{ value: c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop }, { value: Asc.c_oAscChartDataLabelsPos.inEnd, displayValue: this.textInnerTop },
{ value: c_oAscChartDataLabelsPos.outEnd, displayValue: this.textOuterTop } { value: Asc.c_oAscChartDataLabelsPos.outEnd, displayValue: this.textOuterTop }
] ]
}); });
@ -417,13 +417,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;', menuStyle : 'min-width: 100px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textAuto, value: c_oAscValAxisRule.auto}, {displayValue: this.textAuto, value: Asc.c_oAscValAxisRule.auto},
{displayValue: this.textFixed, value: c_oAscValAxisRule.fixed} {displayValue: this.textFixed, value: Asc.c_oAscValAxisRule.fixed}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putMinValRule(record.value); this.currentAxisProps.putMinValRule(record.value);
if (record.value==c_oAscValAxisRule.auto) { if (record.value==Asc.c_oAscValAxisRule.auto) {
this.spnMinValue.setValue(this._originalAxisVValues.minAuto, true); this.spnMinValue.setValue(this._originalAxisVValues.minAuto, true);
} }
} }
@ -439,10 +439,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : '' value : ''
}).on('change', _.bind(function(field, newValue, oldValue) { }).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbMinType.suspendEvents(); this.cmbMinType.suspendEvents();
this.cmbMinType.setValue(c_oAscValAxisRule.fixed); this.cmbMinType.setValue(Asc.c_oAscValAxisRule.fixed);
this.cmbMinType.resumeEvents(); this.cmbMinType.resumeEvents();
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putMinValRule(c_oAscValAxisRule.fixed); this.currentAxisProps.putMinValRule(Asc.c_oAscValAxisRule.fixed);
this.currentAxisProps.putMinVal(field.getNumberValue()); this.currentAxisProps.putMinVal(field.getNumberValue());
} }
}, this)); }, this));
@ -453,13 +453,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;', menuStyle : 'min-width: 100px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textAuto, value: c_oAscValAxisRule.auto}, {displayValue: this.textAuto, value: Asc.c_oAscValAxisRule.auto},
{displayValue: this.textFixed, value: c_oAscValAxisRule.fixed} {displayValue: this.textFixed, value: Asc.c_oAscValAxisRule.fixed}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putMaxValRule(record.value); this.currentAxisProps.putMaxValRule(record.value);
if (record.value==c_oAscValAxisRule.auto) { if (record.value==Asc.c_oAscValAxisRule.auto) {
this.spnMaxValue.setValue(this._originalAxisVValues.maxAuto, true); this.spnMaxValue.setValue(this._originalAxisVValues.maxAuto, true);
} }
} }
@ -475,10 +475,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : '' value : ''
}).on('change', _.bind(function(field, newValue, oldValue) { }).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbMaxType.suspendEvents(); this.cmbMaxType.suspendEvents();
this.cmbMaxType.setValue(c_oAscValAxisRule.fixed); this.cmbMaxType.setValue(Asc.c_oAscValAxisRule.fixed);
this.cmbMaxType.resumeEvents(); this.cmbMaxType.resumeEvents();
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putMaxValRule(c_oAscValAxisRule.fixed); this.currentAxisProps.putMaxValRule(Asc.c_oAscValAxisRule.fixed);
this.currentAxisProps.putMaxVal(field.getNumberValue()); this.currentAxisProps.putMaxVal(field.getNumberValue());
} }
}, this)); }, this));
@ -489,23 +489,23 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;', menuStyle : 'min-width: 100px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textAuto, value: c_oAscCrossesRule.auto}, {displayValue: this.textAuto, value: Asc.c_oAscCrossesRule.auto},
{displayValue: this.textValue, value: c_oAscCrossesRule.value}, {displayValue: this.textValue, value: Asc.c_oAscCrossesRule.value},
{displayValue: this.textMinValue, value: c_oAscCrossesRule.minValue}, {displayValue: this.textMinValue, value: Asc.c_oAscCrossesRule.minValue},
{displayValue: this.textMaxValue, value: c_oAscCrossesRule.maxValue} {displayValue: this.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(record.value); this.currentAxisProps.putCrossesRule(record.value);
var value; var value;
switch (record.value) { switch (record.value) {
case c_oAscCrossesRule.minValue: case Asc.c_oAscCrossesRule.minValue:
this.spnVAxisCrosses.setValue(this.spnMinValue.getNumberValue(), true); this.spnVAxisCrosses.setValue(this.spnMinValue.getNumberValue(), true);
break; break;
case c_oAscCrossesRule.maxValue: case Asc.c_oAscCrossesRule.maxValue:
this.spnVAxisCrosses.setValue(this.spnMaxValue.getNumberValue(), true); this.spnVAxisCrosses.setValue(this.spnMaxValue.getNumberValue(), true);
break; break;
case c_oAscCrossesRule.auto: case Asc.c_oAscCrossesRule.auto:
this.spnVAxisCrosses.setValue(this._originalAxisVValues.crossesAuto, true); this.spnVAxisCrosses.setValue(this._originalAxisVValues.crossesAuto, true);
break; break;
} }
@ -522,10 +522,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : '' value : ''
}).on('change', _.bind(function(field, newValue, oldValue) { }).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbVCrossType.suspendEvents(); this.cmbVCrossType.suspendEvents();
this.cmbVCrossType.setValue(c_oAscCrossesRule.value); this.cmbVCrossType.setValue(Asc.c_oAscCrossesRule.value);
this.cmbVCrossType.resumeEvents(); this.cmbVCrossType.resumeEvents();
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(c_oAscCrossesRule.value); this.currentAxisProps.putCrossesRule(Asc.c_oAscCrossesRule.value);
this.currentAxisProps.putCrosses(field.getNumberValue()); this.currentAxisProps.putCrosses(field.getNumberValue());
} }
}, this)); }, this));
@ -536,16 +536,16 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscValAxUnits.none}, {displayValue: this.textNone, value: Asc.c_oAscValAxUnits.none},
{displayValue: this.textHundreds, value: c_oAscValAxUnits.HUNDREDS}, {displayValue: this.textHundreds, value: Asc.c_oAscValAxUnits.HUNDREDS},
{displayValue: this.textThousands, value: c_oAscValAxUnits.THOUSANDS}, {displayValue: this.textThousands, value: Asc.c_oAscValAxUnits.THOUSANDS},
{displayValue: this.textTenThousands, value: c_oAscValAxUnits.TEN_THOUSANDS}, {displayValue: this.textTenThousands, value: Asc.c_oAscValAxUnits.TEN_THOUSANDS},
{displayValue: this.textHundredThousands, value: c_oAscValAxUnits.HUNDRED_THOUSANDS}, {displayValue: this.textHundredThousands, value: Asc.c_oAscValAxUnits.HUNDRED_THOUSANDS},
{displayValue: this.textMillions, value: c_oAscValAxUnits.MILLIONS}, {displayValue: this.textMillions, value: Asc.c_oAscValAxUnits.MILLIONS},
{displayValue: this.textTenMillions, value: c_oAscValAxUnits.TEN_MILLIONS}, {displayValue: this.textTenMillions, value: Asc.c_oAscValAxUnits.TEN_MILLIONS},
{displayValue: this.textHundredMil, value: c_oAscValAxUnits.HUNDRED_MILLIONS}, {displayValue: this.textHundredMil, value: Asc.c_oAscValAxUnits.HUNDRED_MILLIONS},
{displayValue: this.textBillions, value: c_oAscValAxUnits.BILLIONS}, {displayValue: this.textBillions, value: Asc.c_oAscValAxUnits.BILLIONS},
{displayValue: this.textTrillions, value: c_oAscValAxUnits.TRILLIONS} {displayValue: this.textTrillions, value: Asc.c_oAscValAxUnits.TRILLIONS}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -568,10 +568,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE}, {displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT} {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -585,10 +585,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE}, {displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT} {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -602,10 +602,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE}, {displayValue: this.textNone, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE},
{displayValue: this.textLow, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW}, {displayValue: this.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW},
{displayValue: this.textHigh, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH}, {displayValue: this.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH},
{displayValue: this.textNextToAxis, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO} {displayValue: this.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -621,19 +621,19 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 100px;', menuStyle : 'min-width: 100px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textAuto, value: c_oAscCrossesRule.auto}, {displayValue: this.textAuto, value: Asc.c_oAscCrossesRule.auto},
{displayValue: this.textValue, value: c_oAscCrossesRule.value}, {displayValue: this.textValue, value: Asc.c_oAscCrossesRule.value},
{displayValue: this.textMinValue, value: c_oAscCrossesRule.minValue}, {displayValue: this.textMinValue, value: Asc.c_oAscCrossesRule.minValue},
{displayValue: this.textMaxValue, value: c_oAscCrossesRule.maxValue} {displayValue: this.textMaxValue, value: Asc.c_oAscCrossesRule.maxValue}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(record.value); this.currentAxisProps.putCrossesRule(record.value);
if (record.value==c_oAscCrossesRule.auto) { if (record.value==Asc.c_oAscCrossesRule.auto) {
this.spnHAxisCrosses.setValue(this._originalAxisHValues.crossesAuto, true); this.spnHAxisCrosses.setValue(this._originalAxisHValues.crossesAuto, true);
} else if (record.value==c_oAscCrossesRule.minValue) { } else if (record.value==Asc.c_oAscCrossesRule.minValue) {
this.spnHAxisCrosses.setValue(this._originalAxisHValues.minAuto, true); this.spnHAxisCrosses.setValue(this._originalAxisHValues.minAuto, true);
} else if (record.value==c_oAscCrossesRule.maxValue) { } else if (record.value==Asc.c_oAscCrossesRule.maxValue) {
this.spnHAxisCrosses.setValue(this._originalAxisHValues.maxAuto, true); this.spnHAxisCrosses.setValue(this._originalAxisHValues.maxAuto, true);
} }
} }
@ -649,10 +649,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : '' value : ''
}).on('change', _.bind(function(field, newValue, oldValue) { }).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbHCrossType.suspendEvents(); this.cmbHCrossType.suspendEvents();
this.cmbHCrossType.setValue(c_oAscCrossesRule.value); this.cmbHCrossType.setValue(Asc.c_oAscCrossesRule.value);
this.cmbHCrossType.resumeEvents(); this.cmbHCrossType.resumeEvents();
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putCrossesRule(c_oAscCrossesRule.value); this.currentAxisProps.putCrossesRule(Asc.c_oAscCrossesRule.value);
this.currentAxisProps.putCrosses(field.getNumberValue()); this.currentAxisProps.putCrosses(field.getNumberValue());
} }
}, this)); }, this));
@ -663,8 +663,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textOnTickMarks, value: c_oAscLabelsPosition.byDivisions}, {displayValue: this.textOnTickMarks, value: Asc.c_oAscLabelsPosition.byDivisions},
{displayValue: this.textBetweenTickMarks, value: c_oAscLabelsPosition.betweenDivisions} {displayValue: this.textBetweenTickMarks, value: Asc.c_oAscLabelsPosition.betweenDivisions}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -687,10 +687,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE}, {displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT} {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -704,10 +704,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscTickMark.TICK_MARK_NONE}, {displayValue: this.textNone, value: Asc.c_oAscTickMark.TICK_MARK_NONE},
{displayValue: this.textCross, value: c_oAscTickMark.TICK_MARK_CROSS}, {displayValue: this.textCross, value: Asc.c_oAscTickMark.TICK_MARK_CROSS},
{displayValue: this.textIn, value: c_oAscTickMark.TICK_MARK_IN}, {displayValue: this.textIn, value: Asc.c_oAscTickMark.TICK_MARK_IN},
{displayValue: this.textOut, value: c_oAscTickMark.TICK_MARK_OUT} {displayValue: this.textOut, value: Asc.c_oAscTickMark.TICK_MARK_OUT}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -735,10 +735,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textNone, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE}, {displayValue: this.textNone, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NONE},
{displayValue: this.textLow, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW}, {displayValue: this.textLow, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_LOW},
{displayValue: this.textHigh, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH}, {displayValue: this.textHigh, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_HIGH},
{displayValue: this.textNextToAxis, value: c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO} {displayValue: this.textNextToAxis, value: Asc.c_oAscTickLabelsPos.TICK_LABEL_POSITION_NEXT_TO}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
@ -770,10 +770,10 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value : '' value : ''
}).on('change', _.bind(function(field, newValue, oldValue) { }).on('change', _.bind(function(field, newValue, oldValue) {
this.cmbLabelInterval.suspendEvents(); this.cmbLabelInterval.suspendEvents();
this.cmbLabelInterval.setValue(c_oAscBetweenLabelsRule.manual); this.cmbLabelInterval.setValue(Asc.c_oAscBetweenLabelsRule.manual);
this.cmbLabelInterval.resumeEvents(); this.cmbLabelInterval.resumeEvents();
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putIntervalBetweenLabelsRule(c_oAscBetweenLabelsRule.manual); this.currentAxisProps.putIntervalBetweenLabelsRule(Asc.c_oAscBetweenLabelsRule.manual);
this.currentAxisProps.putIntervalBetweenLabels(field.getNumberValue()); this.currentAxisProps.putIntervalBetweenLabels(field.getNumberValue());
} }
}, this)); }, this));
@ -784,13 +784,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
menuStyle : 'min-width: 140px;', menuStyle : 'min-width: 140px;',
editable : false, editable : false,
data : [ data : [
{displayValue: this.textAuto, value: c_oAscBetweenLabelsRule.auto}, {displayValue: this.textAuto, value: Asc.c_oAscBetweenLabelsRule.auto},
{displayValue: this.textManual, value: c_oAscBetweenLabelsRule.manual} {displayValue: this.textManual, value: Asc.c_oAscBetweenLabelsRule.manual}
] ]
}).on('selected', _.bind(function(combo, record) { }).on('selected', _.bind(function(combo, record) {
if (this.currentAxisProps) { if (this.currentAxisProps) {
this.currentAxisProps.putIntervalBetweenLabelsRule(record.value); this.currentAxisProps.putIntervalBetweenLabelsRule(record.value);
if (record.value==c_oAscBetweenLabelsRule.auto) if (record.value==Asc.c_oAscBetweenLabelsRule.auto)
this.spnLabelInterval.setValue(1, true); this.spnLabelInterval.setValue(1, true);
} }
}, this)); }, this));
@ -834,8 +834,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
}, },
updateAxisProps: function(type, isDefault) { updateAxisProps: function(type, isDefault) {
var value = (type == c_oAscChartTypeSettings.lineNormal || type == c_oAscChartTypeSettings.lineStacked || var value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked ||
type == c_oAscChartTypeSettings.lineStackedPer || type == c_oAscChartTypeSettings.scatter); type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.scatter);
this.chMarkers.setVisible(value); this.chMarkers.setVisible(value);
this.cmbLines.setVisible(value); this.cmbLines.setVisible(value);
this.lblLines.toggleClass('hidden', !value); this.lblLines.toggleClass('hidden', !value);
@ -845,7 +845,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.cmbLines.setValue(this.chartSettings.getLine() ? (this.chartSettings.getSmooth() ? 2 : 1) : 0); this.cmbLines.setValue(this.chartSettings.getLine() ? (this.chartSettings.getSmooth() ? 2 : 1) : 0);
} }
value = (type == c_oAscChartTypeSettings.pie || type == c_oAscChartTypeSettings.doughnut || type == c_oAscChartTypeSettings.pie3d); value = (type == Asc.c_oAscChartTypeSettings.pie || type == Asc.c_oAscChartTypeSettings.doughnut || type == Asc.c_oAscChartTypeSettings.pie3d);
this.btnsCategory[2].setDisabled(value); this.btnsCategory[2].setDisabled(value);
this.btnsCategory[3].setDisabled(value); this.btnsCategory[3].setDisabled(value);
this.cmbHorShow.setDisabled(value); this.cmbHorShow.setDisabled(value);
@ -862,22 +862,22 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.cmbHorGrid.setValue(this.chartSettings.getHorGridLines()); this.cmbHorGrid.setValue(this.chartSettings.getHorGridLines());
this.cmbVertGrid.setValue(this.chartSettings.getVertGridLines()); this.cmbVertGrid.setValue(this.chartSettings.getVertGridLines());
value = (type == c_oAscChartTypeSettings.hBarNormal || type == c_oAscChartTypeSettings.hBarStacked || type == c_oAscChartTypeSettings.hBarStackedPer || value = (type == Asc.c_oAscChartTypeSettings.hBarNormal || type == Asc.c_oAscChartTypeSettings.hBarStacked || type == Asc.c_oAscChartTypeSettings.hBarStackedPer ||
type == c_oAscChartTypeSettings.hBarNormal3d || type == c_oAscChartTypeSettings.hBarStacked3d || type == c_oAscChartTypeSettings.hBarStackedPer3d); type == Asc.c_oAscChartTypeSettings.hBarNormal3d || type == Asc.c_oAscChartTypeSettings.hBarStacked3d || type == Asc.c_oAscChartTypeSettings.hBarStackedPer3d);
this.btnsCategory[2].options.contentTarget = (value) ? 'id-chart-settings-dlg-hor' : 'id-chart-settings-dlg-vert'; this.btnsCategory[2].options.contentTarget = (value) ? 'id-chart-settings-dlg-hor' : 'id-chart-settings-dlg-vert';
this.btnsCategory[3].options.contentTarget = (value || type == c_oAscChartTypeSettings.scatter) ? 'id-chart-settings-dlg-vert' : 'id-chart-settings-dlg-hor'; this.btnsCategory[3].options.contentTarget = (value || type == Asc.c_oAscChartTypeSettings.scatter) ? 'id-chart-settings-dlg-vert' : 'id-chart-settings-dlg-hor';
}, },
onVCategoryClick: function() { onVCategoryClick: function() {
(this.vertAxisProps.getAxisType()==c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps) : this.fillHProps(this.vertAxisProps); (this.vertAxisProps.getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.vertAxisProps) : this.fillHProps(this.vertAxisProps);
}, },
onHCategoryClick: function() { onHCategoryClick: function() {
(this.horAxisProps.getAxisType()==c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps) : this.fillHProps(this.horAxisProps); (this.horAxisProps.getAxisType()==Asc.c_oAscAxisType.val) ? this.fillVProps(this.horAxisProps) : this.fillHProps(this.horAxisProps);
}, },
fillVProps: function(props) { fillVProps: function(props) {
if (props.getAxisType() !== c_oAscAxisType.val) return; if (props.getAxisType() !== Asc.c_oAscAxisType.val) return;
if (this._originalAxisVValues==undefined) { if (this._originalAxisVValues==undefined) {
this._originalAxisVValues = { this._originalAxisVValues = {
minAuto: (props.getMinVal()==null) ? 0 : props.getMinVal(), minAuto: (props.getMinVal()==null) ? 0 : props.getMinVal(),
@ -887,23 +887,23 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
} }
this.cmbMinType.setValue(props.getMinValRule()); this.cmbMinType.setValue(props.getMinValRule());
var value = (props.getMinValRule()==c_oAscValAxisRule.auto) ? this._originalAxisVValues.minAuto : props.getMinVal(); var value = (props.getMinValRule()==Asc.c_oAscValAxisRule.auto) ? this._originalAxisVValues.minAuto : props.getMinVal();
this.spnMinValue.setValue((value==null) ? '' : value, true); this.spnMinValue.setValue((value==null) ? '' : value, true);
this.cmbMaxType.setValue(props.getMaxValRule()); this.cmbMaxType.setValue(props.getMaxValRule());
value = (props.getMaxValRule()==c_oAscValAxisRule.auto) ? this._originalAxisVValues.maxAuto : props.getMaxVal(); value = (props.getMaxValRule()==Asc.c_oAscValAxisRule.auto) ? this._originalAxisVValues.maxAuto : props.getMaxVal();
this.spnMaxValue.setValue((value==null) ? '' : value, true); this.spnMaxValue.setValue((value==null) ? '' : value, true);
value = props.getCrossesRule(); value = props.getCrossesRule();
this.cmbVCrossType.setValue(value); this.cmbVCrossType.setValue(value);
switch (value) { switch (value) {
case c_oAscCrossesRule.minValue: case Asc.c_oAscCrossesRule.minValue:
value = this.spnMinValue.getNumberValue(); value = this.spnMinValue.getNumberValue();
break; break;
case c_oAscCrossesRule.maxValue: case Asc.c_oAscCrossesRule.maxValue:
value = this.spnMaxValue.getNumberValue(); value = this.spnMaxValue.getNumberValue();
break; break;
case c_oAscCrossesRule.auto: case Asc.c_oAscCrossesRule.auto:
value = this._originalAxisVValues.crossesAuto; value = this._originalAxisVValues.crossesAuto;
break; break;
default: default:
@ -922,7 +922,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
}, },
fillHProps: function(props) { fillHProps: function(props) {
if (props.getAxisType() !== c_oAscAxisType.cat) return; if (props.getAxisType() !== Asc.c_oAscAxisType.cat) return;
if (this._originalAxisHValues==undefined) { if (this._originalAxisHValues==undefined) {
this._originalAxisHValues = { this._originalAxisHValues = {
minAuto: (props.getCrossMinVal()==null) ? 0 : props.getCrossMinVal(), minAuto: (props.getCrossMinVal()==null) ? 0 : props.getCrossMinVal(),
@ -934,13 +934,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
var value = props.getCrossesRule(); var value = props.getCrossesRule();
this.cmbHCrossType.setValue(value); this.cmbHCrossType.setValue(value);
switch (value) { switch (value) {
case c_oAscCrossesRule.minValue: case Asc.c_oAscCrossesRule.minValue:
value = this._originalAxisHValues.minAuto; value = this._originalAxisHValues.minAuto;
break; break;
case c_oAscCrossesRule.maxValue: case Asc.c_oAscCrossesRule.maxValue:
value = this._originalAxisHValues.maxAuto; value = this._originalAxisHValues.maxAuto;
break; break;
case c_oAscCrossesRule.auto: case Asc.c_oAscCrossesRule.auto:
value = this._originalAxisHValues.crossesAuto; value = this._originalAxisHValues.crossesAuto;
break; break;
default: default:
@ -959,7 +959,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
value = props.getIntervalBetweenLabelsRule(); value = props.getIntervalBetweenLabelsRule();
this.cmbLabelInterval.setValue(value); this.cmbLabelInterval.setValue(value);
this.spnLabelInterval.setValue((value===c_oAscBetweenLabelsRule.manual) ? props.getIntervalBetweenLabels(): 1, true); this.spnLabelInterval.setValue((value===Asc.c_oAscBetweenLabelsRule.manual) ? props.getIntervalBetweenLabels(): 1, true);
this.currentAxisProps = props; this.currentAxisProps = props;
}, },
@ -1060,8 +1060,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
if (me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(false); if (me.cmbDataDirect.isDisabled()) me.cmbDataDirect.setDisabled(false);
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, value, false); var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false);
return (isvalid==c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true; return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
}; };
this.cmbDataDirect.setDisabled(value===null); this.cmbDataDirect.setDisabled(value===null);
@ -1124,8 +1124,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.chartSettings.putShowMarker(this.chMarkers.getValue()=='checked'); this.chartSettings.putShowMarker(this.chMarkers.getValue()=='checked');
value = (type == c_oAscChartTypeSettings.lineNormal || type == c_oAscChartTypeSettings.lineStacked || value = (type == Asc.c_oAscChartTypeSettings.lineNormal || type == Asc.c_oAscChartTypeSettings.lineStacked ||
type == c_oAscChartTypeSettings.lineStackedPer || type == c_oAscChartTypeSettings.scatter); type == Asc.c_oAscChartTypeSettings.lineStackedPer || type == Asc.c_oAscChartTypeSettings.scatter);
if (value) { if (value) {
value = this.cmbLines.getValue(); value = this.cmbLines.getValue();
this.chartSettings.putLine(value!==0); this.chartSettings.putLine(value!==0);
@ -1142,17 +1142,17 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
isRangeValid: function() { isRangeValid: function() {
var isvalid; var isvalid;
if (!_.isEmpty(this.txtDataRange.getValue())) { if (!_.isEmpty(this.txtDataRange.getValue())) {
isvalid = this.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, this.txtDataRange.getValue(), true, this.cmbDataDirect.getValue()==0, this.mnuChartTypePicker.getSelectedRec()[0].get('type')); isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, this.txtDataRange.getValue(), true, this.cmbDataDirect.getValue()==0, this.mnuChartTypePicker.getSelectedRec()[0].get('type'));
if (isvalid == c_oAscError.ID.No) if (isvalid == Asc.c_oAscError.ID.No)
return true; return true;
} else } else
this.txtDataRange.showError([this.txtEmpty]); this.txtDataRange.showError([this.txtEmpty]);
this.btnsCategory[0].toggle(true); this.btnsCategory[0].toggle(true);
this.onCategoryClick(this.btnsCategory[0]); this.onCategoryClick(this.btnsCategory[0]);
if (isvalid == c_oAscError.ID.StockChartError) { if (isvalid == Asc.c_oAscError.ID.StockChartError) {
Common.UI.warning({msg: this.errorStockChart}); Common.UI.warning({msg: this.errorStockChart});
} else if (isvalid == c_oAscError.ID.MaxDataSeriesError) { } else if (isvalid == Asc.c_oAscError.ID.MaxDataSeriesError) {
Common.UI.warning({msg: this.errorMaxRows}); Common.UI.warning({msg: this.errorMaxRows});
} else } else
this.txtDataRange.cmpEl.find('input').focus(); this.txtDataRange.cmpEl.find('input').focus();
@ -1188,7 +1188,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
}, },
onSelectDataLabels: function(obj, rec, e) { onSelectDataLabels: function(obj, rec, e) {
var disable = rec.value == c_oAscChartDataLabelsPos.none; var disable = rec.value == Asc.c_oAscChartDataLabelsPos.none;
this.chSeriesName.setDisabled(disable); this.chSeriesName.setDisabled(disable);
this.chCategoryName.setDisabled(disable); this.chCategoryName.setDisabled(disable);
this.chValue.setDisabled(disable); this.chValue.setDisabled(disable);

View file

@ -115,16 +115,16 @@ define([
items: [ items: [
{ {
caption : me.txtShiftRight, caption : me.txtShiftRight,
value : c_oAscInsertOptions.InsertCellsAndShiftRight value : Asc.c_oAscInsertOptions.InsertCellsAndShiftRight
},{ },{
caption : me.txtShiftDown, caption : me.txtShiftDown,
value : c_oAscInsertOptions.InsertCellsAndShiftDown value : Asc.c_oAscInsertOptions.InsertCellsAndShiftDown
},{ },{
caption : me.txtRow, caption : me.txtRow,
value : c_oAscInsertOptions.InsertRows value : Asc.c_oAscInsertOptions.InsertRows
},{ },{
caption : me.txtColumn, caption : me.txtColumn,
value : c_oAscInsertOptions.InsertColumns value : Asc.c_oAscInsertOptions.InsertColumns
} }
] ]
}) })
@ -141,16 +141,16 @@ define([
items: [ items: [
{ {
caption : me.txtShiftLeft, caption : me.txtShiftLeft,
value : c_oAscDeleteOptions.DeleteCellsAndShiftLeft value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftLeft
},{ },{
caption : me.txtShiftUp, caption : me.txtShiftUp,
value : c_oAscDeleteOptions.DeleteCellsAndShiftTop value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftTop
},{ },{
caption : me.txtRow, caption : me.txtRow,
value : c_oAscDeleteOptions.DeleteRows value : Asc.c_oAscDeleteOptions.DeleteRows
},{ },{
caption : me.txtColumn, caption : me.txtColumn,
value : c_oAscDeleteOptions.DeleteColumns value : Asc.c_oAscDeleteOptions.DeleteColumns
} }
] ]
}) })
@ -163,23 +163,23 @@ define([
items: [ items: [
{ {
caption : me.txtClearAll, caption : me.txtClearAll,
value : c_oAscCleanOptions.All value : Asc.c_oAscCleanOptions.All
}, },
{ {
caption : me.txtClearText, caption : me.txtClearText,
value : c_oAscCleanOptions.Text value : Asc.c_oAscCleanOptions.Text
}, },
{ {
caption : me.txtClearFormat, caption : me.txtClearFormat,
value : c_oAscCleanOptions.Format value : Asc.c_oAscCleanOptions.Format
}, },
{ {
caption : me.txtClearComments, caption : me.txtClearComments,
value : c_oAscCleanOptions.Comments value : Asc.c_oAscCleanOptions.Comments
}, },
{ {
caption : me.txtClearHyper, caption : me.txtClearHyper,
value : c_oAscCleanOptions.Hyperlinks value : Asc.c_oAscCleanOptions.Hyperlinks
} }
] ]
}) })
@ -345,22 +345,22 @@ define([
caption : this.textArrangeFront, caption : this.textArrangeFront,
iconCls : 'mnu-arrange-front', iconCls : 'mnu-arrange-front',
type : 'arrange', type : 'arrange',
value : c_oAscDrawingLayerType.BringToFront value : Asc.c_oAscDrawingLayerType.BringToFront
},{ },{
caption : this.textArrangeBack, caption : this.textArrangeBack,
iconCls : 'mnu-arrange-back', iconCls : 'mnu-arrange-back',
type : 'arrange', type : 'arrange',
value : c_oAscDrawingLayerType.SendToBack value : Asc.c_oAscDrawingLayerType.SendToBack
},{ },{
caption : this.textArrangeForward, caption : this.textArrangeForward,
iconCls : 'mnu-arrange-forward', iconCls : 'mnu-arrange-forward',
type : 'arrange', type : 'arrange',
value : c_oAscDrawingLayerType.BringForward value : Asc.c_oAscDrawingLayerType.BringForward
},{ },{
caption: this.textArrangeBackward, caption: this.textArrangeBackward,
iconCls : 'mnu-arrange-backward', iconCls : 'mnu-arrange-backward',
type : 'arrange', type : 'arrange',
value : c_oAscDrawingLayerType.SendBackward value : Asc.c_oAscDrawingLayerType.SendBackward
}, },
{caption: '--'}, {caption: '--'},
me.mnuGroupImg, me.mnuGroupImg,
@ -380,19 +380,19 @@ define([
caption : me.topCellText, caption : me.topCellText,
checkable : true, checkable : true,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_TOP value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
}), }),
me.menuParagraphCenter = new Common.UI.MenuItem({ me.menuParagraphCenter = new Common.UI.MenuItem({
caption : me.centerCellText, caption : me.centerCellText,
checkable : true, checkable : true,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_CTR value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
}), }),
this.menuParagraphBottom = new Common.UI.MenuItem({ this.menuParagraphBottom = new Common.UI.MenuItem({
caption : me.bottomCellText, caption : me.bottomCellText,
checkable : true, checkable : true,
toggleGroup : 'popupparagraphvalign', toggleGroup : 'popupparagraphvalign',
value : c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM value : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
}) })
] ]
}) })
@ -409,7 +409,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.normal direction : Asc.c_oAscVertDrawingText.normal
}), }),
me.menuParagraphDirect90 = new Common.UI.MenuItem({ me.menuParagraphDirect90 = new Common.UI.MenuItem({
caption : me.direct90Text, caption : me.direct90Text,
@ -417,7 +417,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert direction : Asc.c_oAscVertDrawingText.vert
}), }),
me.menuParagraphDirect270 = new Common.UI.MenuItem({ me.menuParagraphDirect270 = new Common.UI.MenuItem({
caption : me.direct270Text, caption : me.direct270Text,
@ -425,7 +425,7 @@ define([
checkable : true, checkable : true,
checked : false, checked : false,
toggleGroup : 'popupparagraphdirect', toggleGroup : 'popupparagraphdirect',
direction : c_oAscVertDrawingText.vert270 direction : Asc.c_oAscVertDrawingText.vert270
}) })
] ]
}) })

View file

@ -42,13 +42,13 @@ define([
menu: undefined, menu: undefined,
formats: [[ formats: [[
{name: 'XLSX', imgCls: 'xlsx', type: c_oAscFileType.XLSX}, {name: 'XLSX', imgCls: 'xlsx', type: Asc.c_oAscFileType.XLSX},
{name: 'PDF', imgCls: 'pdf', type: c_oAscFileType.PDF}, {name: 'PDF', imgCls: 'pdf', type: Asc.c_oAscFileType.PDF},
{name: 'ODS', imgCls: 'ods', type: c_oAscFileType.ODS}, {name: 'ODS', imgCls: 'ods', type: Asc.c_oAscFileType.ODS},
{name: 'CSV', imgCls: 'csv', type: c_oAscFileType.CSV} {name: 'CSV', imgCls: 'csv', type: Asc.c_oAscFileType.CSV}
] ]
// ,[ // ,[
// {name: 'HTML', imgCls: 'html', type: c_oAscFileType.HTML} // {name: 'HTML', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
// ] // ]
], ],
@ -263,19 +263,19 @@ define([
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)'}, {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)', caption: 'US Letter'},
{value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)'}, {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)', caption: 'US Legal'},
{value:'210|297', displayValue:'A4 (21cm x 29,7cm)'}, {value:'210|297', displayValue:'A4 (21cm x 29,7cm)', caption: 'A4'},
{value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)'}, {value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)', caption: 'A5'},
{value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)'}, {value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)', caption: 'B5'},
{value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)'}, {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)', caption: 'Envelope #10'},
{value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)'}, {value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)', caption: 'Envelope DL'},
{value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)'}, {value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)', caption: 'Tabloid'},
{value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)'}, {value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)', caption: 'A3'},
{value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)'}, {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)', caption: 'Tabloid Oversize'},
{value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)'}, {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)', caption: 'ROC 16K'},
{value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)'}, {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)', caption: 'Envelope Choukei 3'},
{value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)'} {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)', caption: 'Super B/A3'}
] ]
}); });
@ -286,8 +286,8 @@ define([
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait }, { value: Asc.c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
{ value: c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape } { value: Asc.c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
] ]
}); });
@ -380,9 +380,20 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
var store = this.cmbPaperSize.store;
for (var i=0; i<store.length; i++) {
var item = store.at(i),
value = item.get('value'),
pagewidth = /^\d{3}\.?\d*/.exec(value),
pageheight = /\d{3}\.?\d*$/.exec(value);
item.set('displayValue', item.get('caption') + ' (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(pagewidth).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' +
parseFloat(Common.Utils.Metric.fnRecalcFromMM(pageheight).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ')');
}
this.cmbPaperSize.onResetItems();
}, },
applySettings: function() { applySettings: function() {
@ -533,9 +544,9 @@ define([
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscFontRenderingModeType.hintingAndSubpixeling, displayValue: this.txtWin }, { value: Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling, displayValue: this.txtWin },
{ value: c_oAscFontRenderingModeType.noHinting, displayValue: this.txtMac }, { value: Asc.c_oAscFontRenderingModeType.noHinting, displayValue: this.txtMac },
{ value: c_oAscFontRenderingModeType.hinting, displayValue: this.txtNative } { value: Asc.c_oAscFontRenderingModeType.hinting, displayValue: this.txtNative }
] ]
}); });
@ -557,7 +568,8 @@ define([
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm }, { value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm },
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt } { value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt },
{ value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch }
] ]
}); });
@ -645,7 +657,7 @@ define([
value = Common.localStorage.getItem("sse-settings-fontrender"); value = Common.localStorage.getItem("sse-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)}); item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? c_oAscFontRenderingModeType.noHinting : c_oAscFontRenderingModeType.hintingAndSubpixeling)); this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? Asc.c_oAscFontRenderingModeType.noHinting : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling));
value = Common.localStorage.getItem("sse-settings-unit"); value = Common.localStorage.getItem("sse-settings-unit");
item = this.cmbUnit.store.findWhere({value: parseInt(value)}); item = this.cmbUnit.store.findWhere({value: parseInt(value)});
@ -755,7 +767,8 @@ define([
strFast: 'Fast', strFast: 'Fast',
strStrict: 'Strict', strStrict: 'Strict',
textAutoRecover: 'Autorecover', textAutoRecover: 'Autorecover',
strAutoRecover: 'Turn on autorecover' strAutoRecover: 'Turn on autorecover',
txtInch: 'Inch'
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {})); }, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -117,14 +117,14 @@ define([
editable: false, editable: false,
menuStyle: 'min-width: 100%;', menuStyle: 'min-width: 100%;',
data : [ data : [
{displayValue: this.textInternalLink, value: c_oAscHyperlinkType.RangeLink}, {displayValue: this.textInternalLink, value: Asc.c_oAscHyperlinkType.RangeLink},
{displayValue: this.textExternalLink, value: c_oAscHyperlinkType.WebLink} {displayValue: this.textExternalLink, value: Asc.c_oAscHyperlinkType.WebLink}
] ]
}).on('selected', function(combo, record) { }).on('selected', function(combo, record) {
$('#id-dlg-hyperlink-external')[record.value == c_oAscHyperlinkType.WebLink ? 'show' : 'hide'](); $('#id-dlg-hyperlink-external')[record.value == Asc.c_oAscHyperlinkType.WebLink ? 'show' : 'hide']();
$('#id-dlg-hyperlink-internal')[record.value != c_oAscHyperlinkType.WebLink ? 'show' : 'hide'](); $('#id-dlg-hyperlink-internal')[record.value != Asc.c_oAscHyperlinkType.WebLink ? 'show' : 'hide']();
}); });
me.cmbLinkType.setValue(c_oAscHyperlinkType.WebLink); me.cmbLinkType.setValue(Asc.c_oAscHyperlinkType.WebLink);
me.cmbSheets = new Common.UI.ComboBox({ me.cmbSheets = new Common.UI.ComboBox({
el : $('#id-dlg-hyperlink-sheet'), el : $('#id-dlg-hyperlink-sheet'),
@ -177,7 +177,7 @@ define([
me.inputTip = new Common.UI.InputField({ me.inputTip = new Common.UI.InputField({
el : $('#id-dlg-hyperlink-tip'), el : $('#id-dlg-hyperlink-tip'),
style : 'width: 100%;', style : 'width: 100%;',
maxLength : c_oAscMaxTooltipLength maxLength : Asc.c_oAscMaxTooltipLength
}); });
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
@ -199,7 +199,7 @@ define([
this.cmbSheets.setData(settings.sheets); this.cmbSheets.setData(settings.sheets);
if (!settings.props) { if (!settings.props) {
this.cmbLinkType.setValue(c_oAscHyperlinkType.WebLink); this.cmbLinkType.setValue(Asc.c_oAscHyperlinkType.WebLink);
this.cmbLinkType.setDisabled(!settings.allowInternal); this.cmbLinkType.setDisabled(!settings.allowInternal);
this.inputDisplay.setValue(settings.isLock ? this.textDefault : settings.text); this.inputDisplay.setValue(settings.isLock ? this.textDefault : settings.text);
this.focusedInput = this.inputUrl.cmpEl.find('input'); this.focusedInput = this.inputUrl.cmpEl.find('input');
@ -208,7 +208,7 @@ define([
this.cmbLinkType.setValue(settings.props.asc_getType()); this.cmbLinkType.setValue(settings.props.asc_getType());
this.cmbLinkType.setDisabled(!settings.allowInternal); this.cmbLinkType.setDisabled(!settings.allowInternal);
if (settings.props.asc_getType() == c_oAscHyperlinkType.RangeLink) { if (settings.props.asc_getType() == Asc.c_oAscHyperlinkType.RangeLink) {
$('#id-dlg-hyperlink-external').hide(); $('#id-dlg-hyperlink-external').hide();
$('#id-dlg-hyperlink-internal').show(); $('#id-dlg-hyperlink-internal').show();
@ -233,7 +233,7 @@ define([
def_display = ""; def_display = "";
props.asc_setType(this.cmbLinkType.getValue()); props.asc_setType(this.cmbLinkType.getValue());
if (this.cmbLinkType.getValue() == c_oAscHyperlinkType.RangeLink) { if (this.cmbLinkType.getValue() == Asc.c_oAscHyperlinkType.RangeLink) {
props.asc_setSheet(this.cmbSheets.getValue()); props.asc_setSheet(this.cmbSheets.getValue());
props.asc_setRange(this.inputRange.getValue()); props.asc_setRange(this.inputRange.getValue());
def_display = this.cmbSheets.getValue() + '!' + this.inputRange.getValue(); def_display = this.cmbSheets.getValue() + '!' + this.inputRange.getValue();
@ -273,8 +273,8 @@ define([
_handleInput: function(state) { _handleInput: function(state) {
if (this.options.handler) { if (this.options.handler) {
if (state == 'ok') { if (state == 'ok') {
var checkurl = (this.cmbLinkType.getValue() === c_oAscHyperlinkType.WebLink) ? this.inputUrl.checkValidate() : true, var checkurl = (this.cmbLinkType.getValue() === Asc.c_oAscHyperlinkType.WebLink) ? this.inputUrl.checkValidate() : true,
checkrange = (this.cmbLinkType.getValue() === c_oAscHyperlinkType.RangeLink) ? this.inputRange.checkValidate() : true, checkrange = (this.cmbLinkType.getValue() === Asc.c_oAscHyperlinkType.RangeLink) ? this.inputRange.checkValidate() : true,
checkdisp = this.inputDisplay.checkValidate(); checkdisp = this.inputDisplay.checkValidate();
if (checkurl !== true) { if (checkurl !== true) {
this.inputUrl.cmpEl.find('input').focus(); this.inputUrl.cmpEl.find('input').focus();

View file

@ -169,7 +169,7 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
}, },

View file

@ -179,7 +179,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
}, },
onRefreshDefNameList: function() { onRefreshDefNameList: function() {
this.refreshRangeList(this.api.asc_getDefinedNames(c_oAscGetDefinedNamesList.All), this.currentNamedRange); this.refreshRangeList(this.api.asc_getDefinedNames(Asc.c_oAscGetDefinedNamesList.All), this.currentNamedRange);
}, },
refreshRangeList: function(ranges, selectedItem) { refreshRangeList: function(ranges, selectedItem) {
@ -400,7 +400,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
}, },
onLockDefNameManager: function(state) { onLockDefNameManager: function(state) {
this.locked = (state == c_oAscDefinedNameReason.LockDefNameManager); this.locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
}, },
txtTitle: 'Name Manager', txtTitle: 'Name Manager',

View file

@ -133,12 +133,12 @@ define([
if (isvalid.asc_getStatus() === true) return true; if (isvalid.asc_getStatus() === true) return true;
else { else {
switch (isvalid.asc_getReason()) { switch (isvalid.asc_getReason()) {
case c_oAscDefinedNameReason.IsLocked: case Asc.c_oAscDefinedNameReason.IsLocked:
return me.textIsLocked; return me.textIsLocked;
break; break;
case c_oAscDefinedNameReason.Existed: case Asc.c_oAscDefinedNameReason.Existed:
return (me.isEdit && me.props.asc_getName().toLowerCase() == value.toLowerCase()) ? true : me.textExistName; return (me.isEdit && me.props.asc_getName().toLowerCase() == value.toLowerCase()) ? true : me.textExistName;
case c_oAscDefinedNameReason.NameReserved: case Asc.c_oAscDefinedNameReason.NameReserved:
return (me.isEdit) ? me.textReservedName : true; return (me.isEdit) ? me.textReservedName : true;
default: default:
return me.textInvalidName; return me.textInvalidName;
@ -172,8 +172,8 @@ define([
if (_.isEmpty(value)) { if (_.isEmpty(value)) {
return true; return true;
} }
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.Chart, value, false); var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, false);
return (isvalid!==c_oAscError.ID.DataRangeError || (me.isEdit && me.props.asc_getRef().toLowerCase() == value.toLowerCase())) ? true : me.textInvalidRange; return (isvalid!==Asc.c_oAscError.ID.DataRangeError || (me.isEdit && me.props.asc_getRef().toLowerCase() == value.toLowerCase())) ? true : me.textInvalidRange;
} }
}).on('keypress:after', function(input, e) { }).on('keypress:after', function(input, e) {
if (e.keyCode === Common.UI.Keys.RETURN) { if (e.keyCode === Common.UI.Keys.RETURN) {
@ -298,7 +298,7 @@ define([
}, },
onLockDefNameManager: function(state) { onLockDefNameManager: function(state) {
this.locked = (state == c_oAscDefinedNameReason.LockDefNameManager); this.locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
}, },
onRefreshDefNameList: function(name) { onRefreshDefNameList: function(name) {

View file

@ -299,13 +299,13 @@ define([
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
var rec = this.cmbLineRule.store.at(1); var rec = this.cmbLineRule.store.at(1);
rec.set({defaultUnit: Common.Utils.Metric.getCurrentMetricName(), rec.set({defaultUnit: Common.Utils.Metric.getCurrentMetricName(),
minValue: parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)), minValue: parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)),
step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm) ? 0.01: 1}); step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt) ? 1 : 0.01});
if (this._state.LineRule !== null) { if (this._state.LineRule !== null) {
var obj; var obj;
@ -333,7 +333,7 @@ define([
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].asc_getObjectType(); elType = selectedElements[i].asc_getObjectType();
elValue = selectedElements[i].asc_getObjectValue(); elValue = selectedElements[i].asc_getObjectValue();
if (c_oAscTypeSelectElement.Paragraph == elType) { if (Asc.c_oAscTypeSelectElement.Paragraph == elType) {
(new SSE.Views.ParagraphSettingsAdvanced( (new SSE.Views.ParagraphSettingsAdvanced(
{ {
paragraphProps: elValue, paragraphProps: elValue,

View file

@ -358,9 +358,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' ) if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' )
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
else else
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }

View file

@ -92,9 +92,9 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscPrintType.ActiveSheets, displayValue: this.textCurrentSheet }, { value: Asc.c_oAscPrintType.ActiveSheets, displayValue: this.textCurrentSheet },
{ value: c_oAscPrintType.EntireWorkbook, displayValue: this.textAllSheets }, { value: Asc.c_oAscPrintType.EntireWorkbook, displayValue: this.textAllSheets },
{ value: c_oAscPrintType.Selection, displayValue: this.textSelection } { value: Asc.c_oAscPrintType.Selection, displayValue: this.textSelection }
] ]
}); });
this.cmbRange.on('selected', _.bind(this.comboRangeChange, this)); this.cmbRange.on('selected', _.bind(this.comboRangeChange, this));
@ -115,19 +115,19 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)'}, {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)', caption: 'US Letter'},
{value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)'}, {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)', caption: 'US Legal'},
{value:'210|297', displayValue:'A4 (21cm x 29,7cm)'}, {value:'210|297', displayValue:'A4 (21cm x 29,7cm)', caption: 'A4'},
{value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)'}, {value:'148.1|209.9', displayValue:'A5 (14,81cm x 20,99cm)', caption: 'A5'},
{value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)'}, {value:'176|250.1', displayValue:'B5 (17,6cm x 25,01cm)', caption: 'B5'},
{value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)'}, {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)', caption: 'Envelope #10'},
{value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)'}, {value:'110.1|220.1', displayValue:'Envelope DL (11,01cm x 22,01cm)', caption: 'Envelope DL'},
{value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)'}, {value:'279.4|431.7', displayValue:'Tabloid (27,94cm x 43,17cm)', caption: 'Tabloid'},
{value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)'}, {value:'297|420.1', displayValue:'A3 (29,7cm x 42,01cm)', caption: 'A3'},
{value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)'}, {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)', caption: 'Tabloid Oversize'},
{value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)'}, {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)', caption: 'ROC 16K'},
{value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)'}, {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)', caption: 'Envelope Choukei 3'},
{value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)'} {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)', caption: 'Super B/A3'}
] ]
}); });
@ -138,8 +138,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [
{ value: c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait }, { value: Asc.c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
{ value: c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape } { value: Asc.c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
] ]
}); });
@ -242,9 +242,20 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
} }
} }
var store = this.cmbPaperSize.store;
for (var i=0; i<store.length; i++) {
var item = store.at(i),
value = item.get('value'),
pagewidth = /^\d{3}\.?\d*/.exec(value),
pageheight = /\d{3}\.?\d*$/.exec(value);
item.set('displayValue', item.get('caption') + ' (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(pagewidth).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' +
parseFloat(Common.Utils.Metric.fnRecalcFromMM(pageheight).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ')');
}
this.cmbPaperSize.onResetItems();
}, },
handlerShowDetails: function(btn) { handlerShowDetails: function(btn) {

View file

@ -83,16 +83,16 @@ define([
this._state = { this._state = {
Transparency: null, Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent', ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH, BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
DisabledFillPanels: false, DisabledFillPanels: false,
DisabledControls: false, DisabledControls: false,
HideShapeOnlySettings: false, HideShapeOnlySettings: false,
@ -101,10 +101,10 @@ define([
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH; this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -123,11 +123,11 @@ define([
this.render(); this.render();
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT}, {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -307,8 +307,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [ this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH}, {displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE} {displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
]; ];
this.cmbFillType = new Common.UI.ComboBox({ this.cmbFillType = new Common.UI.ComboBox({
@ -367,8 +367,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end'); this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -579,12 +579,12 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid()); fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color)); fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill); props.asc_putFill(fill);
@ -592,19 +592,19 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops); this.api.asc_setGraphicObjectProps(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -622,15 +622,15 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops); this.api.asc_setGraphicObjectProps(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_BLIP: case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break; break;
case c_oAscFill.FILL_TYPE_PATT: case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
@ -651,12 +651,12 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops); this.api.asc_setGraphicObjectProps(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null); fill.asc_putFill(null);
props.asc_putFill(fill); props.asc_putFill(fill);
this.imgprops.asc_putShapeProperties(props); this.imgprops.asc_putShapeProperties(props);
@ -676,10 +676,10 @@ define([
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') { if (this.ShapeColor.Color=='transparent') {
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null); fill.asc_putFill(null);
} else { } else {
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid()); fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color)); fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
} }
@ -700,10 +700,10 @@ define([
this.PatternFillType = record.get('type'); this.PatternFillType = record.get('type');
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -720,10 +720,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -740,9 +740,9 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
} }
@ -757,10 +757,10 @@ define([
onFillTypeSelect: function(combo, record) { onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value; this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) { if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip()); fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(this.BlipFillType); fill.asc_getFill().asc_putType(this.BlipFillType);
@ -820,7 +820,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -830,7 +830,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -844,10 +844,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
@ -877,12 +877,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putLinearAngle(rawData.type * 60000); fill.asc_getFill().asc_putLinearAngle(rawData.type * 60000);
@ -905,13 +905,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
@ -948,13 +948,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
@ -976,13 +976,13 @@ define([
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke(); var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1; this._state.StrokeType = this._state.StrokeWidth = -1;
} else { } else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent') if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putWidth(this._pt2mm(this.BorderSize)); stroke.asc_putWidth(this._pt2mm(this.BorderSize));
} }
@ -1028,9 +1028,9 @@ define([
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke(); var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
} else { } else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.asc_putWidth(this._pt2mm(this.BorderSize)); stroke.asc_putWidth(this._pt2mm(this.BorderSize));
} }
@ -1052,7 +1052,7 @@ define([
if (me.BlipFillType !== null) { if (me.BlipFillType !== null) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip()); fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(me.BlipFillType); fill.asc_getFill().asc_putType(me.BlipFillType);
fill.asc_getFill().asc_putUrl(checkUrl); fill.asc_getFill().asc_putUrl(checkUrl);
@ -1080,7 +1080,7 @@ define([
var elType, elValue; var elType, elValue;
for (var i = selectedElements.length - 1; i >= 0; i--) { for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].asc_getObjectType(); elType = selectedElements[i].asc_getObjectType();
if (c_oAscTypeSelectElement.Image == elType) { if (Asc.c_oAscTypeSelectElement.Image == elType) {
elValue = selectedElements[i].asc_getObjectValue(); elValue = selectedElements[i].asc_getObjectValue();
(new SSE.Views.ShapeSettingsAdvanced( (new SSE.Views.ShapeSettingsAdvanced(
{ {
@ -1142,13 +1142,13 @@ define([
if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур if (fill===null || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null; this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
color = fill.asc_getColor(); color = fill.asc_getColor();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else { } else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1156,23 +1156,23 @@ define([
} else } else
this.ShapeColor = {Value: 0, Color: 'transparent'}; this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'}; this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000'; this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) { if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) { if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType); this.cmbFillType.setValue(this.BlipFillType);
} else } else
this.cmbFillType.setValue(''); this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType; this._state.BlipFillType = this.BlipFillType;
} }
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
this.PatternFillType = fill.asc_getPatternType(); // null - не совпадают у нескольких фигур this.PatternFillType = fill.asc_getPatternType(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) { if (this._state.PatternFillType !== this.PatternFillType) {
@ -1187,7 +1187,7 @@ define([
color = fill.asc_getColorFg(); color = fill.asc_getColorFg();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else { } else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())}; this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1197,7 +1197,7 @@ define([
color = fill.asc_getColorBg(); color = fill.asc_getColorBg();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else { } else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())}; this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1205,17 +1205,17 @@ define([
} else } else
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color); this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1226,7 +1226,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.asc_getLinearAngle()/60000); var value = Math.floor(fill.asc_getLinearAngle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -1243,7 +1243,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -1254,7 +1254,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -1282,7 +1282,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]}; this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]}; this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1325,10 +1325,10 @@ define([
var strokeType = stroke.asc_getType(); var strokeType = stroke.asc_getType();
if (stroke) { if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.asc_getColor(); color = stroke.asc_getColor();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} }
else else
@ -1368,8 +1368,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color; this._state.StrokeColor = this.BorderColor.Color;
} }
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) { if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.asc_getWidth(); var w = stroke.asc_getWidth();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1389,7 +1389,7 @@ define([
} }
this.BorderSize = w; this.BorderSize = w;
} }
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) { } else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0; this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value'); this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize); this.cmbBorderSize.setValue(this.BorderSize);
@ -1549,9 +1549,9 @@ define([
if (this.api) { if (this.api) {
var props = new Asc.asc_CShapeProperty(); var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip()); fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(c_oAscFillBlipType.TILE); fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(record.get('type')); fill.asc_getFill().asc_putTextureId(record.get('type'));
props.asc_putFill(fill); props.asc_putFill(fill);
this.imgprops.asc_putShapeProperties(props); this.imgprops.asc_putShapeProperties(props);
@ -1626,11 +1626,11 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP); this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT); this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null)); this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
}, },
setLocked: function (locked) { setLocked: function (locked) {

View file

@ -242,9 +242,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
// Shape // Shape
this._arrCapType = [ this._arrCapType = [
{displayValue: this.textFlat, value: c_oAscLineCapType.Flat}, {displayValue: this.textFlat, value: Asc.c_oAscLineCapType.Flat},
{displayValue: this.textRound, value: c_oAscLineCapType.Round}, {displayValue: this.textRound, value: Asc.c_oAscLineCapType.Round},
{displayValue: this.textSquare, value: c_oAscLineCapType.Square} {displayValue: this.textSquare, value: Asc.c_oAscLineCapType.Square}
]; ];
this.cmbCapType = new Common.UI.ComboBox({ this.cmbCapType = new Common.UI.ComboBox({
@ -254,7 +254,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
editable: false, editable: false,
data: this._arrCapType data: this._arrCapType
}); });
this.cmbCapType.setValue(c_oAscLineCapType.Flat); this.cmbCapType.setValue(Asc.c_oAscLineCapType.Flat);
this.cmbCapType.on('selected', _.bind(function(combo, record){ this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined) if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
@ -267,9 +267,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
}, this)); }, this));
this._arrJoinType = [ this._arrJoinType = [
{displayValue: this.textRound, value: c_oAscLineJoinType.Round}, {displayValue: this.textRound, value: Asc.c_oAscLineJoinType.Round},
{displayValue: this.textBevel, value: c_oAscLineJoinType.Bevel}, {displayValue: this.textBevel, value: Asc.c_oAscLineJoinType.Bevel},
{displayValue: this.textMiter, value: c_oAscLineJoinType.Miter} {displayValue: this.textMiter, value: Asc.c_oAscLineJoinType.Miter}
]; ];
this.cmbJoinType = new Common.UI.ComboBox({ this.cmbJoinType = new Common.UI.ComboBox({
el: $('#shape-advanced-join-type'), el: $('#shape-advanced-join-type'),
@ -278,7 +278,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
editable: false, editable: false,
data: this._arrJoinType data: this._arrJoinType
}); });
this.cmbJoinType.setValue(c_oAscLineJoinType.Round); this.cmbJoinType.setValue(Asc.c_oAscLineJoinType.Round);
this.cmbJoinType.on('selected', _.bind(function(combo, record){ this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedProps) { if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined) if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
@ -295,25 +295,25 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
for ( var i=0; i<6; i++ ) for ( var i=0; i<6; i++ )
_arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0}); _arrStyles.push({value: i, offsetx: 80*i+10, offsety: 0});
_arrStyles[0].type = c_oAscLineBeginType.None; _arrStyles[0].type = Asc.c_oAscLineBeginType.None;
_arrStyles[1].type = c_oAscLineBeginType.Triangle; _arrStyles[1].type = Asc.c_oAscLineBeginType.Triangle;
_arrStyles[2].type = c_oAscLineBeginType.Arrow; _arrStyles[2].type = Asc.c_oAscLineBeginType.Arrow;
_arrStyles[3].type = c_oAscLineBeginType.Stealth; _arrStyles[3].type = Asc.c_oAscLineBeginType.Stealth;
_arrStyles[4].type = c_oAscLineBeginType.Diamond; _arrStyles[4].type = Asc.c_oAscLineBeginType.Diamond;
_arrStyles[5].type = c_oAscLineBeginType.Oval; _arrStyles[5].type = Asc.c_oAscLineBeginType.Oval;
for ( i=0; i<9; i++ ) for ( i=0; i<9; i++ )
_arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)}); _arrSize.push({value: i, offsetx: 80+10, offsety: 20*(i+1)});
_arrSize[0].type = c_oAscLineBeginSize.small_small; _arrSize[0].type = Asc.c_oAscLineBeginSize.small_small;
_arrSize[1].type = c_oAscLineBeginSize.small_mid; _arrSize[1].type = Asc.c_oAscLineBeginSize.small_mid;
_arrSize[2].type = c_oAscLineBeginSize.small_large; _arrSize[2].type = Asc.c_oAscLineBeginSize.small_large;
_arrSize[3].type = c_oAscLineBeginSize.mid_small; _arrSize[3].type = Asc.c_oAscLineBeginSize.mid_small;
_arrSize[4].type = c_oAscLineBeginSize.mid_mid; _arrSize[4].type = Asc.c_oAscLineBeginSize.mid_mid;
_arrSize[5].type = c_oAscLineBeginSize.mid_large; _arrSize[5].type = Asc.c_oAscLineBeginSize.mid_large;
_arrSize[6].type = c_oAscLineBeginSize.large_small; _arrSize[6].type = Asc.c_oAscLineBeginSize.large_small;
_arrSize[7].type = c_oAscLineBeginSize.large_mid; _arrSize[7].type = Asc.c_oAscLineBeginSize.large_mid;
_arrSize[8].type = c_oAscLineBeginSize.large_large; _arrSize[8].type = Asc.c_oAscLineBeginSize.large_large;
this.btnBeginStyle = new Common.UI.ComboBox({ this.btnBeginStyle = new Common.UI.ComboBox({
@ -555,7 +555,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
for (var i=0; i<this.spinners.length; i++) { for (var i=0; i<this.spinners.length; i++) {
var spinner = this.spinners[i]; var spinner = this.spinners[i];
spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName()); spinner.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1); spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
} }
} }
this.sizeMax = { this.sizeMax = {

View file

@ -223,8 +223,8 @@ define([
//'tab:manual' : _.bind(this.onAddTabClick, this), //'tab:manual' : _.bind(this.onAddTabClick, this),
'tab:contextmenu' : _.bind(this.onTabMenu, this), 'tab:contextmenu' : _.bind(this.onTabMenu, this),
'tab:dblclick' : _.bind(function () { 'tab:dblclick' : _.bind(function () {
if (me.editMode && (me.rangeSelectionMode !== c_oAscSelectionDialogType.Chart) && if (me.editMode && (me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
(me.rangeSelectionMode !== c_oAscSelectionDialogType.FormatTable)) { (me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable)) {
me.fireEvent('sheet:changename'); me.fireEvent('sheet:changename');
} }
}, this), }, this),
@ -518,8 +518,8 @@ define([
}, },
onTabMenu: function (o, index, tab) { onTabMenu: function (o, index, tab) {
if (this.mode.isEdit && !this.isEditFormula && (this.rangeSelectionMode !== c_oAscSelectionDialogType.Chart) && if (this.mode.isEdit && !this.isEditFormula && (this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
(this.rangeSelectionMode !== c_oAscSelectionDialogType.FormatTable)) { (this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable)) {
if (tab && tab.sheetindex >= 0) { if (tab && tab.sheetindex >= 0) {
var rect = tab.$el.get(0).getBoundingClientRect(), var rect = tab.$el.get(0).getBoundingClientRect(),
childPos = tab.$el.offset(), childPos = tab.$el.offset(),

View file

@ -119,15 +119,15 @@ define([
this.inputRange.setValue(options.asc_getRange()); this.inputRange.setValue(options.asc_getRange());
this.cbTitle.setValue(options.asc_getIsTitle()); this.cbTitle.setValue(options.asc_getIsTitle());
me.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.FormatTable, options.asc_getRange()); me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.FormatTable, options.asc_getRange());
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me)); me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me)); me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.FormatTable); Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.FormatTable);
} }
me.inputRange.validation = function(value) { me.inputRange.validation = function(value) {
var isvalid = me.api.asc_checkDataRange(c_oAscSelectionDialogType.FormatTable, value, false); var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.FormatTable, value, false);
return (isvalid==c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true; return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.txtInvalidRange : true;
}; };
}, },
@ -147,11 +147,11 @@ define([
}, },
isRangeValid: function() { isRangeValid: function() {
var isvalid = this.api.asc_checkDataRange(c_oAscSelectionDialogType.FormatTable, this.inputRange.getValue(), true); var isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.FormatTable, this.inputRange.getValue(), true);
if (isvalid == c_oAscError.ID.No) if (isvalid == Asc.c_oAscError.ID.No)
return true; return true;
else { else {
if (isvalid == c_oAscError.ID.AutoFilterDataRangeError) { if (isvalid == Asc.c_oAscError.ID.AutoFilterDataRangeError) {
Common.UI.warning({msg: this.errorAutoFilterDataRange}); Common.UI.warning({msg: this.errorAutoFilterDataRange});
} }
} }
@ -164,9 +164,9 @@ define([
onClose: function(event) { onClose: function(event) {
if (this.api) if (this.api)
this.api.asc_setSelectionDialogMode(c_oAscSelectionDialogType.None); this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('cells:range', c_oAscSelectionDialogType.None); Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('edit:complete', this); Common.NotificationCenter.trigger('edit:complete', this);
}, },

View file

@ -82,26 +82,26 @@ define([
this._state = { this._state = {
Transparency: null, Transparency: null,
FillType: c_oAscFill.FILL_TYPE_SOLID, FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
ShapeColor: 'transparent', ShapeColor: 'transparent',
BlipFillType: c_oAscFillBlipType.STRETCH, BlipFillType: Asc.c_oAscFillBlipType.STRETCH,
StrokeType: c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
GradFillType: c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null, FormId: null,
DisabledControls: false DisabledControls: false
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = false; this._locked = false;
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.ShapeColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BlipFillType = c_oAscFillBlipType.STRETCH; this.BlipFillType = Asc.c_oAscFillBlipType.STRETCH;
this.GradFillType = c_oAscFillGradType.GRAD_LINEAR; this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0}; this.GradColor = { values: [0, 100], colors: ['000000', 'ffffff'], currentIdx: 0};
this.GradRadialDirectionIdx = 0; this.GradRadialDirectionIdx = 0;
this.GradLinearDirectionType = 0; this.GradLinearDirectionType = 0;
@ -137,11 +137,11 @@ define([
this.lockedControls.push(this.cmbTextArt); this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [ this._arrFillSrc = [
{displayValue: this.textColor, value: c_oAscFill.FILL_TYPE_SOLID}, {displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: c_oAscFill.FILL_TYPE_GRAD}, {displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: c_oAscFill.FILL_TYPE_BLIP}, {displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: c_oAscFill.FILL_TYPE_PATT}, {displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: c_oAscFill.FILL_TYPE_NOFILL} {displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
]; ];
this.cmbFillSrc = new Common.UI.ComboBox({ this.cmbFillSrc = new Common.UI.ComboBox({
@ -322,8 +322,8 @@ define([
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [ this._arrFillType = [
{displayValue: this.textStretch, value: c_oAscFillBlipType.STRETCH}, {displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: c_oAscFillBlipType.TILE} {displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
]; ];
this.cmbFillType = new Common.UI.ComboBox({ this.cmbFillType = new Common.UI.ComboBox({
@ -382,8 +382,8 @@ define([
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end'); this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [ this._arrGradType = [
{displayValue: this.textLinear, value: c_oAscFillGradType.GRAD_LINEAR}, {displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: c_oAscFillGradType.GRAD_PATH} {displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
]; ];
this.cmbGradType = new Common.UI.ComboBox({ this.cmbGradType = new Common.UI.ComboBox({
@ -595,12 +595,12 @@ define([
onFillSrcSelect: function(combo, record) { onFillSrcSelect: function(combo, record) {
this.ShowHideElem(record.value); this.ShowHideElem(record.value);
switch (record.value){ switch (record.value){
case c_oAscFill.FILL_TYPE_SOLID: case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = c_oAscFill.FILL_TYPE_SOLID; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid()); fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color)); fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill); props.asc_putFill(fill);
@ -608,19 +608,19 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops); this.api.asc_setGraphicObjectProps(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_GRAD: case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = c_oAscFill.FILL_TYPE_GRAD; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(), var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex(); HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
@ -638,15 +638,15 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops); this.api.asc_setGraphicObjectProps(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_BLIP: case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = c_oAscFill.FILL_TYPE_BLIP; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
break; break;
case c_oAscFill.FILL_TYPE_PATT: case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = c_oAscFill.FILL_TYPE_PATT; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
@ -666,12 +666,12 @@ define([
this.api.asc_setGraphicObjectProps(this.imgprops); this.api.asc_setGraphicObjectProps(this.imgprops);
} }
break; break;
case c_oAscFill.FILL_TYPE_NOFILL: case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = c_oAscFill.FILL_TYPE_NOFILL; this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) { if (!this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null); fill.asc_putFill(null);
props.asc_putFill(fill); props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -691,10 +691,10 @@ define([
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') { if (this.ShapeColor.Color=='transparent') {
fill.asc_putType(c_oAscFill.FILL_TYPE_NOFILL); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.asc_putFill(null); fill.asc_putFill(null);
} else { } else {
fill.asc_putType(c_oAscFill.FILL_TYPE_SOLID); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.asc_putFill( new Asc.asc_CFillSolid()); fill.asc_putFill( new Asc.asc_CFillSolid());
fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color)); fill.asc_getFill().asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
} }
@ -715,10 +715,10 @@ define([
this.PatternFillType = record.get('type'); this.PatternFillType = record.get('type');
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -735,10 +735,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color)); fill.asc_getFill().asc_putColorBg(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
} }
@ -755,9 +755,9 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_PATT); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.asc_putFill( new Asc.asc_CFillHatch()); fill.asc_putFill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_PATT) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.asc_getFill().asc_putPatternType(this.PatternFillType); fill.asc_getFill().asc_putPatternType(this.PatternFillType);
fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color)); fill.asc_getFill().asc_putColorFg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
} }
@ -772,10 +772,10 @@ define([
onFillTypeSelect: function(combo, record) { onFillTypeSelect: function(combo, record) {
this.BlipFillType = record.value; this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == c_oAscFill.FILL_TYPE_BLIP) { if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip()); fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(this.BlipFillType); fill.asc_getFill().asc_putType(this.BlipFillType);
@ -835,7 +835,7 @@ define([
onGradTypeSelect: function(combo, record){ onGradTypeSelect: function(combo, record){
this.GradFillType = record.value; this.GradFillType = record.value;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear); this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175); this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174; this.mnuDirectionPicker.restoreHeight = 174;
@ -845,7 +845,7 @@ define([
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else else
this.btnDirection.setIconCls(''); this.btnDirection.setIconCls('');
} else if (this.GradFillType == c_oAscFillGradType.GRAD_PATH) { } else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial); this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60); this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58; this.mnuDirectionPicker.restoreHeight = 58;
@ -859,10 +859,10 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
@ -892,12 +892,12 @@ define([
} }
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) { if (this.api) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putLinearAngle(rawData.type * 60000); fill.asc_getFill().asc_putLinearAngle(rawData.type * 60000);
@ -920,13 +920,13 @@ define([
if (this.api && !this._noApply) { if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]); fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
@ -963,13 +963,13 @@ define([
if (this._sliderChanged) { if (this._sliderChanged) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_GRAD); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.asc_putFill( new Asc.asc_CFillGrad()); fill.asc_putFill( new Asc.asc_CFillGrad());
fill.asc_getFill().asc_putGradType(this.GradFillType); fill.asc_getFill().asc_putGradType(this.GradFillType);
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]); fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
if (this.OriginalFillType !== c_oAscFill.FILL_TYPE_GRAD) { if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000); fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
fill.asc_getFill().asc_putLinearScale(true); fill.asc_getFill().asc_putLinearScale(true);
} }
@ -991,13 +991,13 @@ define([
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke(); var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1; this._state.StrokeType = this._state.StrokeWidth = -1;
} else { } else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent') if (this.BorderColor.Color == 'transparent' || this.BorderColor.Color.color == 'transparent')
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putWidth(this._pt2mm(this.BorderSize)); stroke.asc_putWidth(this._pt2mm(this.BorderSize));
} }
@ -1043,9 +1043,9 @@ define([
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke(); var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) { if (this.BorderSize<0.01) {
stroke.asc_putType( c_oAscStrokeType.STROKE_NONE); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_NONE);
} else { } else {
stroke.asc_putType( c_oAscStrokeType.STROKE_COLOR); stroke.asc_putType( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.asc_putWidth(this._pt2mm(this.BorderSize)); stroke.asc_putWidth(this._pt2mm(this.BorderSize));
} }
@ -1067,7 +1067,7 @@ define([
if (me.BlipFillType !== null) { if (me.BlipFillType !== null) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip()); fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(me.BlipFillType); fill.asc_getFill().asc_putType(me.BlipFillType);
fill.asc_getFill().asc_putUrl(checkUrl); fill.asc_getFill().asc_putUrl(checkUrl);
@ -1124,13 +1124,13 @@ define([
if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур if (fill===null || fill===undefined || fill_type===null) { // заливка не совпадает у неск. фигур
this.OriginalFillType = null; this.OriginalFillType = null;
} else if (fill_type==c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_NOFILL) { // заливки нет
this.OriginalFillType = c_oAscFill.FILL_TYPE_NOFILL; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
} else if (fill_type==c_oAscFill.FILL_TYPE_SOLID) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
color = fill.asc_getColor(); color = fill.asc_getColor();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.ShapeColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else { } else {
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1138,23 +1138,23 @@ define([
} else } else
this.ShapeColor = {Value: 0, Color: 'transparent'}; this.ShapeColor = {Value: 0, Color: 'transparent'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_SOLID; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'}; this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000'; this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_BLIP) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур
if (this._state.BlipFillType !== this.BlipFillType) { if (this._state.BlipFillType !== this.BlipFillType) {
if (this.BlipFillType == c_oAscFillBlipType.STRETCH || this.BlipFillType == c_oAscFillBlipType.TILE) { if (this.BlipFillType == Asc.c_oAscFillBlipType.STRETCH || this.BlipFillType == Asc.c_oAscFillBlipType.TILE) {
this.cmbFillType.setValue(this.BlipFillType); this.cmbFillType.setValue(this.BlipFillType);
} else } else
this.cmbFillType.setValue(''); this.cmbFillType.setValue('');
this._state.BlipFillType = this.BlipFillType; this._state.BlipFillType = this.BlipFillType;
} }
this.OriginalFillType = c_oAscFill.FILL_TYPE_BLIP; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
} else if (fill_type==c_oAscFill.FILL_TYPE_PATT) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_PATT) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
this.PatternFillType = fill.asc_getPatternType(); // null - не совпадают у нескольких фигур this.PatternFillType = fill.asc_getPatternType(); // null - не совпадают у нескольких фигур
if (this._state.PatternFillType !== this.PatternFillType) { if (this._state.PatternFillType !== this.PatternFillType) {
@ -1169,7 +1169,7 @@ define([
color = fill.asc_getColorFg(); color = fill.asc_getColorFg();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else { } else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())}; this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1179,7 +1179,7 @@ define([
color = fill.asc_getColorBg(); color = fill.asc_getColorBg();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else { } else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())}; this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
@ -1187,17 +1187,17 @@ define([
} else } else
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.OriginalFillType = c_oAscFill.FILL_TYPE_PATT; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)}; this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color); this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
this.GradColor.colors[1] = 'ffffff'; this.GradColor.colors[1] = 'ffffff';
} else if (fill_type==c_oAscFill.FILL_TYPE_GRAD) { } else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
fill = fill.asc_getFill(); fill = fill.asc_getFill();
var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур
if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) { if (this._state.GradFillType !== gradfilltype || this.GradFillType !== gradfilltype) {
this.GradFillType = gradfilltype; this.GradFillType = gradfilltype;
rec = undefined; rec = undefined;
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == c_oAscFillGradType.GRAD_PATH) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType); this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType}); rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes); this.onGradTypeSelect(this.cmbGradType, rec.attributes);
@ -1208,7 +1208,7 @@ define([
this._state.GradFillType = this.GradFillType; this._state.GradFillType = this.GradFillType;
} }
if (this.GradFillType == c_oAscFillGradType.GRAD_LINEAR ) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) {
var value = Math.floor(fill.asc_getLinearAngle()/60000); var value = Math.floor(fill.asc_getLinearAngle()/60000);
if (Math.abs(this.GradLinearDirectionType-value)>0.001) { if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value; this.GradLinearDirectionType=value;
@ -1225,7 +1225,7 @@ define([
if (colors && colors.length>0) { if (colors && colors.length>0) {
color = colors[0]; color = colors[0];
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()}; this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
} else { } else {
@ -1236,7 +1236,7 @@ define([
color = colors[1]; color = colors[1];
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()}; this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]); Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
} else { } else {
@ -1264,7 +1264,7 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1); this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
this.sldrGradient.setValue(0, this.GradColor.values[0]); this.sldrGradient.setValue(0, this.GradColor.values[0]);
this.sldrGradient.setValue(1, this.GradColor.values[1]); this.sldrGradient.setValue(1, this.GradColor.values[1]);
this.OriginalFillType = c_oAscFill.FILL_TYPE_GRAD; this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]}; this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
this.BGColor = {Value: 1, Color: 'ffffff'}; this.BGColor = {Value: 1, Color: 'ffffff'};
this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]}; this.ShapeColor = {Value: 1, Color: this.GradColor.colors[0]};
@ -1307,10 +1307,10 @@ define([
strokeType = (stroke) ? stroke.asc_getType() : null; strokeType = (stroke) ? stroke.asc_getType() : null;
if (stroke) { if (stroke) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
color = stroke.asc_getColor(); color = stroke.asc_getColor();
if (color) { if (color) {
if (color.asc_getType() == c_oAscColor.COLOR_TYPE_SCHEME) { if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }}; this.BorderColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} }
else else
@ -1349,8 +1349,8 @@ define([
this._state.StrokeColor = this.BorderColor.Color; this._state.StrokeColor = this.BorderColor.Color;
} }
if (this._state.StrokeType !== strokeType || strokeType == c_oAscStrokeType.STROKE_COLOR) { if (this._state.StrokeType !== strokeType || strokeType == Asc.c_oAscStrokeType.STROKE_COLOR) {
if ( strokeType == c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
var w = stroke.asc_getWidth(); var w = stroke.asc_getWidth();
var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue())); var check_value = (Math.abs(this._state.StrokeWidth-w)<0.001) && !((new RegExp(this.txtPt + '\\s*$')).test(this.cmbBorderSize.getRawValue()));
if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value || if ( Math.abs(this._state.StrokeWidth-w)>0.001 || check_value ||
@ -1370,7 +1370,7 @@ define([
} }
this.BorderSize = w; this.BorderSize = w;
} }
} else if (strokeType == c_oAscStrokeType.STROKE_NONE) { } else if (strokeType == Asc.c_oAscStrokeType.STROKE_NONE) {
this._state.StrokeWidth = 0; this._state.StrokeWidth = 0;
this.BorderSize = this.cmbBorderSize.store.at(0).get('value'); this.BorderSize = this.cmbBorderSize.store.at(0).get('value');
this.cmbBorderSize.setValue(this.BorderSize); this.cmbBorderSize.setValue(this.BorderSize);
@ -1538,9 +1538,9 @@ define([
if (this.api) { if (this.api) {
var props = new Asc.asc_TextArtProperties(); var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill(); var fill = new Asc.asc_CShapeFill();
fill.asc_putType(c_oAscFill.FILL_TYPE_BLIP); fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip()); fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(c_oAscFillBlipType.TILE); fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(record.get('type')); fill.asc_getFill().asc_putTextureId(record.get('type'));
props.asc_putFill(fill); props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -1626,11 +1626,11 @@ define([
}, },
ShowHideElem: function(value) { ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_SOLID); this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillImageContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_BLIP); this.FillImageContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_BLIP);
this.FillPatternContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_PATT); this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== c_oAscFill.FILL_TYPE_GRAD); this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
this.TransparencyContainer.toggleClass('settings-hidden', (value === c_oAscFill.FILL_TYPE_NOFILL || value === null)); this.TransparencyContainer.toggleClass('settings-hidden', (value === Asc.c_oAscFill.FILL_TYPE_NOFILL || value === null));
}, },
setLocked: function (locked) { setLocked: function (locked) {

View file

@ -122,18 +122,18 @@ define([
}; };
me.numFormatTypes = {}; me.numFormatTypes = {};
me.numFormatTypes[c_oAscNumFormatType.General] = me.txtGeneral; me.numFormatTypes[Asc.c_oAscNumFormatType.General] = me.txtGeneral;
me.numFormatTypes[c_oAscNumFormatType.Custom] = me.txtCustom; me.numFormatTypes[Asc.c_oAscNumFormatType.Custom] = me.txtCustom;
me.numFormatTypes[c_oAscNumFormatType.Text] = me.txtText; me.numFormatTypes[Asc.c_oAscNumFormatType.Text] = me.txtText;
me.numFormatTypes[c_oAscNumFormatType.Number] = me.txtNumber; me.numFormatTypes[Asc.c_oAscNumFormatType.Number] = me.txtNumber;
me.numFormatTypes[c_oAscNumFormatType.Integer] = me.txtInteger; me.numFormatTypes[Asc.c_oAscNumFormatType.Integer] = me.txtInteger;
me.numFormatTypes[c_oAscNumFormatType.Scientific] = me.txtScientific; me.numFormatTypes[Asc.c_oAscNumFormatType.Scientific] = me.txtScientific;
me.numFormatTypes[c_oAscNumFormatType.Currency] = me.txtCurrency; me.numFormatTypes[Asc.c_oAscNumFormatType.Currency] = me.txtCurrency;
me.numFormatTypes[c_oAscNumFormatType.Accounting] = me.txtAccounting; me.numFormatTypes[Asc.c_oAscNumFormatType.Accounting] = me.txtAccounting;
me.numFormatTypes[c_oAscNumFormatType.Date] = me.txtDate; me.numFormatTypes[Asc.c_oAscNumFormatType.Date] = me.txtDate;
me.numFormatTypes[c_oAscNumFormatType.Time] = me.txtTime; me.numFormatTypes[Asc.c_oAscNumFormatType.Time] = me.txtTime;
me.numFormatTypes[c_oAscNumFormatType.Percent] = me.txtPercentage; me.numFormatTypes[Asc.c_oAscNumFormatType.Percent] = me.txtPercentage;
me.numFormatTypes[c_oAscNumFormatType.Fraction] = me.txtFraction; me.numFormatTypes[Asc.c_oAscNumFormatType.Fraction] = me.txtFraction;
function dummyCmp() { function dummyCmp() {
return { return {
@ -399,25 +399,25 @@ define([
caption : me.textTopBorders, caption : me.textTopBorders,
iconCls : 'mnu-border-top', iconCls : 'mnu-border-top',
icls : 'btn-border-top', icls : 'btn-border-top',
borderId : c_oAscBorderOptions.Top borderId : Asc.c_oAscBorderOptions.Top
}, },
{ {
caption : me.textBottomBorders, caption : me.textBottomBorders,
iconCls : 'mnu-border-bottom', iconCls : 'mnu-border-bottom',
icls : 'btn-border-bottom', icls : 'btn-border-bottom',
borderId : c_oAscBorderOptions.Bottom borderId : Asc.c_oAscBorderOptions.Bottom
}, },
{ {
caption : me.textLeftBorders, caption : me.textLeftBorders,
iconCls : 'mnu-border-left', iconCls : 'mnu-border-left',
icls : 'btn-border-left', icls : 'btn-border-left',
borderId : c_oAscBorderOptions.Left borderId : Asc.c_oAscBorderOptions.Left
}, },
{ {
caption : me.textRightBorders, caption : me.textRightBorders,
iconCls : 'mnu-border-right', iconCls : 'mnu-border-right',
icls : 'btn-border-right', icls : 'btn-border-right',
borderId : c_oAscBorderOptions.Right borderId : Asc.c_oAscBorderOptions.Right
}, },
{ {
caption : me.textNoBorders, caption : me.textNoBorders,
@ -436,25 +436,25 @@ define([
caption : me.textCenterBorders, caption : me.textCenterBorders,
iconCls : 'mnu-border-vmiddle', iconCls : 'mnu-border-vmiddle',
icls : 'btn-border-vmiddle', icls : 'btn-border-vmiddle',
borderId : c_oAscBorderOptions.InnerV borderId : Asc.c_oAscBorderOptions.InnerV
}, },
{ {
caption : me.textMiddleBorders, caption : me.textMiddleBorders,
iconCls : 'mnu-border-hmiddle', iconCls : 'mnu-border-hmiddle',
icls : 'btn-border-hmiddle', icls : 'btn-border-hmiddle',
borderId : c_oAscBorderOptions.InnerH borderId : Asc.c_oAscBorderOptions.InnerH
}, },
{ {
caption : me.textDiagUpBorder, caption : me.textDiagUpBorder,
iconCls : 'mnu-border-diagup', iconCls : 'mnu-border-diagup',
icls : 'btn-border-diagup', icls : 'btn-border-diagup',
borderId : c_oAscBorderOptions.DiagU borderId : Asc.c_oAscBorderOptions.DiagU
}, },
{ {
caption : me.textDiagDownBorder, caption : me.textDiagDownBorder,
iconCls : 'mnu-border-diagdown', iconCls : 'mnu-border-diagdown',
icls : 'btn-border-diagdown', icls : 'btn-border-diagdown',
borderId : c_oAscBorderOptions.DiagD borderId : Asc.c_oAscBorderOptions.DiagD
}, },
{caption: '--'}, {caption: '--'},
{ {
@ -576,19 +576,19 @@ define([
items: [ items: [
{ {
caption : me.txtMergeCenter, caption : me.txtMergeCenter,
value : c_oAscMergeOptions.MergeCenter value : Asc.c_oAscMergeOptions.MergeCenter
}, },
{ {
caption : me.txtMergeAcross, caption : me.txtMergeAcross,
value : c_oAscMergeOptions.MergeAcross value : Asc.c_oAscMergeOptions.MergeAcross
}, },
{ {
caption : me.txtMergeCells, caption : me.txtMergeCells,
value : c_oAscMergeOptions.Merge value : Asc.c_oAscMergeOptions.Merge
}, },
{ {
caption : me.txtUnmerge, caption : me.txtUnmerge,
value : c_oAscMergeOptions.Unmerge value : Asc.c_oAscMergeOptions.Unmerge
} }
] ]
}) })
@ -1150,27 +1150,27 @@ define([
items : [ items : [
{ {
caption : me.txtClearAll, caption : me.txtClearAll,
value : c_oAscCleanOptions.All value : Asc.c_oAscCleanOptions.All
}, },
{ {
caption : me.txtClearText, caption : me.txtClearText,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth], lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Text value : Asc.c_oAscCleanOptions.Text
}, },
{ {
caption : me.txtClearFormat, caption : me.txtClearFormat,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth], lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Format value : Asc.c_oAscCleanOptions.Format
}, },
{ {
caption : me.txtClearComments, caption : me.txtClearComments,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth], lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Comments value : Asc.c_oAscCleanOptions.Comments
}, },
{ {
caption : me.txtClearHyper, caption : me.txtClearHyper,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth], lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : c_oAscCleanOptions.Hyperlinks value : Asc.c_oAscCleanOptions.Hyperlinks
} }
] ]
}) })
@ -1195,19 +1195,19 @@ define([
items : [ items : [
{ {
caption : me.textInsRight, caption : me.textInsRight,
value : c_oAscInsertOptions.InsertCellsAndShiftRight value : Asc.c_oAscInsertOptions.InsertCellsAndShiftRight
}, },
{ {
caption : me.textInsDown, caption : me.textInsDown,
value : c_oAscInsertOptions.InsertCellsAndShiftDown value : Asc.c_oAscInsertOptions.InsertCellsAndShiftDown
}, },
{ {
caption : me.textEntireRow, caption : me.textEntireRow,
value : c_oAscInsertOptions.InsertRows value : Asc.c_oAscInsertOptions.InsertRows
}, },
{ {
caption : me.textEntireCol, caption : me.textEntireCol,
value : c_oAscInsertOptions.InsertColumns value : Asc.c_oAscInsertOptions.InsertColumns
} }
] ]
}) })
@ -1223,19 +1223,19 @@ define([
items : [ items : [
{ {
caption : me.textDelLeft, caption : me.textDelLeft,
value : c_oAscDeleteOptions.DeleteCellsAndShiftLeft value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftLeft
}, },
{ {
caption : me.textDelUp, caption : me.textDelUp,
value : c_oAscDeleteOptions.DeleteCellsAndShiftTop value : Asc.c_oAscDeleteOptions.DeleteCellsAndShiftTop
}, },
{ {
caption : me.textEntireRow, caption : me.textEntireRow,
value : c_oAscDeleteOptions.DeleteRows value : Asc.c_oAscDeleteOptions.DeleteRows
}, },
{ {
caption : me.textEntireCol, caption : me.textEntireCol,
value : c_oAscDeleteOptions.DeleteColumns value : Asc.c_oAscDeleteOptions.DeleteColumns
} }
] ]
}) })

View file

@ -498,10 +498,11 @@
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "as OS X", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "as OS X",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Native", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Native",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Inch",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows",
"SSE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutoRecover": "Turn on autorecover",
"SSE.Views.FileMenuPanels.Settings.textAutoRecover": "Autorecover", "SSE.Views.FileMenuPanels.MainSettingsGeneral.textAutoRecover": "Autorecover",
"SSE.Views.FileMenuPanels.Settings.txtGeneral": "General", "SSE.Views.FileMenuPanels.Settings.txtGeneral": "General",
"del_SSE.Views.FileMenuPanels.Settings.txtPrint": "Print", "del_SSE.Views.FileMenuPanels.Settings.txtPrint": "Print",
"SSE.Views.FileMenuPanels.Settings.txtPageSettings": "Page Settings", "SSE.Views.FileMenuPanels.Settings.txtPageSettings": "Page Settings",

View file

@ -500,8 +500,9 @@
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Пункт", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Пункт",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Русский", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Русский",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "как Windows", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "как Windows",
"SSE.Views.FileMenuPanels.Settings.strAutoRecover": "Включить автовосстановление", "SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Дюйм",
"SSE.Views.FileMenuPanels.Settings.textAutoRecover": "Автовосстановление", "SSE.Views.FileMenuPanels.MainSettingsGeneral.strAutoRecover": "Включить автовосстановление",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.textAutoRecover": "Автовосстановление",
"SSE.Views.FileMenuPanels.Settings.txtGeneral": "Общие", "SSE.Views.FileMenuPanels.Settings.txtGeneral": "Общие",
"del_SSE.Views.FileMenuPanels.Settings.txtPrint": "Печать", "del_SSE.Views.FileMenuPanels.Settings.txtPrint": "Печать",
"SSE.Views.FormulaDialog.cancelButtonText": "Отмена", "SSE.Views.FormulaDialog.cancelButtonText": "Отмена",

View file

@ -76,9 +76,9 @@ Ext.define('SSE.controller.Document', {
}, },
_onLongActionEnd: function(type, id) { _onLongActionEnd: function(type, id) {
if (type === c_oAscAsyncActionType['BlockInteraction']) { if (type === Asc.c_oAscAsyncActionType['BlockInteraction']) {
switch (id) { switch (id) {
case c_oAscAsyncAction['Open']: case Asc.c_oAscAsyncAction['Open']:
var i = this.api.asc_getActiveWorksheetIndex(); var i = this.api.asc_getActiveWorksheetIndex();
this.api.asc_showWorksheet(i); this.api.asc_showWorksheet(i);
break; break;

View file

@ -150,43 +150,43 @@ Ext.define('SSE.controller.Main', {
switch (id) switch (id)
{ {
case c_oAscError.ID.Unknown: case Asc.c_oAscError.ID.Unknown:
config.message = this.unknownErrorText; config.message = this.unknownErrorText;
break; break;
case c_oAscError.ID.ConvertationTimeout: case Asc.c_oAscError.ID.ConvertationTimeout:
config.message = this.convertationTimeoutText; config.message = this.convertationTimeoutText;
break; break;
case c_oAscError.ID.ConvertationError: case Asc.c_oAscError.ID.ConvertationError:
config.message = this.convertationErrorText; config.message = this.convertationErrorText;
break; break;
case c_oAscError.ID.DownloadError: case Asc.c_oAscError.ID.DownloadError:
config.message = this.downloadErrorText; config.message = this.downloadErrorText;
break; break;
case c_oAscError.ID.UplImageSize: case Asc.c_oAscError.ID.UplImageSize:
config.message = this.uploadImageSizeMessage; config.message = this.uploadImageSizeMessage;
break; break;
case c_oAscError.ID.UplImageExt: case Asc.c_oAscError.ID.UplImageExt:
config.message = this.uploadImageExtMessage; config.message = this.uploadImageExtMessage;
break; break;
case c_oAscError.ID.UplImageFileCount: case Asc.c_oAscError.ID.UplImageFileCount:
config.message = this.uploadImageFileCountMessage; config.message = this.uploadImageFileCountMessage;
break; break;
case c_oAscError.ID.VKeyEncrypt: case Asc.c_oAscError.ID.VKeyEncrypt:
config.msg = this.errorKeyEncrypt; config.msg = this.errorKeyEncrypt;
break; break;
case c_oAscError.ID.KeyExpire: case Asc.c_oAscError.ID.KeyExpire:
config.msg = this.errorKeyExpire; config.msg = this.errorKeyExpire;
break; break;
case c_oAscError.ID.UserCountExceed: case Asc.c_oAscError.ID.UserCountExceed:
config.msg = this.errorUsersExceed; config.msg = this.errorUsersExceed;
break; break;
@ -197,7 +197,7 @@ Ext.define('SSE.controller.Main', {
if (level == c_oAscError.Level.Critical) { if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors // report only critical errors
Common.Gateway.reportError(id, config.message); Common.Gateway.reportError(id, config.message);
@ -243,7 +243,7 @@ Ext.define('SSE.controller.Main', {
}, },
onAdvancedOptions: function(advOptions) { onAdvancedOptions: function(advOptions) {
if (advOptions.asc_getOptionId() == c_oAscAdvancedOptionsID['CSV']){ if (advOptions.asc_getOptionId() == Asc.c_oAscAdvancedOptionsID['CSV']){
var preloader = Ext.get('loading-mask'), var preloader = Ext.get('loading-mask'),
me = this; me = this;
@ -287,7 +287,7 @@ Ext.define('SSE.controller.Main', {
after : function(){ after : function(){
Ext.Viewport.remove(viewAdvOptionsCsv); Ext.Viewport.remove(viewAdvOptionsCsv);
if (me.api) { if (me.api) {
me.api.asc_setAdvancedOptions(c_oAscAdvancedOptionsID['CSV'], new Asc.asc_CCSVAdvancedOptions(result.encoding, result.delimiter)); me.api.asc_setAdvancedOptions(Asc.c_oAscAdvancedOptionsID['CSV'], new Asc.asc_CCSVAdvancedOptions(result.encoding, result.delimiter));
} }
} }
}); });
@ -313,9 +313,9 @@ Ext.define('SSE.controller.Main', {
}, },
onLongActionEnd: function(type, id) { onLongActionEnd: function(type, id) {
if (type === c_oAscAsyncActionType['BlockInteraction']){ if (type === Asc.c_oAscAsyncActionType['BlockInteraction']){
switch (id) { switch (id) {
case c_oAscAsyncAction['Open']: case Asc.c_oAscAsyncAction['Open']:
this.onOpenDocument(); this.onOpenDocument();
break; break;
} }
@ -323,7 +323,7 @@ Ext.define('SSE.controller.Main', {
}, },
onDownloadAs: function() { onDownloadAs: function() {
this.api.asc_DownloadAs(c_oAscFileType.XLSX, true); this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true);
}, },
_hideLoadSplash: function(){ _hideLoadSplash: function(){

View file

@ -96,9 +96,9 @@ Ext.define('SSE.controller.WorksheetList', {
}, },
onLongActionEnd: function(type, id) { onLongActionEnd: function(type, id) {
if (type === c_oAscAsyncActionType['BlockInteraction']){ if (type === Asc.c_oAscAsyncActionType['BlockInteraction']){
switch (id) { switch (id) {
case c_oAscAsyncAction['Open']: case Asc.c_oAscAsyncAction['Open']:
this._loadWorksheets(); this._loadWorksheets();
break; break;
} }