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

не добавлем лишние элементы в историю при применении свойств через слайдеры....

не добавлем лишние элементы в историю при применении свойств через слайдеры. поправил падение в CParagraphContentWithParagraphLikeContent.prototype.Copy

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60868 954022d7-b5bf-4e40-9824-e11837661b57
parent da93b0cd
...@@ -346,7 +346,7 @@ CTextBody.prototype = ...@@ -346,7 +346,7 @@ CTextBody.prototype =
} }
else else
{ {
this.bodyPr = null; this.lstStyle = null;
} }
break; break;
......
...@@ -2826,11 +2826,14 @@ CPresentation.prototype = ...@@ -2826,11 +2826,14 @@ CPresentation.prototype =
editor.asc_fireCallback("asc_onCanUnGroup", this.canUnGroup()); editor.asc_fireCallback("asc_onCanUnGroup", this.canUnGroup());
}, },
changeBackground: function(bg, arr_ind) changeBackground: function(bg, arr_ind, bNoCreatePoint)
{ {
if(this.Document_Is_SelectionLocked(changestype_SlideBg) === false) if(bNoCreatePoint === true || this.Document_Is_SelectionLocked(changestype_SlideBg) === false)
{ {
History.Create_NewPoint(); if(!(bNoCreatePoint === true ))
{
History.Create_NewPoint();
}
for(var i = 0; i <arr_ind.length; ++i) for(var i = 0; i <arr_ind.length; ++i)
{ {
this.Slides[arr_ind[i]].changeBackground(bg); this.Slides[arr_ind[i]].changeBackground(bg);
...@@ -2843,7 +2846,10 @@ CPresentation.prototype = ...@@ -2843,7 +2846,10 @@ CPresentation.prototype =
} }
this.DrawingDocument.OnEndRecalculate(true, false); this.DrawingDocument.OnEndRecalculate(true, false);
this.Document_UpdateInterfaceState(); if(!(bNoCreatePoint === true ))
{
this.Document_UpdateInterfaceState();
}
} }
}, },
...@@ -4328,8 +4334,12 @@ CPresentation.prototype = ...@@ -4328,8 +4334,12 @@ CPresentation.prototype =
{ {
var pos = this.m_oContentChanges.Check( contentchanges_Add, Reader.GetLong()); var pos = this.m_oContentChanges.Check( contentchanges_Add, Reader.GetLong());
var Id = Reader.GetString2(); var Id = Reader.GetString2();
this.Slides.splice(pos, 0, g_oTableId.Get_ById(Id)); var oSlide = g_oTableId.Get_ById(Id);
CollaborativeEditing.Add_ChangedClass(this); if(oSlide)
{
this.Slides.splice(pos, 0, oSlide);
CollaborativeEditing.Add_ChangedClass(this);
}
break; break;
} }
case historyitem_Presentation_RemoveSlide: case historyitem_Presentation_RemoveSlide:
......
...@@ -2221,7 +2221,44 @@ asc_docs_api.prototype.SetSlideProps = function(prop) ...@@ -2221,7 +2221,44 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
{ {
this.WordControl.m_oDrawingDocument.DrawImageTextureFillSlide(bg.bgPr.Fill.fill.RasterImageId); this.WordControl.m_oDrawingDocument.DrawImageTextureFillSlide(bg.bgPr.Fill.fill.RasterImageId);
} }
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
if(!this.noCreatePoint || this.exucuteHistory)
{
if( !this.noCreatePoint && !this.exucuteHistory && this.exucuteHistoryEnd)
{
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind, true);
this.exucuteHistoryEnd = false;
}
else
{
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
}
if(this.exucuteHistory)
{
this.exucuteHistory = false;
}
}
else
{
if(this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage])
{
ExecuteNoHistory(function(){
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind, true);
for(var i = 0; i <arr_ind.length; ++i)
{
this.WordControl.m_oLogicDocument.Slides[arr_ind[i]].recalculateBackground()
}
for(i = 0; i <arr_ind.length; ++i)
{
this.WordControl.m_oLogicDocument.DrawingDocument.OnRecalculatePage(arr_ind[i], this.WordControl.m_oLogicDocument.Slides[arr_ind[i]]);
}
this.WordControl.m_oLogicDocument.DrawingDocument.OnEndRecalculate(true, false);
}, this, []);
}
}
} }
} }
......
...@@ -912,7 +912,7 @@ CGraphicObjects.prototype = ...@@ -912,7 +912,7 @@ CGraphicObjects.prototype =
if(this.curState.InlinePos) if(this.curState.InlinePos)
{ {
this.drawingDocument.AutoShapesTrack.SetCurrentPage(this.curState.InlinePos.Page); this.drawingDocument.AutoShapesTrack.SetCurrentPage(this.curState.InlinePos.Page);
this.drawingDocument.AutoShapesTrack.DrawInlineMoveCursor(this.curState.InlinePos.X, this.curState.InlinePos.Y, this.curState.InlinePos.Height, this.curState.InlinePos.transform) this.drawingDocument.AutoShapesTrack.DrawInlineMoveCursor(this.curState.InlinePos.X, this.curState.InlinePos.Y, this.curState.InlinePos.Height, this.curState.InlinePos.transform);
} }
//TODO Anchor Position //TODO Anchor Position
return; return;
......
...@@ -189,9 +189,9 @@ CParagraphContentWithParagraphLikeContent.prototype.Copy = function(Selected) ...@@ -189,9 +189,9 @@ CParagraphContentWithParagraphLikeContent.prototype.Copy = function(Selected)
var Item = this.Content[CurPos]; var Item = this.Content[CurPos];
if ( StartPos === CurPos || EndPos === CurPos ) if ( StartPos === CurPos || EndPos === CurPos )
NewHyperlink.Add_ToContent( CurPos - StartPos, Item.Copy(Selected) ); NewElement.Add_ToContent( CurPos - StartPos, Item.Copy(Selected) );
else else
NewHyperlink.Add_ToContent( CurPos - StartPos, Item.Copy(false) ); NewElement.Add_ToContent( CurPos - StartPos, Item.Copy(false) );
} }
return NewElement; return NewElement;
......
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