Commit e3b3ddc9 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@55084 954022d7-b5bf-4e40-9824-e11837661b57
parent 9b54a866
This diff is collapsed.
......@@ -853,7 +853,7 @@ WordShape.prototype =
if (theme && this.style != null && this.style.fillRef!=null)
{
brush = theme.getFillStyle(this.style.fillRef.idx);
this.style.fillRef.Color.Calculate(theme, colorMap, {R:0, G:0, B:0, A:255});
this.style.fillRef.Color.Calculate(theme, null, null, null, {R:0, G:0, B:0, A:255});
RGBA = this.style.fillRef.Color.RGBA;
if (this.style.fillRef.Color.color != null)
......@@ -870,9 +870,10 @@ WordShape.prototype =
}
brush.merge(this.spPr.Fill);
this.brush = brush;
this.brush.calculate(theme, colorMap, RGBA);
this.brush.calculate(theme, null, null, null, RGBA);
},
calculateLine: function()
......@@ -889,7 +890,7 @@ WordShape.prototype =
&& this.style.lnRef.Color !== null && typeof this.style.lnRef.Color.Calculate === "function")
{
_calculated_line = _theme.getLnStyle(this.style.lnRef.idx);
this.style.lnRef.Color.Calculate(_theme, colorMap, {R: 0 , G: 0, B: 0, A: 255});
this.style.lnRef.Color.Calculate(_theme, null, null, null, {R: 0 , G: 0, B: 0, A: 255});
RGBA = this.style.lnRef.Color.RGBA;
}
else
......@@ -901,12 +902,19 @@ WordShape.prototype =
if(_calculated_line.Fill!=null)
{
_calculated_line.Fill.calculate(_theme, colorMap, RGBA) ;
_calculated_line.Fill.calculate(_theme, null, null, null, RGBA) ;
}
this.pen = _calculated_line;
},
Get_PrevElementEndInfo: function()
{
if(isRealObject(this.parent) && isRealObject(this.parent.Parent) && (this.parent.Parent.Get_PrevElementEndInfo) )
return this.parent.Parent.Get_PrevElementEndInfo();
return null;
},
calculateText: function()
{
......
......@@ -4131,6 +4131,7 @@ function StartTrackNewShape(graphicObjects, beginArrow, endArrow)
var pen = new CLn();
pen.Fill = new CUniFill();
pen.Fill.fill = new CSolidFill();
pen.Fill.fill.color = new CUniColor();
pen.Fill.fill.color.color = new CSchemeColor();
pen.Fill.calculate(this.graphicObjects.document.theme, this.graphicObjects.document.clrSchemeMap, {R: 0, G: 0, B: 0, A:255});
if(this.beginArrow)
......@@ -4151,6 +4152,7 @@ function StartTrackNewShape(graphicObjects, beginArrow, endArrow)
var brush = new CUniFill();
brush.fill = new CSolidFill();
brush.fill.color = new CUniColor();
brush.fill.color.color = new CSchemeColor();
brush.calculate(this.graphicObjects.document.theme, this.graphicObjects.document.clrSchemeMap, {R: 0, G: 0, B: 0, A:255});
......@@ -4279,7 +4281,7 @@ function TrackNewShape(graphicObjects, beginArrow, endArrow)
if(false === editor.isViewMode && near_pos!= null && false === this.graphicObjects.document.Document_Is_SelectionLocked(changestype_None, {Type : changestype_2_Element_and_Type , Element : near_pos.Paragraph, CheckType : changestype_Paragraph_Content} ))
{
History.Create_NewPoint();
var Drawing = new ParaDrawing(track_obj.extX, track_obj.extY, null, this.graphicObjects.drawingDocument, this.graphicObjects.document, this.graphicObjects.document);
var Drawing = new ParaDrawing(track_obj.extX, track_obj.extY, null, this.graphicObjects.drawingDocument, this.graphicObjects.document, near_pos.Paragraph);
Drawing.Set_DrawingType(drawing_Anchor);
var shape = new WordShape(Drawing, this.graphicObjects.document, this.graphicObjects.drawingDocument, null);
Drawing.Set_GraphicObject(shape);
......@@ -4370,6 +4372,7 @@ function StartTrackTextRect(graphicObjects)
var brush = new CUniFill();
brush.fill = new CSolidFill();
brush.fill.color = new CUniColor();
brush.fill.color.color = new CSchemeColor();
brush.fill.color.color.id = 12;
brush.calculate(this.graphicObjects.document.theme, this.graphicObjects.document.clrSchemeMap, {R: 0, G: 0, B: 0, A:255});
......@@ -4431,7 +4434,7 @@ function TrackTextRect(graphicObjects)
History.Create_NewPoint();
this.graphicObjects.arrTrackObjects[0].endTrack();
track_obj = this.graphicObjects.arrTrackObjects[0];
var Drawing = new ParaDrawing(track_obj.extX, track_obj.extY, null, this.graphicObjects.drawingDocument, this.graphicObjects.document, this.graphicObjects.document);
var Drawing = new ParaDrawing(track_obj.extX, track_obj.extY, null, this.graphicObjects.drawingDocument, this.graphicObjects.document, near_pos.Paragraph);
Drawing.Set_DrawingType(drawing_Anchor);
var shape = new WordShape(Drawing, this.graphicObjects.document, this.graphicObjects.drawingDocument, null);
Drawing.Set_GraphicObject(shape);
......
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