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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52049 954022d7-b5bf-4e40-9824-e11837661b57
parent 7b99dbf6
......@@ -1514,6 +1514,10 @@ CChartAsGroup.prototype =
setPosition: function(x, y)
{
if(this.spPr.xfrm)
{
this.setXfrmObject(new CXfrm());
}
this.spPr.xfrm.setPosition(x, y);
},
......
......@@ -212,6 +212,95 @@ CChartTitle.prototype =
}
},
setCellAlign: function (align) {
if(isRealObject(this.txBody))
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddUndo, null, null,
new UndoRedoDataGraphicObjects(this.chartGroup.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
var align_num = null;
switch(align)
{
case "left":
{
align_num = align_Left;
break;
}
case "right":
{
align_num = align_Right;
break;
}
case "center":
{
align_num = align_Center;
break;
}
case "justify":
{
align_num = align_Justify;
break;
}
}
if(isRealNumber(align_num))
{
this.txBody.content.Set_ParagraphAlign(align_num);
//this.calculateTransformTextMatrix();
}
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddRedo, null, null,
new UndoRedoDataGraphicObjects(this.chartGroup.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
}
},
setCellAllAlign: function (align) {
if(isRealObject(this.txBody))
{
var align_num = null;
switch(align)
{
case "left":
{
align_num = align_Left;
break;
}
case "right":
{
align_num = align_Right;
break;
}
case "center":
{
align_num = align_Center;
break;
}
case "justify":
{
align_num = align_Justify;
break;
}
}
if(isRealNumber(align_num))
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddUndo, null, null,
new UndoRedoDataGraphicObjects(this.chartGroup.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
this.txBody.content.Set_ApplyToAll(true);
this.txBody.content.Set_ParagraphAlign(align_num);
this.txBody.content.Set_ApplyToAll(false);
this.calculateContent();
this.calculateTransformTextMatrix();
this.recalculateCurPos();
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_RecalculateAfterParagraphAddRedo, null, null,
new UndoRedoDataGraphicObjects(this.chartGroup.Get_Id(), new UndoRedoDataGOSingleProp(null, null)));
}
}
},
setCellFontName: function (fontName) {
if(isRealObject(this.txBody))
{
......
......@@ -310,6 +310,7 @@ function NullState(drawingObjectsController, drawingObjects)
}
this.drawingObjectsController.resetSelection();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
this.drawingObjectsController.updateSelectionState();
this.drawingObjects.OnUpdateOverlay();
asc["editor"].asc_endAddShape();
};
......@@ -1182,7 +1183,9 @@ function ChartState(drawingObjectsController, drawingObjects, chart)
this.chart.resetSelection(this.drawingObjectsController);
this.drawingObjectsController.resetSelection();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
this.drawingObjectsController.updateSelectionState();
this.drawingObjects.OnUpdateOverlay();
asc["editor"].asc_endAddShape();
};
this.onMouseMove = function(e, x, y)
......@@ -1395,6 +1398,16 @@ function ChartState(drawingObjectsController, drawingObjects, chart)
}
};
this.setCellAlign = function(align)
{
var title = this.getSelectTitle();
if(title && typeof title.setCellAllAlign === "function")
{
title.setCellAllAlign(align);
this.drawingObjects.showDrawingObjects(true);
}
};
// Уменьшение размера шрифта
this.setCellFontSize = function (fontSize) {
var title = this.getSelectTitle();
......@@ -1625,6 +1638,15 @@ function ChartTextAdd(drawingObjectsController, drawingObjects, chart, textObjec
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
}
};
this.setCellAlign = function(align)
{
if(typeof this.textObject.setCellAlign === "function")
{
this.textObject.setCellAlign(align);
this.drawingObjects.showDrawingObjects(true);
this.textObject.updateSelectionState(this.drawingObjects.drawingDocument);
}
};
// Уменьшение размера шрифта
this.setCellUnderline = function (isUnderline) {
......
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