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
5b264090
Commit
5b264090
authored
Jun 15, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Рефакторинг функции Add_NewParagraph. Сделан первоначальный вариант этой функции для сносок.
parent
a929970c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
151 deletions
+181
-151
word/Editor/Document.js
word/Editor/Document.js
+141
-148
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+7
-0
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+7
-3
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+18
-0
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+4
-0
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+4
-0
No files found.
word/Editor/Document.js
View file @
5b264090
This diff is collapsed.
Click to expand it.
word/Editor/DocumentControllerBase.js
View file @
5b264090
...
...
@@ -197,6 +197,13 @@ CDocumentControllerBase.prototype.RecalculateCurPos = function(){};
* @returns {number} -1 - значит, номер страницы определеить невозможно
*/
CDocumentControllerBase
.
prototype
.
GetCurPage
=
function
(){
return
-
1
;};
/**
* Добавляем новый параграф.
* @param {boolean} bRecalculate - Пересчитывать или нет.
* @param {boolean} bForceAdd - Добавляем параграф, пропуская всякие проверки типа пустого параграфа с нумерацией.
* @constructor
*/
CDocumentControllerBase
.
prototype
.
AddNewParagraph
=
function
(
bRecalculate
,
bForceAdd
){
return
false
;};
/**
* Смещаем курсор влево
* @param {boolean} AddToSelect Добавлять ли к селекту смещение
...
...
word/Editor/DrawingsController.js
View file @
5b264090
...
...
@@ -36,6 +36,10 @@ CDrawingsController.prototype.GetCurPage = function()
return
-
1
;
};
CDrawingsController
.
prototype
.
AddNewParagraph
=
function
(
bRecalculate
,
bForceAdd
)
{
return
this
.
DrawingObjects
.
addNewParagraph
(
bRecalculate
,
bForceAdd
);
};
CDrawingsController
.
prototype
.
Cursor_MoveLeft
=
function
(
AddToSelect
,
Word
)
{
return
this
.
DrawingObjects
.
cursorMoveLeft
(
AddToSelect
,
Word
);
...
...
@@ -50,9 +54,9 @@ CDrawingsController.prototype.AddToParagraph = function(oItem, bRecalculate)
return
;
this
.
DrawingObjects
.
paragraphAdd
(
oItem
,
bRecalculate
);
this
.
Logic
d
ocument
.
Document_UpdateSelectionState
();
this
.
Logic
d
ocument
.
Document_UpdateUndoRedoState
();
this
.
Logic
d
ocument
.
Document_UpdateInterfaceState
();
this
.
Logic
D
ocument
.
Document_UpdateSelectionState
();
this
.
Logic
D
ocument
.
Document_UpdateUndoRedoState
();
this
.
Logic
D
ocument
.
Document_UpdateInterfaceState
();
};
word/Editor/Footnotes.js
View file @
5b264090
...
...
@@ -272,6 +272,24 @@ CFootnotesController.prototype.GetCurPage = function()
return
-
1
;
};
CFootnotesController
.
prototype
.
AddNewParagraph
=
function
(
bRecalculate
,
bForceAdd
)
{
var
bRetValue
=
false
;
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
bRetValue
=
this
.
CurFootnote
.
Add_NewParagraph
(
bRecalculate
,
bForceAdd
);
}
return
bRetValue
;
};
CFootnotesController
.
prototype
.
Cursor_MoveLeft
=
function
(
AddToSelect
,
Word
)
{
var
bRetValue
=
false
;
...
...
word/Editor/HeaderFooterController.js
View file @
5b264090
...
...
@@ -39,6 +39,10 @@ CHdrFtrController.prototype.GetCurPage = function()
return
-
1
;
};
CHdrFtrController
.
prototype
.
AddNewParagraph
=
function
(
bRecalculate
,
bForceAdd
)
{
return
this
.
HdrFtr
.
Add_NewParagraph
(
bRecalculate
,
bForceAdd
);
};
CHdrFtrController
.
prototype
.
Cursor_MoveLeft
=
function
(
AddToSelect
,
Word
)
{
return
this
.
HdrFtr
.
Cursor_MoveLeft
(
AddToSelect
,
Word
);
...
...
word/Editor/LogicDocumentController.js
View file @
5b264090
...
...
@@ -29,6 +29,10 @@ CLogicDocumentController.prototype.GetCurPage = function()
{
return
this
.
LogicDocument
.
controller_GetCurPage
();
};
CLogicDocumentController
.
prototype
.
AddNewParagraph
=
function
(
bRecalculate
,
bForceAdd
)
{
return
this
.
LogicDocument
.
controller_AddNewParagraph
(
bRecalculate
,
bForceAdd
);
};
CLogicDocumentController
.
prototype
.
Cursor_MoveLeft
=
function
(
AddToSelect
,
Word
)
{
return
this
.
LogicDocument
.
controller_CursorMoveLeft
(
AddToSelect
,
Word
);
...
...
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