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

Добавлены изменения с логами в презентациях. Исправлены различные баги.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61704 954022d7-b5bf-4e40-9824-e11837661b57
parent 2587c02a
......@@ -2417,7 +2417,7 @@ function DrawingObjects() {
_this.groupGraphicObjects = function() {
if ( _this.controller.canGroup() ) {
_this.controller.createGroup(null);
_this.controller.checkSelectedObjectsAndCallback(_this.controller.createGroup, [], false, historydescription_Spreadsheet_CreateGroup);
worksheet.setSelectionShape(true);
}
};
......
This diff is collapsed.
This diff is collapsed.
......@@ -1260,11 +1260,11 @@ CShape.prototype =
if(this.spPr && isRealObject(this.spPr.geometry) && isRealObject(this.spPr.geometry.rect))
{
var rect = this.spPr.geometry.rect;
this.clipRect = {x: rect.l + _body_pr.lIns, y: rect.t + _body_pr.tIns, w: rect.r - rect.l - _body_pr.rIns, h: rect.b - rect.t - _body_pr.bIns};
this.clipRect = {x: -1, y: rect.t + _body_pr.tIns, w: this.extX + 2, h: rect.b - rect.t - _body_pr.bIns};
}
else
{
this.clipRect = {x: _body_pr.lIns, y: _body_pr.tIns, w: this.extX - _body_pr.rIns, h: this.extY - _body_pr.bIns};
this.clipRect = {x: -1, y: _body_pr.tIns, w: this.extX + 2, h: this.extY - _body_pr.bIns};
}
}
else {
......@@ -1382,9 +1382,9 @@ CShape.prototype =
var r_ins = typeof body_pr.rIns === "number" ? body_pr.rIns : 2.54;
var b_ins = typeof body_pr.bIns === "number" ? body_pr.bIns : 1.27;
this.clipRect = {
x: -l_ins,
x: -1,
y: -_vertical_shift - t_ins,
w: this.contentWidth + (r_ins + l_ins),
w: Math.max(this.extX, this.extY) + 2,
h: this.contentHeight + (b_ins + t_ins)
};
}
......@@ -1492,7 +1492,7 @@ CShape.prototype =
var _vertical_shift;
var _text_rect_height = _b - _t;
var _text_rect_width = _r - _l;
if (_body_pr.upright === false) {
if (!_body_pr.upright) {
if (!(_body_pr.vert === nVertTTvert || _body_pr.vert === nVertTTvert270)) {
if (/*_content_height < _text_rect_height*/true) {
switch (_body_pr.anchor) {
......@@ -1616,10 +1616,10 @@ CShape.prototype =
}
if (this.spPr && isRealObject(this.spPr.geometry) && isRealObject(this.spPr.geometry.rect)) {
var rect = this.spPr.geometry.rect;
this.clipRect = { x: rect.l, y: rect.t, w: rect.r - rect.l, h: rect.b - rect.t };
this.clipRect = { x: -1, y: rect.t, w: this.extX + 2, h: rect.b - rect.t };
}
else {
this.clipRect = { x: 0, y: 0, w: this.extX, h: this.extY };
this.clipRect = { x: -1, y: 0, w: this.extX + 2, h: this.extY };
}
}
else {
......@@ -1738,9 +1738,9 @@ CShape.prototype =
var r_ins = typeof body_pr.rIns === "number" ? body_pr.rIns : 2.54;
var b_ins = typeof body_pr.bIns === "number" ? body_pr.bIns : 1.27;
this.clipRect = {
x: -l_ins,
x: -1,
y: -_vertical_shift - t_ins,
w: this.contentWidth + (r_ins + l_ins),
w: Math.max(this.extX, this.extY) + 2,
h: this.contentHeight + (b_ins + t_ins)
};
}
......
......@@ -392,7 +392,7 @@ ChangeAdjState.prototype =
{
track.trackEnd();
drawingObjects.startRecalculate();
},[]);
},[], false, historydescription_CommonDrawings_ChangeAdj);
}
this.drawingObjects.clearTrackObjects();
......@@ -472,7 +472,7 @@ RotateState.prototype =
{
var i, copy;
this.drawingObjects.resetSelection();
History.Create_NewPoint(historydescription_CommonStatesRotate);
History.Create_NewPoint(historydescription_CommonDrawings_CopyCtrl);
for(i = 0; i < tracks.length; ++i)
{
copy = tracks[i].originalObject.copy();
......@@ -575,7 +575,7 @@ RotateState.prototype =
}
oThis.drawingObjects.drawingObjects.checkGraphicObjectPosition(0, 0, Math.max.apply(Math, arr_x2), Math.max.apply(Math, arr_y2));
}
}, []);
}, [], false, historydescription_CommonDrawings_EndTrack);
}
}
......
......@@ -207,31 +207,10 @@ DrawingObjectsController.prototype.RefreshAfterChangeColorScheme = function()
}
}
};
DrawingObjectsController.prototype.getLayout = function()
{
return null;
};
DrawingObjectsController.prototype.getMaster = function()
{
return null;
};
DrawingObjectsController.prototype.updateOverlay = function()
{
this.drawingObjects.OnUpdateOverlay();
};
DrawingObjectsController.prototype.endTrackNewShape = function()
{
History.Create_NewPoint();
var shape = this.arrTrackObjects[0].getShape();
shape.setDrawingObjects(this.drawingObjects);
shape.addToDrawingObjects();
shape.addToRecalculate();
this.arrTrackObjects.length = 0;
this.changeCurrentState(new NullState(this));
this.resetSelection();
this.selectObject(shape, 0);
this.startRecalculate();
};
DrawingObjectsController.prototype.recalculate = function(bAll, Point)
{
......@@ -382,7 +361,6 @@ DrawingObjectsController.prototype.OnMouseUp = DrawingObjectsController.prototyp
DrawingObjectsController.prototype.createGroup = function()
{
History.Create_NewPoint();
var group = this.getGroup();
if(group)
{
......@@ -579,7 +557,7 @@ DrawingObjectsController.prototype.onKeyPress = function(e)
this.checkSelectedObjectsAndCallback(function()
{
this.paragraphAdd( new ParaText( String.fromCharCode( Code ) ) );
}, []);
}, [], false, historydescription_Spreadsheet_ParagraphAdd);
bRetValue = true;
}
//if ( true == bRetValue )
......
......@@ -685,7 +685,7 @@ function CTableOutlineDr()
if (!_table.Is_Inline())
{
word_control.m_oLogicDocument.Create_NewHistoryPoint();
word_control.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_TableMoveFromRulers);
switch (this.TrackTablePos)
{
case 1:
......@@ -736,7 +736,7 @@ function CTableOutlineDr()
if (null != this.InlinePos)
{
// inline move
word_control.m_oLogicDocument.Create_NewHistoryPoint();
word_control.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_TableMoveFromRulersInline);
_table.Move(this.InlinePos.X, this.InlinePos.Y, this.InlinePos.Page);
}
}
......@@ -4659,7 +4659,7 @@ function CThumbnailsManager()
if(this.m_oWordControl.m_oLogicDocument.viewMode === false)
{
var _presentation = this.m_oWordControl.m_oLogicDocument;
History.Create_NewPoint();
History.Create_NewPoint(historydescription_Presentation_MoveSlidesToEnd);
var _selection_array = this.GetSelectedArray();
_presentation.moveSlides(_selection_array, _presentation.Slides.length);
_presentation.Recalculate();
......@@ -4697,7 +4697,7 @@ function CThumbnailsManager()
}
if(can_move)
{
History.Create_NewPoint();
History.Create_NewPoint(historydescription_Presentation_MoveSlidesNextPos);
for(var i = first_index; i > -1; --i)
{
_presentation.moveSlides([_selected_array[i]], _selected_array[i] + 2);
......@@ -4820,7 +4820,7 @@ function CThumbnailsManager()
{
if (!window.USER_AGENT_SAFARI_MACOS)
{
this.m_oWordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.m_oWordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PasteOnThumbnails);
window.GlobalPasteFlag = true;
editor.waitSave = true;
......@@ -4832,7 +4832,7 @@ function CThumbnailsManager()
{
if (0 === window.GlobalPasteFlagCounter)
{
this.m_oWordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.m_oWordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Presentation_PasteOnThumbnailsSafari);
SafariIntervalFocus();
window.GlobalPasteFlag = true;
......@@ -4904,7 +4904,7 @@ function CThumbnailsManager()
if(this.m_oWordControl.m_oLogicDocument.viewMode === false)
{
var _presentation = this.m_oWordControl.m_oLogicDocument;
History.Create_NewPoint();
History.Create_NewPoint(historydescription_Presentation_MoveSlidesToStart);
var _selection_array = this.GetSelectedArray();
_presentation.moveSlides(_selection_array, 0);
_presentation.Recalculate();
......@@ -4942,7 +4942,7 @@ function CThumbnailsManager()
}
if(can_move)
{
History.Create_NewPoint();
History.Create_NewPoint(historydescription_Presentation_MoveSlidesPrevPos);
for(var i = first_index; i > -1; --i)
{
_presentation.moveSlides([_selected_array[i]], _selected_array[i] - 1);
......
......@@ -317,6 +317,31 @@ function CTableId()
break;
}
case historyitem_TableId_Description:
{
// Long : FileCheckSum
// Long : FileSize
// Long : Description
// Long : ItemsCount
// Long : PointIndex
// Long : StartPoint
// Long : LastPoint
// Long : SumIndex
// Long : DeletedIndex
Writer.WriteLong(Data.FileCheckSum);
Writer.WriteLong(Data.FileSize);
Writer.WriteLong(Data.Description);
Writer.WriteLong(Data.ItemsCount);
Writer.WriteLong(Data.PointIndex);
Writer.WriteLong(Data.StartPoint);
Writer.WriteLong(Data.LastPoint);
Writer.WriteLong(Data.SumIndex);
Writer.WriteLong(null === Data.DeletedIndex ? -10 : Data.DeletedIndex);
break;
}
}
};
......@@ -370,6 +395,43 @@ function CTableId()
break;
}
case historyitem_TableId_Description:
{
// Long : FileCheckSum
// Long : FileSize
// Long : Description
// Long : ItemsCount
// Long : PointIndex
// Long : StartPoint
// Long : LastPoint
// Long : SumIndex
// Long : DeletedIndex
// var FileCheckSum = Reader.GetLong();
// var FileSize = Reader.GetLong();
// var Description = Reader.GetLong();
// var ItemsCount = Reader.GetLong();
// var PointIndex = Reader.GetLong();
// var StartPoint = Reader.GetLong();
// var LastPoint = Reader.GetLong();
// var SumIndex = Reader.GetLong();
// var DeletedIndex = Reader.GetLong();
//
// console.log("----------------------------");
// console.log("FileCheckSum " + FileCheckSum);
// console.log("FileSize " + FileSize);
// console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description));
// console.log("ItemsCount " + ItemsCount);
// console.log("PointIndex " + PointIndex);
// console.log("StartPoint " + StartPoint);
// console.log("LastPoint " + LastPoint);
// console.log("SumIndex " + SumIndex);
// console.log("DeletedIndex " + (-10 === DeletedIndex ? null : DeletedIndex));
break;
}
}
return true;
......@@ -421,7 +483,7 @@ function CCollaborativeChanges()
var Class = null;
Class = g_oTableId.Get_ById(ClassId);
//console.log(ClassId);
LoadData.Reader.Seek2(ReaderPos);
if (null != Class)
......@@ -766,12 +828,22 @@ function CCollaborativeEditing()
{
LastPoint = History.Index;
}
// Просчитаем сколько изменений на сервер пересылать не надо
var SumIndex = 0;
var StartPoint2 = Math.min( StartPoint, LastPoint + 1 );
for ( var PointIndex = 0; PointIndex < StartPoint2; PointIndex++ )
{
var Point = History.Points[PointIndex];
SumIndex += Point.Items.length;
}
var deleteIndex = ( null === History.SavedIndex ? null : SumIndex );
var aChanges = [];
for ( var PointIndex = StartPoint; PointIndex <= LastPoint; PointIndex++ )
{
var Point = History.Points[PointIndex];
History.Update_PointInfoItem(PointIndex, StartPoint, LastPoint, SumIndex, deleteIndex);
for ( var Index = 0; Index < Point.Items.length; Index++ )
{
var Item = Point.Items[Index];
......@@ -781,14 +853,6 @@ function CCollaborativeEditing()
}
}
// Просчитаем сколько изменений на сервер пересылать не надо
var SumIndex = 0;
var StartPoint2 = Math.min( StartPoint, LastPoint + 1 );
for ( var PointIndex = 0; PointIndex < StartPoint2; PointIndex++ )
{
var Point = History.Points[PointIndex];
SumIndex += Point.Items.length;
}
var map = this.Release_Locks();
......@@ -862,7 +926,6 @@ function CCollaborativeEditing()
this.m_aNeedUnlock.length = 0;
this.m_aNeedUnlock2.length = 0;
var deleteIndex = ( null === History.SavedIndex ? null : SumIndex );
if (0 < aChanges.length || null !== deleteIndex)
editor.CoAuthoringApi.saveChanges(aChanges, deleteIndex);
else
......
......@@ -11,7 +11,7 @@ DrawingObjectsController.prototype.getDrawingArray = function()
return this.drawingObjects.cSld.spTree;
};
DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(callback, args)
DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(callback, args, bNoSendProps, nHistoryPointType)
{
var check_type = changestype_Drawing_Props, comment;
if(this.drawingObjects.slideComments)
......@@ -25,7 +25,8 @@ DrawingObjectsController.prototype.checkSelectedObjectsAndCallback = function(ca
}
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(check_type, comment) === false)
{
History.Create_NewPoint();
var nPointType = isRealNumber(nHistoryPointType) ? nHistoryPointType : historydescription_CommonControllerCheckSelected;
History.Create_NewPoint(nPointType);
callback.apply(this, args);
this.startRecalculate();
}
......@@ -47,7 +48,7 @@ DrawingObjectsController.prototype.paragraphFormatPaste = function( CopyTextPr,
this.checkSelectedObjectsAndCallback(function()
{
this.applyTextFunction(CDocumentContent.prototype.Paragraph_Format_Paste, CTable.prototype.Paragraph_Format_Paste, [CopyTextPr, CopyParaPr, Bool]);
}, [CopyTextPr, CopyParaPr, Bool]);
}, [CopyTextPr, CopyParaPr, Bool], false, historydescription_Presentation_ParaFormatPaste);
};
......@@ -109,7 +110,27 @@ DrawingObjectsController.prototype.resetSelect = function()
DrawingObjectsController.prototype.checkSelectedObjectsAndFireCallback = DrawingObjectsController.prototype.checkSelectedObjectsAndCallback;
DrawingObjectsController.prototype.checkSelectedObjectsAndFireCallback = function(callback, args)
{
var check_type = changestype_Drawing_Props, comment;
if(this.drawingObjects.slideComments)
{
comment = this.drawingObjects.slideComments.getSelectedComment();
if(comment)
{
check_type = changestype_MoveComment;
comment = comment.Get_Id();
}
}
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(check_type, comment) === false)
{
callback.apply(this, args);
this.startRecalculate();
}
};
DrawingObjectsController.prototype.showChartSettings = function()
{
editor.asc_doubleClickOnChart(this.getChartObject());
......@@ -311,7 +332,7 @@ MoveCommentState.prototype =
{
if(!this.drawingObjects.isViewMode() && editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_MoveComment, this.comment.Get_Id()) === false)
{
History.Create_NewPoint();
History.Create_NewPoint(historydescription_Presentation_MoveComments);
var tracks = this.drawingObjects.arrTrackObjects;
for(var i = 0; i < tracks.length; ++i)
{
......
......@@ -656,7 +656,7 @@ CGraphicFrame.prototype =
{
if(editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
History.Create_NewPoint();
History.Create_NewPoint(historydescription_Presentation_TableBorder);
}
else
{
......
This diff is collapsed.
This diff is collapsed.
......@@ -990,15 +990,6 @@ $(document).ready(function(){
break;
case "td_imageInText":
var _img = new Image();
_img.onload = function(){
editor.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
editor.WordControl.m_oLogicDocument.Add_InlineImage( 50, 50, this.src );
};
//_img.innerHtml = "./Images/Test.jpg";
_img.src = "./Images/Test.jpg";
//editor.AddImage(true);
break;
case "td_imageInText2":
editor.AddImageUrl("./Images/Test.jpg");
......
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