Commit 25d8bc68 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с добавлением автофигур в колонтитулы (баги 24432, 25014).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57151 954022d7-b5bf-4e40-9824-e11837661b57
parent 11d92015
......@@ -9741,11 +9741,26 @@ CDocument.prototype =
var OldCurPage = this.CurPage;
this.CurPage = PageIndex;
if ( true === editor.isStartAddShape && docpostype_HdrFtr != this.CurPos.Type )
if ( true === editor.isStartAddShape && (docpostype_HdrFtr !== this.CurPos.Type || null !== this.HdrFtr.CurHdrFtr) )
{
this.CurPos.Type = docpostype_DrawingObjects;
this.Selection.Use = true;
this.Selection.Start = true;
if (docpostype_HdrFtr !== this.CurPos.Type)
{
this.CurPos.Type = docpostype_DrawingObjects;
this.Selection.Use = true;
this.Selection.Start = true;
}
else
{
this.Selection.Use = true;
this.Selection.Start = true;
var CurHdrFtr = this.HdrFtr.CurHdrFtr;
var DocContent = CurHdrFtr.Content;
DocContent.CurPos.Type = docpostype_DrawingObjects;
DocContent.Selection.Use = true;
DocContent.Selection.Start = true;
}
if ( true != this.DrawingObjects.isPolylineAddition() )
this.DrawingObjects.startAddShape( editor.addShapePreset );
......
......@@ -3911,7 +3911,8 @@ CDocumentContent.prototype =
// TODO: Заглушка для переноса автофигур и картинок. Когда разрулим ситуацию так, чтобы когда у нас
// в текста была выделена автофигура выделение шло для автофигур, тогда здесь можно будет убрать.
bNeedSelect = (docpostype_DrawingObjects !== this.CurPos.Type && ( null === this.LogicDocument || docpostype_DrawingObjects !== this.LogicDocument.CurPos.Type ) ? true : false);
var LogicDocument = this.LogicDocument;
bNeedSelect = (null !== LogicDocument && (docpostype_DrawingObjects === LogicDocument.CurPos.Type || (docpostype_HdrFtr === LogicDocument.CurPos.Type && null !== LogicDocument.HdrFtr.CurHdrFtr && docpostype_DrawingObjects === LogicDocument.HdrFtr.CurHdrFtr.Content.CurPos.Type)) ? false : true);
for ( var Index = 0; Index < NewElementsCount; Index++ )
{
......@@ -4028,8 +4029,15 @@ CDocumentContent.prototype =
this.Selection.EndPos = DstIndex + ElementsCount - 1;
}
if ( true === bNeedSelect )
if (true === bNeedSelect)
this.Parent.Set_CurrentElement(false, this.Get_StartPage_Absolute());
else if (null !== this.LogicDocument && docpostype_HdrFtr === this.LogicDocument.CurPos.Type)
{
this.Parent.Set_CurrentElement(false, this.Get_StartPage_Absolute());
this.CurPos.Type = docpostype_DrawingObjects;
this.Selection.Use = true;
this.Selection.Start = false;
}
},
Set_ParagraphAlign : function(Align)
......
......@@ -2070,7 +2070,8 @@ CHeaderFooterController.prototype =
Get_NearestPos : function(PageNum, X, Y, bAnchor, Drawing)
{
var HdrFtr = this.Internal_GetContentByXY( X, Y, PageNum );
var HdrFtr = (true === editor.isStartAddShape ? this.CurHdrFtr : this.Internal_GetContentByXY( X, Y, PageNum ));
if ( null != HdrFtr )
return HdrFtr.Get_NearestPos( X, Y, bAnchor, Drawing );
else
......
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