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

правка багов 21991 и 21990

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51518 954022d7-b5bf-4e40-9824-e11837661b57
parent 33694ee0
......@@ -4795,6 +4795,10 @@ function redrawSlide(slide, presentation, arr_layouts, direction, arr_slides)
}
slide.recalcAll();
slide.recalculate();
if(direction === 0)
{
editor.WordControl.m_oLogicDocument.RecalculateCurPos();
}
presentation.DrawingDocument.OnRecalculatePage(slide.num, slide);
}
......
......@@ -277,7 +277,7 @@ CGraphicFrame.prototype =
},
recalculate: function()
{
if(isRealObject(this.graphicObject))
if(isRealObject(this.graphicObject) && isRealObject(this.parent) && (Array.isArray(this.graphicObject.Content) && this.graphicObject.Content.length > 0))
{
if(this.recalcInfo.recalculateNumbering)
{
......@@ -325,7 +325,6 @@ CGraphicFrame.prototype =
this.graphicObject.Recalculate_Page(0);
}
if(this.recalcInfo.recalculateSizes)
{
this.recalculateSizes();
......@@ -341,6 +340,7 @@ CGraphicFrame.prototype =
onParagraphChanged: function()
{
this.recalcInfo.recalculateSizes = true;
this.recalcInfo.recalculateTransform = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
......@@ -2214,7 +2214,7 @@ CGraphicFrame.prototype =
}
if(isRealObject(this.parent) && isRealObject(this.graphicObject))
if(isRealObject(this.parent) && isRealObject(this.graphicObject) && (Array.isArray(this.graphicObject.Content) && this.graphicObject.Content.length > 0))
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
else
delete editor.WordControl.m_oLogicDocument.recalcMap[this.Id];
......@@ -2335,10 +2335,12 @@ CGraphicFrame.prototype =
}
}
if(isRealObject(this.parent) && isRealObject(this.graphicObject))
if(isRealObject(this.parent) && isRealObject(this.graphicObject) && (Array.isArray(this.graphicObject.Content) && this.graphicObject.Content.length > 0))
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
else
delete editor.WordControl.m_oLogicDocument.recalcMap[this.Id];
},
Save_Changes: function(data, w)
......@@ -2603,7 +2605,7 @@ CGraphicFrame.prototype =
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
if(isRealObject(this.parent) && isRealObject(this.graphicObject))
if(isRealObject(this.parent) && isRealObject(this.graphicObject) && (Array.isArray(this.graphicObject.Content) && this.graphicObject.Content.length > 0))
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
else
delete editor.WordControl.m_oLogicDocument.recalcMap[this.Id];
......
......@@ -4880,11 +4880,14 @@ CPresentation.prototype =
var gr_fr = this.Slides[this.CurPage].graphicObjects.State.textObject;
this.Slides[this.CurPage].graphicObjects.resetSelectionState();
gr_fr.select(this.Slides[this.CurPage].graphicObjects);
this.Remove(-1);
this.Slides[this.CurPage].removeSelectedObjects();
this.Recalculate();
this.Document_UpdateUndoRedoState();
this.Document_UpdateInterfaceState()
}
this.Document_UpdateSelectionState();
this.Document_UpdateUndoRedoState();
this.Document_UpdateInterfaceState();
//this.Document_UpdateSelectionState();
//this.Document_UpdateUndoRedoState();
//this.Document_UpdateInterfaceState();
},
Table_Select : function(Type)
......@@ -5505,6 +5508,7 @@ CPresentation.prototype =
{
this.Slides[i].changeSize(kw, kh);
}
editor.sync_DocSizeCallback(this.Width, this.Height);
if(b_is_on)
{
History.TurnOn();
......@@ -5574,6 +5578,7 @@ CPresentation.prototype =
{
this.Slides[i].changeSize(kw, kh);
}
editor.sync_DocSizeCallback(this.Width, this.Height);
if(b_is_on)
{
History.TurnOn();
......@@ -6205,6 +6210,7 @@ CPresentation.prototype =
History.TurnOn();
}
this.Recalculate();
editor.sync_DocSizeCallback(this.Width, this.Height);
}
},
......@@ -6766,6 +6772,7 @@ CPresentation.prototype =
{
this.Slides[i].changeSize(kw, kh);
}
editor.sync_DocSizeCallback(this.Width, this.Height);
if(b_is_on)
{
History.TurnOn();
......
......@@ -2508,43 +2508,75 @@ asc_docs_api.prototype.sync_HeadersAndFootersPropCallback = function(hafProp){
/*functions for working with table*/
asc_docs_api.prototype.put_Table = function(col,row)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Add_FlowTable(col,row);
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Add_FlowTable(col,row);
}
}
asc_docs_api.prototype.addRowAbove = function(count)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddRow(true);
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddRow(true);
}
}
asc_docs_api.prototype.addRowBelow = function(count)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddRow(false);
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddRow(false);
}
}
asc_docs_api.prototype.addColumnLeft = function(count)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddCol(true);
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddCol(true);
}
}
asc_docs_api.prototype.addColumnRight = function(count)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddCol(false);
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_AddCol(false);
}
}
asc_docs_api.prototype.remRow = function()
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_RemoveRow();
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_RemoveRow();
}
}
asc_docs_api.prototype.remColumn = function()
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_RemoveCol();
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_RemoveCol();
}
}
asc_docs_api.prototype.remTable = function()
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_RemoveTable();
var doc = this.WordControl.m_oLogicDocument;
if(doc.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_RemoveTable();
}
}
asc_docs_api.prototype.selectRow = function()
{
......
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