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