to Asc namespace

This commit is contained in:
Alexander.Trofimov 2016-04-18 15:21:15 +03:00
parent bf049fedb9
commit 3180c98ee2
36 changed files with 422 additions and 422 deletions

View file

@ -224,7 +224,7 @@ Common.Utils.ThemeColor = new(function() {
color=color.replace(/#/,'');
if(color.length==3) color=color.replace(/(.)/g,'$1$1');
color=parseInt(color,16);
var c = new CAscColor();
var c = new Asc.asc_CColor();
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_g((color&0xff00)>>8);

View file

@ -171,7 +171,7 @@ var ApplicationController = new(function(){
if (docConfig) {
permissions = $.extend(permissions, docConfig.permissions);
var docInfo = new CDocInfo();
var docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(docConfig.key);
docInfo.put_Url(docConfig.url);
docInfo.put_Title(docConfig.title);

View file

@ -266,13 +266,13 @@ define([
if (data.doc) {
this.permissions = $.extend(this.permissions, data.doc.permissions);
var _user = new CUserInfo();
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id);
_user.put_FirstName(this.appOptions.user.firstname);
_user.put_LastName(this.appOptions.user.lastname);
_user.put_FullName(this.appOptions.user.fullname);
docInfo = new CDocInfo();
docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(data.doc.key);
docInfo.put_Url(data.doc.url);
docInfo.put_Title(data.doc.title);
@ -998,7 +998,7 @@ define([
translateChart.asc_setSeries(this.txtSeries);
this.api.asc_setChartTranslate(translateChart);
var translateArt = new asc_TextArtTranslate();
var translateArt = new Asc.asc_TextArtTranslate();
translateArt.asc_setDefaultText(this.txtArt);
this.api.asc_setTextArtTranslate(translateArt);
}

View file

@ -1529,7 +1529,7 @@ define([
var pr = SelectedObjects[i].get_ObjectValue();
var value = pr.get_FramePr();
if (!_.isUndefined(value)) {
value = new CParagraphFrame();
value = new Asc.asc_CParagraphFrame();
value.put_FromDropCapMenu(true);
value.put_DropCap(item.value);
this.api.put_FramePr(value);
@ -1987,7 +1987,7 @@ define([
onAutoFontColor: function(e) {
this._state.clrtext = this._state.clrtext_asccolor = undefined;
var color = new CAscColor();
var color = new Asc.asc_CColor();
color.put_auto(true);
this.api.put_TextColor(color);

View file

@ -241,7 +241,7 @@ define([
this.disableControls(this._locked);
if (props && props.get_ChartProperties()){
this._originalProps = new CImgProperty(props);
this._originalProps = new Asc.asc_CImgProperty(props);
this._noApply = true;
var value = props.get_WrappingStyle();
@ -367,7 +367,7 @@ define([
this.btnWrapType.setIconCls('item-wrap ' + rawData.iconCls);
if (this.api) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
@ -461,7 +461,7 @@ define([
this._state.ChartType = -1;
if (this.api && !this._noApply && this.chartProps) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
this.chartProps.changeType(rawData.type);
props.put_ChartProperties(this.chartProps);
this.api.ImgApply(props);
@ -491,7 +491,7 @@ define([
btnIconEl.css('background-image', style);
if (this.api && !this._noApply && this.chartProps) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
this.chartProps.putStyle(rawData.data);
props.put_ChartProperties(this.chartProps);
this.api.ImgApply(props);

View file

@ -1697,7 +1697,7 @@ define([
menu : (function(){
function onItemClick(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
if (!_.isUndefined(item.options.halign)) {
properties.put_PositionH(new Asc.CImagePositionH());
properties.get_PositionH().put_UseAlign(true);
@ -1757,7 +1757,7 @@ define([
iconCls : 'mnu-arrange-group'
}).on('click', function(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Group(1);
me.api.ImgApply(properties);
}
@ -1769,7 +1769,7 @@ define([
caption : this.txtUngroup
}).on('click', function(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Group(-1);
me.api.ImgApply(properties);
}
@ -1781,7 +1781,7 @@ define([
menu : (function(){
function onItemClick(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_ChangeLevel(item.options.valign);
me.api.ImgApply(properties);
}
@ -1835,7 +1835,7 @@ define([
menu : (function(){
function onItemClick(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_WrappingStyle(item.options.wrapType);
if (me.menuImageWrap._originalProps.get_WrappingStyle() === Asc.c_oAscWrapStyle2.Inline && item.wrapType !== Asc.c_oAscWrapStyle2.Inline ) {
@ -1976,7 +1976,7 @@ define([
if (me.api){
var originalImageSize = me.api.get_OriginalSizeImage();
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Width(originalImageSize.get_ImageWidth());
properties.put_Height(originalImageSize.get_ImageHeight());
@ -2690,7 +2690,7 @@ define([
var paragraphVAlign = function(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_VerticalTextAlign(item.options.valign);
me.api.ImgApply(properties);
}
@ -2728,7 +2728,7 @@ define([
var paragraphDirection = function(item, e) {
if (me.api) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Vert(item.options.direction);
me.api.ImgApply(properties);
}

View file

@ -92,7 +92,7 @@ define([
this._noApply = true;
this.Margins = undefined;
this._originalProps = new CParagraphProp(this.options.paragraphProps);
this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps);
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
},
@ -244,7 +244,7 @@ define([
if (me._changedProps) {
if (me._changedProps.get_Shade()===undefined || me._changedProps.get_Shade()===null) {
me._changedProps.put_Shade(new CParagraphShd());
me._changedProps.put_Shade(new Asc.asc_CParagraphShd());
}
if (color=='transparent') {
me._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
@ -729,7 +729,7 @@ define([
for (var j=0; j<this.tableStyler.columns; j++) {
this.tableStyler.getCell(j, i).on('borderclick', function(ct, border, size, color){
if (this.ChangedBorders===undefined) {
this.ChangedBorders = new CParagraphBorders();
this.ChangedBorders = new Asc.asc_CParagraphBorders();
}
this._UpdateCellBordersStyle(ct, border, size, color, this.Borders);
}, this);
@ -737,7 +737,7 @@ define([
}
this.tableStyler.on('borderclick', function(ct, border, size, color){
if (this.ChangedBorders===undefined) {
this.ChangedBorders = new CParagraphBorders();
this.ChangedBorders = new Asc.asc_CParagraphBorders();
}
this._UpdateTableBordersStyle(ct, border, size, color, this.Borders);
}, this);
@ -775,30 +775,30 @@ define([
if (this.Margins) {
var borders = this._changedProps.get_Borders();
if (borders===undefined || borders===null) {
this._changedProps.put_Borders(new CParagraphBorders());
this._changedProps.put_Borders(new Asc.asc_CParagraphBorders());
borders = this._changedProps.get_Borders();
}
if (this.Margins.Left!==undefined) {
if (borders.get_Left()===undefined || borders.get_Left()===null)
borders.put_Left(new CBorder(this.Borders.get_Left()));
borders.put_Left(new Asc.asc_CTextBorder(this.Borders.get_Left()));
borders.get_Left().put_Space(this.Margins.Left);
}
if (this.Margins.Top!==undefined) {
if (borders.get_Top()===undefined || borders.get_Top()===null)
borders.put_Top(new CBorder(this.Borders.get_Top()));
borders.put_Top(new Asc.asc_CTextBorder(this.Borders.get_Top()));
borders.get_Top().put_Space(this.Margins.Top);
}
if (this.Margins.Right!==undefined) {
if (borders.get_Right()===undefined || borders.get_Right()===null)
borders.put_Right(new CBorder(this.Borders.get_Right()));
borders.put_Right(new Asc.asc_CTextBorder(this.Borders.get_Right()));
borders.get_Right().put_Space(this.Margins.Right);
}
if (this.Margins.Bottom!==undefined) {
if (borders.get_Bottom()===undefined || borders.get_Bottom()===null)
borders.put_Bottom(new CBorder(this.Borders.get_Bottom()));
borders.put_Bottom(new Asc.asc_CTextBorder(this.Borders.get_Bottom()));
borders.get_Bottom().put_Space(this.Margins.Bottom);
if (borders.get_Between()===undefined || borders.get_Between()===null)
borders.put_Between(new CBorder(this.Borders.get_Between()));
borders.put_Between(new Asc.asc_CTextBorder(this.Borders.get_Between()));
borders.get_Between().put_Space(this.Margins.Bottom);
}
}
@ -859,7 +859,7 @@ define([
_setDefaults: function(props) {
if (props) {
this._noApply = true;
this._originalProps = new CParagraphProp(props);
this._originalProps = new Asc.asc_CParagraphProperty(props);
var frame_props = props.get_FramePr();
if (frame_props) {
var value;
@ -954,7 +954,7 @@ define([
}
}
this.Borders = new CParagraphBorders(frame_props.get_Borders());
this.Borders = new Asc.asc_CParagraphBorders(frame_props.get_Borders());
if (this.Borders) {
var brd = this.Borders.get_Left();
@ -1004,7 +1004,7 @@ define([
this._noApply = false;
this._changedProps = new CParagraphFrame();
this._changedProps = new Asc.asc_CParagraphFrame();
if (this.isFrame && frame_props && frame_props.get_W()!==undefined) {
this._changedProps.put_W(frame_props.get_W());
}
@ -1114,7 +1114,7 @@ define([
_UpdateBorderStyle: function(border, visible) {
if (null == border)
border = new CBorder();
border = new Asc.asc_CTextBorder();
if (visible && this.BorderSize.ptValue > 0){
var size = parseFloat(this.BorderSize.ptValue);
@ -1136,28 +1136,28 @@ define([
if ( ct.col==0 && border.indexOf('l') > -1 ) {
updateBorders.put_Left(this._UpdateBorderStyle(updateBorders.get_Left(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Left(new CBorder(updateBorders.get_Left()));
this.ChangedBorders.put_Left(new Asc.asc_CTextBorder(updateBorders.get_Left()));
}
}
if ( ct.col== this.tableStylerColumns-1 && border.indexOf('r') > -1 ) {
updateBorders.put_Right(this._UpdateBorderStyle(updateBorders.get_Right(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Right(new CBorder(updateBorders.get_Right()));
this.ChangedBorders.put_Right(new Asc.asc_CTextBorder(updateBorders.get_Right()));
}
}
if ( ct.row==0 && border.indexOf('t') > -1 ) {
updateBorders.put_Top(this._UpdateBorderStyle(updateBorders.get_Top(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Top(new CBorder(updateBorders.get_Top()));
this.ChangedBorders.put_Top(new Asc.asc_CTextBorder(updateBorders.get_Top()));
}
}
if ( ct.row== this.tableStylerRows-1 && border.indexOf('b') > -1 ) {
updateBorders.put_Bottom(this._UpdateBorderStyle(updateBorders.get_Bottom(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Bottom(new CBorder(updateBorders.get_Bottom()));
this.ChangedBorders.put_Bottom(new Asc.asc_CTextBorder(updateBorders.get_Bottom()));
}
}
@ -1165,7 +1165,7 @@ define([
ct.row== this.tableStylerRows-1 && border.indexOf('t') > -1) {
updateBorders.put_Between(this._UpdateBorderStyle(updateBorders.get_Between(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Between(new CBorder(updateBorders.get_Between()));
this.ChangedBorders.put_Between(new Asc.asc_CTextBorder(updateBorders.get_Between()));
}
}
},
@ -1176,25 +1176,25 @@ define([
if (border.indexOf('l') > -1) {
updateBorders.put_Left(this._UpdateBorderStyle(updateBorders.get_Left(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Left(new CBorder(updateBorders.get_Left()));
this.ChangedBorders.put_Left(new Asc.asc_CTextBorder(updateBorders.get_Left()));
}
}
if (border.indexOf('t') > -1) {
updateBorders.put_Top(this._UpdateBorderStyle(updateBorders.get_Top(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Top(new CBorder(updateBorders.get_Top()));
this.ChangedBorders.put_Top(new Asc.asc_CTextBorder(updateBorders.get_Top()));
}
}
if (border.indexOf('r') > -1) {
updateBorders.put_Right(this._UpdateBorderStyle(updateBorders.get_Right(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Right(new CBorder(updateBorders.get_Right()));
this.ChangedBorders.put_Right(new Asc.asc_CTextBorder(updateBorders.get_Right()));
}
}
if (border.indexOf('b') > -1) {
updateBorders.put_Bottom(this._UpdateBorderStyle(updateBorders.get_Bottom(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Bottom(new CBorder(updateBorders.get_Bottom()));
this.ChangedBorders.put_Bottom(new Asc.asc_CTextBorder(updateBorders.get_Bottom()));
}
}
},

View file

@ -179,7 +179,7 @@ define([
this.disableControls(this._locked);
if (props ){
this._originalProps = new CImgProperty(props);
this._originalProps = new Asc.asc_CImgProperty(props);
var value = props.get_WrappingStyle();
if (this._state.WrappingStyle!==value) {
@ -250,7 +250,7 @@ define([
this.btnWrapType.setIconCls('item-wrap ' + rawData.iconcls);
if (this.api) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
props.put_PositionH(new Asc.CImagePositionH());
@ -281,7 +281,7 @@ define([
this.labelWidth[0].innerHTML = this.textWidth + ': ' + Common.Utils.Metric.fnRecalcFromMM(w).toFixed(1) + ' ' + Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()];
this.labelHeight[0].innerHTML = this.textHeight + ': ' + Common.Utils.Metric.fnRecalcFromMM(h).toFixed(1) + ' ' + Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()];
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Width(w);
properties.put_Height(h);
this.api.ImgApply(properties);
@ -297,7 +297,7 @@ define([
if (me.api) {
var checkUrl = value.replace(/ /g, '');
if (!_.isEmpty(checkUrl)) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
props.put_ImageUrl(checkUrl);
me.api.ImgApply(props);
}

View file

@ -284,7 +284,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnTop.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Paddings()===null || this._changedProps.get_Paddings()===undefined)
this._changedProps.put_Paddings(new CPaddings());
this._changedProps.put_Paddings(new Asc.asc_CPaddings());
this._changedProps.get_Paddings().put_Top(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
@ -303,7 +303,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnBottom.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Paddings()===null || this._changedProps.get_Paddings()===undefined)
this._changedProps.put_Paddings(new CPaddings());
this._changedProps.put_Paddings(new Asc.asc_CPaddings());
this._changedProps.get_Paddings().put_Bottom(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
@ -322,7 +322,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Paddings()===null || this._changedProps.get_Paddings()===undefined)
this._changedProps.put_Paddings(new CPaddings());
this._changedProps.put_Paddings(new Asc.asc_CPaddings());
this._changedProps.get_Paddings().put_Left(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
@ -341,7 +341,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Paddings()===null || this._changedProps.get_Paddings()===undefined)
this._changedProps.put_Paddings(new CPaddings());
this._changedProps.put_Paddings(new Asc.asc_CPaddings());
this._changedProps.get_Paddings().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
@ -658,7 +658,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnMarginTop.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this.Margins===undefined)
this.Margins= new CPaddings();
this.Margins= new Asc.asc_CPaddings();
this.Margins.put_Top(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -676,7 +676,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnMarginBottom.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this.Margins===undefined)
this.Margins= new CPaddings();
this.Margins= new Asc.asc_CPaddings();
this.Margins.put_Bottom(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -694,7 +694,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnMarginLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this.Margins===undefined)
this.Margins= new CPaddings();
this.Margins= new Asc.asc_CPaddings();
this.Margins.put_Left(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -712,7 +712,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.spnMarginRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this.Margins===undefined)
this.Margins= new CPaddings();
this.Margins= new Asc.asc_CPaddings();
this.Margins.put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -736,7 +736,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
this._changedShapeProps.put_stroke(new CAscStroke());
this._changedShapeProps.put_stroke(new Asc.asc_CStroke());
this._changedShapeProps.get_stroke().put_linecap(record.value);
}
@ -758,7 +758,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
this._changedShapeProps.put_stroke(new CAscStroke());
this._changedShapeProps.put_stroke(new Asc.asc_CStroke());
this._changedShapeProps.get_stroke().put_linejoin(record.value);
}
@ -1120,7 +1120,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnRatio.toggle(true);
}
this._changedProps = new CImgProperty();
this._changedProps = new Asc.asc_CImgProperty();
}
},
@ -1142,7 +1142,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
properties.put_ShapeProperties(this._changedShapeProps);
if (this.Margins) {
if (properties.get_ShapeProperties()===null || properties.get_ShapeProperties()===undefined)
properties.put_ShapeProperties(new CAscShapeProp);
properties.put_ShapeProperties(new Asc.asc_CShapeProperty());
properties.get_ShapeProperties().put_paddings(this.Margins);
}
}
@ -1241,7 +1241,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}
}
}
this._changedShapeProps = new CAscShapeProp();
this._changedShapeProps = new Asc.asc_CShapeProperty();
},
updateMetricUnit: function() {
@ -1569,7 +1569,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onSelectBeginStyle: function(picker, view, record, e){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
this._changedShapeProps.put_stroke(new CAscStroke());
this._changedShapeProps.put_stroke(new Asc.asc_CStroke());
this._changedShapeProps.get_stroke().put_linebeginstyle(record.get('type'));
}
@ -1582,7 +1582,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onSelectBeginSize: function(picker, view, record, e){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
this._changedShapeProps.put_stroke(new CAscStroke());
this._changedShapeProps.put_stroke(new Asc.asc_CStroke());
this._changedShapeProps.get_stroke().put_linebeginsize(record.get('type'));
}
@ -1593,7 +1593,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onSelectEndStyle: function(picker, view, record, e){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
this._changedShapeProps.put_stroke(new CAscStroke());
this._changedShapeProps.put_stroke(new Asc.asc_CStroke());
this._changedShapeProps.get_stroke().put_lineendstyle(record.get('type'));
}
@ -1606,7 +1606,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
onSelectEndSize: function(picker, view, record, e){
if (this._changedShapeProps) {
if (this._changedShapeProps.get_stroke()===null)
this._changedShapeProps.put_stroke(new CAscStroke());
this._changedShapeProps.put_stroke(new Asc.asc_CStroke());
this._changedShapeProps.get_stroke().put_lineendsize(record.get('type'));
}

View file

@ -88,7 +88,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.tableStylerColumns = this.options.tableStylerColumns;
this.borderProps = this.options.borderProps;
this.api = this.options.api;
this._originalProps = new CParagraphProp(this.options.paragraphProps);
this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps);
this.isChart = this.options.isChart;
},
@ -112,7 +112,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.numFirstLine.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
this._changedProps.put_Ind(new CParagraphInd());
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
this._changedProps.get_Ind().put_FirstLine(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -131,7 +131,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.numIndentsLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
this._changedProps.put_Ind(new CParagraphInd());
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
this._changedProps.get_Ind().put_Left(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -150,7 +150,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.numIndentsRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
this._changedProps.put_Ind(new CParagraphInd());
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
this._changedProps.get_Ind().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -371,7 +371,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._changedProps.put_TextSpacing(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_TextSpacing(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
}
@ -393,7 +393,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._changedProps.put_Position(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Position(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
}
@ -567,38 +567,38 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
if (this.Margins) {
var borders = this._changedProps.get_Borders();
if (borders===undefined || borders===null) {
this._changedProps.put_Borders(new CParagraphBorders());
this._changedProps.put_Borders(new Asc.asc_CParagraphBorders());
borders = this._changedProps.get_Borders();
}
if (this.Margins.Left!==undefined) {
if (borders.get_Left()===undefined || borders.get_Left()===null)
borders.put_Left(new CBorder(this.Borders.get_Left()));
borders.put_Left(new Asc.asc_CTextBorder(this.Borders.get_Left()));
borders.get_Left().put_Space(this.Margins.Left);
}
if (this.Margins.Top!==undefined) {
if (borders.get_Top()===undefined || borders.get_Top()===null)
borders.put_Top(new CBorder(this.Borders.get_Top()));
borders.put_Top(new Asc.asc_CTextBorder(this.Borders.get_Top()));
borders.get_Top().put_Space(this.Margins.Top);
}
if (this.Margins.Right!==undefined) {
if (borders.get_Right()===undefined || borders.get_Right()===null)
borders.put_Right(new CBorder(this.Borders.get_Right()));
borders.put_Right(new Asc.asc_CTextBorder(this.Borders.get_Right()));
borders.get_Right().put_Space(this.Margins.Right);
}
if (this.Margins.Bottom!==undefined) {
if (borders.get_Bottom()===undefined || borders.get_Bottom()===null)
borders.put_Bottom(new CBorder(this.Borders.get_Bottom()));
borders.put_Bottom(new Asc.asc_CTextBorder(this.Borders.get_Bottom()));
borders.get_Bottom().put_Space(this.Margins.Bottom);
if (borders.get_Between()===undefined || borders.get_Between()===null)
borders.put_Between(new CBorder(this.Borders.get_Between()));
borders.put_Between(new Asc.asc_CTextBorder(this.Borders.get_Between()));
borders.get_Between().put_Space(this.Margins.Bottom);
}
}
if ( this._tabListChanged ) {
if (this._changedProps.get_Tabs()===null || this._changedProps.get_Tabs()===undefined)
this._changedProps.put_Tabs(new CParagraphTabs());
this._changedProps.put_Tabs(new Asc.asc_CParagraphTabs());
this.tabList.store.each(function (item, index) {
var tab = new CParagraphTab(Common.Utils.Metric.fnRecalcToMM(item.get('tabPos')), item.get('tabAlign'));
var tab = new Asc.asc_CParagraphTab(Common.Utils.Metric.fnRecalcToMM(item.get('tabPos')), item.get('tabAlign'));
this._changedProps.get_Tabs().add_Tab(tab);
}, this);
}
@ -607,7 +607,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
_setDefaults: function(props) {
if (props ){
this._originalProps = new CParagraphProp(props);
this._originalProps = new Asc.asc_CParagraphProperty(props);
this.hideTextOnlySettings(this.isChart);
@ -621,7 +621,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.chKeepNext.setValue((props.get_KeepNext() !== null && props.get_KeepNext() !== undefined) ? props.get_KeepNext() : 'indeterminate', true);
this.chOrphan.setValue((props.get_WidowControl() !== null && props.get_WidowControl() !== undefined) ? props.get_WidowControl() : 'indeterminate', true);
this.Borders = new CParagraphBorders(props.get_Borders());
this.Borders = new Asc.asc_CParagraphBorders(props.get_Borders());
// Margins
if (this.Borders) {
@ -710,7 +710,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._noApply = false;
this._changedProps = new CParagraphProp();
this._changedProps = new Asc.asc_CParagraphProperty();
this.ChangedBorders = undefined;
}
},
@ -756,7 +756,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
for (var j=0; j<this.BordersImage.columns; j++) {
this.BordersImage.getCell(j, i).on('borderclick', function(ct, border, size, color){
if (this.ChangedBorders===undefined) {
this.ChangedBorders = new CParagraphBorders();
this.ChangedBorders = new Asc.asc_CParagraphBorders();
}
this._UpdateCellBordersStyle(ct, border, size, color, this.Borders);
}, this);
@ -764,7 +764,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
}
this.BordersImage.on('borderclick', function(ct, border, size, color){
if (this.ChangedBorders===undefined) {
this.ChangedBorders = new CParagraphBorders();
this.ChangedBorders = new Asc.asc_CParagraphBorders();
}
this._UpdateTableBordersStyle(ct, border, size, color, this.Borders);
}, this);
@ -783,7 +783,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Strikeout(field.getValue()=='checked');
properties.put_DStrikeout(this.chDoubleStrike.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -803,7 +803,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_DStrikeout(field.getValue()=='checked');
properties.put_Strikeout(this.chStrike.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -823,7 +823,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Superscript(field.getValue()=='checked');
properties.put_Subscript(this.chSubscript.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -843,7 +843,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Subscript(field.getValue()=='checked');
properties.put_Superscript(this.chSuperscript.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -863,7 +863,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_SmallCaps(field.getValue()=='checked');
properties.put_AllCaps(this.chAllCaps.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -883,7 +883,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_AllCaps(field.getValue()=='checked');
properties.put_SmallCaps(this.chSmallCaps.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -910,7 +910,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
if (this._changedProps) {
if (this._changedProps.get_Shade()===undefined || this._changedProps.get_Shade()===null) {
this._changedProps.put_Shade(new CParagraphShd());
this._changedProps.put_Shade(new Asc.asc_CParagraphShd());
}
if (this.paragraphShade=='transparent') {
this._changedProps.get_Shade().put_Value(Asc.c_oAscShdNil);
@ -937,7 +937,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
_UpdateBorderStyle: function(border, visible) {
if (null == border)
border = new CBorder();
border = new Asc.asc_CTextBorder();
if (visible && this.BorderSize.ptValue > 0){
var size = parseFloat(this.BorderSize.ptValue);
@ -947,7 +947,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
border.put_Color(color);
}
else {
border.put_Color(new CAscColor());
border.put_Color(new Asc.asc_CColor());
border.put_Value(0);
}
return border;
@ -959,28 +959,28 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
if ( ct.col==0 && border.indexOf('l') > -1 ) {
updateBorders.put_Left(this._UpdateBorderStyle(updateBorders.get_Left(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Left(new CBorder(updateBorders.get_Left()));
this.ChangedBorders.put_Left(new Asc.asc_CTextBorder(updateBorders.get_Left()));
}
}
if ( ct.col== this.tableStylerColumns-1 && border.indexOf('r') > -1 ) {
updateBorders.put_Right(this._UpdateBorderStyle(updateBorders.get_Right(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Right(new CBorder(updateBorders.get_Right()));
this.ChangedBorders.put_Right(new Asc.asc_CTextBorder(updateBorders.get_Right()));
}
}
if ( ct.row==0 && border.indexOf('t') > -1 ) {
updateBorders.put_Top(this._UpdateBorderStyle(updateBorders.get_Top(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Top(new CBorder(updateBorders.get_Top()));
this.ChangedBorders.put_Top(new Asc.asc_CTextBorder(updateBorders.get_Top()));
}
}
if ( ct.row== this.tableStylerRows-1 && border.indexOf('b') > -1 ) {
updateBorders.put_Bottom(this._UpdateBorderStyle(updateBorders.get_Bottom(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Bottom(new CBorder(updateBorders.get_Bottom()));
this.ChangedBorders.put_Bottom(new Asc.asc_CTextBorder(updateBorders.get_Bottom()));
}
}
@ -988,7 +988,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
ct.row== this.tableStylerRows-1 && border.indexOf('t') > -1) {
updateBorders.put_Between(this._UpdateBorderStyle(updateBorders.get_Between(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Between(new CBorder(updateBorders.get_Between()));
this.ChangedBorders.put_Between(new Asc.asc_CTextBorder(updateBorders.get_Between()));
}
}
},
@ -999,25 +999,25 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
if (border.indexOf('l') > -1) {
updateBorders.put_Left(this._UpdateBorderStyle(updateBorders.get_Left(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Left(new CBorder(updateBorders.get_Left()));
this.ChangedBorders.put_Left(new Asc.asc_CTextBorder(updateBorders.get_Left()));
}
}
if (border.indexOf('t') > -1) {
updateBorders.put_Top(this._UpdateBorderStyle(updateBorders.get_Top(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Top(new CBorder(updateBorders.get_Top()));
this.ChangedBorders.put_Top(new Asc.asc_CTextBorder(updateBorders.get_Top()));
}
}
if (border.indexOf('r') > -1) {
updateBorders.put_Right(this._UpdateBorderStyle(updateBorders.get_Right(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Right(new CBorder(updateBorders.get_Right()));
this.ChangedBorders.put_Right(new Asc.asc_CTextBorder(updateBorders.get_Right()));
}
}
if (border.indexOf('b') > -1) {
updateBorders.put_Bottom(this._UpdateBorderStyle(updateBorders.get_Bottom(), (size>0)));
if (this.ChangedBorders) {
this.ChangedBorders.put_Bottom(new CBorder(updateBorders.get_Bottom()));
this.ChangedBorders.put_Bottom(new Asc.asc_CTextBorder(updateBorders.get_Bottom()));
}
}
},

View file

@ -619,10 +619,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
@ -632,10 +632,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -665,10 +665,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
var fHexColor = Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color).get_color().get_hex();
@ -690,8 +690,8 @@ define([
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.put_fill(fill);
@ -708,15 +708,15 @@ define([
this.ShapeColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -734,10 +734,10 @@ define([
onPatternSelect: function(combo, record){
if (this.api && !this._noApply) {
this.PatternFillType = record.get('type');
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -754,10 +754,10 @@ define([
this.btnFGColor.setColor(color);
this.FGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -774,10 +774,10 @@ define([
this.btnBGColor.setColor(color);
this.BGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -794,10 +794,10 @@ define([
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -812,8 +812,8 @@ define([
this.sldrTransparency.setValue(field.getNumberValue(), true);
if (this.api) {
var num = field.getNumberValue();
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(num * 2.55);
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
@ -843,8 +843,8 @@ define([
_transparencyApplyFunc: function() {
if (this._sliderChanged!==undefined) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(this._sliderChanged * 2.55);
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
@ -878,10 +878,10 @@ define([
}
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -916,10 +916,10 @@ define([
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
fill.get_fill().put_linear_scale(true);
@ -939,10 +939,10 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(color) == 'object') ? color.color : color));
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
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])]);
@ -982,10 +982,10 @@ define([
_gradientApplyFunc: function() {
if (this._sliderChanged) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
@ -1009,8 +1009,8 @@ define([
this.BorderSize = value;
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var stroke = new CAscStroke();
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
@ -1060,8 +1060,8 @@ define([
this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color};
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new CAscShapeProp();
var stroke = new CAscStroke();
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
@ -1108,7 +1108,7 @@ define([
this.btnWrapType.setIconCls('item-wrap ' + rawData.iconcls);
if (this.api) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
props.put_WrappingStyle((rawData.data));
if (this._state.WrappingStyle===Asc.c_oAscWrapStyle2.Inline && rawData.data!==Asc.c_oAscWrapStyle2.Inline ) {
@ -1140,10 +1140,10 @@ define([
var checkUrl = value.replace(/ /g, '');
if (!_.isEmpty(checkUrl)) {
if (me.BlipFillType !== null) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -1194,7 +1194,7 @@ define([
ChangeSettings: function(props) {
if (this.imgprops==null)
this.imgprops = new CImgProperty();
this.imgprops = new Asc.asc_CImgProperty();
else
this.imgprops.put_ImageUrl(null);
@ -1206,7 +1206,7 @@ define([
{
var shapeprops = props.get_ShapeProperties(),
shapetype = shapeprops.asc_getType();
this._originalProps = new CImgProperty(props);
this._originalProps = new Asc.asc_CImgProperty(props);
this._noApply = true;
@ -1659,10 +1659,10 @@ define([
this._fromTextureCmb = false;
if (this.api) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.put_fill(fill);

View file

@ -662,39 +662,39 @@ define([
if (border.indexOf('l') > -1 || !visible) {
if (updateBorders.get_Left()===null || updateBorders.get_Left()===undefined)
updateBorders.put_Left(new CBorder());
updateBorders.put_Left(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Left(), visible);
}
if (border.indexOf('t') > -1 || !visible) {
if (updateBorders.get_Top()===null || updateBorders.get_Top()===undefined)
updateBorders.put_Top(new CBorder());
updateBorders.put_Top(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Top(), visible);
}
if (border.indexOf('r') > -1 || !visible) {
if (updateBorders.get_Right()===null || updateBorders.get_Right()===undefined)
updateBorders.put_Right(new CBorder());
updateBorders.put_Right(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Right(), visible);
}
if (border.indexOf('b') > -1 || !visible) {
if (updateBorders.get_Bottom()===null || updateBorders.get_Bottom()===undefined)
updateBorders.put_Bottom(new CBorder());
updateBorders.put_Bottom(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Bottom(), visible);
}
if (border.indexOf('c') > -1 || !visible) {
if (updateBorders.get_InsideV()===null || updateBorders.get_InsideV()===undefined)
updateBorders.put_InsideV(new CBorder());
updateBorders.put_InsideV(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_InsideV(), visible);
}
if (border.indexOf('m') > -1 || !visible) {
if (updateBorders.get_InsideH()===null || updateBorders.get_InsideH()===undefined)
updateBorders.put_InsideH(new CBorder());
updateBorders.put_InsideH(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_InsideH(), visible);
}
},
_UpdateBorderStyle: function(border, visible) {
if (null == border)
border = new CBorder();
border = new Asc.asc_CTextBorder();
if (visible && this.BorderSize > 0){
var size = parseFloat(this.BorderSize);

View file

@ -253,7 +253,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Top');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Top((this.TableMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Top) : null);
this.TableMargins.isChanged = true;
}
@ -273,7 +273,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Bottom');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Bottom((this.TableMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Bottom) : null);
this.TableMargins.isChanged = true;
}
@ -293,7 +293,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Left');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Left((this.TableMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Left) : null);
this.TableMargins.isChanged = true;
}
@ -313,7 +313,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Right');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Right((this.TableMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Right) : null);
this.TableMargins.isChanged = true;
}
@ -609,7 +609,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnDistanceTop.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_TablePaddings()===undefined)
this._changedProps.put_TablePaddings(new CPaddings());
this._changedProps.put_TablePaddings(new Asc.asc_CPaddings());
this._changedProps.get_TablePaddings().put_Top(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -627,7 +627,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnDistanceBottom.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_TablePaddings()===undefined)
this._changedProps.put_TablePaddings(new CPaddings());
this._changedProps.put_TablePaddings(new Asc.asc_CPaddings());
this._changedProps.get_TablePaddings().put_Bottom(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -645,7 +645,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnDistanceLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_TablePaddings()===undefined)
this._changedProps.put_TablePaddings(new CPaddings());
this._changedProps.put_TablePaddings(new Asc.asc_CPaddings());
this._changedProps.get_TablePaddings().put_Left(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -663,7 +663,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.spnDistanceRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_TablePaddings()===undefined)
this._changedProps.put_TablePaddings(new CPaddings());
this._changedProps.put_TablePaddings(new Asc.asc_CPaddings());
this._changedProps.get_TablePaddings().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -1713,7 +1713,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (this.CellColor.Color=='transparent') {
this._cellBackground.put_Value(1);
this._cellBackground.put_Color(new CAscColor(0,0,0));
this._cellBackground.put_Color(new Asc.asc_CColor(0,0,0));
} else {
this._cellBackground.put_Value(0);
this._cellBackground.put_Color(Common.Utils.ThemeColor.getRgbColor(this.CellColor.Color));
@ -1732,7 +1732,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
}
if (this.TableColor.Color=='transparent') {
background.put_Value(1);
background.put_Color(new CAscColor(0, 0,0));
background.put_Color(new Asc.asc_CColor(0, 0,0));
} else {
background.put_Value(0);
background.put_Color(Common.Utils.ThemeColor.getRgbColor(this.TableColor.Color));
@ -1769,7 +1769,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._UpdateCellBorderSpacing_(source.get_Bottom(), 'b', this.tableBordersImageSpacing.getCell(i, this.tableBordersImageSpacing.rows-1));
}
if (this._allTable && source.get_InsideV() === null) {
source.put_InsideV(new CBorder());
source.put_InsideV(new Asc.asc_CTextBorder());
}
if (source.get_InsideV() !== null) {
for (i=0; i<this.tableBordersImageSpacing.rows; i++) {
@ -1779,7 +1779,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
}
if (this._allTable && source.get_InsideH() === null) {
source.put_InsideH(new CBorder());
source.put_InsideH(new Asc.asc_CTextBorder());
}
if (source.get_InsideH() !== null) {
for (i=0; i<this.tableBordersImageSpacing.columns; i++) {
@ -1842,7 +1842,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._UpdateTableBorderNoSpacing_(source.get_Bottom(), 'b');
if (this._allTable && source.get_InsideV() == null) {
source.put_InsideV(new CBorder());
source.put_InsideV(new Asc.asc_CTextBorder());
}
if (source.get_InsideV() !== null) {
for (var i=0; i<this.tableBordersImage.rows; i++) {
@ -1852,7 +1852,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
}
if (this._allTable && source.get_InsideH() == null) {
source.put_InsideH(new CBorder());
source.put_InsideH(new Asc.asc_CTextBorder());
}
if (source.get_InsideH() !== null) {
for (i=0; i<this.tableBordersImage.columns; i++) {
@ -1967,42 +1967,42 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if ( ct.col==0 && border.indexOf('l') > -1 ) {
this._UpdateBorderStyle(updateBorders.get_Left(), (size>0));
if (changed_destination) {
changed_destination.put_Left(new CBorder(updateBorders.get_Left()));
changed_destination.put_Left(new Asc.asc_CTextBorder(updateBorders.get_Left()));
}
}
if ( ct.col== this.tableStylerColumns-1 && border.indexOf('r') > -1 ) {
this._UpdateBorderStyle(updateBorders.get_Right(), (size>0));
if (changed_destination) {
changed_destination.put_Right(new CBorder(updateBorders.get_Right()));
changed_destination.put_Right(new Asc.asc_CTextBorder(updateBorders.get_Right()));
}
}
if ( ct.row==0 && border.indexOf('t') > -1 ) {
this._UpdateBorderStyle(updateBorders.get_Top(), (size>0));
if (changed_destination) {
changed_destination.put_Top(new CBorder(updateBorders.get_Top()));
changed_destination.put_Top(new Asc.asc_CTextBorder(updateBorders.get_Top()));
}
}
if ( ct.row== this.tableStylerRows-1 && border.indexOf('b') > -1 ) {
this._UpdateBorderStyle(updateBorders.get_Bottom(), (size>0));
if (changed_destination) {
changed_destination.put_Bottom(new CBorder(updateBorders.get_Bottom()));
changed_destination.put_Bottom(new Asc.asc_CTextBorder(updateBorders.get_Bottom()));
}
}
if ( ct.col==0 && border.indexOf('r') > -1 || ct.col== this.tableStylerColumns-1 && border.indexOf('l') > -1) {
this._UpdateBorderStyle(updateBorders.get_InsideV(), (size>0));
if (changed_destination) {
changed_destination.put_InsideV(new CBorder(updateBorders.get_InsideV()));
changed_destination.put_InsideV(new Asc.asc_CTextBorder(updateBorders.get_InsideV()));
}
}
if ( ct.row==0 && border.indexOf('b') > -1 || ct.row== this.tableStylerRows-1 && border.indexOf('t') > -1) {
this._UpdateBorderStyle(updateBorders.get_InsideH(), (size>0));
if (changed_destination) {
changed_destination.put_InsideH(new CBorder(updateBorders.get_InsideH()));
changed_destination.put_InsideH(new Asc.asc_CTextBorder(updateBorders.get_InsideH()));
}
}
},
@ -2013,25 +2013,25 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (border.indexOf('l') > -1) {
this._UpdateBorderStyle(updateBorders.get_Left(), (size>0));
if (changed_destination) {
changed_destination.put_Left(new CBorder(updateBorders.get_Left()));
changed_destination.put_Left(new Asc.asc_CTextBorder(updateBorders.get_Left()));
}
}
if (border.indexOf('t') > -1) {
this._UpdateBorderStyle(updateBorders.get_Top(), (size>0));
if (changed_destination) {
changed_destination.put_Top(new CBorder(updateBorders.get_Top()));
changed_destination.put_Top(new Asc.asc_CTextBorder(updateBorders.get_Top()));
}
}
if (border.indexOf('r') > -1) {
this._UpdateBorderStyle(updateBorders.get_Right(), (size>0));
if (changed_destination) {
changed_destination.put_Right(new CBorder(updateBorders.get_Right()));
changed_destination.put_Right(new Asc.asc_CTextBorder(updateBorders.get_Right()));
}
}
if (border.indexOf('b') > -1) {
this._UpdateBorderStyle(updateBorders.get_Bottom(), (size>0));
if (changed_destination) {
changed_destination.put_Bottom(new CBorder(updateBorders.get_Bottom()));
changed_destination.put_Bottom(new Asc.asc_CTextBorder(updateBorders.get_Bottom()));
}
}
},
@ -2047,7 +2047,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
border.put_Color(color);
}
else {
border.put_Color(new CAscColor());
border.put_Color(new Asc.asc_CColor());
border.put_Value(0);
}
return border.get_Value();

View file

@ -418,10 +418,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -431,10 +431,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -461,8 +461,8 @@ define([
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.asc_putFill(fill);
@ -479,15 +479,15 @@ define([
this.ShapeColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -506,8 +506,8 @@ define([
this.sldrTransparency.setValue(field.getNumberValue(), true);
if (this.api) {
var num = field.getNumberValue();
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(num * 2.55);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -537,8 +537,8 @@ define([
_transparencyApplyFunc: function() {
if (this._sliderChanged!==undefined) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(this._sliderChanged * 2.55);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -572,10 +572,10 @@ define([
}
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -610,10 +610,10 @@ define([
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
fill.get_fill().put_linear_scale(true);
@ -633,10 +633,10 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(color) == 'object') ? color.color : color));
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
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])]);
@ -676,10 +676,10 @@ define([
_gradientApplyFunc: function() {
if (this._sliderChanged) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
@ -703,8 +703,8 @@ define([
this.BorderSize = value;
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
@ -754,8 +754,8 @@ define([
this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color};
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
@ -772,8 +772,8 @@ define([
ChangeSettings: function(props) {
if (this.imgprops==null) {
this.imgprops = new CImgProperty();
this.imgprops.put_ShapeProperties(new CAscShapeProp());
this.imgprops = new Asc.asc_CImgProperty();
this.imgprops.put_ShapeProperties(new Asc.asc_CShapeProperty());
this.shapeprops = this.imgprops.get_ShapeProperties();
} else
this.imgprops.put_ImageUrl(null);
@ -1078,7 +1078,7 @@ define([
onTextArtSelect: function(combo, record){
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var props = new Asc.asc_TextArtProperties();
props.asc_putStyle(record.get('data'));
this.shapeprops.put_TextArtProperties(props);
this.api.ImgApply(this.imgprops);
@ -1111,7 +1111,7 @@ define([
onTransformSelect: function(combo, record){
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var props = new Asc.asc_TextArtProperties();
props.asc_putForm(record.get('type'));
this.shapeprops.put_TextArtProperties(props);
this.api.ImgApply(this.imgprops);

View file

@ -241,18 +241,18 @@
<script type="text/javascript" src="../../../../sdkjs/common/browser.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/commonDefines.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/editorscommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/downloaderfiles.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/docscoapicommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/docscoapi.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/apiCommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/editorscommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/spellcheckapi.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/wordcopypaste.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/spellCheckLanguage.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/spellCheckLanguagesAll.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/apiCommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/apiDefines.js"></script>
<!-- For chart editor -->

View file

@ -108,13 +108,13 @@ Ext.define('DE.controller.Main', {
if ( data.doc ) {
this.permissions = data.doc.permissions;
var _user = new CUserInfo();
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.editorConfig.user.id);
_user.put_FirstName(this.editorConfig.user.firstname);
_user.put_LastName(this.editorConfig.user.lastname);
_user.put_FullName(this.editorConfig.user.fullname);
var docInfo = new CDocInfo();
var docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(data.doc.key);
docInfo.put_Url(data.doc.url);
docInfo.put_Title(data.doc.title);

View file

@ -85,7 +85,7 @@ Ext.define('DE.controller.tablet.panel.Insert', {
mpImg.imageLoadListeners.push(function() {
var canvas = document.createElement('canvas'),
imgProperty = new CImgProperty();
imgProperty = new Asc.asc_CImgProperty();
mpImg.render(canvas, { maxWidth: 1024, maxHeight: 1024 });
imgProperty.put_WrappingStyle((input == inputInlineMedia) ? Asc.c_oAscWrapStyle2.Inline : Asc.c_oAscWrapStyle2.Square);

View file

@ -171,7 +171,7 @@ Ext.define('DE.controller.tablet.panel.TextColor', {
textColorList.select(record);
var color = record.get('color'),
ascColor = new CAscColor();
ascColor = new Asc.asc_CColor();
ascColor.put_r(parseInt((color[0] + color[1]), 16));
ascColor.put_g(parseInt((color[2] + color[3]), 16));

View file

@ -168,7 +168,7 @@ var ApplicationController = new(function(){
if (docConfig) {
permissions = $.extend(permissions, docConfig.permissions);
var docInfo = new CDocInfo();
var docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(docConfig.key);
docInfo.put_Url(docConfig.url);
docInfo.put_Title(docConfig.title);

View file

@ -247,13 +247,13 @@ define([
if (data.doc) {
this.permissions = $.extend(this.permissions, data.doc.permissions);
var _user = new CUserInfo();
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id);
_user.put_FirstName(this.appOptions.user.firstname);
_user.put_LastName(this.appOptions.user.lastname);
_user.put_FullName(this.appOptions.user.fullname);
docInfo = new CDocInfo();
docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(data.doc.key);
docInfo.put_Url(data.doc.url);
docInfo.put_Title(data.doc.title);
@ -774,7 +774,7 @@ define([
translateChart.asc_setSeries(this.txtSeries);
this.api.asc_setChartTranslate(translateChart);
var translateArt = new asc_TextArtTranslate();
var translateArt = new Asc.asc_TextArtTranslate();
translateArt.asc_setDefaultText(this.txtArt);
this.api.asc_setTextArtTranslate(translateArt);
}

View file

@ -1510,7 +1510,7 @@ define([
menu : (function(){
function onItemClick(item) {
if (me.api) {
var properties = new CAscShapeProp();
var properties = new Asc.asc_CShapeProperty();
properties.put_VerticalTextAlign(item.value);
me.api.ShapeApply(properties);
@ -1548,7 +1548,7 @@ define([
var paragraphDirection = function(item, e) {
if (me.api) {
var properties = new CAscShapeProp();
var properties = new Asc.asc_CShapeProperty();
properties.put_Vert(item.options.direction);
me.api.ShapeApply(properties);
}
@ -1600,7 +1600,7 @@ define([
var originalImageSize = me.api.get_OriginalSizeImage();
if (originalImageSize) {
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Width(originalImageSize.get_ImageWidth());
properties.put_Height(originalImageSize.get_ImageHeight());

View file

@ -142,7 +142,7 @@ define([
this.disableControls(this._locked);
if (props ){
this._originalProps = new CImgProperty(props);
this._originalProps = new Asc.asc_CImgProperty(props);
var value = props.get_Width();
if ( Math.abs(this._state.Width-value)>0.001 ) {
@ -169,7 +169,7 @@ define([
this.labelWidth[0].innerHTML = this.textWidth + ': ' + Common.Utils.Metric.fnRecalcFromMM(w).toFixed(1) + ' ' + Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()];
this.labelHeight[0].innerHTML = this.textHeight + ': ' + Common.Utils.Metric.fnRecalcFromMM(h).toFixed(1) + ' ' + Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()];
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
properties.put_Width(w);
properties.put_Height(h);
this.api.ImgApply(properties);
@ -185,7 +185,7 @@ define([
if (me.api) {
var checkUrl = value.replace(/ /g, '');
if (!_.isEmpty(checkUrl)) {
var props = new CImgProperty();
var props = new Asc.asc_CImgProperty();
props.put_ImageUrl(checkUrl);
me.api.ImgApply(props);
}

View file

@ -213,7 +213,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
getSettings: function() {
Common.localStorage.setItem("pe-settings-imageratio", (this.btnRatio.pressed) ? 1 : 0);
var properties = new CImgProperty();
var properties = new Asc.asc_CImgProperty();
if (this.spnHeight.getValue()!=='')
properties.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue()));
if (this.spnWidth.getValue()!=='')

View file

@ -75,7 +75,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.spinners = [];
this.api = this.options.api;
this._originalProps = new CParagraphProp(this.options.paragraphProps);
this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps);
},
render: function() {
@ -98,7 +98,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.numFirstLine.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
this._changedProps.put_Ind(new CParagraphInd());
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
this._changedProps.get_Ind().put_FirstLine(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -118,7 +118,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
var numval = field.getNumberValue();
if (this._changedProps) {
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
this._changedProps.put_Ind(new CParagraphInd());
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
this._changedProps.get_Ind().put_Left(Common.Utils.Metric.fnRecalcToMM(numval));
}
this.numFirstLine.setMinValue(-numval);
@ -140,7 +140,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.numIndentsRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined)
this._changedProps.put_Ind(new CParagraphInd());
this._changedProps.put_Ind(new Asc.asc_CParagraphInd());
this._changedProps.get_Ind().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -199,7 +199,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this._changedProps.put_TextSpacing(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_TextSpacing(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
}
@ -292,9 +292,9 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
getSettings: function() {
if ( this._tabListChanged ) {
if (this._changedProps.get_Tabs()===null || this._changedProps.get_Tabs()===undefined)
this._changedProps.put_Tabs(new CParagraphTabs());
this._changedProps.put_Tabs(new Asc.asc_CParagraphTabs());
this.tabList.store.each(function (item, index) {
var tab = new CParagraphTab(Common.Utils.Metric.fnRecalcToMM(item.get('tabPos')), item.get('tabAlign'));
var tab = new Asc.asc_CParagraphTab(Common.Utils.Metric.fnRecalcToMM(item.get('tabPos')), item.get('tabAlign'));
this._changedProps.get_Tabs().add_Tab(tab);
}, this);
}
@ -303,7 +303,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
_setDefaults: function(props) {
if (props ){
this._originalProps = new CParagraphProp(props);
this._originalProps = new Asc.asc_CParagraphProperty(props);
this.numIndentsLeft.setValue((props.get_Ind() !== null && props.get_Ind().get_Left() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Left()) : '', true);
this.numFirstLine.setMinValue(-this.numIndentsLeft.getNumberValue());
@ -349,7 +349,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this._noApply = false;
this._changedProps = new CParagraphProp();
this._changedProps = new Asc.asc_CParagraphProperty();
}
},
@ -385,7 +385,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Strikeout(field.getValue()=='checked');
properties.put_DStrikeout(this.chDoubleStrike.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -405,7 +405,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_DStrikeout(field.getValue()=='checked');
properties.put_Strikeout(this.chStrike.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -425,7 +425,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Superscript(field.getValue()=='checked');
properties.put_Subscript(this.chSubscript.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -445,7 +445,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_Subscript(field.getValue()=='checked');
properties.put_Superscript(this.chSuperscript.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -465,7 +465,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_SmallCaps(field.getValue()=='checked');
properties.put_AllCaps(this.chAllCaps.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);
@ -485,7 +485,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
this.checkGroup = 0;
}
if (this.api && !this._noApply) {
var properties = (this._originalProps) ? this._originalProps : new CParagraphProp();
var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty();
properties.put_AllCaps(field.getValue()=='checked');
properties.put_SmallCaps(this.chSmallCaps.getValue()=='checked');
this.api.SetDrawImagePlaceParagraph('paragraphadv-font-img', properties);

View file

@ -581,10 +581,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.put_fill(fill);
this.api.ShapeApply(props);
@ -593,10 +593,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -625,10 +625,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
var fHexColor = Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color).get_color().get_hex();
@ -650,8 +650,8 @@ define([
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.put_fill(fill);
@ -667,15 +667,15 @@ define([
this.ShapeColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -692,10 +692,10 @@ define([
onPatternSelect: function(combo, record){
if (this.api && !this._noApply) {
this.PatternFillType = record.get('type');
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -711,10 +711,10 @@ define([
this.btnFGColor.setColor(color);
this.FGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -730,10 +730,10 @@ define([
this.btnBGColor.setColor(color);
this.BGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -749,10 +749,10 @@ define([
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -766,8 +766,8 @@ define([
this.sldrTransparency.setValue(field.getNumberValue(), true);
if (this.api) {
var num = field.getNumberValue();
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(num * 2.55);
props.put_fill(fill);
this.api.ShapeApply(props);
@ -796,8 +796,8 @@ define([
_transparencyApplyFunc: function() {
if (this._sliderChanged!==undefined) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(this._sliderChanged * 2.55);
props.put_fill(fill);
this.api.ShapeApply(props);
@ -830,10 +830,10 @@ define([
}
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -867,10 +867,10 @@ define([
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
fill.get_fill().put_linear_scale(true);
@ -889,10 +889,10 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(color) == 'object') ? color.color : color));
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
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])]);
@ -931,10 +931,10 @@ define([
_gradientApplyFunc: function() {
if (this._sliderChanged) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
@ -957,8 +957,8 @@ define([
this.BorderSize = value;
if (this.api && !this._noApply) {
var props = new CAscShapeProp();
var stroke = new CAscStroke();
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
@ -1007,8 +1007,8 @@ define([
this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color};
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new CAscShapeProp();
var stroke = new CAscStroke();
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
@ -1031,10 +1031,10 @@ define([
var checkUrl = value.replace(/ /g, '');
if (!_.isEmpty(checkUrl)) {
if (me.BlipFillType !== null) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -1523,10 +1523,10 @@ define([
this._fromTextureCmb = false;
if (this.api) {
var props = new CAscShapeProp();
var fill = new CAscFill();
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.put_fill(fill);

View file

@ -164,7 +164,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.spnMarginTop.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_paddings()===null || this._changedProps.get_paddings()===undefined)
this._changedProps.put_paddings(new CPaddings());
this._changedProps.put_paddings(new Asc.asc_CPaddings());
this._changedProps.get_paddings().put_Top(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -182,7 +182,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.spnMarginBottom.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_paddings()===null || this._changedProps.get_paddings()===undefined)
this._changedProps.put_paddings(new CPaddings());
this._changedProps.put_paddings(new Asc.asc_CPaddings());
this._changedProps.get_paddings().put_Bottom(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -200,7 +200,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.spnMarginLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_paddings()===null || this._changedProps.get_paddings()===undefined)
this._changedProps.put_paddings(new CPaddings());
this._changedProps.put_paddings(new Asc.asc_CPaddings());
this._changedProps.get_paddings().put_Left(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -218,7 +218,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.spnMarginRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.get_paddings()===null || this._changedProps.get_paddings()===undefined)
this._changedProps.put_paddings(new CPaddings());
this._changedProps.put_paddings(new Asc.asc_CPaddings());
this._changedProps.get_paddings().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
}
}, this));
@ -242,7 +242,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.cmbCapType.on('selected', _.bind(function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
this._changedProps.put_stroke(new CAscStroke());
this._changedProps.put_stroke(new Asc.asc_CStroke());
this._changedProps.get_stroke().put_linecap(record.value);
}
@ -264,7 +264,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.cmbJoinType.on('selected', _.bind(function(combo, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
this._changedProps.put_stroke(new CAscStroke());
this._changedProps.put_stroke(new Asc.asc_CStroke());
this._changedProps.get_stroke().put_linejoin(record.value);
}
@ -442,7 +442,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
}
this.btnsCategory[2].setDisabled(null === margins); // Margins
this._changedProps = new CAscShapeProp();
this._changedProps = new Asc.asc_CShapeProperty();
}
},
@ -568,7 +568,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
onSelectBeginStyle: function(picker, view, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
this._changedProps.put_stroke(new CAscStroke());
this._changedProps.put_stroke(new Asc.asc_CStroke());
this._changedProps.get_stroke().put_linebeginstyle(record.get('type'));
}
@ -581,7 +581,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
onSelectBeginSize: function(picker, view, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
this._changedProps.put_stroke(new CAscStroke());
this._changedProps.put_stroke(new Asc.asc_CStroke());
this._changedProps.get_stroke().put_linebeginsize(record.get('type'));
}
@ -592,7 +592,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
onSelectEndStyle: function(picker, view, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
this._changedProps.put_stroke(new CAscStroke());
this._changedProps.put_stroke(new Asc.asc_CStroke());
this._changedProps.get_stroke().put_lineendstyle(record.get('type'));
}
@ -605,7 +605,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
onSelectEndSize: function(picker, view, record){
if (this._changedProps) {
if (this._changedProps.get_stroke()===null)
this._changedProps.put_stroke(new CAscStroke());
this._changedProps.put_stroke(new Asc.asc_CStroke());
this._changedProps.get_stroke().put_lineendsize(record.get('type'));
}

View file

@ -578,9 +578,9 @@ define([
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.SlideColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.SlideColor.Color));
props.put_background(fill);
this.api.SetSlideProps(props);
@ -590,9 +590,9 @@ define([
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -622,9 +622,9 @@ define([
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
var fHexColor = Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color).get_color().get_hex();
@ -646,7 +646,7 @@ define([
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.put_background(fill);
@ -663,14 +663,14 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
if (this.SlideColor.Color=='transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.SlideColor.Color));
}
@ -688,9 +688,9 @@ define([
if (this.api && !this._noApply) {
this.PatternFillType = record.get('type');
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -707,9 +707,9 @@ define([
this.FGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -726,9 +726,9 @@ define([
this.BGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -745,9 +745,9 @@ define([
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -783,9 +783,9 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -820,9 +820,9 @@ define([
if (this.api) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
fill.get_fill().put_linear_scale(true);
@ -842,9 +842,9 @@ define([
if (this.api && !this._noApply) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
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])]);
@ -884,9 +884,9 @@ define([
_gradientApplyFunc: function() {
if (this._sliderChanged) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
@ -913,9 +913,9 @@ define([
if (!_.isEmpty(checkUrl)) {
if (me.BlipFillType !== null) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -997,9 +997,9 @@ define([
if (this.api) {
var props = new Asc.CAscSlideProps();
var fill = new CAscFill();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.put_background(fill);

View file

@ -571,39 +571,39 @@ define([
if (border.indexOf('l') > -1 || !visible) {
if (updateBorders.get_Left()===null || updateBorders.get_Left()===undefined)
updateBorders.put_Left(new CBorder());
updateBorders.put_Left(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Left(), visible);
}
if (border.indexOf('t') > -1 || !visible) {
if (updateBorders.get_Top()===null || updateBorders.get_Top()===undefined)
updateBorders.put_Top(new CBorder());
updateBorders.put_Top(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Top(), visible);
}
if (border.indexOf('r') > -1 || !visible) {
if (updateBorders.get_Right()===null || updateBorders.get_Right()===undefined)
updateBorders.put_Right(new CBorder());
updateBorders.put_Right(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Right(), visible);
}
if (border.indexOf('b') > -1 || !visible) {
if (updateBorders.get_Bottom()===null || updateBorders.get_Bottom()===undefined)
updateBorders.put_Bottom(new CBorder());
updateBorders.put_Bottom(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_Bottom(), visible);
}
if (border.indexOf('c') > -1 || !visible) {
if (updateBorders.get_InsideV()===null || updateBorders.get_InsideV()===undefined)
updateBorders.put_InsideV(new CBorder());
updateBorders.put_InsideV(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_InsideV(), visible);
}
if (border.indexOf('m') > -1 || !visible) {
if (updateBorders.get_InsideH()===null || updateBorders.get_InsideH()===undefined)
updateBorders.put_InsideH(new CBorder());
updateBorders.put_InsideH(new Asc.asc_CTextBorder());
this._UpdateBorderStyle (updateBorders.get_InsideH(), visible);
}
},
_UpdateBorderStyle: function(border, visible) {
if (null == border)
border = new CBorder();
border = new Asc.asc_CTextBorder();
if (visible && this.BorderSize > 0){
var size = parseFloat(this.BorderSize);

View file

@ -118,7 +118,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Top');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Top((this.TableMargins.Top!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Top) : null);
this.TableMargins.isChanged = true;
}
@ -138,7 +138,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Bottom');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Bottom((this.TableMargins.Bottom!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Bottom) : null);
this.TableMargins.isChanged = true;
}
@ -158,7 +158,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Left');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Left((this.TableMargins.Left!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Left) : null);
this.TableMargins.isChanged = true;
}
@ -178,7 +178,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this._marginsChange( field, newValue, oldValue, eOpts, 'table', 'Right');
if (this._changedProps) {
if (this._changedProps.get_DefaultMargins()===undefined)
this._changedProps.put_DefaultMargins(new CPaddings());
this._changedProps.put_DefaultMargins(new Asc.asc_CPaddings());
this._changedProps.get_DefaultMargins().put_Right((this.TableMargins.Right!==null) ? Common.Utils.Metric.fnRecalcToMM(this.TableMargins.Right) : null);
this.TableMargins.isChanged = true;
}

View file

@ -596,10 +596,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor((this.ShapeColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.ShapeColor.Color));
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -609,10 +609,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -642,10 +642,10 @@ define([
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
var fHexColor = Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color).get_color().get_hex();
@ -667,8 +667,8 @@ define([
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
props.asc_putFill(fill);
@ -685,15 +685,15 @@ define([
this.ShapeColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
if (this.ShapeColor.Color=='transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill( new CAscFillSolid());
fill.put_fill( new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(this.ShapeColor.Color));
}
@ -711,10 +711,10 @@ define([
onPatternSelect: function(combo, record){
if (this.api && !this._noApply) {
this.PatternFillType = record.get('type');
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_pattern_type(this.PatternFillType);
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -731,10 +731,10 @@ define([
this.btnFGColor.setColor(color);
this.FGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
@ -751,10 +751,10 @@ define([
this.btnBGColor.setColor(color);
this.BGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_PATT);
fill.put_fill( new CAscFillHatch());
fill.put_fill( new Asc.asc_CFillHatch());
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_PATT) {
fill.get_fill().put_pattern_type(this.PatternFillType);
fill.get_fill().put_color_fg(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
@ -771,10 +771,10 @@ define([
this.BlipFillType = record.value;
if (this.api && this._fromTextureCmb !== true && this.OriginalFillType == Asc.c_oAscFill.FILL_TYPE_BLIP) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(this.BlipFillType);
@ -789,8 +789,8 @@ define([
this.sldrTransparency.setValue(field.getNumberValue(), true);
if (this.api) {
var num = field.getNumberValue();
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(num * 2.55);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -820,8 +820,8 @@ define([
_transparencyApplyFunc: function() {
if (this._sliderChanged!==undefined) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_transparent(this._sliderChanged * 2.55);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
@ -855,10 +855,10 @@ define([
}
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
@ -893,10 +893,10 @@ define([
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_linear_angle(rawData.type * 60000);
fill.get_fill().put_linear_scale(true);
@ -916,10 +916,10 @@ define([
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(color) == 'object') ? color.color : color));
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
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])]);
@ -959,10 +959,10 @@ define([
_gradientApplyFunc: function() {
if (this._sliderChanged) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
fill.put_fill( new CAscFillGrad());
fill.put_fill( new Asc.asc_CFillGrad());
fill.get_fill().put_grad_type(this.GradFillType);
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
@ -986,8 +986,8 @@ define([
this.BorderSize = value;
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
this._state.StrokeType = this._state.StrokeWidth = -1;
@ -1037,8 +1037,8 @@ define([
this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color};
if (this.api && this.BorderSize>0 && !this._noApply) {
var props = new asc_TextArtProperties();
var stroke = new CAscStroke();
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
@ -1062,10 +1062,10 @@ define([
var checkUrl = value.replace(/ /g, '');
if (!_.isEmpty(checkUrl)) {
if (me.BlipFillType !== null) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(me.BlipFillType);
fill.get_fill().put_url(checkUrl);
@ -1083,7 +1083,7 @@ define([
ChangeSettings: function(props) {
if (this.shapeprops==null) {
this.shapeprops = new CAscShapeProp();
this.shapeprops = new Asc.asc_CShapeProperty();
}
if (this._initSettings)
@ -1530,10 +1530,10 @@ define([
this._fromTextureCmb = false;
if (this.api) {
var props = new asc_TextArtProperties();
var fill = new CAscFill();
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new CAscFillBlip());
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(record.get('type'));
props.asc_putFill(fill);
@ -1562,7 +1562,7 @@ define([
onTextArtSelect: function(combo, record){
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var props = new Asc.asc_TextArtProperties();
props.asc_putStyle(record.get('data'));
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);
@ -1595,7 +1595,7 @@ define([
onTransformSelect: function(combo, record){
if (this.api && !this._noApply) {
var props = new asc_TextArtProperties();
var props = new Asc.asc_TextArtProperties();
props.asc_putForm(record.get('type'));
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);

View file

@ -244,10 +244,10 @@
<script type="text/javascript" src="../../../../sdkjs/common/downloaderfiles.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/docscoapicommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/docscoapi.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/apiCommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/editorscommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/apiCommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/apiDefines.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/wordcopypaste.js"></script>

View file

@ -109,13 +109,13 @@ Ext.define('PE.controller.Main', {
if (data.doc) {
this.permissions = data.doc.permissions;
var _user = new CUserInfo();
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.editorConfig.user.id);
_user.put_FirstName(this.editorConfig.user.firstname);
_user.put_LastName(this.editorConfig.user.lastname);
_user.put_FullName(this.editorConfig.user.fullname);
var docInfo = new CDocInfo();
var docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(data.doc.key);
docInfo.put_Url(data.doc.url);
docInfo.put_Title(data.doc.title);

View file

@ -160,7 +160,7 @@ var ApplicationController = new(function(){
if (docConfig) {
permissions = $.extend(permissions, docConfig.permissions);
var docInfo = new CDocInfo();
var docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(docConfig.key);
docInfo.put_Url(docConfig.url);
docInfo.put_Title(docConfig.title);

View file

@ -284,13 +284,13 @@ define([
if (data.doc) {
this.permissions = _.extend(this.permissions, data.doc.permissions);
var _user = new CUserInfo();
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id);
_user.put_FirstName(this.appOptions.user.firstname);
_user.put_LastName(this.appOptions.user.lastname);
_user.put_FullName(this.appOptions.user.fullname);
docInfo = new CDocInfo();
docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(data.doc.key);
docInfo.put_Url(data.doc.url);
docInfo.put_Title(data.doc.title);

View file

@ -247,12 +247,12 @@
<script type="text/javascript" src="../../../../sdkjs/common/downloaderfiles.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/docscoapicommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/docscoapi.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/apiCommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/editorscommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/scroll.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/apiCommon.js"></script>
<script type="text/javascript" src="../../../../sdkjs/cell/apiDefines.js"></script>
<script type="text/javascript" src="../../../../sdkjs/common/Charts/DrawingArea.js"></script>

View file

@ -108,13 +108,13 @@ Ext.define('SSE.controller.Main', {
if (data.doc) {
this.permissions = data.doc.permissions;
var _user = new CUserInfo();
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.editorConfig.user.id);
_user.put_FirstName(this.editorConfig.user.firstname);
_user.put_LastName(this.editorConfig.user.lastname);
_user.put_FullName(this.editorConfig.user.fullname);
docInfo = new CDocInfo();
docInfo = new Asc.asc_CDocInfo();
docInfo.put_Id(data.doc.key);
docInfo.put_Url(data.doc.url);
docInfo.put_Title(data.doc.title);