Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
e857a6e9
Commit
e857a6e9
authored
Jun 21, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Рефакторинг функций, работающих с таблицей.
parent
f1d2b0be
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
439 additions
and
291 deletions
+439
-291
word/Editor/Document.js
word/Editor/Document.js
+230
-289
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+45
-1
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+40
-0
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+42
-1
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+42
-0
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+40
-0
No files found.
word/Editor/Document.js
View file @
e857a6e9
This diff is collapsed.
Click to expand it.
word/Editor/DocumentControllerBase.js
View file @
e857a6e9
...
...
@@ -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
...
...
word/Editor/DrawingsController.js
View file @
e857a6e9
...
...
@@ -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
)
{
...
...
word/Editor/Footnotes.js
View file @
e857a6e9
...
...
@@ -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
)
...
...
word/Editor/HeaderFooterController.js
View file @
e857a6e9
...
...
@@ -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
)
...
...
word/Editor/LogicDocumentController.js
View file @
e857a6e9
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment