Commit 0db94746 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

addShapeOnPage

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60853 954022d7-b5bf-4e40-9824-e11837661b57
parent f5f16888
......@@ -868,9 +868,32 @@ CGraphicObjects.prototype =
addShapeOnPage: function(sPreset, nPageIndex, dX, dY)
{
this.changeCurrentState(new StartAddNewShape(this, sPreset));
this.OnMouseDown({}, dX, dY, nPageIndex);
this.OnMouseUp({}, dX, dY, nPageIndex);
if ( docpostype_HdrFtr !== this.document.CurPos.Type || null !== this.document.HdrFtr.CurHdrFtr )
{
if (docpostype_HdrFtr !== this.document.CurPos.Type)
{
this.document.CurPos.Type = docpostype_DrawingObjects;
this.document.Selection.Use = true;
this.document.Selection.Start = true;
}
else
{
this.document.Selection.Use = true;
this.document.Selection.Start = true;
var CurHdrFtr = this.document.HdrFtr.CurHdrFtr;
var DocContent = CurHdrFtr.Content;
DocContent.CurPos.Type = docpostype_DrawingObjects;
DocContent.Selection.Use = true;
DocContent.Selection.Start = true;
}
this.changeCurrentState(new StartAddNewShape(this, sPreset));
this.OnMouseDown({}, dX, dY, nPageIndex);
this.OnMouseUp({}, dX, dY, nPageIndex);
}
},
......
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