Commit e857a6e9 authored by Ilya Kirillov's avatar Ilya Kirillov

Рефакторинг функций, работающих с таблицей.

parent f1d2b0be
......@@ -7679,317 +7679,74 @@ CDocument.prototype.Get_SelectedElementsInfo = function()
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с таблицами
//----------------------------------------------------------------------------------------------------------------------
CDocument.prototype.Table_AddRow = function(bBefore)
CDocument.prototype.Table_AddRow = function(bBefore)
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_AddRow(bBefore);
this.Recalculate();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.tableAddRow(bBefore);
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Row_Add(bBefore);
if (false === this.Selection.Use && true === this.Content[Pos].Is_SelectionUse())
{
this.Selection.Use = true;
this.Selection.StartPos = Pos;
this.Selection.EndPos = Pos;
}
this.ContentLastChangePos = Pos;
this.Recalculate();
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Controller.AddTableRow(bBefore);
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
};
CDocument.prototype.Table_AddCol = function(bBefore)
CDocument.prototype.Table_AddCol = function(bBefore)
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_AddCol(bBefore);
this.Recalculate();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.tableAddCol(bBefore);
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Col_Add(bBefore);
if (false === this.Selection.Use && true === this.Content[Pos].Is_SelectionUse())
{
this.Selection.Use = true;
this.Selection.StartPos = Pos;
this.Selection.EndPos = Pos;
}
this.ContentLastChangePos = Pos;
this.Recalculate();
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Controller.AddTableCol(bBefore);
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
};
CDocument.prototype.Table_RemoveRow = function()
CDocument.prototype.Table_RemoveRow = function()
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_RemoveRow();
this.Recalculate();
}
else if (docpostype_DrawingObjects == this.CurPos.Type)
{
this.DrawingObjects.tableRemoveRow();
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
if (false === this.Content[Pos].Row_Remove())
this.Table_RemoveTable();
else
{
this.ContentLastChangePos = Pos;
this.Recalculate();
}
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Controller.RemoveTableRow();
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
};
CDocument.prototype.Table_RemoveCol = function()
CDocument.prototype.Table_RemoveCol = function()
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_RemoveCol();
this.Recalculate();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.tableRemoveCol();
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
if (false === this.Content[Pos].Col_Remove())
this.Table_RemoveTable();
else
{
this.ContentLastChangePos = Pos;
this.Recalculate();
}
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Controller.RemoveTableCol();
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
};
CDocument.prototype.Table_MergeCells = function()
CDocument.prototype.Table_MergeCells = function()
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_MergeCells();
this.Recalculate();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.tableMergeCells();
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Cell_Merge();
this.ContentLastChangePos = Pos;
this.Recalculate();
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Controller.MergeTableCells();
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
};
CDocument.prototype.Table_SplitCell = function(Cols, Rows)
CDocument.prototype.Table_SplitCell = function(Cols, Rows)
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_SplitCell(Cols, Rows);
this.Recalculate();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.tableSplitCell(Cols, Rows);
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Cell_Split(Rows, Cols);
this.ContentLastChangePos = Pos;
this.Recalculate();
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Controller.SplitTableCells(Cols, Rows);
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
};
CDocument.prototype.Table_RemoveTable = function()
CDocument.prototype.Table_RemoveTable = function()
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_RemoveTable();
this.Recalculate();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
return this.DrawingObjects.tableRemoveTable();
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
var Table = this.Content[Pos];
if (true === Table.Is_InnerTable())
Table.Remove_InnerTable();
else
{
this.Selection_Remove();
Table.PreDelete();
this.Internal_Content_Remove(Pos, 1);
if (Pos >= this.Content.length - 1)
Pos--;
if (Pos < 0)
Pos = 0;
this.Set_DocPosType(docpostype_Content);
this.CurPos.ContentPos = Pos;
this.Content[Pos].Cursor_MoveToStartPos();
this.ContentLastChangePos = Pos;
this.Recalculate();
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
}
this.Controller.RemoveTable();
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
};
CDocument.prototype.Table_Select = function(Type)
CDocument.prototype.Table_Select = function(Type)
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
{
this.HdrFtr.Table_Select(Type);
}
else if (docpostype_DrawingObjects == this.CurPos.Type)
{
this.DrawingObjects.tableSelect(Type);
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Table_Select(Type);
if (false === this.Selection.Use && true === this.Content[Pos].Is_SelectionUse())
{
this.Selection.Use = true;
this.Selection.StartPos = Pos;
this.Selection.EndPos = Pos;
}
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
//this.Document_UpdateRulersState();
this.Controller.SelectTable(Type);
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
//this.Document_UpdateRulersState();
};
CDocument.prototype.Table_CheckMerge = function()
CDocument.prototype.Table_CheckMerge = function()
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
return this.HdrFtr.Table_CheckMerge();
else if (docpostype_DrawingObjects == this.CurPos.Type)
{
return this.DrawingObjects.tableCheckMerge();
}
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
return this.Content[Pos].Check_Merge();
}
return false;
return this.Controller.CanMergeTableCells();
};
CDocument.prototype.Table_CheckSplit = function()
CDocument.prototype.Table_CheckSplit = function()
{
// Работаем с колонтитулом
if (docpostype_HdrFtr === this.CurPos.Type)
return this.HdrFtr.Table_CheckSplit();
else if (docpostype_DrawingObjects === this.CurPos.Type)
return this.DrawingObjects.tableCheckSplit();
else if (docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
return this.Content[Pos].Check_Split();
}
return false;
return this.Controller.CanSplitTableCells();
};
CDocument.prototype.Check_TableCoincidence = function(Table)
{
return false;
return false;
};
//----------------------------------------------------------------------------------------------------------------------
// Дополнительные функции
......@@ -15831,6 +15588,190 @@ CDocument.prototype.controller_GetSelectedElementsInfo = function(Info)
this.Content[this.CurPos.ContentPos].Get_SelectedElementsInfo(Info);
}
};
CDocument.prototype.controller_AddTableRow = function(bBefore)
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Row_Add(bBefore);
if (false === this.Selection.Use && true === this.Content[Pos].Is_SelectionUse())
{
this.Selection.Use = true;
this.Selection.StartPos = Pos;
this.Selection.EndPos = Pos;
}
}
};
CDocument.prototype.controller_AddTableCol = function(bBefore)
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Col_Add(bBefore);
if (false === this.Selection.Use && true === this.Content[Pos].Is_SelectionUse())
{
this.Selection.Use = true;
this.Selection.StartPos = Pos;
this.Selection.EndPos = Pos;
}
}
};
CDocument.prototype.controller_RemoveTableRow = function()
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
if (false === this.Content[Pos].Row_Remove())
this.controller_RemoveTable();
}
};
CDocument.prototype.controller_RemoveTableCol = function()
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
if (false === this.Content[Pos].Col_Remove())
this.controller_RemoveTable();
}
};
CDocument.prototype.controller_MergeTableCells = function()
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Cell_Merge();
}
};
CDocument.prototype.controller_SplitTableCells = function(Cols, Rows)
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Cell_Split(Rows, Cols);
}
};
CDocument.prototype.controller_RemoveTable = function()
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
var Table = this.Content[Pos];
if (true === Table.Is_InnerTable())
Table.Remove_InnerTable();
else
{
this.Selection_Remove();
Table.PreDelete();
this.Internal_Content_Remove(Pos, 1);
if (Pos >= this.Content.length - 1)
Pos--;
if (Pos < 0)
Pos = 0;
this.Set_DocPosType(docpostype_Content);
this.CurPos.ContentPos = Pos;
this.Content[Pos].Cursor_MoveToStartPos();
}
}
};
CDocument.prototype.controller_SelectTable = function(Type)
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
this.Content[Pos].Table_Select(Type);
if (false === this.Selection.Use && true === this.Content[Pos].Is_SelectionUse())
{
this.Selection.Use = true;
this.Selection.StartPos = Pos;
this.Selection.EndPos = Pos;
}
}
};
CDocument.prototype.controller_CanMergeTableCells = function()
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
return this.Content[Pos].Check_Merge();
}
return false;
};
CDocument.prototype.controller_CanSplitTableCells = function()
{
if ((true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType())
|| (false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType()))
{
var Pos = 0;
if (true === this.Selection.Use)
Pos = this.Selection.StartPos;
else
Pos = this.CurPos.ContentPos;
return this.Content[Pos].Check_Split();
}
return false;
};
CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate)
{
......
......@@ -581,7 +581,51 @@ CDocumentControllerBase.prototype.GetCurrentParagraph = function(){return null};
* @param oInfo
*/
CDocumentControllerBase.prototype.GetSelectedElementsInfo = function(oInfo){};
/**
* Добавляем строку таблицы.
* @param bBefore
*/
CDocumentControllerBase.prototype.AddTableRow = function(bBefore){};
/**
* Добавляем столбец таблицы.
* @param bBefore
*/
CDocumentControllerBase.prototype.AddTableCol = function(bBefore){};
/**
* Удаляем строку таблицы.
*/
CDocumentControllerBase.prototype.RemoveTableRow = function(){};
/**
* Удаляем колонку таблицы.
*/
CDocumentControllerBase.prototype.RemoveTableCol = function(){};
/**
* Объединяем ячейки таблицы.
*/
CDocumentControllerBase.prototype.MergeTableCells = function(){};
/**
* Разбить ячейки таблицы.
*/
CDocumentControllerBase.prototype.SplitTableCells = function(Cols, Rows){};
/**
* Удаляем таблицу.
*/
CDocumentControllerBase.prototype.RemoveTable = function(){};
/**
* Выделяем таблицу или ее часть.
* @param Type тип выделения
*/
CDocumentControllerBase.prototype.SelectTable = function(Type){};
/**
* Проверяем можем ли мы произвести объединение ячеек таблицы.
* @returns {boolean}
*/
CDocumentControllerBase.prototype.CanMergeTableCells = function(){return false;};
/**
* Проверяем можем ли мы произвести разделение ячеек таблицы.
* @returns {boolean}
*/
CDocumentControllerBase.prototype.CanSplitTableCells = function(){return false;};
/**
* Добавляем элемент в параграф.
* @param oItem
......
......@@ -332,6 +332,46 @@ CDrawingsController.prototype.GetSelectedElementsInfo = function(oInfo)
{
this.DrawingObjects.getSelectedElementsInfo(oInfo);
};
CDrawingsController.prototype.AddTableRow = function(bBefore)
{
this.DrawingObjects.tableAddRow(bBefore);
};
CDrawingsController.prototype.AddTableCol = function(bBefore)
{
this.DrawingObjects.tableAddCol(bBefore);
};
CDrawingsController.prototype.RemoveTableRow = function()
{
this.DrawingObjects.tableRemoveRow();
};
CDrawingsController.prototype.RemoveTableCol = function()
{
this.DrawingObjects.tableRemoveCol();
};
CDrawingsController.prototype.MergeTableCells = function()
{
this.DrawingObjects.tableMergeCells();
};
CDrawingsController.prototype.SplitTableCells = function(Cols, Rows)
{
this.DrawingObjects.tableSplitCell(Cols, Rows);
};
CDrawingsController.prototype.RemoveTable = function()
{
this.DrawingObjects.tableRemoveTable();
};
CDrawingsController.prototype.SelectTable = function(Type)
{
this.DrawingObjects.tableSelect(Type);
};
CDrawingsController.prototype.CanMergeTableCells = function()
{
return this.DrawingObjects.tableCheckMerge();
};
CDrawingsController.prototype.CanSplitTableCells = function()
{
return this.DrawingObjects.tableCheckSplit();
};
CDrawingsController.prototype.AddToParagraph = function(oItem, bRecalculate)
{
......
......@@ -944,7 +944,48 @@ CFootnotesController.prototype.GetCurrentParagraph = function()
CFootnotesController.prototype.GetSelectedElementsInfo = function(oInfo)
{
// TODO: Реализовать
};
CFootnotesController.prototype.AddTableRow = function(bBefore)
{
// TODO: Реализовать
};
CFootnotesController.prototype.AddTableCol = function(bBefore)
{
// TODO: Реализовать
};
CFootnotesController.prototype.RemoveTableRow = function()
{
// TODO: Реализовать
};
CFootnotesController.prototype.RemoveTableCol = function()
{
// TODO: Реализовать
};
CFootnotesController.prototype.MergeTableCells = function()
{
// TODO: Реализовать
};
CFootnotesController.prototype.SplitTableCells = function(Cols, Rows)
{
// TODO: Реализовать
};
CFootnotesController.prototype.RemoveTable = function()
{
// TODO: Реализовать
};
CFootnotesController.prototype.SelectTable = function(Type)
{
// TODO: Реализовать
};
CFootnotesController.prototype.CanMergeTableCells = function()
{
// TODO: Реализовать
return false;
};
CFootnotesController.prototype.CanSplitTableCells = function()
{
// TODO: Реализовать
return false;
};
CFootnotesController.prototype.AddToParagraph = function(oItem, bRecalculate)
......
......@@ -281,6 +281,48 @@ CHdrFtrController.prototype.GetSelectedElementsInfo = function(oInfo)
{
this.HdrFtr.Get_SelectedElementsInfo(oInfo);
};
CHdrFtrController.prototype.AddTableRow = function(bBefore)
{
this.HdrFtr.Table_AddRow(bBefore);
};
CHdrFtrController.prototype.AddTableCol = function(bBefore)
{
this.HdrFtr.Table_AddCol(bBefore);
};
CHdrFtrController.prototype.RemoveTableRow = function()
{
this.HdrFtr.Table_RemoveRow();
};
CHdrFtrController.prototype.RemoveTableCol = function()
{
this.HdrFtr.Table_RemoveCol();
};
CHdrFtrController.prototype.MergeTableCells = function()
{
this.HdrFtr.Table_MergeCells();
};
CHdrFtrController.prototype.SplitTableCells = function(Cols, Rows)
{
this.HdrFtr.Table_SplitCell(Cols, Rows);
};
CHdrFtrController.prototype.RemoveTable = function()
{
this.HdrFtr.Table_RemoveTable();
};
CHdrFtrController.prototype.SelectTable = function(Type)
{
this.HdrFtr.Table_Select(Type);
};
CHdrFtrController.prototype.CanMergeTableCells = function()
{
return this.HdrFtr.Table_CheckMerge();
};
CHdrFtrController.prototype.CanSplitTableCells = function()
{
return this.HdrFtr.Table_CheckSplit();
};
CHdrFtrController.prototype.AddToParagraph = function(oItem, bRecalculate)
......
......@@ -257,6 +257,46 @@ CLogicDocumentController.prototype.GetSelectedElementsInfo = function(oInfo)
{
this.LogicDocument.controller_GetSelectedElementsInfo(oInfo);
};
CLogicDocumentController.prototype.AddTableRow = function(bBefore)
{
this.LogicDocument.controller_AddTableRow(bBefore);
};
CLogicDocumentController.prototype.AddTableCol = function(bBefore)
{
this.LogicDocument.controller_AddTableCol(bBefore);
};
CLogicDocumentController.prototype.RemoveTableRow = function()
{
this.LogicDocument.controller_RemoveTableRow();
};
CLogicDocumentController.prototype.RemoveTableCol = function()
{
this.LogicDocument.controller_RemoveTableCol();
};
CLogicDocumentController.prototype.MergeTableCells = function()
{
this.LogicDocument.controller_MergeTableCells();
};
CLogicDocumentController.prototype.SplitTableCells = function(Cols, Rows)
{
this.LogicDocument.controller_SplitTableCells(Cols, Rows);
};
CLogicDocumentController.prototype.RemoveTable = function()
{
this.LogicDocument.controller_RemoveTable();
};
CLogicDocumentController.prototype.SelectTable = function(Type)
{
this.LogicDocument.controller_SelectTable(Type);
};
CLogicDocumentController.prototype.CanMergeTableCells = function()
{
return this.LogicDocument.controller_CanMergeTableCells();
};
CLogicDocumentController.prototype.CanSplitTableCells = function()
{
return this.LogicDocument.controller_CanSplitTableCells();
};
CLogicDocumentController.prototype.AddToParagraph = function(oItem)
......
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