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
2328b023
Commit
2328b023
authored
Jun 21, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Рефакторинг функций связанных с обновлением интерфейса.
parent
e857a6e9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
484 additions
and
444 deletions
+484
-444
word/Editor/Document.js
word/Editor/Document.js
+405
-443
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+12
-0
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+28
-0
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+12
-0
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+15
-0
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+12
-1
No files found.
word/Editor/Document.js
View file @
2328b023
This diff is collapsed.
Click to expand it.
word/Editor/DocumentControllerBase.js
View file @
2328b023
...
...
@@ -626,6 +626,18 @@ CDocumentControllerBase.prototype.CanMergeTableCells = function(){return false;}
* @returns {boolean}
*/
CDocumentControllerBase
.
prototype
.
CanSplitTableCells
=
function
(){
return
false
;};
/**
* Обновляем состояние интерфейса.
*/
CDocumentControllerBase
.
prototype
.
UpdateInterfaceState
=
function
(){};
/**
* Обновляем состояние линеек.
*/
CDocumentControllerBase
.
prototype
.
UpdateRulersState
=
function
(){};
/**
* Обновляем состояние селекта и курсора.
*/
CDocumentControllerBase
.
prototype
.
UpdateSelectionState
=
function
(){};
/**
* Добавляем элемент в параграф.
* @param oItem
...
...
word/Editor/DrawingsController.js
View file @
2328b023
...
...
@@ -372,6 +372,34 @@ CDrawingsController.prototype.CanSplitTableCells = function()
{
return
this
.
DrawingObjects
.
tableCheckSplit
();
};
CDrawingsController
.
prototype
.
UpdateInterfaceState
=
function
()
{
var
oTargetTextObject
=
AscFormat
.
getTargetTextObject
(
this
.
DrawingObjects
);
if
(
oTargetTextObject
)
{
this
.
LogicDocument
.
Interface_Update_DrawingPr
();
this
.
DrawingObjects
.
documentUpdateInterfaceState
();
}
else
{
this
.
DrawingObjects
.
resetInterfaceTextPr
();
this
.
DrawingObjects
.
updateTextPr
();
this
.
LogicDocument
.
Interface_Update_DrawingPr
();
this
.
DrawingObjects
.
updateParentParagraphParaPr
();
}
};
CDrawingsController
.
prototype
.
UpdateRulersState
=
function
()
{
// Вызываем данную функцию, чтобы убрать рамку буквицы
this
.
DrawingDocument
.
Set_RulerState_Paragraph
(
null
);
this
.
LogicDocument
.
Document_UpdateRulersStateBySection
(
this
.
LogicDocument
.
CurPos
.
ContentPos
);
this
.
DrawingObjects
.
documentUpdateRulersState
();
};
CDrawingsController
.
prototype
.
UpdateSelectionState
=
function
()
{
this
.
DrawingObjects
.
documentUpdateSelectionState
();
this
.
LogicDocument
.
Document_UpdateTracks
();
};
CDrawingsController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
...
...
word/Editor/Footnotes.js
View file @
2328b023
...
...
@@ -987,6 +987,18 @@ CFootnotesController.prototype.CanSplitTableCells = function()
// TODO: Реализовать
return
false
;
};
CFootnotesController
.
prototype
.
UpdateInterfaceState
=
function
()
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
UpdateRulersState
=
function
()
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
UpdateSelectionState
=
function
()
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
...
...
word/Editor/HeaderFooterController.js
View file @
2328b023
...
...
@@ -321,6 +321,21 @@ CHdrFtrController.prototype.CanSplitTableCells = function()
{
return
this
.
HdrFtr
.
Table_CheckSplit
();
};
CHdrFtrController
.
prototype
.
UpdateInterfaceState
=
function
()
{
this
.
LogicDocument
.
Interface_Update_HdrFtrPr
();
this
.
HdrFtr
.
Document_UpdateInterfaceState
();
};
CHdrFtrController
.
prototype
.
UpdateRulersState
=
function
()
{
this
.
DrawingDocument
.
Set_RulerState_Paragraph
(
null
);
this
.
HdrFtr
.
Document_UpdateRulersState
(
this
.
LogicDocument
.
CurPage
);
};
CHdrFtrController
.
prototype
.
UpdateSelectionState
=
function
()
{
this
.
HdrFtr
.
Document_UpdateSelectionState
();
this
.
LogicDocument
.
Document_UpdateTracks
();
};
...
...
word/Editor/LogicDocumentController.js
View file @
2328b023
...
...
@@ -297,7 +297,18 @@ CLogicDocumentController.prototype.CanSplitTableCells = function()
{
return
this
.
LogicDocument
.
controller_CanSplitTableCells
();
};
CLogicDocumentController
.
prototype
.
UpdateInterfaceState
=
function
()
{
this
.
LogicDocument
.
controller_UpdateInterfaceState
();
};
CLogicDocumentController
.
prototype
.
UpdateRulersState
=
function
()
{
this
.
LogicDocument
.
controller_UpdateRulersState
();
};
CLogicDocumentController
.
prototype
.
UpdateSelectionState
=
function
()
{
this
.
LogicDocument
.
controller_UpdateSelectionState
();
};
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