Commit d5602650 authored by Sergey Luzyanin's avatar Sergey Luzyanin

Merge branch 'release/4.0.1' into develop

parents 016d7315 345dee37
...@@ -586,7 +586,7 @@ function CheckSpPrXfrm2(object) ...@@ -586,7 +586,7 @@ function CheckSpPrXfrm2(object)
function getObjectsByTypesFromArr(arr, bGrouped) function getObjectsByTypesFromArr(arr, bGrouped)
{ {
var ret = {shapes: [], images: [], groups: [], charts: [], tables: []}; var ret = {shapes: [], images: [], groups: [], charts: [], tables: [], oleObjects: []};
var selected_objects = arr; var selected_objects = arr;
for(var i = 0; i < selected_objects.length; ++i) for(var i = 0; i < selected_objects.length; ++i)
{ {
...@@ -600,11 +600,15 @@ function getObjectsByTypesFromArr(arr, bGrouped) ...@@ -600,11 +600,15 @@ function getObjectsByTypesFromArr(arr, bGrouped)
break; break;
} }
case AscDFH.historyitem_type_ImageShape: case AscDFH.historyitem_type_ImageShape:
case AscDFH.historyitem_type_OleObject:
{ {
ret.images.push(drawing); ret.images.push(drawing);
break; break;
} }
case AscDFH.historyitem_type_OleObject:
{
ret.oleObjects.push(drawing);
break;
}
case AscDFH.historyitem_type_GroupShape: case AscDFH.historyitem_type_GroupShape:
{ {
ret.groups.push(drawing); ret.groups.push(drawing);
...@@ -614,7 +618,8 @@ function getObjectsByTypesFromArr(arr, bGrouped) ...@@ -614,7 +618,8 @@ function getObjectsByTypesFromArr(arr, bGrouped)
ret.shapes = ret.shapes.concat(by_types.shapes); ret.shapes = ret.shapes.concat(by_types.shapes);
ret.images = ret.images.concat(by_types.images); ret.images = ret.images.concat(by_types.images);
ret.charts = ret.charts.concat(by_types.charts); ret.charts = ret.charts.concat(by_types.charts);
ret.tables = ret.tables.concat(by_types.charts); ret.tables = ret.tables.concat(by_types.tables);
ret.oleObjects = ret.oleObjects.concat(by_types.oleObjects);
} }
break; break;
} }
...@@ -2437,6 +2442,17 @@ DrawingObjectsController.prototype = ...@@ -2437,6 +2442,17 @@ DrawingObjectsController.prototype =
} }
objects_by_type.charts[i].checkDrawingBaseCoords(); objects_by_type.charts[i].checkDrawingBaseCoords();
} }
for(i = 0; i < objects_by_type.oleObjects.length; ++i)
{
CheckSpPrXfrm(objects_by_type.oleObjects[i]);
objects_by_type.oleObjects[i].spPr.xfrm.setExtX(props.Width);
objects_by_type.oleObjects[i].spPr.xfrm.setExtY(props.Height);
if(objects_by_type.oleObjects[i].group)
{
checkObjectInArray(aGroups, objects_by_type.oleObjects[i].group.getMainGroup());
}
objects_by_type.oleObjects[i].checkDrawingBaseCoords();
}
} }
} }
...@@ -6614,6 +6630,51 @@ DrawingObjectsController.prototype = ...@@ -6614,6 +6630,51 @@ DrawingObjectsController.prototype =
} }
break; break;
} }
case AscDFH.historyitem_type_OleObject:
{
var pluginData = new Asc.CPluginData();
pluginData.setAttribute("data", drawing.m_sData);
pluginData.setAttribute("guid", drawing.m_sApplicationId);
pluginData.setAttribute("width", drawing.extX);
pluginData.setAttribute("height", drawing.extY);
pluginData.setAttribute("widthPix", drawing.m_nPixWidth);
pluginData.setAttribute("heightPix", drawing.m_nPixHeight);
pluginData.setAttribute("objectId", drawing.Id);
new_image_props =
{
ImageUrl: null,
w: drawing.extX,
h: drawing.extY,
locked: locked,
x: drawing.x,
y: drawing.y,
lockAspect: lockAspect,
pluginGuid: drawing.m_sApplicationId,
pluginData: pluginData
};
if(!image_props)
image_props = new_image_props;
else
{
image_props.ImageUrl = null;
if(image_props.w != null && image_props.w !== new_image_props.w)
image_props.w = null;
if(image_props.h != null && image_props.h !== new_image_props.h)
image_props.h = null;
if(image_props.x != null && image_props.x !== new_image_props.x)
image_props.x = null;
if(image_props.y != null && image_props.y !== new_image_props.y)
image_props.y = null;
if(image_props.locked || new_image_props.locked)
image_props.locked = true;
if(image_props.lockAspect || new_image_props.lockAspect)
image_props.lockAspect = false;
new_image_props.pluginGuid = null;
new_image_props.pluginData = undefined;
}
break;
}
case AscDFH.historyitem_type_ChartSpace: case AscDFH.historyitem_type_ChartSpace:
{ {
var type_subtype = drawing.getTypeSubType(); var type_subtype = drawing.getTypeSubType();
......
...@@ -1745,6 +1745,10 @@ ...@@ -1745,6 +1745,10 @@
this.severalChartStyles = obj.severalChartStyles != undefined ? obj.severalChartStyles : undefined; this.severalChartStyles = obj.severalChartStyles != undefined ? obj.severalChartStyles : undefined;
this.verticalTextAlign = obj.verticalTextAlign != undefined ? obj.verticalTextAlign : undefined; this.verticalTextAlign = obj.verticalTextAlign != undefined ? obj.verticalTextAlign : undefined;
this.vert = obj.vert != undefined ? obj.vert : undefined; this.vert = obj.vert != undefined ? obj.vert : undefined;
//oleObjects
this.pluginGuid = obj.pluginGuid != undefined ? obj.pluginGuid : undefined;
this.pluginData = obj.pluginData != undefined ? obj.pluginData : undefined;
} }
else { else {
this.CanBeFlow = true; this.CanBeFlow = true;
...@@ -1775,6 +1779,10 @@ ...@@ -1775,6 +1779,10 @@
this.severalChartStyles = undefined; this.severalChartStyles = undefined;
this.verticalTextAlign = undefined; this.verticalTextAlign = undefined;
this.vert = undefined; this.vert = undefined;
//oleObjects
this.pluginGuid = undefined;
this.pluginData = undefined;
} }
} }
...@@ -1912,6 +1920,23 @@ ...@@ -1912,6 +1920,23 @@
return new asc_CImageSize( parseInt(_w), parseInt(_h), bIsCorrect); return new asc_CImageSize( parseInt(_w), parseInt(_h), bIsCorrect);
} }
return new asc_CImageSize( 50, 50, false ); return new asc_CImageSize( 50, 50, false );
},
//oleObjects
asc_getPluginGuid: function(){
return this.pluginGuid;
},
asc_putPluginGuid: function(v){
this.pluginGuid = v;
},
asc_getPluginData: function(){
return this.pluginData;
},
asc_putPluginData: function(v){
this.pluginData = v;
} }
}; };
......
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