Commit e857a6e9 authored by Ilya Kirillov's avatar Ilya Kirillov

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

parent f1d2b0be
This diff is collapsed.
......@@ -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