Commit 3dba7939 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@51889 954022d7-b5bf-4e40-9824-e11837661b57
parent fcb0b034
......@@ -1436,7 +1436,7 @@ function BinaryPPTYLoader()
_mod.name = s.GetString2();
var _find = _mod.name.indexOf(":");
if (_find >= 0 && _find < (_mod.name.length - 1))
_mod.name = _mod.name.substring(_find + 1);
_mod.name = _mod.name.substring(_find + 1);
}
else if (1 == _type)
_mod.val = s.GetLong();
......@@ -4306,7 +4306,7 @@ function BinaryPPTYLoader()
this.ReadGraphicObject = function()
{
var s = this.stream;
var s = this.stream;
var _type = s.GetUChar();
var _object = null;
......@@ -4737,10 +4737,10 @@ function BinaryPPTYLoader()
var _end_rec = _rec_start + s.GetULong() + 4;
var _graphic_frame = new CGraphicFrame(this.TempMainObject);
/* if (null != this.TempGroupObject)
_graphic_frame.Container = this.TempGroupObject;
else
_graphic_frame.Container = _graphic_frame.parent.elementsManipulator; */
/* if (null != this.TempGroupObject)
_graphic_frame.Container = this.TempGroupObject;
else
_graphic_frame.Container = _graphic_frame.parent.elementsManipulator; */
this.TempGroupObject = _graphic_frame;
......@@ -5063,7 +5063,7 @@ function BinaryPPTYLoader()
this.ReadCell = function(cell)
{
// cell.Content.Content.splice(0, cell.Content.Content.length);
// cell.Content.Content.splice(0, cell.Content.Content.length);
cell.Content.Internal_Content_RemoveAll();
var s = this.stream;
......@@ -5157,7 +5157,7 @@ function BinaryPPTYLoader()
var _end_rec = _rec_start + s.GetULong() + 4;
props.TableCellMar = new Object();
props.TableCellMar.Top = new CTableMeasurement(tblwidth_Mm, 1.27);
props.TableCellMar.Top = new CTableMeasurement(tblwidth_Mm, 1.27);
props.TableCellMar.Left = new CTableMeasurement(tblwidth_Mm, 2.54);
props.TableCellMar.Bottom = new CTableMeasurement(tblwidth_Mm, 1.27);
props.TableCellMar.Right = new CTableMeasurement(tblwidth_Mm, 2.54);
......@@ -5186,7 +5186,7 @@ function BinaryPPTYLoader()
props.TableCellMar = {}
props.TableCellMar.Top = new CTableMeasurement(tblwidth_Mm, s.GetULong() / 36000);
// props.TableCellMar.Top.W = s.GetULong() / 36000;
// props.TableCellMar.Top.W = s.GetULong() / 36000;
break;
}
case 2:
......@@ -5194,7 +5194,7 @@ function BinaryPPTYLoader()
if(props.TableCellMar == null)
props.TableCellMar = {}
props.TableCellMar.Right = new CTableMeasurement(tblwidth_Mm, s.GetULong() / 36000);
// props.TableCellMar.Right.W = s.GetULong() / 36000;
// props.TableCellMar.Right.W = s.GetULong() / 36000;
break;
}
case 3:
......@@ -6513,9 +6513,9 @@ function BinaryPPTYLoader()
s.Skip2(4);
var _c = s.GetULong();
/*if(History != null)
{
History.TurnOff();
}*/
{
History.TurnOff();
}*/
if(!txbody.content)
txbody.content = new CDocumentContent(shape, this.presentation ? this.presentation.DrawingDocument : null, 0, 0, 0, 0, 0, 0);
if(_c>0)
......@@ -6541,9 +6541,9 @@ function BinaryPPTYLoader()
txbody.textFieldFlag = true;
}
/*if(History != null)
{
History.TurnOn();
}*/
{
History.TurnOn();
}*/
break;
}
default:
......@@ -6665,9 +6665,9 @@ function BinaryPPTYLoader()
var _c = s.GetULong();
/*if(History != null)
{
History.TurnOff();
}*/
{
History.TurnOff();
}*/
for (var i = 0; i < _c; i++)
......@@ -6678,9 +6678,9 @@ function BinaryPPTYLoader()
}
/*if(History != null)
{
History.TurnOn();
}*/
{
History.TurnOn();
}*/
break;
}
default:
......@@ -6704,6 +6704,22 @@ function BinaryPPTYLoader()
var _rec_start = s.cur;
var _end_rec = _rec_start + s.GetULong() + 4;
var textPropsForRecalc;
if(DocumentContent.Parent instanceof CTextBody)
{
textPropsForRecalc = DocumentContent.Parent.textPropsForRecalc;
}
else
{
if(DocumentContent.Parent instanceof CTableCell
&& DocumentContent.Parent.Row
&& DocumentContent.Parent.Row.Table
&& DocumentContent.Parent.Row.Table.Parent
&& DocumentContent.Parent.Row.Table.Parent.textPropsForRecalc)
{
textPropsForRecalc = DocumentContent.Parent.textPropsForRecalc;
}
}
while (s.cur < _end_rec)
{
var _at = s.GetUChar();
......@@ -6812,9 +6828,11 @@ function BinaryPPTYLoader()
_run.unifill = unifill;
_run.Underline = true;
var tx_pr = new ParaTextPr(_run);
if(DocumentContent.Parent && DocumentContent.Parent.textPropsForRecalc)
if(textPropsForRecalc)
{
DocumentContent.Parent.textPropsForRecalc.push(tx_pr)
textPropsForRecalc.push(tx_pr)
}
par.Internal_Content_Add( EndPos++, tx_pr);
......@@ -6827,9 +6845,9 @@ function BinaryPPTYLoader()
{
var tx_pr = new ParaTextPr(_run);
if(DocumentContent.Parent && DocumentContent.Parent.textPropsForRecalc)
if(textPropsForRecalc)
{
DocumentContent.Parent.textPropsForRecalc.push(tx_pr)
textPropsForRecalc.push(tx_pr)
}
par.Internal_Content_Add( EndPos++, tx_pr);
}
......@@ -6841,12 +6859,12 @@ function BinaryPPTYLoader()
{
par.Internal_Content_Add( EndPos++, new ParaTab());
}
else if (_text[j] == '\n')
{
par.Internal_Content_Add( EndPos++, new ParaNewLine( break_Line ));
}
else if (_text[j] == '\r')
;
else if (_text[j] == '\n')
{
par.Internal_Content_Add( EndPos++, new ParaNewLine( break_Line ));
}
else if (_text[j] == '\r')
;
else if (_text[j] != ' ')
{
par.Internal_Content_Add( EndPos++, new ParaText(_text[j]));
......@@ -6877,7 +6895,7 @@ function BinaryPPTYLoader()
break;
if (0 == _at)
var f_id = s.GetString2();
var f_id = s.GetString2();
else if (1 == _at)
var f_type = s.GetString2();
else
......@@ -6924,9 +6942,9 @@ function BinaryPPTYLoader()
_run.unifill = unifill;
_run.Underline = true;
var tx_pr = new ParaTextPr(_run);
if(DocumentContent.Parent && DocumentContent.Parent.textPropsForRecalc)
if(textPropsForRecalc)
{
DocumentContent.Parent.textPropsForRecalc.push(tx_pr)
textPropsForRecalc.push(tx_pr)
}
par.Internal_Content_Add( EndPos++, tx_pr);
......@@ -6938,9 +6956,9 @@ function BinaryPPTYLoader()
else
{
var tx_pr = new ParaTextPr(_run);
if(DocumentContent.Parent && DocumentContent.Parent.textPropsForRecalc)
if(textPropsForRecalc)
{
DocumentContent.Parent.textPropsForRecalc.push(tx_pr)
textPropsForRecalc.push(tx_pr)
}
par.Internal_Content_Add( EndPos++, tx_pr);
}
......@@ -6971,12 +6989,16 @@ function BinaryPPTYLoader()
if(par.IsEmpty() && endRunPr)
{
var tx_pr = new ParaTextPr(endRunPr);
if(DocumentContent.Parent && DocumentContent.Parent.textPropsForRecalc)
if(textPropsForRecalc)
{
DocumentContent.Parent.textPropsForRecalc.push(tx_pr)
textPropsForRecalc.push(tx_pr)
}
par.Internal_Content_Add( EndPos++, tx_pr);
}
if(textPropsForRecalc)
{
textPropsForRecalc.push({Value:{unifill:par.folHlinkColor}});
}
return par;
}
......
......@@ -220,8 +220,8 @@ CChartAsGroup.prototype =
var bin = w.pos + ";" + w.GetBase64Memory();
var new_chart_data = new asc_CChart(this.chart);
/* var r = CreateBinaryReader(bin, 0, bin.length);
new_chart_data.Read_FromBinary2(r); */
/* var r = CreateBinaryReader(bin, 0, bin.length);
new_chart_data.Read_FromBinary2(r); */
if(chart.styleId != null)
new_chart_data.asc_setStyleId(chart.styleId);
......@@ -1107,7 +1107,7 @@ CChartAsGroup.prototype =
t_y = invert_transform.TransformPointY(x, y);
var radius = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
var sqr_x = t_x*t_y, sqr_y = t_y*t_y;
var sqr_x = t_x*t_x, sqr_y = t_y*t_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 0;
......@@ -1490,7 +1490,7 @@ CChartAsGroup.prototype =
if(is_on)
History.TurnOn();
// this.recalculate();
// this.recalculate();
},
......
......@@ -78,7 +78,7 @@ function CDocumentContent(Parent, DrawingDocument, X, Y, XLimit, YLimit, Split,
};
this.ApplyToAll = false; // Специальный параметр, используемый в ячейках таблицы.
// True, если ячейка попадает в выделение по ячейкам.
// True, если ячейка попадает в выделение по ячейкам.
this.TurnOffRecalc = false;
......@@ -159,12 +159,12 @@ CDocumentContent.prototype =
Get_PageFields : function(PageIndex)
{
var Y = this.Pages[PageIndex].Y ;
var YLimit = this.Pages[PageIndex].YLimit;
var X = this.Pages[PageIndex].X;
var XLimit = this.Pages[PageIndex].XLimit;
var Y = this.Pages[PageIndex].Y ;
var YLimit = this.Pages[PageIndex].YLimit;
var X = this.Pages[PageIndex].X;
var XLimit = this.Pages[PageIndex].XLimit;
return { X : X, XLimit : XLimit, Y : Y, YLimit : YLimit };
return { X : X, XLimit : XLimit, Y : Y, YLimit : YLimit };
},
Get_EmptyHeight : function()
......@@ -267,18 +267,35 @@ CDocumentContent.prototype =
recalcColors: function()
{
if(this.Parent instanceof CTextBody)
var textPropsForRecalc;
if(this.Parent instanceof CTextBody)
{
textPropsForRecalc = this.Parent.textPropsForRecalc;
}
else
{
if(this.Parent instanceof CTableCell
&& this.Parent.Row
&& this.Parent.Row.Table
&& this.Parent.Row.Table.Parent
&& this.Parent.Row.Table.Parent.textPropsForRecalc)
{
textPropsForRecalc = this.Parent.textPropsForRecalc;
}
}
if(Array.isArray(textPropsForRecalc))
{
for(var i = 0; i < this.Content.length; ++i)
{
var p = this.Content[i];
if(p.CompiledPr.Pr.TextPr)
this.Parent.textPropsForRecalc.push({Value:p.CompiledPr.Pr.TextPr});
textPropsForRecalc.push({Value:p.CompiledPr.Pr.TextPr});
textPropsForRecalc.push({Value:{unifill:p.folHlinkColor}});
for(var j = 0; j < p.Content.length; ++j)
{
if(p.Content[j].Type === para_TextPr && p.Content[j].Value.unifill)
{
this.Parent.textPropsForRecalc.push(p.Content[j]);
textPropsForRecalc.push(p.Content[j]);
}
}
}
......@@ -573,6 +590,7 @@ CDocumentContent.prototype =
if(paragraph !== undefined)
{
_cur_paragraph = paragraph;
_cur_paragraph.RecalcInfo.Recalc_0_Type = pararecalc_0_All;
_cur_paragraph.Remove_PresentationNumbering();
if(_cur_paragraph.GetType() != type_Paragraph)
{
......@@ -981,6 +999,7 @@ CDocumentContent.prototype =
for(_par_index = 0; _par_index < _content_length; ++_par_index)
{
_cur_paragraph = this.Content[_par_index];
_cur_paragraph.RecalcInfo.Recalc_0_Type = pararecalc_0_All;
if(_cur_paragraph.GetType() != type_Paragraph)
{
continue;
......@@ -1301,6 +1320,16 @@ CDocumentContent.prototype =
}
},
recalc0AllContent: function()
{
for(var i = 0; i < this.Content.length; ++i)
{
this.Content[i].RecalcInfo.Recalc_0_Type = pararecalc_0_All;
this.Content[i].Recalc_CompiledPr();
}
},
Recalculate_ : function(bForceRecalc, LastChangeIndex)
{
if ( true === this.TurnOffRecalc || true === editor.WordControl.m_oLogicDocument.TurnOffRecalc )
......@@ -1315,7 +1344,7 @@ CDocumentContent.prototype =
var OldPages = this.Pages.length;
var OldBottom = new Array();
for ( var Index = 0; Index < OldPages; Index++ )
OldBottom[Index] = this.Pages[Index].Bounds.Bottom;
OldBottom[Index] = this.Pages[Index].Bounds.Bottom;
var Old_FlowObjects = new Array();
for ( var Index = 0; Index < this.Pages.length; Index++ )
......@@ -1354,7 +1383,7 @@ CDocumentContent.prototype =
// Пересчитываем элемент
var Element = this.Content[Index];
Element.Set_DocumentIndex( Index );
if ( Index >= LastChangeIndex )
{
Element.TurnOff_RecalcEvent();
......@@ -2584,7 +2613,7 @@ CDocumentContent.prototype =
}
}
},
Paragraph_Add : function( ParaItem, bRecalculate )
{
if ( true === this.ApplyToAll )
......@@ -4034,7 +4063,7 @@ CDocumentContent.prototype =
return false;
else if ( false != this.Selection.Use || 0 != this.CurPos.ContentPos )
return false;
var Item = this.Content[0];
return Item.Cursor_IsStart( bOnlyPara );
},
......@@ -4907,7 +4936,7 @@ CDocumentContent.prototype =
{
var Styles = this.Parent.Get_Styles();
var StyleId = Styles.Get_StyleIdByName( Name );
if ( true === this.ApplyToAll )
{
for ( var Index = 0; Index < this.Content.length; Index++ )
......@@ -5823,136 +5852,136 @@ CDocumentContent.prototype =
Get_Paragraph_ParaPr : function()
{
/* var Result_ParaPr = new CParaPr();
if ( true === this.ApplyToAll )
{
var StartPr, Pr;
if ( type_Paragraph == this.Content[0].GetType() )
{
StartPr = this.Content[0].Get_CompiledPr2().ParaPr;
Pr = StartPr.Copy();
Pr.Locked = this.Content[0].Lock.Is_Locked();
}
else if ( type_Table == this.Content[0].GetType() )
{
StartPr = this.Content[0].Get_Paragraph_ParaPr();
Pr = StartPr.Copy();
Pr.Locked = StartPr.Locked;
}
for ( var Index = 1; Index < this.Content.length; Index++ )
{
var Item = this.Content[Index];
var TempPr;
if ( type_Paragraph == Item.GetType() )
{
TempPr = Item.Get_CompiledPr2(false).ParaPr.Copy();
TempPr.Locked = Item.Lock.Is_Locked();
}
else if ( type_Table == Item.GetType() )
{
TempPr = Item.Get_Paragraph_ParaPr();
}
Pr = Pr.Compare(TempPr);
}
if ( Pr.Ind.Left == UnknownValue )
Pr.Ind.Left = StartPr.Ind.Left;
if ( Pr.Ind.Right == UnknownValue )
Pr.Ind.Right = StartPr.Ind.Right;
if ( Pr.Ind.FirstLine == UnknownValue )
Pr.Ind.FirstLine = StartPr.Ind.FirstLine;
Result_ParaPr = Pr;
Result_ParaPr.CanAddTable = ( true === Pr.Locked ? false : true );
return Result_ParaPr;
}
if ( docpostype_DrawingObjects === this.CurPos.Type )
return this.LogicDocument.DrawingObjects.getParagraphParaPr();
else //if ( docpostype_Content === this.CurPos.Type )
{
if ( true === this.Selection.Use && selectionflag_Common === this.Selection.Flag )
{
var StartPos = this.Selection.StartPos;
var EndPos = this.Selection.EndPos;
if ( EndPos < StartPos )
{
var Temp = StartPos;
StartPos = EndPos;
EndPos = Temp;
}
var StartPr, Pr;
if ( type_Paragraph == this.Content[StartPos].GetType() )
{
StartPr = this.Content[StartPos].Get_CompiledPr2(false).ParaPr;
Pr = StartPr.Copy();
Pr.Locked = this.Content[StartPos].Lock.Is_Locked();
}
else if ( type_Table == this.Content[StartPos].GetType() )
{
StartPr = this.Content[StartPos].Get_Paragraph_ParaPr();
Pr = StartPr.Copy();
Pr.Locked = StartPr.Locked;
}
for ( var Index = StartPos + 1; Index <= EndPos; Index++ )
{
var Item = this.Content[Index];
var TempPr;
if ( type_Paragraph == Item.GetType() )
{
TempPr = Item.Get_CompiledPr2(false).ParaPr;
TempPr.Locked = Item.Lock.Is_Locked();
}
else if ( type_Table == Item.GetType() )
{
TempPr = Item.Get_Paragraph_ParaPr();
}
Pr = Pr.Compare(TempPr);
}
if ( undefined === Pr.Ind.Left )
Pr.Ind.Left = StartPr.Ind.Left;
if ( undefined === Pr.Ind.Right )
Pr.Ind.Right = StartPr.Ind.Right;
if ( undefined === Pr.Ind.FirstLine )
Pr.Ind.FirstLine = StartPr.Ind.FirstLine;
Result_ParaPr = Pr;
Result_ParaPr.CanAddTable = ( true === Locked ? false : true );
}
else
{
var Item = this.Content[this.CurPos.ContentPos];
if ( type_Paragraph == Item.GetType() )
{
var ParaPr = Item.Get_CompiledPr2(false).ParaPr;
var Locked = Item.Lock.Is_Locked();
Result_ParaPr = ParaPr.Copy();
Result_ParaPr.Locked = Locked;
Result_ParaPr.CanAddTable = ( ( true === Locked ) ? ( ( true === Item.Cursor_IsEnd() ) ? true : false ) : true );
}
else if ( type_Table == Item.GetType() )
{
Result_ParaPr = Item.Get_Paragraph_ParaPr();
}
}
return Result_ParaPr;
} */
/* var Result_ParaPr = new CParaPr();
if ( true === this.ApplyToAll )
{
var StartPr, Pr;
if ( type_Paragraph == this.Content[0].GetType() )
{
StartPr = this.Content[0].Get_CompiledPr2().ParaPr;
Pr = StartPr.Copy();
Pr.Locked = this.Content[0].Lock.Is_Locked();
}
else if ( type_Table == this.Content[0].GetType() )
{
StartPr = this.Content[0].Get_Paragraph_ParaPr();
Pr = StartPr.Copy();
Pr.Locked = StartPr.Locked;
}
for ( var Index = 1; Index < this.Content.length; Index++ )
{
var Item = this.Content[Index];
var TempPr;
if ( type_Paragraph == Item.GetType() )
{
TempPr = Item.Get_CompiledPr2(false).ParaPr.Copy();
TempPr.Locked = Item.Lock.Is_Locked();
}
else if ( type_Table == Item.GetType() )
{
TempPr = Item.Get_Paragraph_ParaPr();
}
Pr = Pr.Compare(TempPr);
}
if ( Pr.Ind.Left == UnknownValue )
Pr.Ind.Left = StartPr.Ind.Left;
if ( Pr.Ind.Right == UnknownValue )
Pr.Ind.Right = StartPr.Ind.Right;
if ( Pr.Ind.FirstLine == UnknownValue )
Pr.Ind.FirstLine = StartPr.Ind.FirstLine;
Result_ParaPr = Pr;
Result_ParaPr.CanAddTable = ( true === Pr.Locked ? false : true );
return Result_ParaPr;
}
if ( docpostype_DrawingObjects === this.CurPos.Type )
return this.LogicDocument.DrawingObjects.getParagraphParaPr();
else //if ( docpostype_Content === this.CurPos.Type )
{
if ( true === this.Selection.Use && selectionflag_Common === this.Selection.Flag )
{
var StartPos = this.Selection.StartPos;
var EndPos = this.Selection.EndPos;
if ( EndPos < StartPos )
{
var Temp = StartPos;
StartPos = EndPos;
EndPos = Temp;
}
var StartPr, Pr;
if ( type_Paragraph == this.Content[StartPos].GetType() )
{
StartPr = this.Content[StartPos].Get_CompiledPr2(false).ParaPr;
Pr = StartPr.Copy();
Pr.Locked = this.Content[StartPos].Lock.Is_Locked();
}
else if ( type_Table == this.Content[StartPos].GetType() )
{
StartPr = this.Content[StartPos].Get_Paragraph_ParaPr();
Pr = StartPr.Copy();
Pr.Locked = StartPr.Locked;
}
for ( var Index = StartPos + 1; Index <= EndPos; Index++ )
{
var Item = this.Content[Index];
var TempPr;
if ( type_Paragraph == Item.GetType() )
{
TempPr = Item.Get_CompiledPr2(false).ParaPr;
TempPr.Locked = Item.Lock.Is_Locked();
}
else if ( type_Table == Item.GetType() )
{
TempPr = Item.Get_Paragraph_ParaPr();
}
Pr = Pr.Compare(TempPr);
}
if ( undefined === Pr.Ind.Left )
Pr.Ind.Left = StartPr.Ind.Left;
if ( undefined === Pr.Ind.Right )
Pr.Ind.Right = StartPr.Ind.Right;
if ( undefined === Pr.Ind.FirstLine )
Pr.Ind.FirstLine = StartPr.Ind.FirstLine;
Result_ParaPr = Pr;
Result_ParaPr.CanAddTable = ( true === Locked ? false : true );
}
else
{
var Item = this.Content[this.CurPos.ContentPos];
if ( type_Paragraph == Item.GetType() )
{
var ParaPr = Item.Get_CompiledPr2(false).ParaPr;
var Locked = Item.Lock.Is_Locked();
Result_ParaPr = ParaPr.Copy();
Result_ParaPr.Locked = Locked;
Result_ParaPr.CanAddTable = ( ( true === Locked ) ? ( ( true === Item.Cursor_IsEnd() ) ? true : false ) : true );
}
else if ( type_Table == Item.GetType() )
{
Result_ParaPr = Item.Get_Paragraph_ParaPr();
}
}
return Result_ParaPr;
} */
var Result_ParaPr = new CParaPr();
if ( true === this.ApplyToAll )
......@@ -7433,7 +7462,7 @@ CDocumentContent.prototype =
Item.Internal_Selection_UpdateCells();
}
break;
}
}
......@@ -8070,7 +8099,7 @@ CDocumentContent.prototype =
if ( "undefined" == typeof(NextObj) )
NextObj = null;
for ( var Index = 0; Index < Count; Index++ )
this.Content[Position + Index].PreDelete();
......
......@@ -1453,7 +1453,7 @@ CGroupShape.prototype =
t_y = invert_transform.TransformPointY(x, y);
var radius = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
var sqr_x = t_x*t_y, sqr_y = t_y*t_y;
var sqr_x = t_x*t_x, sqr_y = t_y*t_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 0;
......
......@@ -1003,7 +1003,7 @@ CImageShape.prototype =
t_y = invert_transform.TransformPointY(x, y);
var radius = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
var sqr_x = t_x*t_y, sqr_y = t_y*t_y;
var sqr_x = t_x*t_x, sqr_y = t_y*t_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 0;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -236,24 +236,24 @@ CShape.prototype =
if (arrowsCount === 1 || arrowsCount === 2) {
switch (arrowsCount) {
case 1:
{
var ln = new CLn();
ln.tailEnd = new EndArrow();
ln.tailEnd.type = LineEndType.Arrow;
ln.tailEnd.len = LineEndSize.Mid;
break;
}
{
var ln = new CLn();
ln.tailEnd = new EndArrow();
ln.tailEnd.type = LineEndType.Arrow;
ln.tailEnd.len = LineEndSize.Mid;
break;
}
case 2:
{
var ln = new CLn();
ln.tailEnd = new EndArrow();
ln.tailEnd.type = LineEndType.Arrow;
ln.tailEnd.len = LineEndSize.Mid;
ln.headEnd = new EndArrow();
ln.headEnd.type = LineEndType.Arrow;
ln.headEnd.len = LineEndSize.Mid;
break;
}
{
var ln = new CLn();
ln.tailEnd = new EndArrow();
ln.tailEnd.type = LineEndType.Arrow;
ln.tailEnd.len = LineEndSize.Mid;
ln.headEnd = new EndArrow();
ln.headEnd.type = LineEndType.Arrow;
ln.headEnd.len = LineEndSize.Mid;
break;
}
}
this.setLine(ln);
}
......@@ -419,19 +419,19 @@ CShape.prototype =
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind) {
case SLIDE_KIND:
{
var placeholder = this.parent.Layout.getMatchingShape(ph_type, ph_index);
if (placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull())
return true;
placeholder = this.parent.Layout.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
{
var placeholder = this.parent.Layout.getMatchingShape(ph_type, ph_index);
if (placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull())
return true;
placeholder = this.parent.Layout.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
case LAYOUT_KIND:
{
var placeholder = this.parent.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
{
var placeholder = this.parent.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
}
}
return false;
......@@ -446,17 +446,17 @@ CShape.prototype =
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind) {
case SLIDE_KIND:
{
hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index));
hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index));
break;
}
{
hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index));
hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index));
break;
}
case LAYOUT_KIND:
{
hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index));
break;
}
{
hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index));
break;
}
}
}
this.recalcInfo.recalculateShapeHierarchy = true;
......@@ -538,29 +538,29 @@ CShape.prototype =
var parents = { slide: null, layout: null, master: null, theme: null };
switch (this.parent.kind) {
case SLIDE_KIND:
{
parents.slide = this.parent;
parents.layout = this.parent.Layout;
parents.master = this.parent.Layout.Master;
parents.theme = this.parent.Layout.Master.Theme;
parents.presentation = this.parent.Layout.Master.presentation;
break;
}
{
parents.slide = this.parent;
parents.layout = this.parent.Layout;
parents.master = this.parent.Layout.Master;
parents.theme = this.parent.Layout.Master.Theme;
parents.presentation = this.parent.Layout.Master.presentation;
break;
}
case LAYOUT_KIND:
{
parents.layout = this.parent;
parents.master = this.parent.Master;
parents.theme = this.parent.Master.Theme;
parents.presentation = this.parent.Master.presentation;
break;
}
{
parents.layout = this.parent;
parents.master = this.parent.Master;
parents.theme = this.parent.Master.Theme;
parents.presentation = this.parent.Master.presentation;
break;
}
case MASTER_KIND:
{
parents.master = this.parent;
parents.theme = this.parent.Theme;
parents.presentation = this.parent.presentation;
break;
}
{
parents.master = this.parent;
parents.theme = this.parent.Theme;
parents.presentation = this.parent.presentation;
break;
}
}
return parents;
},
......@@ -900,30 +900,30 @@ CShape.prototype =
if (/*_content_height < _text_rect_height*/true) {
switch (_body_pr.anchor) {
case 0: //b
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_height - _content_height;
break;
}
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_height - _content_height;
break;
}
case 1: //ctr
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
case 2: //dist
{// (Text Anchor Enum ( Distributed )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Distributed )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
case 3: //just
{// (Text Anchor Enum ( Justified )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Justified )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
case 4: //t
{//Top
_vertical_shift = 0;
break;
}
{//Top
_vertical_shift = 0;
break;
}
}
}
......@@ -932,13 +932,13 @@ CShape.prototype =
//_vertical_shift = _text_rect_height - _content_height;
/*if(_body_pr.anchor === 0)
{
_vertical_shift = _text_rect_height - _content_height;
}
else
{
_vertical_shift = 0;
} */
{
_vertical_shift = _text_rect_height - _content_height;
}
else
{
_vertical_shift = 0;
} */
}
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) {
......@@ -956,42 +956,42 @@ CShape.prototype =
if (/*_content_height < _text_rect_width*/true) {
switch (_body_pr.anchor) {
case 0: //b
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_width - _content_height;
break;
}
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_width - _content_height;
break;
}
case 1: //ctr
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
case 2: //dist
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
case 3: //just
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
case 4: //t
{//Top
_vertical_shift = 0;
break;
}
{//Top
_vertical_shift = 0;
break;
}
}
}
else {
_vertical_shift = 0;
/*if(_body_pr.anchor === 0)
{
_vertical_shift = _text_rect_width - _content_height;
}
else
{
_vertical_shift = 0;
} */
{
_vertical_shift = _text_rect_width - _content_height;
}
else
{
_vertical_shift = 0;
} */
}
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
var _alpha;
......@@ -1056,42 +1056,42 @@ CShape.prototype =
if (/*_content_height < content_height2*/true) {
switch (_body_pr.anchor) {
case 0: //b
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = content_height2 - _content_height;
break;
}
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = content_height2 - _content_height;
break;
}
case 1: //ctr
{// (Text Anchor Enum ( Center ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Center ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
case 2: //dist
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
case 3: //just
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
case 4: //t
{//Top
_vertical_shift = 0;
break;
}
{//Top
_vertical_shift = 0;
break;
}
}
}
else {
_vertical_shift = 0;
/*if(_body_pr.anchor === 0)
{
_vertical_shift = content_height2 - _content_height;
}
else
{
_vertical_shift = 0;
} */
{
_vertical_shift = content_height2 - _content_height;
}
else
{
_vertical_shift = 0;
} */
}
var _text_rect_xc = _l + (_r - _l) * 0.5;
......@@ -1212,30 +1212,30 @@ CShape.prototype =
if (/*_content_height < _text_rect_height*/true) {
switch (_body_pr.anchor) {
case 0: //b
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_height - _content_height;
break;
}
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_height - _content_height;
break;
}
case 1: //ctr
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
case 2: //dist
{// (Text Anchor Enum ( Distributed )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Distributed )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
case 3: //just
{// (Text Anchor Enum ( Justified )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Justified )) TODO: пока выравнивание по центру. Переделать!
_vertical_shift = (_text_rect_height - _content_height) * 0.5;
break;
}
case 4: //t
{//Top
_vertical_shift = 0;
break;
}
{//Top
_vertical_shift = 0;
break;
}
}
}
......@@ -1244,13 +1244,13 @@ CShape.prototype =
//_vertical_shift = _text_rect_height - _content_height;
/*if(_body_pr.anchor === 0)
{
_vertical_shift = _text_rect_height - _content_height;
}
else
{
_vertical_shift = 0;
} */
{
_vertical_shift = _text_rect_height - _content_height;
}
else
{
_vertical_shift = 0;
} */
}
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) {
......@@ -1268,42 +1268,42 @@ CShape.prototype =
if (/*_content_height < _text_rect_width*/true) {
switch (_body_pr.anchor) {
case 0: //b
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_width - _content_height;
break;
}
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = _text_rect_width - _content_height;
break;
}
case 1: //ctr
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Center ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
case 2: //dist
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
case 3: //just
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (_text_rect_width - _content_height) * 0.5;
break;
}
case 4: //t
{//Top
_vertical_shift = 0;
break;
}
{//Top
_vertical_shift = 0;
break;
}
}
}
else {
_vertical_shift = 0;
/*if(_body_pr.anchor === 0)
{
_vertical_shift = _text_rect_width - _content_height;
}
else
{
_vertical_shift = 0;
} */
{
_vertical_shift = _text_rect_width - _content_height;
}
else
{
_vertical_shift = 0;
} */
}
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
var _alpha;
......@@ -1375,42 +1375,42 @@ CShape.prototype =
if (/*_content_height < content_height2*/true) {
switch (_body_pr.anchor) {
case 0: //b
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = content_height2 - _content_height;
break;
}
{ // (Text Anchor Enum ( Bottom ))
_vertical_shift = content_height2 - _content_height;
break;
}
case 1: //ctr
{// (Text Anchor Enum ( Center ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Center ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
case 2: //dist
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Distributed ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
case 3: //just
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
{// (Text Anchor Enum ( Justified ))
_vertical_shift = (content_height2 - _content_height) * 0.5;
break;
}
case 4: //t
{//Top
_vertical_shift = 0;
break;
}
{//Top
_vertical_shift = 0;
break;
}
}
}
else {
_vertical_shift = 0;
/*if(_body_pr.anchor === 0)
{
_vertical_shift = content_height2 - _content_height;
}
else
{
_vertical_shift = 0;
} */
{
_vertical_shift = content_height2 - _content_height;
}
else
{
_vertical_shift = 0;
} */
}
var _text_rect_xc = _l + (_r - _l) * 0.5;
......@@ -1523,23 +1523,23 @@ CShape.prototype =
switch (this.getPlaceholderType()) {
case phType_ctrTitle:
case phType_title:
{
master_ppt_styles = parent_objects.master.txStyles.titleStyle;
break;
}
{
master_ppt_styles = parent_objects.master.txStyles.titleStyle;
break;
}
case phType_body:
case phType_subTitle:
case phType_obj:
case null:
{
master_ppt_styles = parent_objects.master.txStyles.bodyStyle;
break;
}
{
master_ppt_styles = parent_objects.master.txStyles.bodyStyle;
break;
}
default:
{
master_ppt_styles = parent_objects.master.txStyles.otherStyle;
break;
}
{
master_ppt_styles = parent_objects.master.txStyles.otherStyle;
break;
}
}
}
else {
......@@ -1582,19 +1582,19 @@ CShape.prototype =
shape_text_style = new CStyle("shapeTextStyle", null, null, null);
switch (this.style.fontRef.idx) {
case fntStyleInd_major:
{
shape_text_style.TextPr.FontFamily = { Name: getFontInfo("+mj-lt")(parent_objects.theme.themeElements.fontScheme) };
break;
}
{
shape_text_style.TextPr.FontFamily = { Name: getFontInfo("+mj-lt")(parent_objects.theme.themeElements.fontScheme) };
break;
}
case fntStyleInd_minor:
{
shape_text_style.TextPr.FontFamily = { Name: getFontInfo("+mn-lt")(parent_objects.theme.themeElements.fontScheme) };
break;
}
{
shape_text_style.TextPr.FontFamily = { Name: getFontInfo("+mn-lt")(parent_objects.theme.themeElements.fontScheme) };
break;
}
default:
{
break;
}
{
break;
}
}
if (this.style.fontRef.Color != null && this.style.fontRef.Color.color != null) {
......@@ -2008,25 +2008,25 @@ CShape.prototype =
var full_flip_v = this.getFullFlipV();
switch (Math.min(y1, y3, y5, y7)) {
case y1:
{
north_number = !full_flip_v ? 1 : 5;
break;
}
{
north_number = !full_flip_v ? 1 : 5;
break;
}
case y3:
{
north_number = !full_flip_h ? 3 : 7;
break;
}
{
north_number = !full_flip_h ? 3 : 7;
break;
}
case y5:
{
north_number = !full_flip_v ? 5 : 1;
break;
}
{
north_number = !full_flip_v ? 5 : 1;
break;
}
default:
{
north_number = !full_flip_h ? 7 : 3;
break;
}
{
north_number = !full_flip_h ? 7 : 3;
break;
}
}
var same_flip = !full_flip_h && !full_flip_v || full_flip_h && full_flip_v;
......@@ -2650,24 +2650,24 @@ CShape.prototype =
draw: function (graphics) {
/*graphics.SetIntegerGrid(false);
graphics.transform3(this.transform, false);
var shape_drawer = new CShapeDrawer();
shape_drawer.fromShape(this, graphics);
shape_drawer.draw(this.spPr.geometry);
if(locktype_None != this.Lock.Get_Type())
graphics.DrawLockObjectRect(this.Lock.Get_Type() , 0, 0, this.extX, this.extY);
graphics.reset();
graphics.SetIntegerGrid(true);
graphics.transform3(this.transform, false);
var shape_drawer = new CShapeDrawer();
shape_drawer.fromShape(this, graphics);
shape_drawer.draw(this.spPr.geometry);
if(locktype_None != this.Lock.Get_Type())
graphics.DrawLockObjectRect(this.Lock.Get_Type() , 0, 0, this.extX, this.extY);
graphics.reset();
graphics.SetIntegerGrid(true);
if (this.txBody /*&& /*!(graphics instanceof CSlideBoundsChecker))*/
if (this.txBody /*&& /*!(graphics instanceof CSlideBoundsChecker))*/
// {
/* graphics.SetIntegerGrid(false);
graphics.transform3(this.transformText);
this.txBody.draw(graphics);
graphics.reset();
graphics.SetIntegerGrid(true);
} */
graphics.transform3(this.transformText);
this.txBody.draw(graphics);
graphics.reset();
graphics.SetIntegerGrid(true);
} */
if (graphics.IsSlideBoundsCheckerType === true) {
graphics.transform3(this.transform);
if (null == this.geometry || !graphics.IsShapeNeedBounds(this.spPr.geometry.preset)) {
......@@ -2789,18 +2789,18 @@ CShape.prototype =
graphics.FreeFont();
/*var _masrgins = this.getMargins();
graphics.reset();
graphics.SetIntegerGrid(false);
graphics.p_width(70);
graphics.transform3(this.TransformTextMatrix);
graphics.p_color(0,0,0,255);
graphics._s();
graphics._m(_masrgins.L*100, _masrgins.T*100);
graphics._l(_masrgins.R*100, _masrgins.T*100);
graphics._l(_masrgins.R*100, _masrgins.B*100);
graphics._l(_masrgins.L*100, _masrgins.B*100);
graphics._z();
graphics.ds(); */
graphics.reset();
graphics.SetIntegerGrid(false);
graphics.p_width(70);
graphics.transform3(this.TransformTextMatrix);
graphics.p_color(0,0,0,255);
graphics._s();
graphics._m(_masrgins.L*100, _masrgins.T*100);
graphics._l(_masrgins.R*100, _masrgins.T*100);
graphics._l(_masrgins.R*100, _masrgins.B*100);
graphics._l(_masrgins.L*100, _masrgins.B*100);
graphics._z();
graphics.ds(); */
graphics.SetIntegerGrid(true);
}
......@@ -3008,135 +3008,135 @@ CShape.prototype =
}
switch (sPreset) {
case "lineWithArrow":
{
_final_preset = "line";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
{
_final_preset = "line";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
case "lineWithTwoArrows":
{
_final_preset = "line";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
case "lineWithTwoArrows":
{
_final_preset = "line";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
case "bentConnector5WithArrow":
{
_final_preset = "bentConnector5";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
{
_final_preset = "bentConnector5";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
case "bentConnector5WithTwoArrows":
{
_final_preset = "bentConnector5";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
{
_final_preset = "bentConnector5";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
case "curvedConnector3WithArrow":
{
_final_preset = "curvedConnector3";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
{
_final_preset = "curvedConnector3";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
break;
}
case "curvedConnector3WithTwoArrows":
{
_final_preset = "curvedConnector3";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
{
_final_preset = "curvedConnector3";
_arrow_flag = true;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
default:
{
_final_preset = sPreset;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = null;
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = new EndArrow();
_new_line.tailEnd.type = LineEndType.Arrow;
_new_line.tailEnd.len = LineEndSize.Mid;
_new_line.tailEnd.w = LineEndSize.Mid;
_new_line.headEnd = null;
break;
_new_line.headEnd = new EndArrow();
_new_line.headEnd.type = LineEndType.Arrow;
_new_line.headEnd.len = LineEndSize.Mid;
_new_line.headEnd.w = LineEndSize.Mid;
break;
}
default:
{
_final_preset = sPreset;
if (_old_line == null) {
_new_line = new CLn();
}
else {
_new_line = this.spPr.ln.createDuplicate();
}
_new_line.tailEnd = null;
_new_line.headEnd = null;
break;
}
}
var old_geometry = isRealObject(this.spPr.geometry) ? this.spPr.geometry : null;
if (_final_preset != null) {
......@@ -3272,7 +3272,7 @@ CShape.prototype =
var radius = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
var check_line = CheckObjectLine(this);
var sqr_x = t_x * t_y, sqr_y = t_y * t_y;
var sqr_x = t_x * t_x, sqr_y = t_y * t_y;
if (Math.sqrt(sqr_x + sqr_y) < radius)
return 0;
......@@ -3365,7 +3365,7 @@ CShape.prototype =
HitInLine(_hit_context, x_t, y_t, this.extX, 0, this.extX, this.extY) ||
HitInLine(_hit_context, x_t, y_t, this.extX, this.extY, 0, this.extY) ||
HitInLine(_hit_context, x_t, y_t, 0, this.extY, 0, 0) ||
HitInLine(_hit_context, x_t, y_t, this.extX * 0.5, 0, this.extX * 0.5, -this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE)));
HitInLine(_hit_context, x_t, y_t, this.extX * 0.5, 0, this.extX * 0.5, -this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE)));
},
canRotate: function () {
......@@ -3473,119 +3473,119 @@ CShape.prototype =
switch (data.Type) {
case historyitem_SetShapeRot:
{
this.spPr.xfrm.rot = data.oldRot;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
{
this.spPr.xfrm.rot = data.oldRot;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetShapeOffset:
{
this.spPr.xfrm.offX = data.oldOffsetX;
this.spPr.xfrm.offY = data.oldOffsetY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
{
this.spPr.xfrm.offX = data.oldOffsetX;
this.spPr.xfrm.offY = data.oldOffsetY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetShapeExtents:
{
this.spPr.xfrm.extX = data.oldExtentX;
this.spPr.xfrm.extY = data.oldExtentY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateGeometry = true;
break;
}
{
this.spPr.xfrm.extX = data.oldExtentX;
this.spPr.xfrm.extY = data.oldExtentY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateGeometry = true;
break;
}
case historyitem_SetShapeFlips:
{
this.spPr.xfrm.flipH = data.oldFlipH;
this.spPr.xfrm.flipV = data.oldFlipV;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
break;
}
{
this.spPr.xfrm.flipH = data.oldFlipH;
this.spPr.xfrm.flipV = data.oldFlipV;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
break;
}
case historyitem_SetShapeSetFill:
{
if (isRealObject(data.oldFill)) {
this.spPr.Fill = data.oldFill.createDuplicate();
}
else {
this.spPr.Fill = null;
}
{
if (isRealObject(data.oldFill)) {
this.spPr.Fill = data.oldFill.createDuplicate();
}
else {
this.spPr.Fill = null;
}
this.recalcInfo.recalculateFill = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculateTransparent = true;
this.recalcInfo.recalculateFill = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculateTransparent = true;
break;
}
break;
}
case historyitem_SetShapeSetLine:
{
if (isRealObject(data.oldLine)) {
this.spPr.ln = data.oldLine.createDuplicate();
}
else {
this.spPr.ln = null;
}
this.recalcInfo.recalculateLine = true;
this.recalcInfo.recalculatePen = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
break;
{
if (isRealObject(data.oldLine)) {
this.spPr.ln = data.oldLine.createDuplicate();
}
else {
this.spPr.ln = null;
}
this.recalcInfo.recalculateLine = true;
this.recalcInfo.recalculatePen = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
break;
}
case historyitem_SetShapeSetGeometry:
{
if (isRealObject(data.oldGeometry)) {
this.spPr.geometry = data.oldGeometry.createDuplicate();
this.spPr.geometry.Init(5, 5);
}
else {
this.spPr.geometry = null;
}
this.recalcInfo.recalculateGeometry = true;
break;
{
if (isRealObject(data.oldGeometry)) {
this.spPr.geometry = data.oldGeometry.createDuplicate();
this.spPr.geometry.Init(5, 5);
}
case historyitem_SetShapeBodyPr:
{
this.txBody.bodyPr = data.oldBodyPr.createDuplicate();
this.txBody.recalcInfo.recalculateBodyPr = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
break;
else {
this.spPr.geometry = null;
}
this.recalcInfo.recalculateGeometry = true;
break;
}
case historyitem_SetShapeBodyPr:
{
this.txBody.bodyPr = data.oldBodyPr.createDuplicate();
this.txBody.recalcInfo.recalculateBodyPr = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetSetNvSpPr:
{
this.nvSpPr = data.oldPr;
break;
}
{
this.nvSpPr = data.oldPr;
break;
}
case historyitem_SetSetSpPr:
{
this.spPr = data.oldPr;
break;
}
{
this.spPr = data.oldPr;
break;
}
case historyitem_SetSetStyle:
{
this.style = data.oldPr;
break;
}
{
this.style = data.oldPr;
break;
}
case historyitem_SetTextBody:
{
this.txBody = data.oldPr;
break;
}
{
this.txBody = data.oldPr;
break;
}
case historyitem_SetSpGroup:
{
this.group = data.oldPr;
break;
}
{
this.group = data.oldPr;
break;
}
case historyitem_SetShapeParent:
{
this.parent = data.Old;
break;
}
{
this.parent = data.Old;
break;
}
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
if (!this.parent) {
......@@ -3597,117 +3597,117 @@ CShape.prototype =
switch (data.Type) {
case historyitem_SetShapeRot:
{
this.spPr.xfrm.rot = data.newRot;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
{
this.spPr.xfrm.rot = data.newRot;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetShapeOffset:
{
this.spPr.xfrm.offX = data.newOffsetX;
this.spPr.xfrm.offY = data.newOffsetY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
{
this.spPr.xfrm.offX = data.newOffsetX;
this.spPr.xfrm.offY = data.newOffsetY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetShapeExtents:
{
this.spPr.xfrm.extX = data.newExtentX;
this.spPr.xfrm.extY = data.newExtentY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateGeometry = true;
break;
}
{
this.spPr.xfrm.extX = data.newExtentX;
this.spPr.xfrm.extY = data.newExtentY;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateGeometry = true;
break;
}
case historyitem_SetShapeFlips:
{
this.spPr.xfrm.flipH = data.newFlipH;
this.spPr.xfrm.flipV = data.newFlipV;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
break;
}
{
this.spPr.xfrm.flipH = data.newFlipH;
this.spPr.xfrm.flipV = data.newFlipV;
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
break;
}
case historyitem_SetShapeSetFill:
{
if (isRealObject(data.newFill)) {
this.spPr.Fill = data.newFill.createDuplicate();
}
this.recalcInfo.recalculateFill = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculateTransparent = true;
break;
{
if (isRealObject(data.newFill)) {
this.spPr.Fill = data.newFill.createDuplicate();
}
case historyitem_SetShapeSetLine:
{
if (isRealObject(data.newLine)) {
this.spPr.ln = data.newLine.createDuplicate();
}
else {
this.spPr.ln = null;
}
this.recalcInfo.recalculateFill = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculateTransparent = true;
this.recalcInfo.recalculateLine = true;
this.recalcInfo.recalculatePen = true;
break;
break;
}
case historyitem_SetShapeSetLine:
{
if (isRealObject(data.newLine)) {
this.spPr.ln = data.newLine.createDuplicate();
}
else {
this.spPr.ln = null;
}
this.recalcInfo.recalculateLine = true;
this.recalcInfo.recalculatePen = true;
break;
}
case historyitem_SetShapeSetGeometry:
{
if (isRealObject(data.newGeometry)) {
this.spPr.geometry = data.newGeometry.createDuplicate();
this.spPr.geometry.Init(5, 5);
}
else {
this.spPr.geometry = null;
}
this.recalcInfo.recalculateGeometry = true;
break;
{
if (isRealObject(data.newGeometry)) {
this.spPr.geometry = data.newGeometry.createDuplicate();
this.spPr.geometry.Init(5, 5);
}
case historyitem_SetShapeBodyPr:
{
this.txBody.bodyPr = data.newBodyPr.createDuplicate();
this.txBody.recalcInfo.recalculateBodyPr = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
break;
else {
this.spPr.geometry = null;
}
this.recalcInfo.recalculateGeometry = true;
break;
}
case historyitem_SetShapeBodyPr:
{
this.txBody.bodyPr = data.newBodyPr.createDuplicate();
this.txBody.recalcInfo.recalculateBodyPr = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetSetNvSpPr:
{
this.nvSpPr = data.newPr;
break;
}
{
this.nvSpPr = data.newPr;
break;
}
case historyitem_SetSetSpPr:
{
this.spPr = data.newPr;
break;
}
{
this.spPr = data.newPr;
break;
}
case historyitem_SetSetStyle:
{
this.style = data.newPr;
break;
}
{
this.style = data.newPr;
break;
}
case historyitem_SetTextBody:
{
this.txBody = data.newPr;
break;
}
{
this.txBody = data.newPr;
break;
}
case historyitem_SetSpGroup:
{
this.group = data.newPr;
break;
}
{
this.group = data.newPr;
break;
}
case historyitem_SetShapeParent:
{
this.parent = data.New;
break;
}
{
this.parent = data.New;
break;
}
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
if (!this.parent) {
......@@ -3721,111 +3721,111 @@ CShape.prototype =
var bool;
switch (data.Type) {
case historyitem_SetShapeRot:
{
w.WriteDouble(data.newRot);
break;
}
{
w.WriteDouble(data.newRot);
break;
}
case historyitem_SetShapeOffset:
{
w.WriteDouble(data.newOffsetX);
w.WriteDouble(data.newOffsetY);
break;
}
{
w.WriteDouble(data.newOffsetX);
w.WriteDouble(data.newOffsetY);
break;
}
case historyitem_SetShapeExtents:
{
w.WriteDouble(data.newExtentX);
w.WriteDouble(data.newExtentY);
break;
}
{
w.WriteDouble(data.newExtentX);
w.WriteDouble(data.newExtentY);
break;
}
case historyitem_SetShapeFlips:
{
w.WriteBool(data.newFlipH);
w.WriteBool(data.newFlipV);
break;
}
{
w.WriteBool(data.newFlipH);
w.WriteBool(data.newFlipV);
break;
}
case historyitem_SetShapeSetFill:
{
w.WriteBool(isRealObject(data.newFill));
if (isRealObject(data.newFill)) {
data.newFill.Write_ToBinary2(w);
}
break;
{
w.WriteBool(isRealObject(data.newFill));
if (isRealObject(data.newFill)) {
data.newFill.Write_ToBinary2(w);
}
break;
}
case historyitem_SetShapeSetLine:
{
w.WriteBool(isRealObject(data.newLine));
if (isRealObject(data.newLine)) {
data.newLine.Write_ToBinary2(w);
}
break;
{
w.WriteBool(isRealObject(data.newLine));
if (isRealObject(data.newLine)) {
data.newLine.Write_ToBinary2(w);
}
break;
}
case historyitem_SetShapeSetGeometry:
{
w.WriteBool(isRealObject(data.newGeometry));
if (isRealObject(data.newGeometry)) {
data.newGeometry.Write_ToBinary2(w);
}
break;
{
w.WriteBool(isRealObject(data.newGeometry));
if (isRealObject(data.newGeometry)) {
data.newGeometry.Write_ToBinary2(w);
}
break;
}
case historyitem_SetShapeBodyPr:
{
data.newBodyPr.Write_ToBinary2(w);
break;
}
{
data.newBodyPr.Write_ToBinary2(w);
break;
}
case historyitem_SetSetNvSpPr:
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
data.newPr.Write_ToBinary2(w);
}
break;
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
data.newPr.Write_ToBinary2(w);
}
break;
}
case historyitem_SetSetSpPr:
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
data.newPr.Write_ToBinary2(w);
}
break;
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
data.newPr.Write_ToBinary2(w);
}
break;
}
case historyitem_SetSetStyle:
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
data.newPr.Write_ToBinary2(w);
}
break;
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
data.newPr.Write_ToBinary2(w);
}
break;
}
case historyitem_SetTextBody:
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
w.WriteString2(data.newPr.Get_Id());
}
break;
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
w.WriteString2(data.newPr.Get_Id());
}
break;
}
case historyitem_SetSpGroup:
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
w.WriteString2(data.newPr.Get_Id());
}
break;
{
w.WriteBool(isRealObject(data.newPr));
if (isRealObject(data.newPr)) {
w.WriteString2(data.newPr.Get_Id());
}
break;
}
case historyitem_SetShapeParent:
{
w.WriteBool(isRealObject(data.New));
if (isRealObject(data.New)) {
w.WriteString2(data.New.Id);
}
break;
{
w.WriteBool(isRealObject(data.New));
if (isRealObject(data.New)) {
w.WriteString2(data.New.Id);
}
break;
}
}
},
......@@ -3833,150 +3833,150 @@ CShape.prototype =
if (r.GetLong() === historyitem_type_Shape) {
switch (r.GetLong()) {
case historyitem_SetShapeRot:
{
this.spPr.xfrm.rot = r.GetDouble();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
{
this.spPr.xfrm.rot = r.GetDouble();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetShapeOffset:
{
this.spPr.xfrm.offX = r.GetDouble();
this.spPr.xfrm.offY = r.GetDouble();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
{
this.spPr.xfrm.offX = r.GetDouble();
this.spPr.xfrm.offY = r.GetDouble();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetShapeExtents:
{
this.spPr.xfrm.extX = r.GetDouble();
this.spPr.xfrm.extY = r.GetDouble();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateGeometry = true;
{
this.spPr.xfrm.extX = r.GetDouble();
this.spPr.xfrm.extY = r.GetDouble();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateGeometry = true;
break;
}
break;
}
case historyitem_SetShapeFlips:
{
this.spPr.xfrm.flipH = r.GetBool();
this.spPr.xfrm.flipV = r.GetBool();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
break;
}
{
this.spPr.xfrm.flipH = r.GetBool();
this.spPr.xfrm.flipV = r.GetBool();
this.recalcInfo.recalculateTransform = true;
this.recalcInfo.recalculateTransformText = true;
this.recalcInfo.recalculateContent = true;
break;
}
case historyitem_SetShapeSetFill:
{
if (r.GetBool()) {
this.spPr.Fill = new CUniFill();
this.spPr.Fill.Read_FromBinary2(r);
}
if (this.spPr.Fill && this.spPr.Fill.fill instanceof CBlipFill
{
if (r.GetBool()) {
this.spPr.Fill = new CUniFill();
this.spPr.Fill.Read_FromBinary2(r);
}
if (this.spPr.Fill && this.spPr.Fill.fill instanceof CBlipFill
&& typeof this.spPr.Fill.fill.RasterImageId === "string") {
CollaborativeEditing.Add_NewImage(this.spPr.Fill.fill.RasterImageId);
}
this.recalcInfo.recalculateFill = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculateTransparent = true;
break;
CollaborativeEditing.Add_NewImage(this.spPr.Fill.fill.RasterImageId);
}
this.recalcInfo.recalculateFill = true;
this.recalcInfo.recalculateBrush = true;
this.recalcInfo.recalculateTransparent = true;
break;
}
case historyitem_SetShapeSetLine:
{
if (r.GetBool()) {
this.spPr.ln = new CLn();
this.spPr.ln.Read_FromBinary2(r);
}
this.recalcInfo.recalculateLine = true;
this.recalcInfo.recalculatePen = true;
break;
{
if (r.GetBool()) {
this.spPr.ln = new CLn();
this.spPr.ln.Read_FromBinary2(r);
}
this.recalcInfo.recalculateLine = true;
this.recalcInfo.recalculatePen = true;
break;
}
case historyitem_SetShapeSetGeometry:
{
if (r.GetBool()) {
this.spPr.geometry = new Geometry();
this.spPr.geometry.Read_FromBinary2(r);
this.spPr.geometry.Init(5, 5);
}
else {
this.spPr.geometry = null;
}
this.recalcInfo.recalculateGeometry = true;
break;
{
if (r.GetBool()) {
this.spPr.geometry = new Geometry();
this.spPr.geometry.Read_FromBinary2(r);
this.spPr.geometry.Init(5, 5);
}
case historyitem_SetShapeBodyPr:
{
this.txBody.bodyPr = new CBodyPr();
this.txBody.bodyPr.Read_FromBinary2(r);
this.txBody.recalcInfo.recalculateBodyPr = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
break;
else {
this.spPr.geometry = null;
}
this.recalcInfo.recalculateGeometry = true;
break;
}
case historyitem_SetShapeBodyPr:
{
this.txBody.bodyPr = new CBodyPr();
this.txBody.bodyPr.Read_FromBinary2(r);
this.txBody.recalcInfo.recalculateBodyPr = true;
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
break;
}
case historyitem_SetSetNvSpPr:
{
if (r.GetBool()) {
this.nvSpPr = new UniNvPr();
this.nvSpPr.Read_FromBinary2(r);
}
else {
this.nvSpPr = null;
}
break;
{
if (r.GetBool()) {
this.nvSpPr = new UniNvPr();
this.nvSpPr.Read_FromBinary2(r);
}
else {
this.nvSpPr = null;
}
break;
}
case historyitem_SetSetSpPr:
{
{
this.spPr = new CSpPr();
if (r.GetBool()) {
this.spPr.Read_FromBinary2(r);
}
break;
this.spPr = new CSpPr();
if (r.GetBool()) {
this.spPr.Read_FromBinary2(r);
}
break;
}
case historyitem_SetSetStyle:
{
if (r.GetBool()) {
this.style = new CShapeStyle();
this.style.Read_FromBinary2(r);
}
else {
this.style = null;
}
break;
{
if (r.GetBool()) {
this.style = new CShapeStyle();
this.style.Read_FromBinary2(r);
}
else {
this.style = null;
}
break;
}
case historyitem_SetTextBody:
{
if (r.GetBool()) {
this.txBody = g_oTableId.Get_ById(r.GetString2());
}
else {
this.txBody = null;
}
break;
{
if (r.GetBool()) {
this.txBody = g_oTableId.Get_ById(r.GetString2());
}
else {
this.txBody = null;
}
break;
}
case historyitem_SetSpGroup:
{
if (r.GetBool()) {
this.group = g_oTableId.Get_ById(r.GetString2());
}
else {
this.group = null;
}
break;
{
if (r.GetBool()) {
this.group = g_oTableId.Get_ById(r.GetString2());
}
else {
this.group = null;
}
break;
}
case historyitem_SetShapeParent:
{
if (r.GetBool()) {
this.parent = g_oTableId.Get_ById(r.GetString2());
}
break;
{
if (r.GetBool()) {
this.parent = g_oTableId.Get_ById(r.GetString2());
}
break;
}
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
......
......@@ -220,7 +220,7 @@ CTextBody.prototype =
var Doc = this.content;
if ( true === Doc.Is_SelectionUse() && !Doc.Selection_IsEmpty())
{
drawingDocument.UpdateTargetTransform(this.shape.transformText);
drawingDocument.UpdateTargetTransform(this.shape.transformText);
drawingDocument.TargetEnd();
drawingDocument.SelectEnabled(true);
drawingDocument.SelectClear();
......@@ -636,9 +636,9 @@ CTextBody.prototype =
draw: function(graphics)
{
/*if(this.content.Is_Empty() && isRealObject(this.phContent))
this.content2.Draw(graphics);
else
this.content.Draw(0, graphics); */
this.content2.Draw(graphics);
else
this.content.Draw(0, graphics); */
if((!this.content || this.content.Is_Empty()) && this.content2!=null && !this.shape.addTextFlag && (this.shape.isEmptyPlaceholder ? this.shape.isEmptyPlaceholder() : false))
{
......@@ -914,13 +914,13 @@ CTextBody.prototype =
var par = this.content.Content[i];
for(var j = 0; j < par.Lines.length; ++j)
{
if(par.Lines[j].Ranges[0].W + 1> max_width)
if(par.Lines[j].Ranges[0].W + 1 > max_width)
{
max_width = par.Lines[j].Ranges[0].W;
max_width = par.Lines[j].Ranges[0].W + 1;
}
}
}
return max_width + r_ins + l_ins;
return max_width + 1 + r_ins + l_ins;
},
getRectHeight: function(maxHeight, width)
......
......@@ -813,7 +813,7 @@ CGraphicObjects.prototype = {
case STATES_ID_TEXT_ADD:
case STATES_ID_GROUP:
case STATES_ID_TEXT_ADD_IN_GROUP:
// case STATES_ID_TEXT_ADD_IN_GROUP:
// case STATES_ID_TEXT_ADD_IN_GROUP:
{
if(this.State.id === STATES_ID_GROUP || this.State.id === STATES_ID_TEXT_ADD_IN_GROUP)
{
......@@ -1128,8 +1128,11 @@ CGraphicObjects.prototype = {
SubType: -1
}
};
editor.sync_PrLineSpacingCallBack(_empty_para_pr.Spacing);
editor.UpdateParagraphProp(_empty_para_pr);
editor.sync_ParaSpacingLine( _empty_para_pr.Spacing );
editor.Update_ParaInd(_empty_para_pr.Ind);
editor.sync_PrAlignCallBack(_empty_para_pr.Jc);
editor.sync_ParaStyleName(_empty_para_pr.StyleName);
editor.sync_ListType(_empty_para_pr.ListType);
}
if(text_props != null)
......@@ -1195,7 +1198,7 @@ CGraphicObjects.prototype = {
switch(this.State.id)
{
case STATES_ID_NULL:
//case STATES_ID_TEXT_ADD:
//case STATES_ID_TEXT_ADD:
// case STATES_ID_TEXT_ADD_IN_GROUP:
{
var shapes = by_types.shapes;
......@@ -2116,8 +2119,10 @@ CGraphicObjects.prototype = {
image.setGeometry( CreateGeometry("rect"));
image.spPr.geometry.Init(5, 5);
image.setXfrm((this.slide.presentation.Width - W)/2, (this.slide.presentation.Height - H)/2, W, H, null, null, null);
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_AddShape, image) === false)
if (editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_AddShape, image) === false)
{
this.resetSelectionState();
image.select(this);
this.slide.addToSpTreeToPos(this.slide.cSld.spTree.length, image);
editor.WordControl.m_oLogicDocument.recalcMap[image.Id] = image;
}
......@@ -2380,9 +2385,9 @@ CGraphicObjects.prototype = {
if(_tmp_sel_state.textSelectionState != undefined)
{
/*if(_prev_sel_state != undefined && _tmp_sel_state.textObject != _prev_sel_state.textObject)
{
return _arr_sel_states[_pos_sel_state];
}*/
{
return _arr_sel_states[_pos_sel_state];
}*/
var _text_sel_state = _tmp_sel_state.textSelectionState;
if(b_table && isRealNumber(cur_row) && isRealNumber(cur_cell))
{
......@@ -2573,7 +2578,7 @@ CGraphicObjects.prototype = {
}
}
}
}
}
_prev_sel_state = _tmp_sel_state;
......@@ -3353,7 +3358,7 @@ CGraphicObjects.prototype = {
break;
}
}
// this.updateSelectionState()
// this.updateSelectionState()
},
recalculateCurPos: function()
......@@ -3392,16 +3397,16 @@ CGraphicObjects.prototype = {
{
this.State.onMouseUp(e, x, y);
this.slide.presentation.Document_UpdateInterfaceState();
/* if(this.State.id === STATES_ID_NULL)
{ */
if(this.selectedObjects.length > 0)
{
var _data = new CContextMenuData();
_data.Type = c_oAscContextMenuTypes.Main;
_data.X_abs = e.X;
_data.Y_abs = e.Y;
editor.sync_ContextMenuCallback(_data);
}
/* if(this.State.id === STATES_ID_NULL)
{ */
if(this.selectedObjects.length > 0)
{
var _data = new CContextMenuData();
_data.Type = c_oAscContextMenuTypes.Main;
_data.X_abs = e.X;
_data.Y_abs = e.Y;
editor.sync_ContextMenuCallback(_data);
}
//}
},
......
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