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