Commit da82956e authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

правка бага с отступами в автофигурах (Bug 22517)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52993 954022d7-b5bf-4e40-9824-e11837661b57
parent ed82c0d8
...@@ -536,16 +536,20 @@ CShape.prototype = ...@@ -536,16 +536,20 @@ CShape.prototype =
}, },
setPaddings: function (paddings) { setPaddings: function (paddings) {
if(isRealObject(this.txBody))
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddUndo, null, null,
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
if(!isRealObject(this.txBody))
{ {
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddUndo, null, null, this.addTextBody(new CTextBody(this));
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(null, null))); this.txBody.calculateContent();
this.txBody.setPaddings(paddings);
this.calculateContent();
this.calculateTransformTextMatrix();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddRedo, null, null,
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
} }
this.txBody.setPaddings(paddings);
this.calculateContent();
this.calculateTransformTextMatrix();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddRedo, null, null,
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
}, },
setCellTextWrap: function (isWrapped) { setCellTextWrap: function (isWrapped) {
......
...@@ -831,7 +831,7 @@ CTextBody.prototype = ...@@ -831,7 +831,7 @@ CTextBody.prototype =
{ {
if(isRealNumber(ins)) if(isRealNumber(ins))
{ {
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_LeftInset, null, null, History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_BottomInset, null, null,
new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(this.bodyPr.bIns, ins))); new UndoRedoDataGraphicObjects(this.Get_Id(), new UndoRedoDataGOSingleProp(this.bodyPr.bIns, ins)));
this.bodyPr.bIns = ins; this.bodyPr.bIns = ins;
} }
...@@ -902,6 +902,26 @@ CTextBody.prototype = ...@@ -902,6 +902,26 @@ CTextBody.prototype =
{ {
switch(type) switch(type)
{ {
case historyitem_AutoShapes_LeftInset:
{
this.bodyPr.lIns = data.oldValue;
break;
}
case historyitem_AutoShapes_TopInset:
{
this.bodyPr.tIns = data.oldValue;
break;
}
case historyitem_AutoShapes_RightInset:
{
this.bodyPr.rIns = data.oldValue;
break;
}
case historyitem_AutoShapes_BottomInset:
{
this.bodyPr.bIns = data.oldValue;
break;
}
case historyitem_AutoShapes_AddDocContent: case historyitem_AutoShapes_AddDocContent:
{ {
this.content = g_oTableId.Get_ById(data.oldValue); this.content = g_oTableId.Get_ById(data.oldValue);
...@@ -935,6 +955,26 @@ CTextBody.prototype = ...@@ -935,6 +955,26 @@ CTextBody.prototype =
{ {
switch(type) switch(type)
{ {
case historyitem_AutoShapes_LeftInset:
{
this.bodyPr.lIns = data.newValue;
break;
}
case historyitem_AutoShapes_TopInset:
{
this.bodyPr.tIns = data.newValue;
break;
}
case historyitem_AutoShapes_RightInset:
{
this.bodyPr.rIns = data.newValue;
break;
}
case historyitem_AutoShapes_BottomInset:
{
this.bodyPr.bIns = data.newValue;
break;
}
case historyitem_AutoShapes_AddDocContent: case historyitem_AutoShapes_AddDocContent:
{ {
this.content = g_oTableId.Get_ById(data.newValue); this.content = g_oTableId.Get_ById(data.newValue);
......
...@@ -176,29 +176,29 @@ var historyitem_AutoShapes_SwapGraphicObjects = 65; ...@@ -176,29 +176,29 @@ var historyitem_AutoShapes_SwapGraphicObjects = 65;
var historyitem_AutoShapes_TopInset = 66; var historyitem_AutoShapes_TopInset = 66;
var historyitem_AutoShapes_RightInset = 67; var historyitem_AutoShapes_RightInset = 67;
var historyitem_AutoShapes_LeftInset = 68; var historyitem_AutoShapes_LeftInset = 68;
var historyitem_AutoShapes_BottomInset = 68; var historyitem_AutoShapes_BottomInset = 69;
var historyitem_AutoShapes_Set_AutoShapeStyle = 69; var historyitem_AutoShapes_Set_AutoShapeStyle = 70;
var historyitem_AutoShapes_Set_ImageBlipFill = 70; var historyitem_AutoShapes_Set_ImageBlipFill = 71;
var historyitem_AutoShapes_Set_AscChart = 71; var historyitem_AutoShapes_Set_AscChart = 72;
var historyitem_AutoShapes_Set_PathStroke = 72; var historyitem_AutoShapes_Set_PathStroke = 73;
var historyitem_AutoShapes_Set_PathFill = 73; var historyitem_AutoShapes_Set_PathFill = 74;
var historyitem_AutoShapes_Set_PathWH = 74; var historyitem_AutoShapes_Set_PathWH = 75;
var historyitem_AutoShapes_SetTailEnd = 75; var historyitem_AutoShapes_SetTailEnd = 76;
var historyitem_AutoShapes_SetHeadEnd = 76; var historyitem_AutoShapes_SetHeadEnd = 77;
var historyitem_AutoShapes_AddTitle = 77; var historyitem_AutoShapes_AddTitle = 78;
var historyitem_AutoShapes_AddXAxis = 78; var historyitem_AutoShapes_AddXAxis = 79;
var historyitem_AutoShapes_AddYAxis = 79; var historyitem_AutoShapes_AddYAxis = 80;
var historyitem_AutoShapes_AddChartGroup = 80; var historyitem_AutoShapes_AddChartGroup = 81;
var historyitem_AutoShapes_SetChartTitleLayout = 81; var historyitem_AutoShapes_SetChartTitleLayout = 82;
var historyitem_AutoShapes_SetChartOverlay = 82; var historyitem_AutoShapes_SetChartOverlay = 83;
var historyitem_AutoShapes_InitChart = 83; var historyitem_AutoShapes_InitChart = 84;
var historyitem_AutoShapes_SetChartTitleType = 84; var historyitem_AutoShapes_SetChartTitleType = 85;
var historyitem_AutoShapes_OnContentRecalculateUndo = 85; var historyitem_AutoShapes_OnContentRecalculateUndo = 86;
var historyitem_AutoShapes_OnContentRecalculateRedo = 86; var historyitem_AutoShapes_OnContentRecalculateRedo = 87;
var historyitem_AutoShapes_GeometryAddPreset = 87; var historyitem_AutoShapes_GeometryAddPreset = 88;
var historyitem_AutoShapes_AddToGroupSpTreeToPos = 88; var historyitem_AutoShapes_AddToGroupSpTreeToPos = 89;
var historyitem_AutoShapes_GroupRecalculateArrGraphicObjectsUndo = 89; var historyitem_AutoShapes_GroupRecalculateArrGraphicObjectsUndo = 90;
var historyitem_AutoShapes_GroupRecalculateArrGraphicObjectsRedo = 90; var historyitem_AutoShapes_GroupRecalculateArrGraphicObjectsRedo = 91;
......
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