Commit f4f89297 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@60413 954022d7-b5bf-4e40-9824-e11837661b57
parent c6900987
......@@ -40,8 +40,6 @@ function CGraphicObjects(document, drawingDocument, api, documentContent)
this.urlMap = [];
this.recalcMap = {};
this.arrForCalculateAfterOpen = [];
this.recalculateMap = {};
......
......@@ -7807,14 +7807,22 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
oParaDrawing.setExtent(oParaDrawing.Extent.W, oParaDrawing.Extent.H);
if(null != oParaDrawing.wrappingPolygon)
oParaDrawing.addWrapPolygon(oParaDrawing.wrappingPolygon);
if(editor.WordControl.m_oLogicDocument.DrawingObjects)
editor.WordControl.m_oLogicDocument.DrawingObjects.arrForCalculateAfterOpen.push(oParaDrawing);
oParaDrawing.init();
//TODO некорректная проверка typeof
if(drawing_Anchor == oParaDrawing.DrawingType && typeof History.RecalcData_Add === "function")
History.RecalcData_Add( { Type : historyrecalctype_Flow, Data : oParaDrawing});
if(oParaDrawing.GraphicObj)
{
if(oParaDrawing.GraphicObj.getObjectType() !== historyitem_type_ChartSpace)//диаграммы могут быть без spPr
{
if(!oParaDrawing.GraphicObj.spPr)
{
oParaDrawing.GraphicObj = null;
}
}
if(oParaDrawing.GraphicObj)
{
if(drawing_Anchor == oParaDrawing.DrawingType && typeof History.RecalcData_Add === "function")//TODO некорректная проверка typeof
History.RecalcData_Add( { Type : historyrecalctype_Flow, Data : oParaDrawing});
}
}
oDrawing.content = oParaDrawing;
}
this.ReadObject = function (type, length, oParStruct)
......@@ -7839,12 +7847,12 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
var oDrawing = new Object();
this.ReadDrawing (type, length, oParStruct, oDrawing, res);
if(null != oDrawing.content.GraphicObj)
oNewElem = oDrawing.content;
var oNewRun = new ParaRun(oParStruct.paragraph);
oNewRun.Add_ToContent(0, oNewElem, false);
oParStruct.addToContent(oNewRun);
{
oNewElem = oDrawing.content;
var oNewRun = new ParaRun(oParStruct.paragraph);
oNewRun.Add_ToContent(0, oNewElem, false);
oParStruct.addToContent(oNewRun);
}
}
else
res = c_oSerConstants.ReadUnknown;
......
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