Commit 720ed1f7 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48600 954022d7-b5bf-4e40-9824-e11837661b57
parent 01dc7c71
...@@ -648,222 +648,234 @@ DrawingObjectsController.prototype = ...@@ -648,222 +648,234 @@ DrawingObjectsController.prototype =
getGraphicObjectProps: function() getGraphicObjectProps: function()
{ {
var shape_props, image_props, chart_props; var shape_props, image_props, chart_props;
switch (this.curState.id) if(isRealObject(this.curState.group))
{ {
/*case STATES_ID_GROUP: var selected_objects = this.curState.group.selectedObjects;
case STATES_ID_TEXT_ADD_IN_GROUP: for(var i = 0; i< selected_objects.length; ++i)
{ {
var s_array = this.curState.group.selectionInfo.selectionArray; var c_obj = selected_objects[i];
for(var i = 0; i< s_array.length; ++i) if(c_obj.isImage())
{ {
var c_obj = s_array[i]; if(!isRealObject(image_props))
if(c_obj.isImage() && c_obj.chart == null) {
image_props = new asc_CImgProperty();
image_props.fromGroup = true;
image_props.ImageUrl = c_obj.getImageUrl();
}
else
{
if(image_props.ImageUrl != null && c_obj.getImageUrl() !== image_props.ImageUrl)
image_props.ImageUrl = null;
}
}
if(c_obj.isChart())
{
if(!isRealObject(chart_props))
{
chart_props = new asc_CImgProperty();
chart_props.fromGroup = true;
chart_props.ChartProperties = c_obj.chart;
}
else
{ {
if(!isRealObject(image_props)) chart_props.chart = null;
chart_props.severalCharts = true;
if(chart_props.severalChartTypes !== true)
{ {
image_props = {fromGroup: true}; if(!(chart_props.ChartProperties.type === c_obj.chart.type && chart_props.ChartProperties.subType === c_obj.chart.subType) )
image_props.ImageUrl = c_obj.getImageUrl(); chart_props.severalChartTypes = true;
} }
else if(chart_props.severalChartStyles !== true)
{ {
if(image_props.ImageUrl != null && c_obj.getImageUrl() !== image_props.ImageUrl) if(chart_props.ChartProperties.styleId !== c_obj.chart.styleId )
image_props.ImageUrl = null; chart_props.severalChartStyles = true;
} }
} }
if(c_obj.isImage() && isRealObject(c_obj.chart)) }
if(c_obj.isShape())
{
if(!isRealObject(shape_props))
{
shape_props = new asc_CImgProperty();
shape_props.fromGroup = true;
shape_props.ShapeProperties = new asc_CShapeProperty();
shape_props.ShapeProperties.type = c_obj.getPresetGeom();
shape_props.ShapeProperties.fill = c_obj.getFill();
shape_props.ShapeProperties.stroke = c_obj.getStroke();
shape_props.ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
shape_props.verticalTextAlign = isRealObject(c_obj.txBody) ? c_obj.txBody.getBodyPr().anchor : null;
}
else
{ {
if(!isRealObject(chart_props)) var ShapeProperties =
{ {
chart_props = {fromGroup: true}; type: c_obj.getPresetGeom(),
chart_props.ChartProperties = c_obj.chart; fill: c_obj.getFill(),
stroke: c_obj.getStroke(),
canChangeArrows: c_obj.canChangeArrows()
};
shape_props.ShapeProperties = CompareShapeProperties(ShapeProperties, shape_props.ShapeProperties);
shape_props.verticalTextAlign = undefined;
}
}
}
}
else
{
var s_arr = this.selectedObjects;
for(i = 0; i < s_arr.length; ++i)
{
c_obj = s_arr[i];
if (isRealObject(c_obj))
{
if (c_obj.isShape())
{
if (!isRealObject(shape_props))
{
shape_props = {};
shape_props = c_obj.Get_Props(null);
shape_props.ShapeProperties = new asc_CShapeProperty();
shape_props.ShapeProperties.type = c_obj.getPresetGeom();
shape_props.ShapeProperties.fill = c_obj.getFill();
shape_props.ShapeProperties.stroke = c_obj.getStroke();
shape_props.ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
shape_props.verticalTextAlign = isRealObject(c_obj.txBody) ? c_obj.txBody.getBodyPr().anchor : null;
} }
else else
{ {
chart_props.chart = null; ShapeProperties = new asc_CShapeProperty();
chart_props.severalCharts = true; ShapeProperties.type = c_obj.getPresetGeom();
if(chart_props.severalChartTypes !== true) ShapeProperties.fill = c_obj.getFill();
{ ShapeProperties.stroke = c_obj.getStroke();
if(!(chart_props.ChartProperties.type === c_obj.chart.type && chart_props.ChartProperties.subType === c_obj.chart.subType) ) ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
chart_props.severalChartTypes = true;
} shape_props = c_obj.Get_Props(shape_props);
if(chart_props.severalChartStyles !== true) shape_props.ShapeProperties = CompareShapeProperties(ShapeProperties, shape_props.ShapeProperties);
{ shape_props.verticalTextAlign = undefined;
if(chart_props.ChartProperties.styleId !== c_obj.chart.styleId )
chart_props.severalChartStyles = true;
}
} }
} }
if(c_obj.isShape()) if (c_obj.isImage())
{ {
if(!isRealObject(shape_props)) if (!isRealObject(image_props))
{ {
shape_props = {fromGroup: true}; image_props = new asc_CImgProperty();
shape_props.ShapeProperties = image_props.Width = c_obj.extX;
{ image_props.Height = c_obj.extY;
type: c_obj.getPresetGeom(), image_props.ImageUrl = c_obj.getImageUrl();
fill: c_obj.getFill(),
stroke: c_obj.getStroke(),
canChangeArrows: c_obj.canChangeArrows()
};
shape_props.verticalTextAlign = c_obj.bodyPr.anchor;
} }
else else
{ {
var ShapeProperties = image_props = c_obj.Get_Props(image_props);
{ if (image_props.ImageUrl != null && c_obj.getImageUrl() !== image_props.ImageUrl)
type: c_obj.getPresetGeom(), image_props.ImageUrl = null;
fill: c_obj.getFill(),
stroke: c_obj.getStroke(),
canChangeArrows: c_obj.canChangeArrows()
};
shape_props.ShapeProperties = CompareShapeProperties(ShapeProperties, shape_props.ShapeProperties);
shape_props.verticalTextAlign = undefined;
} }
} }
} if (c_obj.isChart())
break;
}*/
default :
{
var s_arr = this.selectedObjects;
for(i = 0; i < s_arr.length; ++i)
{
c_obj = s_arr[i];
if (isRealObject(c_obj))
{ {
if (c_obj.isShape()) if (!isRealObject(chart_props))
{ {
if (!isRealObject(shape_props)) chart_props = new asc_CImgProperty();
{ chart_props.Width = c_obj.extX;
shape_props = {}; chart_props.Height = c_obj.extY;
shape_props = c_obj.Get_Props(null); chart_props.ChartProperties = c_obj.chart;
shape_props.ShapeProperties = new asc_CShapeProperty();
shape_props.ShapeProperties.type = c_obj.getPresetGeom();
shape_props.ShapeProperties.fill = c_obj.getFill();
shape_props.ShapeProperties.stroke = c_obj.getStroke();
shape_props.ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
//shape_props.verticalTextAlign = c_obj.bodyPr.anchor;
}
else
{
/* TODO
ShapeProperties = new asc_CShapeProperty();
ShapeProperties.type = c_obj.getPresetGeom();
ShapeProperties.fill = c_obj.getFill();
ShapeProperties.stroke = c_obj.getStroke();
ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
shape_props = c_obj.Get_Props(shape_props);
shape_props.ShapeProperties = CompareShapeProperties(ShapeProperties, shape_props.ShapeProperties);
shape_props.verticalTextAlign = undefined;
*/
}
} }
if (c_obj.isImage()) }
if (c_obj.isGroup())
{
var shape_props2 = c_obj.getShapeProps();
var image_props2 = c_obj.getImageProps2();
var chart_props2 = c_obj.getChartProps();
if(isRealObject(shape_props2))
{ {
if (!isRealObject(image_props)) if (!isRealObject(shape_props))
{ {
image_props = new asc_CImgProperty; shape_props = {};
image_props.Width = c_obj.extX; shape_props = s_arr[i].Get_Props(null);
image_props.Height = c_obj.extY; shape_props.ShapeProperties = shape_props2.ShapeProperties;
image_props.ImageUrl = c_obj.getImageUrl();
} }
else else
{ {
/* TODO shape_props = s_arr[i].Get_Props(shape_props);
image_props = c_obj.Get_Props(image_props); shape_props.ShapeProperties = CompareShapeProperties(shape_props2.ShapeProperties, shape_props.ShapeProperties);
if (image_props.ImageUrl != null && c_obj.getImageUrl() !== image_props.ImageUrl)
image_props.ImageUrl = null;
*/
} }
} }
if (c_obj.isChart())
{
if (!isRealObject(chart_props))
{
chart_props = new asc_CImgProperty;
chart_props.Width = c_obj.extX;
chart_props.Height = c_obj.extY;
chart_props.ChartProperties = c_obj.chart;
}
}
/*if (c_obj.isGroup())
{
var shape_props2 = c_obj.getShapeProps();
var image_props2 = c_obj.getImageProps2();
var chart_props2 = c_obj.getChartProps();
if(isRealObject(shape_props2))
{
if (!isRealObject(shape_props))
{
shape_props = {};
shape_props = s_arr[i].Get_Props(null);
shape_props.ShapeProperties = shape_props2.ShapeProperties;
}
else
{
shape_props = s_arr[i].Get_Props(shape_props);
shape_props.ShapeProperties = CompareShapeProperties(shape_props2.ShapeProperties, shape_props.ShapeProperties);
}
}
if (isRealObject(image_props2)) if (c_obj.isGroup())
{ {
if(!isRealObject(image_props)) var shape_props2 = c_obj.getShapeProps();
{ var image_props2 = c_obj.getImageProps2();
image_props = {}; var chart_props2 = c_obj.getChartProps();
image_props = s_arr[i].Get_Props(null); if(isRealObject(shape_props2))
image_props.ImageUrl = image_props2.ImageUrl; {
} if (!isRealObject(shape_props))
else {
{ shape_props = {};
image_props = s_arr[i].Get_Props(image_props); shape_props = s_arr[i].Get_Props(null);
if(image_props.ImageUrl != null && image_props2.ImageUrl !== image_props.ImageUrl) shape_props.ShapeProperties = shape_props2.ShapeProperties;
image_props.ImageUrl = null; }
} else
} {
if (isRealObject(chart_props2)) shape_props = s_arr[i].Get_Props(shape_props);
{ shape_props.ShapeProperties = CompareShapeProperties(shape_props2.ShapeProperties, shape_props.ShapeProperties);
if (!isRealObject(chart_props)) }
{ }
chart_props = {};
chart_props = s_arr[i].Get_Props(null); if (isRealObject(image_props2))
chart_props.ChartProperties = chart_props2.ChartProperties; {
chart_props.severalCharts = chart_props2.severalCharts; if(!isRealObject(image_props))
chart_props.severalChartTypes = chart_props2.severalChartTypes; {
chart_props.severalChartStyles = chart_props2.severalChartStyles; image_props = {};
} image_props = s_arr[i].Get_Props(null);
else image_props.ImageUrl = image_props2.ImageUrl;
{ }
chart_props = s_arr[i].Get_Props(chart_props); else
chart_props.severalCharts = true; {
if(chart_props.severalChartTypes !== true) image_props = s_arr[i].Get_Props(image_props);
{ if(image_props.ImageUrl != null && image_props2.ImageUrl !== image_props.ImageUrl)
if(chart_props2.severalChartTypes === true) image_props.ImageUrl = null;
}
}
if (isRealObject(chart_props2))
{
if (!isRealObject(chart_props))
{
chart_props = {};
chart_props = s_arr[i].Get_Props(null);
chart_props.ChartProperties = chart_props2.ChartProperties;
chart_props.severalCharts = chart_props2.severalCharts;
chart_props.severalChartTypes = chart_props2.severalChartTypes;
chart_props.severalChartStyles = chart_props2.severalChartStyles;
}
else
{
chart_props = s_arr[i].Get_Props(chart_props);
chart_props.severalCharts = true;
if(chart_props.severalChartTypes !== true)
{
if(chart_props2.severalChartTypes === true)
chart_props.severalChartTypes = true; chart_props.severalChartTypes = true;
else else
{ {
if(!(chart_props.ChartProperties.type === chart_props2.ChartProperties.type && chart_props.ChartProperties.subType === chart_props2.ChartProperties.subType) ) if(!(chart_props.ChartProperties.type === chart_props2.ChartProperties.type && chart_props.ChartProperties.subType === chart_props2.ChartProperties.subType) )
chart_props.severalChartTypes = true; chart_props.severalChartTypes = true;
if(chart_props.ChartProperties.subType !== chart_props2.ChartProperties.subType ) if(chart_props.ChartProperties.subType !== chart_props2.ChartProperties.subType )
chart_props.severalChartStyles = true; chart_props.severalChartStyles = true;
} }
} }
} }
} }
}*/ }
} }
} }
break;
} }
} }
var ret = []; var ret = [];
if (isRealObject(shape_props)) if (isRealObject(shape_props))
{ {
...@@ -874,8 +886,8 @@ DrawingObjectsController.prototype = ...@@ -874,8 +886,8 @@ DrawingObjectsController.prototype =
{ {
this.drawingObjects.drawingDocument.DrawImageTextureFillShape(pr.fill.fill.RasterImageId); this.drawingObjects.drawingDocument.DrawImageTextureFillShape(pr.fill.fill.RasterImageId);
} }
shape_props.ShapeProperties.fill = CreateAscFillEx(c_obj.getFill()); shape_props.ShapeProperties.fill = CreateAscFillEx(shape_props.ShapeProperties.fill);
shape_props.ShapeProperties.stroke = CreateAscStrokeEx(c_obj.getStroke()); shape_props.ShapeProperties.stroke = CreateAscStrokeEx(shape_props.ShapeProperties.stroke);
} }
ret.push(shape_props); ret.push(shape_props);
...@@ -897,10 +909,11 @@ DrawingObjectsController.prototype = ...@@ -897,10 +909,11 @@ DrawingObjectsController.prototype =
} }
return ascSelectedObjects; return ascSelectedObjects;
}, },
setGraphicObjectProps: function(props) setGraphicObjectProps: function(props)
{ {
History.Create_NewPoint();
var properties; var properties;
if ( (props instanceof asc_CImgProperty) && props.ShapeProperties) if ( (props instanceof asc_CImgProperty) && props.ShapeProperties)
properties = props.ShapeProperties; properties = props.ShapeProperties;
...@@ -981,19 +994,18 @@ DrawingObjectsController.prototype = ...@@ -981,19 +994,18 @@ DrawingObjectsController.prototype =
{ {
ArrGlyph[i].setTextVerticalAlign(props.verticalTextAlign); ArrGlyph[i].setTextVerticalAlign(props.verticalTextAlign);
} }
if(ArrGlyph[i].isChart() && isRealObject(props.ChartProperties))
{
ArrGlyph[i].chart = props.ChartProperties;
ArrGlyph[i].recalculate();
}
} }
} }
else if (this.curState.id === STATES_ID_GROUP || this.curState.id === STATES_ID_TEXT_ADD_IN_GROUP) else if (this.curState.id === STATES_ID_GROUP || this.curState.id === STATES_ID_TEXT_ADD_IN_GROUP)
{ {
if (false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : this.curState.group.parent.Parent, CheckType : changestype_Paragraph_Content} )) //if (false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : this.curState.group.parent.Parent, CheckType : changestype_Paragraph_Content} ))
{ {
if ( undefined != props.PositionH )
this.curState.group.parent.Set_PositionH( props.PositionH.RelativeFrom, props.PositionH.UseAlign, ( true === props.PositionH.UseAlign ? props.PositionH.Align : props.PositionH.Value ) );
if ( undefined != props.PositionV )
this.curState.group.parent.Set_PositionV( props.PositionV.RelativeFrom, props.PositionV.UseAlign, ( true === props.PositionV.UseAlign ? props.PositionV.Align : props.PositionV.Value ) );
ArrGlyph = this.curState.group.selectionInfo.selectionArray; ArrGlyph = this.curState.group.selectionInfo.selectionArray;
var b_change_diagram = false; var b_change_diagram = false;
for (i = 0; i< ArrGlyph.length; ++i) for (i = 0; i< ArrGlyph.length; ++i)
...@@ -1020,18 +1032,18 @@ DrawingObjectsController.prototype = ...@@ -1020,18 +1032,18 @@ DrawingObjectsController.prototype =
if (typeof props.verticalTextAlign === "number" && !isNaN(props.verticalTextAlign) && typeof ArrGlyph[i].setTextVerticalAlign === "function") if (typeof props.verticalTextAlign === "number" && !isNaN(props.verticalTextAlign) && typeof ArrGlyph[i].setTextVerticalAlign === "function")
{ {
ArrGlyph[i].setTextVerticalAlign(props.verticalTextAlign); ArrGlyph[i].setCellAllVertAlign(props.verticalTextAlign);
} }
} }
if (b_change_diagram) if (b_change_diagram)
{ {
this.curState.group.updateSizes(); /*this.curState.group.updateSizes();
this.curState.group.recalculate(); this.curState.group.recalculate();
var bounds = this.curState.group.parent.getBounds(); var bounds = this.curState.group.parent.getBounds();
if (!this.curState.group.parent.Is_Inline()) if (!this.curState.group.parent.Is_Inline())
this.curState.group.parent.OnEnd_ChangeFlow(this.curState.group.absOffsetX, this.curState.group.absOffsetY, this.curState.group.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, null, true, true); this.curState.group.parent.OnEnd_ChangeFlow(this.curState.group.absOffsetX, this.curState.group.absOffsetY, this.curState.group.pageIndex, bounds.r - bounds.l, bounds.b - bounds.t, null, true, true);
else else
this.curState.group.parent.OnEnd_ResizeInline(bounds.r - bounds.l, bounds.b - bounds.t); this.curState.group.parent.OnEnd_ResizeInline(bounds.r - bounds.l, bounds.b - bounds.t); */
} }
} }
} }
...@@ -1042,13 +1054,11 @@ DrawingObjectsController.prototype = ...@@ -1042,13 +1054,11 @@ DrawingObjectsController.prototype =
applyColorScheme: function() applyColorScheme: function()
{ {
var api = window["Asc"]["editor"];
var themeColors = api.GuiControlColorsMap;
var aObjects = this.drawingObjects.getDrawingObjects(); var aObjects = this.drawingObjects.getDrawingObjects();
for (var i = 0; i < aObjects.length; i++) { for (var i = 0; i < aObjects.length; i++)
if ( aObjects[i].graphicObject.isChart() ) {
aObjects[i].graphicObject.recalculate(); if(typeof aObjects[i].graphicObject.recalculateColors === "function")
aObjects[i].graphicObject.recalculateColors();
} }
} }
}; };
...@@ -1184,7 +1194,7 @@ function CorrectUniColorEx(asc_color, unicolor) { ...@@ -1184,7 +1194,7 @@ function CorrectUniColorEx(asc_color, unicolor) {
{ {
if (ret.color == null || ret.color.type != COLOR_TYPE_PRST) if (ret.color == null || ret.color.type != COLOR_TYPE_PRST)
{ {
ret.color = new CPrstColor(); ret.setColor(new CPrstColor());
} }
ret.color.id = asc_color.asc_getValue(); ret.color.id = asc_color.asc_getValue();
break; break;
...@@ -1193,7 +1203,7 @@ function CorrectUniColorEx(asc_color, unicolor) { ...@@ -1193,7 +1203,7 @@ function CorrectUniColorEx(asc_color, unicolor) {
{ {
if (ret.color == null || ret.color.type != COLOR_TYPE_SCHEME) if (ret.color == null || ret.color.type != COLOR_TYPE_SCHEME)
{ {
ret.color = new CSchemeColor(); ret.setColor(new CSchemeColor());
} }
// тут выставляется ТОЛЬКО из меню. поэтому: // тут выставляется ТОЛЬКО из меню. поэтому:
...@@ -1202,7 +1212,7 @@ function CorrectUniColorEx(asc_color, unicolor) { ...@@ -1202,7 +1212,7 @@ function CorrectUniColorEx(asc_color, unicolor) {
var _pos = _index - _id * 6; var _pos = _index - _id * 6;
var array_colors_types = [6, 15, 7, 16, 0, 1, 2, 3, 4, 5]; var array_colors_types = [6, 15, 7, 16, 0, 1, 2, 3, 4, 5];
ret.color.id = array_colors_types[_id]; ret.color.setColorId(array_colors_types[_id]);
if (ret.Mods.Mods.length != 0) if (ret.Mods.Mods.length != 0)
ret.Mods.Mods.splice(0, ret.Mods.Mods.length); ret.Mods.Mods.splice(0, ret.Mods.Mods.length);
...@@ -1213,9 +1223,10 @@ function CorrectUniColorEx(asc_color, unicolor) { ...@@ -1213,9 +1223,10 @@ function CorrectUniColorEx(asc_color, unicolor) {
var _ind = 0; var _ind = 0;
for (var k in _mods) for (var k in _mods)
{ {
ret.Mods.Mods[_ind] = new CColorMod(); var mod = new CColorMod();
ret.Mods.Mods[_ind].name = k; mod.setName(k);
ret.Mods.Mods[_ind].val = _mods[k]; mod.setVal(_mods[k]);
ret.addMod(mod);
_ind++; _ind++;
} }
} }
...@@ -1226,12 +1237,9 @@ function CorrectUniColorEx(asc_color, unicolor) { ...@@ -1226,12 +1237,9 @@ function CorrectUniColorEx(asc_color, unicolor) {
{ {
if (ret.color == null || ret.color.type != COLOR_TYPE_SRGB) if (ret.color == null || ret.color.type != COLOR_TYPE_SRGB)
{ {
ret.color = new CRGBColor(); ret.setColor(new CRGBColor());
} }
ret.color.RGBA.R = asc_color.asc_getR(); ret.color.setColor(asc_color.asc_getR()*16*16 + asc_color.asc_getG()*16 + asc_color.asc_getB());
ret.color.RGBA.G = asc_color.asc_getG();
ret.color.RGBA.B = asc_color.asc_getB();
ret.color.RGBA.A = asc_color.asc_getA();
} }
} }
return ret; return ret;
...@@ -1381,14 +1389,14 @@ function CorrectUniFillEx(asc_fill, unifill) { ...@@ -1381,14 +1389,14 @@ function CorrectUniFillEx(asc_fill, unifill) {
{ {
case c_oAscFill.FILL_TYPE_NOFILL: case c_oAscFill.FILL_TYPE_NOFILL:
{ {
ret.fill = new CNoFill(); ret.setFill( new CNoFill());
break; break;
} }
case c_oAscFill.FILL_TYPE_BLIP: case c_oAscFill.FILL_TYPE_BLIP:
{ {
if (ret.fill == null || ret.fill.type != FILL_TYPE_BLIP) if (ret.fill == null || ret.fill.type != FILL_TYPE_BLIP)
{ {
ret.fill = new CBlipFill(); ret.setFill(new CBlipFill());
} }
var _url = _fill.asc_getUrl(); var _url = _fill.asc_getUrl();
...@@ -1399,10 +1407,10 @@ function CorrectUniFillEx(asc_fill, unifill) { ...@@ -1399,10 +1407,10 @@ function CorrectUniFillEx(asc_fill, unifill) {
} }
if (_url != null && _url !== undefined && _url != "") if (_url != null && _url !== undefined && _url != "")
ret.fill.RasterImageId = _url; ret.fill.setRasterImageId(_url);
if (ret.fill.RasterImageId == null) if (ret.fill.RasterImageId == null)
ret.fill.RasterImageId = ""; ret.fill.setRasterImageId("");
var tile = _fill.asc_getType(); var tile = _fill.asc_getType();
if (tile == c_oAscFillBlipType.STRETCH) if (tile == c_oAscFillBlipType.STRETCH)
...@@ -1416,16 +1424,16 @@ function CorrectUniFillEx(asc_fill, unifill) { ...@@ -1416,16 +1424,16 @@ function CorrectUniFillEx(asc_fill, unifill) {
{ {
if (ret.fill == null || ret.fill.type != FILL_TYPE_SOLID) if (ret.fill == null || ret.fill.type != FILL_TYPE_SOLID)
{ {
ret.fill = new CSolidFill(); ret.setFill(new CSolidFill());
} }
ret.fill.color = CorrectUniColorEx(_fill.asc_getColor(), ret.fill.color); ret.fill.setColor(CorrectUniColorEx(_fill.asc_getColor(), ret.fill.color));
} }
} }
} }
var _alpha = asc_fill.asc_getTransparent(); var _alpha = asc_fill.asc_getTransparent();
if (null != _alpha) if (null != _alpha)
ret.transparent = _alpha; ret.setTransparent(_alpha);
return ret; return ret;
} }
...@@ -1608,22 +1616,21 @@ function CorrectUniStrokeEx(asc_stroke, unistroke) { ...@@ -1608,22 +1616,21 @@ function CorrectUniStrokeEx(asc_stroke, unistroke) {
var _w = asc_stroke.asc_getWidth(); var _w = asc_stroke.asc_getWidth();
if (_w != null && _w !== undefined) if (_w != null && _w !== undefined)
ret.w = _w * 36000.0; ret.setW(_w * 36000.0);
var _color = asc_stroke.asc_getColor(); var _color = asc_stroke.asc_getColor();
if (_type == c_oAscStrokeType.STROKE_NONE) if (_type == c_oAscStrokeType.STROKE_NONE)
{ {
ret.Fill = new CUniFill(); ret.setFill(new CUniFill());
ret.Fill.fill = new CNoFill(); ret.Fill.setFill(new CNoFill());
} }
else if (_type != null) else if (_type != null)
{ {
if (null != _color && undefined !== _color) if (null != _color && undefined !== _color)
{ {
ret.Fill = new CUniFill(); ret.setFill(new CUniFill());
ret.Fill.type = FILL_TYPE_SOLID; ret.Fill.setFill(new CSolidFill());
ret.Fill.fill = new CSolidFill(); ret.Fill.fill.setColor(CorrectUniColorEx(_color, ret.Fill.fill.color));
ret.Fill.fill.color = CorrectUniColorEx(_color, ret.Fill.fill.color);
} }
} }
......
...@@ -65,6 +65,60 @@ CChartAsGroup.prototype = ...@@ -65,6 +65,60 @@ CChartAsGroup.prototype =
}, },
getBoundsInGroup: function()
{
return {minX: this.x, minY: this.y, maxX: this.x + this.extX, maxY: this.y + this.extY};
var r = this.rot;
if((r >= 0 && r < Math.PI*0.25)
|| (r > 3*Math.PI*0.25 && r < 5*Math.PI*0.25)
|| (r > 7*Math.PI*0.25 && r < 2*Math.PI))
{
}
else
{
var hc = this.extX*0.5;
var vc = this.extY*0.5;
var xc = this.x + hc;
var yc = this.y + vc;
return {minX: xc - vc, minY: yc - hc, maxX: xc + vc, maxY: yc + hc};
}
},
hitInTextRect: function()
{
return false;
},
setGroup: function(group)
{
var oldId = isRealObject(this.group) ? this.group.Get_Id() : null;
var newId = isRealObject(group) ? group.Get_Id() : null;
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_SetGroup, null, null,
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(oldId, newId)));
this.group = group;
},
hitInInnerArea: function(x, y)
{
var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y);
if(isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInInnerArea(this.drawingObjects.getCanvasContext(), x_t, y_t);
return x_t > 0 && x_t < this.extX && y_t > 0 && y_t < this.extY;
},
hitInPath: function(x, y)
{
var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y);
if(isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInPath(this.drawingObjects.getCanvasContext(), x_t, y_t);
return false;
},
recalculateColors: function() recalculateColors: function()
{ {
...@@ -91,6 +145,22 @@ CChartAsGroup.prototype = ...@@ -91,6 +145,22 @@ CChartAsGroup.prototype =
return false; return false;
}, },
Get_Props: function(OtherProps)
{
var Props = new Object();
Props.Width = this.extX;
Props.Height = this.extY;
if(!isRealObject(OtherProps))
return Props;
OtherProps.Width = OtherProps.Width === Props.Width ? Props.Width : undefined;
OtherProps.Height = OtherProps.Height === Props.Height ? Props.Height : undefined;
return OtherProps;
},
syncAscChart: function() { syncAscChart: function() {
if ( this.chartTitle && this.chartTitle.txBody && this.chartTitle.txBody.content ) { if ( this.chartTitle && this.chartTitle.txBody && this.chartTitle.txBody.content ) {
...@@ -1976,6 +2046,11 @@ CChartAsGroup.prototype = ...@@ -1976,6 +2046,11 @@ CChartAsGroup.prototype =
return tx > 0 && tx < this.extX && ty > 0 && ty < this.extY; return tx > 0 && tx < this.extX && ty > 0 && ty < this.extY;
}, },
canGroup: function()
{
return true;
},
canRotate: function() canRotate: function()
{ {
return false; return false;
......
...@@ -2353,7 +2353,7 @@ function CompareUniFill(unifill_1, unifill_2) ...@@ -2353,7 +2353,7 @@ function CompareUniFill(unifill_1, unifill_2)
function CompareShapeProperties(shapeProp1, shapeProp2) function CompareShapeProperties(shapeProp1, shapeProp2)
{ {
var _result_shape_prop = {}; var _result_shape_prop = new asc_CShapeProperty();
if(shapeProp1.type === shapeProp2.type) if(shapeProp1.type === shapeProp2.type)
{ {
_result_shape_prop.type = shapeProp1.type; _result_shape_prop.type = shapeProp1.type;
...@@ -2382,7 +2382,7 @@ function CompareShapeProperties(shapeProp1, shapeProp2) ...@@ -2382,7 +2382,7 @@ function CompareShapeProperties(shapeProp1, shapeProp2)
function CompareImageProperties(imgProps1, imgProps2) function CompareImageProperties(imgProps1, imgProps2)
{ {
var _result_image_properties = {}; var _result_image_properties = new asc_CImgProperty();
if(imgProps1.Width == null || imgProps2.Width == null) if(imgProps1.Width == null || imgProps2.Width == null)
{ {
_result_image_properties.Width = null; _result_image_properties.Width = null;
......
...@@ -1028,6 +1028,337 @@ CGroupShape.prototype = ...@@ -1028,6 +1028,337 @@ CGroupShape.prototype =
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Add_To_Drawing_Objects, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(position, null)), null); History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Add_To_Drawing_Objects, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(position, null)), null);
}, },
changePresetGeometry: function(preset)
{
for(var i =0; i < this.arrGraphicObjects.length; ++i)
{
if(typeof this.arrGraphicObjects[i].changePresetGeometry === "function")
this.arrGraphicObjects[i].changePresetGeometry(preset);
}
},
Get_Props: function(OtherProps)
{
var Props = new Object();
Props.Width = this.extX;
Props.Height = this.extY;
if(!isRealObject(OtherProps))
return Props;
OtherProps.Width = OtherProps.Width === Props.Width ? Props.Width : undefined;
OtherProps.Height = OtherProps.Height === Props.Height ? Props.Height : undefined;
return OtherProps;
},
getFill: function()
{
var _ret = null;
var _shapes = this.arrGraphicObjects;
var _shape_index;
for(_shape_index = 0; _shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].isShape())
{
_ret = _shapes[_shape_index].getFill();
if(_ret == null)
{
return null;
}
break;
}
}
if(_shape_index < _shapes.length)
{
++_shape_index;
var _cur_fill;
for(;_shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].isShape())
{
_cur_fill = _shapes[_shape_index].getFill();
_ret = CompareUniFill(_ret, _cur_fill);
}
}
}
return _ret;
},
getStroke: function()
{
var _ret = null;
var _shapes = this.arrGraphicObjects;
var _shape_index;
for(_shape_index = 0; _shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].isShape())
{
_ret = _shapes[_shape_index].getStroke();
if(_ret == null)
{
return null;
}
break;
}
}
if(_shape_index < _shapes.length)
{
++_shape_index;
var _cur_line;
for(;_shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].isShape())
{
_cur_line = _shapes[_shape_index].getStroke();
if(_cur_line == null)
{
return null;
}
else
{
_ret = _ret.compare(_cur_line);
}
}
}
}
return _ret;
},
canChangeArrows: function()
{
var _ret = false;
var _shapes = this.spTree;
var _shape_index;
for(_shape_index = 0; _shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].canChangeArrows)
{
_ret = _shapes[_shape_index].canChangeArrows();
if(_ret == false)
{
return false;
}
break;
}
}
if(_shape_index < _shapes.length)
{
++_shape_index;
var _cur_line;
for(;_shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].canChangeArrows)
{
if(_shapes[_shape_index].canChangeArrows() == false)
{
return false;
}
}
}
}
return _ret;
},
haveShapes: function()
{
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(this.arrGraphicObjects[i].isShape())
return true;
}
return false;
},
haveImages: function()
{
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(this.arrGraphicObjects[i].isImage())
return true;
}
return false;
},
haveChart: function()
{
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(this.arrGraphicObjects[i].isChart())
return true;
}
return false;
},
getImageUrl: function()
{
var ret = null;
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(this.arrGraphicObjects[i].isImage())
{
if(ret === null)
{
ret = this.arrGraphicObjects[i].getImageUrl();
}
else
{
if(ret !== this.arrGraphicObjects[i].getImageUrl())
return undefined;
}
}
}
return ret;
},
getPresetGeom: function()
{
var _ret = null;
var _shapes = this.arrGraphicObjects;
var _shape_index;
for(_shape_index = 0; _shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].isShape())
{
_ret = _shapes[_shape_index].getPresetGeom();
if(_ret == null)
{
return null;
}
break;
}
}
if(_shape_index < _shapes.length)
{
++_shape_index;
var _cur_preset;
for(;_shape_index < _shapes.length; ++_shape_index)
{
if(_shapes[_shape_index].isShape())
{
_cur_preset = _shapes[_shape_index].getPresetGeom();
if(_cur_preset == null || _cur_preset != _ret)
{
return null;
}
}
}
}
return _ret;
},
getImageProps: function()
{
var _objects = this.arrGraphicObjects;
var _cur_object;
var _object_index;
var _object_count = _objects.length;
var _cur_image_props;
var _result_image_props = null;
for(_object_index = 0; _object_index < _object_count; ++_object_index)
{
_cur_object = _objects[_object_index];
if(_cur_object.isImage())
{
_cur_image_props = _cur_object.getImageProps();
if(_cur_image_props !== null)
{
if(_result_image_props === null)
{
_result_image_props = _cur_image_props;
}
else
{
_result_image_props = CompareImageProperties(_result_image_props, _cur_image_props);
}
}
}
}
return _result_image_props;
},
changeFill: function(fill)
{
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(typeof this.arrGraphicObjects[i].changeFill ==="function")
this.arrGraphicObjects[i].changeFill(fill);
}
},
changeLine: function(line)
{
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(typeof this.arrGraphicObjects[i].changeLine ==="function")
this.arrGraphicObjects[i].changeLine(line);
}
},
getShapeProps: function()
{
if(this.haveShapes())
{
var shape_props = new asc_CShapeProperty();
shape_props.type = this.getPresetGeom();
shape_props.fill = this.getFill();
shape_props.stroke = this.getStroke();
shape_props.canChangeArrows = this.canChangeArrows();
return {ShapeProperties : shape_props}
}
return null;
},
getImageProps2: function()
{
if(this.haveImages())
{
var img_pr = new asc_CImgProperty();
img_pr.ImageUrl = this.getImageUrl();
}
return img_pr;
return null;
},
getChartProps: function()
{
var ret = null;
for(var i = 0; i < this.arrGraphicObjects.length; ++i)
{
if(this.arrGraphicObjects[i].isChart())
{
if(!isRealObject(ret))
{
ret = new asc_CImgProperty();
ret.ChartProperties = this.arrGraphicObjects[i].chart;
}
else
{
ret.severalCharts = true;
if(ret.severalChartTypes !== true)
{
if(!(ret.ChartProperties.type === this.arrGraphicObjects[i].chart.type && ret.ChartProperties.subType === this.arrGraphicObjects[i].chart.subType) )
ret.severalChartTypes = true;
}
if(ret.severalChartStyles !== true)
{
if(ret.ChartProperties.styleId !== this.arrGraphicObjects[i].chart.styleId )
ret.severalChartStyles = true;
}
}
}
}
return ret;
},
Undo: function(type, data) Undo: function(type, data)
{ {
switch(type) switch(type)
......
...@@ -983,14 +983,26 @@ CImage.prototype = ...@@ -983,14 +983,26 @@ CImage.prototype =
{ {
}, },
Get_Props: function(OtherProps) Get_Props: function(OtherProps)
{ {
var Props = new Object(); var Props = new Object();
Props.Width = this.extX; Props.Width = this.extX;
Props.Height = this.extY; Props.Height = this.extY;
return Props; if(!isRealObject(OtherProps))
}, return Props;
OtherProps.Width = OtherProps.Width === Props.Width ? Props.Width : undefined;
OtherProps.Height = OtherProps.Height === Props.Height ? Props.Height : undefined;
return OtherProps;
},
getImageProps: function()
{
return {ImageUrl: this.blipFill.RasterImageId, Width: this.extX, Height: this.extY};
},
......
...@@ -2077,240 +2077,36 @@ CShape.prototype = ...@@ -2077,240 +2077,36 @@ CShape.prototype =
changeFill : function(ascFill) changeFill : function(ascFill)
{ {
//var historyObj = {Type: historyitem_ChangeFill}; History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateBrushUndo, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(null, null)), null);
if(this.spPr.Fill == null)
{ this.setUniFill(CorrectUniFillEx(ascFill, this.spPr.Fill));
//historyObj.old_Fill = null; History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateBrushRedo, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(null, null)), null);
}
else //this.spPr.Fill = CorrectUniFillEx(ascFill, this.spPr.Fill);
{
//historyObj.old_Fill = this.spPr.Fill.createDuplicate();
}
if(this.spPr.Fill == null )
{
this.spPr.Fill = new CUniFill();
}
this.spPr.Fill = CorrectUniFillEx(ascFill, this.spPr.Fill);
if(this.spPr.Fill == null)
{
//historyObj.new_Fill = null;
}
else
{
//historyObj.new_Fill = this.spPr.Fill.createDuplicate();
}
/* if(isRealObject(this.spPr.Fill) && isRealObject(this.spPr.Fill.fill) && this.spPr.Fill.fill.type === FILL_TYPE_BLIP) /* if(isRealObject(this.spPr.Fill) && isRealObject(this.spPr.Fill.fill) && this.spPr.Fill.fill.type === FILL_TYPE_BLIP)
{ {
editor.WordControl.m_oLogicDocument.DrawingObjects.urlMap.push(this.spPr.Fill.fill.RasterImageId); editor.WordControl.m_oLogicDocument.DrawingObjects.urlMap.push(this.spPr.Fill.fill.RasterImageId);
} */ } */
//History.Add(this, historyObj); //History.Add(this, historyObj);
this.calculateFill(); this.recalculateBrush();
}, },
changeLine : function(line) changeLine : function(line)
{ {
//var historyObj = {Type: historyitem_ChangeLine}; History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateBrushUndo, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(null, null)), null);
if(this.spPr.ln != null) this.setUniLine(CorrectUniStrokeEx(line, this.spPr.ln));
{ History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateBrushRedo, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(null, null)), null);
//historyObj.old_Line = this.spPr.ln.createDuplicate(); this.recalculatePen();
}
else
{
//historyObj.old_Line = null;
}
//this.spPr.ln.merge(line);
this.spPr.ln = CorrectUniStrokeEx(line, this.spPr.ln);
//historyObj.new_Line = this.spPr.ln.createDuplicate();
//History.Add(this, historyObj);
this.calculateLine();
}, },
changePresetGeometry: function(sPreset) changePresetGeometry: function(sPreset)
{ {
var _final_preset; History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformUndo, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(null, null)), null);
var _old_line; this.setPresetGeometry(sPreset);
var _new_line; this.spPr.geometry.Recalculate(this.extX, this.extY);
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateTransformRedo, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(null, null)), null);
if(this.spPr.ln == null)
{
_old_line = null;
}
else
{
_old_line = this.spPr.ln.createDuplicate();
}
var _arrow_flag = false;
switch(sPreset)
{
case "lineWithArrow":
{
_final_preset = "line";
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
case "lineWithTwoArrows":
{
_final_preset = "line";
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
case "bentConnector5WithArrow":
{
_final_preset = "bentConnector5";
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
case "bentConnector5WithTwoArrows":
{
_final_preset = "bentConnector5";
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
case "curvedConnector3WithArrow":
{
_final_preset = "curvedConnector3";
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
case "curvedConnector3WithTwoArrows":
{
_final_preset = "curvedConnector3";
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
default :
{
_final_preset = sPreset;
_arrow_flag = true;
if(_old_line == null)
{
_new_line = new CLn();
}
else
{
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = null;
_new_line.headEnd = null;
break;
}
}
//var historyData = {Type: historyitem_ChangePresetGeom};
//historyData.arrowFlag = _arrow_flag;
if(_arrow_flag === true)
{
//historyData.oldLine = _old_line;
//historyData.newLine = _new_line;
this.spPr.ln = _new_line;
this.calculateLine();
}
//historyData.old_geometryPreset = isRealObject(this.spPr.geometry) ? this.spPr.geometry.preset : null;
//historyData.new_geometryPreset = _final_preset;
//History.Add(this, historyData);
this.spPr.geometry = CreateGeometry(_final_preset);
this.spPr.geometry.Init(100, 100);
this.calculateAfterResize();
}, },
canChangeArrows : function() canChangeArrows : function()
...@@ -2633,8 +2429,15 @@ CShape.prototype = ...@@ -2633,8 +2429,15 @@ CShape.prototype =
var Props = new Object(); var Props = new Object();
Props.Width = this.extX; Props.Width = this.extX;
Props.Height = this.extY; Props.Height = this.extY;
return Props; if(!isRealObject(OtherProps))
return Props;
OtherProps.Width = OtherProps.Width === Props.Width ? Props.Width : undefined;
OtherProps.Height = OtherProps.Height === Props.Height ? Props.Height : undefined;
return OtherProps;
}, },
...@@ -2736,7 +2539,9 @@ CShape.prototype = ...@@ -2736,7 +2539,9 @@ CShape.prototype =
case historyitem_AutoShapes_RecalculateBrushUndo: case historyitem_AutoShapes_RecalculateBrushUndo:
{ {
this.recalculateBrush(); this.recalculateBrush();
this.recalculatePen();
break; break;
} }
} }
...@@ -2749,6 +2554,7 @@ CShape.prototype = ...@@ -2749,6 +2554,7 @@ CShape.prototype =
case historyitem_AutoShapes_RecalculateBrushRedo: case historyitem_AutoShapes_RecalculateBrushRedo:
{ {
this.recalculateBrush(); this.recalculateBrush();
this.recalculatePen();
break; break;
} }
case historyitem_AutoShapes_RecalculateAfterParagraphAddRedo: case historyitem_AutoShapes_RecalculateAfterParagraphAddRedo:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment