Commit 03b57c91 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

флаг поддержки заливки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51433 954022d7-b5bf-4e40-9824-e11837661b57
parent 2d58f18c
......@@ -1775,6 +1775,7 @@ function asc_CShapeProperty() {
this.fill = null;
this.stroke = null;
this.paddings = null;
this.canFill = true;
}
asc_CShapeProperty.prototype = {
......@@ -1787,6 +1788,8 @@ asc_CShapeProperty.prototype = {
asc_putStroke: function(v) { this.stroke = v; },
asc_getPaddings: function() { return this.paddings; },
asc_putPaddings: function(v) { this.paddings = v; }
asc_get_CanFill = function(){return this.canFill}
asc_put_CanFill = function(v){this.canFill = v;}
}
//{ asc_CShapeProperty export
......
......@@ -1287,6 +1287,7 @@ DrawingObjectsController.prototype =
shape_props.ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
shape_props.ShapeProperties.paddings = c_obj.getPaddings();
shape_props.verticalTextAlign = isRealObject(c_obj.txBody) ? c_obj.txBody.getBodyPr().anchor : null;
shape_props.ShapeProperties.canFill = c_obj.canFill();
}
else
{
......@@ -1296,7 +1297,8 @@ DrawingObjectsController.prototype =
fill: c_obj.getFill(),
stroke: c_obj.getStroke(),
canChangeArrows: c_obj.canChangeArrows(),
paddings: c_obj.getPaddings()
paddings: c_obj.getPaddings(),
canFill: c_obj.canFill()
};
shape_props.ShapeProperties = CompareShapeProperties(ShapeProperties, shape_props.ShapeProperties);
shape_props.verticalTextAlign = undefined;
......@@ -1327,6 +1329,8 @@ DrawingObjectsController.prototype =
shape_props.ShapeProperties.paddings = c_obj.getPaddings();
shape_props.ShapeProperties.IsLocked = !(c_obj.lockType === c_oAscLockTypes.kLockTypeNone || c_obj.lockType === c_oAscLockTypes.kLockTypeNone);
shape_props.verticalTextAlign = isRealObject(c_obj.txBody) ? c_obj.txBody.getBodyPr().anchor : null;
shape_props.ShapeProperties.canFill = c_obj.canFill();
}
else
{
......@@ -1337,7 +1341,9 @@ DrawingObjectsController.prototype =
ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
ShapeProperties.paddings = c_obj.getPaddings();
ShapeProperties.IsLocked = !(c_obj.lockType === c_oAscLockTypes.kLockTypeNone || c_obj.lockType === c_oAscLockTypes.kLockTypeNone);
shape_props = c_obj.Get_Props(shape_props);
ShapeProperties.canFill = c_obj.canFill();
shape_props = c_obj.Get_Props(shape_props);
shape_props.ShapeProperties = CompareShapeProperties(ShapeProperties, shape_props.ShapeProperties);
shape_props.verticalTextAlign = undefined;
}
......
......@@ -3041,6 +3041,7 @@ function CompareShapeProperties(shapeProp1, shapeProp2)
_result_shape_prop.paddings.Right = isRealNumber(shapeProp1.paddings.Right) ? (shapeProp1.paddings.Right === shapeProp2.paddings.Right ? shapeProp1.paddings.Right : undefined) : undefined;
_result_shape_prop.paddings.Bottom = isRealNumber(shapeProp1.paddings.Bottom) ? (shapeProp1.paddings.Bottom === shapeProp2.paddings.Bottom ? shapeProp1.paddings.Bottom : undefined) : undefined;
}
_result_shape_prop.canFill = shapeProp1.canFill === true || shapeProp2.canFill === true;
return _result_shape_prop;
}
......
......@@ -793,6 +793,7 @@ CGeometry.prototype=
this.rect = ReadObjectDouble(r);
},
AddAdj: function(name, formula, x, y, z)
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Add_Adjustment, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataAddAdjustment(name, parseInt(x))), null);
......
......@@ -1461,6 +1461,7 @@ CGroupShape.prototype =
shape_props.stroke = this.getStroke();
shape_props.canChangeArrows = this.canChangeArrows();
shape_props.paddings = this.getPaddings();
shape_props.canFill = true;
return {ShapeProperties : shape_props}
}
......
......@@ -215,6 +215,14 @@ CShape.prototype =
return true;
},
canFill: function()
{
if(this.spPr && this.spPr.geometry )
return this.spPr.geometry.canFill();
return true;
},
OnContentRecalculate: function()
{
this.calculateContent();
......
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