Commit c0288b6b authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Передача фдага залоченности объекта в меню (Bug 25064);

Добавление заголовка к диаграмме, которая создается в редакторе документов для передачи во фрейм.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57207 954022d7-b5bf-4e40-9824-e11837661b57
parent 812e7bca
...@@ -4060,15 +4060,21 @@ DrawingObjectsController.prototype = ...@@ -4060,15 +4060,21 @@ DrawingObjectsController.prototype =
getDrawingPropsFromArray: function(drawings) getDrawingPropsFromArray: function(drawings)
{ {
var image_props, shape_props, chart_props, new_image_props, new_shape_props, new_chart_props; var image_props, shape_props, chart_props, new_image_props, new_shape_props, new_chart_props, locked;
var drawing; var drawing;
for(var i = 0; i < drawings.length; ++i) for(var i = 0; i < drawings.length; ++i)
{ {
drawing = drawings[i]; drawing = drawings[i];
locked = undefined;
if(!drawing.group)
{
locked = drawing.lockType !== c_oAscLockTypes.kLockTypeNone;
}
switch(drawing.getObjectType()) switch(drawing.getObjectType())
{ {
case historyitem_type_Shape: case historyitem_type_Shape:
{ {
new_shape_props = new_shape_props =
{ {
canFill: drawing.canFill(), canFill: drawing.canFill(),
...@@ -4080,7 +4086,8 @@ DrawingObjectsController.prototype = ...@@ -4080,7 +4086,8 @@ DrawingObjectsController.prototype =
w: drawing.extX, w: drawing.extX,
h: drawing.extY , h: drawing.extY ,
canChangeArrows: drawing.canChangeArrows(), canChangeArrows: drawing.canChangeArrows(),
bFromChart: false bFromChart: false,
locked: locked
}; };
if(!shape_props) if(!shape_props)
shape_props = new_shape_props; shape_props = new_shape_props;
...@@ -4096,7 +4103,8 @@ DrawingObjectsController.prototype = ...@@ -4096,7 +4103,8 @@ DrawingObjectsController.prototype =
{ {
imageUrl: drawing.getImageUrl(), imageUrl: drawing.getImageUrl(),
w: drawing.extX, w: drawing.extX,
h: drawing.extY h: drawing.extY,
locked: locked
}; };
if(!image_props) if(!image_props)
image_props = new_image_props; image_props = new_image_props;
...@@ -4108,6 +4116,8 @@ DrawingObjectsController.prototype = ...@@ -4108,6 +4116,8 @@ DrawingObjectsController.prototype =
image_props.w = null; image_props.w = null;
if(image_props.h != null && image_props.h !== new_image_props.h) if(image_props.h != null && image_props.h !== new_image_props.h)
image_props.h = null; image_props.h = null;
if(image_props.locked || new_image_props.locked)
image_props.locked = true;
} }
break; break;
} }
...@@ -4120,7 +4130,8 @@ DrawingObjectsController.prototype = ...@@ -4120,7 +4130,8 @@ DrawingObjectsController.prototype =
subtype: type_subtype.subtype, subtype: type_subtype.subtype,
styleId: drawing.style, styleId: drawing.style,
w: drawing.extX, w: drawing.extX,
h: drawing.extY h: drawing.extY,
locked: locked
}; };
if(!chart_props) if(!chart_props)
{ {
...@@ -4147,6 +4158,9 @@ DrawingObjectsController.prototype = ...@@ -4147,6 +4158,9 @@ DrawingObjectsController.prototype =
chart_props.w = null; chart_props.w = null;
if(chart_props.h != null && chart_props.h !== new_chart_props.h) if(chart_props.h != null && chart_props.h !== new_chart_props.h)
chart_props.h = null; chart_props.h = null;
if(chart_props.locked || new_chart_props.locked)
chart_props.locked = true;
} }
new_shape_props = new_shape_props =
...@@ -4160,7 +4174,8 @@ DrawingObjectsController.prototype = ...@@ -4160,7 +4174,8 @@ DrawingObjectsController.prototype =
w: drawing.extX, w: drawing.extX,
h: drawing.extY , h: drawing.extY ,
canChangeArrows: false, canChangeArrows: false,
bFromChart: true bFromChart: true,
locked: locked
}; };
if(!shape_props) if(!shape_props)
shape_props = new_shape_props; shape_props = new_shape_props;
...@@ -4195,6 +4210,9 @@ DrawingObjectsController.prototype = ...@@ -4195,6 +4210,9 @@ DrawingObjectsController.prototype =
image_props.w = null; image_props.w = null;
if(image_props.h != null && image_props.h !== group_drawing_props.imageProps.h) if(image_props.h != null && image_props.h !== group_drawing_props.imageProps.h)
image_props.h = null; image_props.h = null;
if(image_props.locked || new_image_props.locked)
image_props.locked = true;
} }
} }
if(group_drawing_props.chartProps) if(group_drawing_props.chartProps)
...@@ -4219,6 +4237,9 @@ DrawingObjectsController.prototype = ...@@ -4219,6 +4237,9 @@ DrawingObjectsController.prototype =
chart_props.w = null; chart_props.w = null;
if(chart_props.h != null && chart_props.h !== group_drawing_props.chartProps.h) if(chart_props.h != null && chart_props.h !== group_drawing_props.chartProps.h)
chart_props.h = null; chart_props.h = null;
if(chart_props.locked || new_chart_props.locked)
chart_props.locked = true;
} }
} }
break; break;
...@@ -4248,6 +4269,7 @@ DrawingObjectsController.prototype = ...@@ -4248,6 +4269,7 @@ DrawingObjectsController.prototype =
var ascSelectedObjects = []; var ascSelectedObjects = [];
var ret = []; var ret = [];
var i, j, cur_drawing;
if (isRealObject(props.shapeProps)) if (isRealObject(props.shapeProps))
{ {
shape_props = new asc_CImgProperty(); shape_props = new asc_CImgProperty();
...@@ -4284,6 +4306,9 @@ DrawingObjectsController.prototype = ...@@ -4284,6 +4306,9 @@ DrawingObjectsController.prototype =
shape_props.ShapeProperties.fill = CreateAscFillEx(shape_props.ShapeProperties.fill); shape_props.ShapeProperties.fill = CreateAscFillEx(shape_props.ShapeProperties.fill);
shape_props.ShapeProperties.stroke = CreateAscStrokeEx(shape_props.ShapeProperties.stroke); shape_props.ShapeProperties.stroke = CreateAscStrokeEx(shape_props.ShapeProperties.stroke);
shape_props.ShapeProperties.stroke.canChangeArrows = shape_props.ShapeProperties.canChangeArrows === true; shape_props.ShapeProperties.stroke.canChangeArrows = shape_props.ShapeProperties.canChangeArrows === true;
shape_props.Locked = props.shapeProps.locked === true;
//shape_props.Locked = false; //shape_props.Locked = false;
ret.push(shape_props); ret.push(shape_props);
} }
...@@ -4293,7 +4318,7 @@ DrawingObjectsController.prototype = ...@@ -4293,7 +4318,7 @@ DrawingObjectsController.prototype =
image_props.Width = props.imageProps.w; image_props.Width = props.imageProps.w;
image_props.Height = props.imageProps.h; image_props.Height = props.imageProps.h;
image_props.ImageUrl = props.imageProps.imageUrl; image_props.ImageUrl = props.imageProps.imageUrl;
//image_props.Locked = false;//TODO!(props.imageProps.lockType === c_oAscLockTypes.kLockTypeNone); image_props.Locked = props.imageProps.locked === true;
ret.push(image_props); ret.push(image_props);
} }
if (isRealObject(props.chartProps) && isRealObject(props.chartProps.chartProps)) if (isRealObject(props.chartProps) && isRealObject(props.chartProps.chartProps))
...@@ -4302,9 +4327,10 @@ DrawingObjectsController.prototype = ...@@ -4302,9 +4327,10 @@ DrawingObjectsController.prototype =
chart_props.Width = props.chartProps.w; chart_props.Width = props.chartProps.w;
chart_props.Height = props.chartProps.h; chart_props.Height = props.chartProps.h;
chart_props.ChartProperties = props.chartProps.chartProps; chart_props.ChartProperties = props.chartProps.chartProps;
chart_props.Locked = props.chartProps.locked === true;
ret.push(chart_props); ret.push(chart_props);
} }
for (var i = 0; i < ret.length; i++) for (i = 0; i < ret.length; i++)
{ {
ascSelectedObjects.push(new asc_CSelectedObject( c_oAscTypeSelectElement.Image, new asc_CImgProperty(ret[i]) )); ascSelectedObjects.push(new asc_CSelectedObject( c_oAscTypeSelectElement.Image, new asc_CImgProperty(ret[i]) ));
......
...@@ -4743,6 +4743,11 @@ function CompareShapeProperties(shapeProp1, shapeProp2) ...@@ -4743,6 +4743,11 @@ function CompareShapeProperties(shapeProp1, shapeProp2)
{ {
_result_shape_prop.bFromChart = true; _result_shape_prop.bFromChart = true;
} }
if(shapeProp1.locked || shapeProp1.locked)
{
_result_shape_prop.locked = true;
}
return _result_shape_prop; return _result_shape_prop;
} }
......
...@@ -666,6 +666,8 @@ CGraphicObjects.prototype = ...@@ -666,6 +666,8 @@ CGraphicObjects.prototype =
c_oAscChartTypeSettings.barNormal), parsedHeaders: {bLeft: true, bTop: true}}; c_oAscChartTypeSettings.barNormal), parsedHeaders: {bLeft: true, bTop: true}};
ret = this.getChartSpace(chartSeries, options); ret = this.getChartSpace(chartSeries, options);
} }
options.type = null;
this.applyPropsToChartSpace(options, ret);
ret.theme = this.document.theme; ret.theme = this.document.theme;
CheckSpPrXfrm(ret); CheckSpPrXfrm(ret);
ret.spPr.xfrm.setOffX(0); ret.spPr.xfrm.setOffX(0);
......
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