Commit 49b360a0 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@50231 954022d7-b5bf-4e40-9824-e11837661b57
parent b3bf498f
...@@ -5913,6 +5913,7 @@ CPresentation.prototype = ...@@ -5913,6 +5913,7 @@ CPresentation.prototype =
if(this.Document_Is_SelectionLocked(changestype_RemoveSlide, null) === false) if(this.Document_Is_SelectionLocked(changestype_RemoveSlide, null) === false)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
var oldLen = this.Slides.length;
array.sort(function(a, b){return a - b;}); array.sort(function(a, b){return a - b;});
for(var i = array.length -1; i > - 1; --i) for(var i = array.length -1; i > - 1; --i)
{ {
...@@ -5922,7 +5923,14 @@ CPresentation.prototype = ...@@ -5922,7 +5923,14 @@ CPresentation.prototype =
{ {
this.Slides[i].changeNum(i); this.Slides[i].changeNum(i);
} }
if(array[array.length-1] != oldLen-1)
{
this.Set_CurPage(array[array.length-1]+1 - array.length);
}
else
{
this.Set_CurPage(this.Slides.length -1);
}
this.Document_UpdateUndoRedoState(); this.Document_UpdateUndoRedoState();
this.DrawingDocument.OnEndRecalculate(); this.DrawingDocument.OnEndRecalculate();
this.DrawingDocument.UpdateThumbnailsAttack(); this.DrawingDocument.UpdateThumbnailsAttack();
......
...@@ -609,25 +609,12 @@ CHistory.prototype = ...@@ -609,25 +609,12 @@ CHistory.prototype =
this.Points[this.Index].Items.push( Item ); this.Points[this.Index].Items.push( Item );
if ( ( Class instanceof CPresentation && ( historyitem_Presenattion_AddSlide === Data.Type || historyitem_Presenattion_RemoveSlide === Data.Type ) ) || if ( ( Class instanceof CPresentation && ( historyitem_Presenattion_AddSlide === Data.Type || historyitem_Presenattion_RemoveSlide === Data.Type ) ) )
( Class instanceof CDocumentContent && ( historyitem_DocumentContent_AddItem === Data.Type || historyitem_DocumentContent_RemoveItem === Data.Type ) ) || {
( Class instanceof CTable && ( historyitem_Table_AddRow === Data.Type || historyitem_Table_RemoveRow === Data.Type ) ) || var bAdd = ( ( Class instanceof CPresentation && historyitem_Presenattion_AddSlide === Data.Type )) ? true : false;
( Class instanceof CTableRow && ( historyitem_TableRow_AddCell === Data.Type || historyitem_TableRow_RemoveCell === Data.Type ) ) ||
( Class instanceof Paragraph && ( historyitem_Paragraph_AddItem === Data.Type || historyitem_Paragraph_RemoveItem === Data.Type ) ) )
{
var bAdd = ( ( Class instanceof CPresentation && historyitem_Presenattion_AddSlide === Data.Type ) ||
( Class instanceof CDocumentContent && historyitem_DocumentContent_AddItem === Data.Type ) ||
( Class instanceof CTable && historyitem_Table_AddRow === Data.Type ) ||
( Class instanceof CTableRow && historyitem_TableRow_AddCell === Data.Type ) ||
( Class instanceof Paragraph && historyitem_Paragraph_AddItem === Data.Type )
) ? true : false;
var Count = 1; var Count = 1;
if ( ( Class instanceof Paragraph ) ||
( Class instanceof CDocumentContent && historyitem_DocumentContent_RemoveItem === Data.Type ) )
Count = Data.Items.length;
var ContentChanges = new CContentChangesElement( ( bAdd == true ? contentchanges_Add : contentchanges_Remove ), Data.Pos, Count, Item ); var ContentChanges = new CContentChangesElement( ( bAdd == true ? contentchanges_Add : contentchanges_Remove ), Data.Pos, Count, Item );
Class.Add_ContentChanges( ContentChanges ); Class.Add_ContentChanges( ContentChanges );
CollaborativeEditing.Add_NewDC( Class ); CollaborativeEditing.Add_NewDC( Class );
......
...@@ -2263,23 +2263,25 @@ function TrackNewShapeState(drawingObjectsController, drawingObjects, presetGeom ...@@ -2263,23 +2263,25 @@ function TrackNewShapeState(drawingObjectsController, drawingObjects, presetGeom
this.drawingObjectsController.resetSelection(); this.drawingObjectsController.resetSelection();
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_AddSp) === false)
{
History.Create_NewPoint(); History.Create_NewPoint();
this.drawingObjectsController.trackEnd(); var shape = this.drawingObjectsController.arrTrackObjects[0].trackEnd();
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_AddShape, shape) === false)
{
this.drawingObjects.shapeAdd(this.drawingObjects.cSld.spTree.length, shape);
if(this.presetGeom != "textRect") if(this.presetGeom != "textRect")
{ {
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects)); this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
} }
else if(isRealObject(this.resultObject)) else
{ {
this.drawingObjectsController.changeCurrentState(new TextAddState(this.drawingObjectsController, this.drawingObjects, this.resultObject)); this.drawingObjectsController.changeCurrentState(new TextAddState(this.drawingObjectsController, this.drawingObjects, shape));
} }
this.drawingObjects.presentation.Recalculate(); this.drawingObjects.presentation.Recalculate();
this.drawingObjects.presentation.DrawingDocument.OnRecalculatePage(this.drawingObjects.num, this.drawingObjects); this.drawingObjects.presentation.DrawingDocument.OnRecalculatePage(this.drawingObjects.num, this.drawingObjects);
} }
else else
{ {
editor.WordControl.m_oLogicDocument.Document_Undo();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects)); this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
} }
editor.sync_EndAddShape(); editor.sync_EndAddShape();
......
...@@ -285,6 +285,7 @@ function NewShapeTrack(drawingObjects, presetGeom, startX, startY) ...@@ -285,6 +285,7 @@ function NewShapeTrack(drawingObjects, presetGeom, startX, startY)
shape.initDefault(this.x, this.y, this.extX, this.extY, false, false, this.presetGeom, this.arrowsCount); shape.initDefault(this.x, this.y, this.extX, this.extY, false, false, this.presetGeom, this.arrowsCount);
else else
shape.initDefaultTextRect(this.x, this.y, this.extX, this.extY, false, false); shape.initDefaultTextRect(this.x, this.y, this.extX, this.extY, false, false);
return shape;
shape.select(this.drawingObjects.graphicObjects); shape.select(this.drawingObjects.graphicObjects);
drawingObjects.shapeAdd(drawingObjects.cSld.spTree.length, shape); drawingObjects.shapeAdd(drawingObjects.cSld.spTree.length, shape);
this.drawingObjects.graphicObjects.State.resultObject = shape; this.drawingObjects.graphicObjects.State.resultObject = shape;
......
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