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
c50ad0a2
Commit
c50ad0a2
authored
Jun 21, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Рефакторинг функций, работающих с гиперссылками.
parent
2328b023
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
522 additions
and
414 deletions
+522
-414
word/Editor/Document.js
word/Editor/Document.js
+370
-413
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+35
-0
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+29
-0
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+31
-0
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+28
-1
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+29
-0
No files found.
word/Editor/Document.js
View file @
c50ad0a2
This diff is collapsed.
Click to expand it.
word/Editor/DocumentControllerBase.js
View file @
c50ad0a2
...
...
@@ -638,6 +638,41 @@ CDocumentControllerBase.prototype.UpdateRulersState = function(){};
* Обновляем состояние селекта и курсора.
*/
CDocumentControllerBase
.
prototype
.
UpdateSelectionState
=
function
(){};
/**
* Получаем текущее состоянии селекта и курсора.
*/
CDocumentControllerBase
.
prototype
.
GetSelectionState
=
function
(){
return
[];};
/**
* Выставляем текущее состояние селекта и курсора.
* @param State
* @param StateIndex
*/
CDocumentControllerBase
.
prototype
.
SetSelectionState
=
function
(
State
,
StateIndex
){};
/**
* Добавляем гиперссылку.
* @param Props
*/
CDocumentControllerBase
.
prototype
.
AddHyperlink
=
function
(
Props
){};
/**
* Изменяем гиперссылку.
* @param Props
*/
CDocumentControllerBase
.
prototype
.
ModifyHyperlink
=
function
(
Props
){};
/**
* Удаляем гиперссылку.
*/
CDocumentControllerBase
.
prototype
.
RemoveHyperlink
=
function
(){};
/**
* Проверяем можно ли добавить гиперссылку.
* @returns {boolean}
*/
CDocumentControllerBase
.
prototype
.
CanAddHyperlink
=
function
(
bCheckInHyperlink
){
return
false
;};
/**
* Проверяем находится ли курсор сейчас в гиперссылке.
* @returns {?ParaHyperlink}
*/
CDocumentControllerBase
.
prototype
.
IsCursorInHyperlink
=
function
(
bCheckEnd
){
return
false
;};
/**
* Добавляем элемент в параграф.
* @param oItem
...
...
word/Editor/DrawingsController.js
View file @
c50ad0a2
...
...
@@ -400,6 +400,35 @@ CDrawingsController.prototype.UpdateSelectionState = function()
this
.
DrawingObjects
.
documentUpdateSelectionState
();
this
.
LogicDocument
.
Document_UpdateTracks
();
};
CDrawingsController
.
prototype
.
GetSelectionState
=
function
()
{
return
this
.
DrawingObjects
.
getSelectionState
();
};
CDrawingsController
.
prototype
.
SetSelectionState
=
function
(
State
,
StateIndex
)
{
this
.
DrawingObjects
.
setSelectionState
(
State
,
StateIndex
);
};
CDrawingsController
.
prototype
.
AddHyperlink
=
function
(
Props
)
{
this
.
DrawingObjects
.
hyperlinkAdd
(
Props
);
};
CDrawingsController
.
prototype
.
ModifyHyperlink
=
function
(
Props
)
{
this
.
DrawingObjects
.
hyperlinkModify
(
Props
);
};
CDrawingsController
.
prototype
.
RemoveHyperlink
=
function
()
{
this
.
DrawingObjects
.
hyperlinkRemove
();
};
CDrawingsController
.
prototype
.
CanAddHyperlink
=
function
(
bCheckInHyperlink
)
{
return
this
.
DrawingObjects
.
hyperlinkCanAdd
(
bCheckInHyperlink
);
};
CDrawingsController
.
prototype
.
IsCursorInHyperlink
=
function
(
bCheckEnd
)
{
return
this
.
DrawingObjects
.
hyperlinkCheck
(
bCheckEnd
);
};
CDrawingsController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
...
...
word/Editor/Footnotes.js
View file @
c50ad0a2
...
...
@@ -999,6 +999,37 @@ CFootnotesController.prototype.UpdateSelectionState = function()
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
GetSelectionState
=
function
()
{
// TODO: Реализовать
return
[];
};
CFootnotesController
.
prototype
.
SetSelectionState
=
function
(
State
,
StateIndex
)
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
AddHyperlink
=
function
(
Props
)
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
ModifyHyperlink
=
function
(
Props
)
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
RemoveHyperlink
=
function
()
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
CanAddHyperlink
=
function
(
bCheckInHyperlink
)
{
// TODO: Реализовать
return
false
;
};
CFootnotesController
.
prototype
.
IsCursorInHyperlink
=
function
(
bCheckEnd
)
{
// TODO: Реализовать
return
false
;
};
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
...
...
word/Editor/HeaderFooterController.js
View file @
c50ad0a2
...
...
@@ -336,7 +336,34 @@ CHdrFtrController.prototype.UpdateSelectionState = function()
this
.
HdrFtr
.
Document_UpdateSelectionState
();
this
.
LogicDocument
.
Document_UpdateTracks
();
};
CHdrFtrController
.
prototype
.
GetSelectionState
=
function
()
{
return
this
.
HdrFtr
.
Get_SelectionState
();
};
CHdrFtrController
.
prototype
.
SetSelectionState
=
function
(
State
,
StateIndex
)
{
this
.
HdrFtr
.
Set_SelectionState
(
State
,
StateIndex
);
};
CHdrFtrController
.
prototype
.
AddHyperlink
=
function
(
Props
)
{
this
.
HdrFtr
.
Hyperlink_Add
(
Props
);
};
CHdrFtrController
.
prototype
.
ModifyHyperlink
=
function
(
Props
)
{
this
.
HdrFtr
.
Hyperlink_Modify
(
Props
);
};
CHdrFtrController
.
prototype
.
RemoveHyperlink
=
function
()
{
this
.
HdrFtr
.
Hyperlink_Remove
();
};
CHdrFtrController
.
prototype
.
CanAddHyperlink
=
function
(
bCheckInHyperlink
)
{
return
this
.
HdrFtr
.
Hyperlink_CanAdd
(
bCheckInHyperlink
);
};
CHdrFtrController
.
prototype
.
IsCursorInHyperlink
=
function
(
bCheckEnd
)
{
return
this
.
HdrFtr
.
Hyperlink_Check
(
bCheckEnd
);
};
...
...
word/Editor/LogicDocumentController.js
View file @
c50ad0a2
...
...
@@ -309,6 +309,35 @@ CLogicDocumentController.prototype.UpdateSelectionState = function()
{
this
.
LogicDocument
.
controller_UpdateSelectionState
();
};
CLogicDocumentController
.
prototype
.
GetSelectionState
=
function
()
{
return
this
.
LogicDocument
.
controller_GetSelectionState
();
};
CLogicDocumentController
.
prototype
.
SetSelectionState
=
function
(
State
,
StateIndex
)
{
this
.
LogicDocument
.
controller_SetSelectionState
(
State
,
StateIndex
);
};
CLogicDocumentController
.
prototype
.
AddHyperlink
=
function
(
Props
)
{
this
.
LogicDocument
.
controller_AddHyperlink
(
Props
);
};
CLogicDocumentController
.
prototype
.
ModifyHyperlink
=
function
(
Props
)
{
this
.
LogicDocument
.
controller_ModifyHyperlink
(
Props
);
};
CLogicDocumentController
.
prototype
.
RemoveHyperlink
=
function
()
{
this
.
LogicDocument
.
controller_RemoveHyperlink
();
};
CLogicDocumentController
.
prototype
.
CanAddHyperlink
=
function
(
bCheckInHyperlink
)
{
return
this
.
LogicDocument
.
controller_CanAddHyperlink
(
bCheckInHyperlink
);
};
CLogicDocumentController
.
prototype
.
IsCursorInHyperlink
=
function
(
bCheckEnd
)
{
return
this
.
LogicDocument
.
controller_IsCursorInHyperlink
(
bCheckEnd
);
};
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