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
b9268e07
Commit
b9268e07
authored
Jul 07, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented working with locks in footnotes.
parent
18e791df
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
8 deletions
+75
-8
common/Private/Locks.js
common/Private/Locks.js
+5
-1
word/Editor/Document.js
word/Editor/Document.js
+62
-7
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+8
-0
No files found.
common/Private/Locks.js
View file @
b9268e07
...
@@ -181,7 +181,11 @@ if(typeof CDocument !== "undefined")
...
@@ -181,7 +181,11 @@ if(typeof CDocument !== "undefined")
};
};
CFootnotesController
.
prototype
.
IsSelectionLocked
=
function
(
CheckType
)
CFootnotesController
.
prototype
.
IsSelectionLocked
=
function
(
CheckType
)
{
{
// TODO: Реализовать
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
var
oFootnote
=
this
.
Selection
.
Footnotes
[
sId
];
oFootnote
.
Document_Is_SelectionLocked
(
CheckType
);
}
};
};
}
}
...
...
word/Editor/Document.js
View file @
b9268e07
...
@@ -4867,6 +4867,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
...
@@ -4867,6 +4867,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
}
}
else
if
(
true
!==
bFlowTable
&&
nInDrawing
<
0
&&
true
===
bFootnotes
)
else
if
(
true
!==
bFlowTable
&&
nInDrawing
<
0
&&
true
===
bFootnotes
)
{
{
this
.
Selection_Remove
();
this
.
Selection
.
Start
=
true
;
this
.
Selection
.
Start
=
true
;
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
Use
=
true
;
...
@@ -5739,7 +5740,23 @@ CDocument.prototype.Update_CursorType = function(X, Y, PageAbs, MouseEvent)
...
@@ -5739,7 +5740,23 @@ CDocument.prototype.Update_CursorType = function(X, Y, PageAbs, MouseEvent)
return
;
return
;
}
}
this
.
Controller
.
UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
var
nDocPosType
=
this
.
Get_DocPosType
();
if
(
docpostype_HdrFtr
===
nDocPosType
)
{
this
.
HeaderFooterController
.
UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
}
else
if
(
docpostype_DrawingObjects
===
nDocPosType
)
{
this
.
DrawingsController
.
UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
}
else
{
if
(
true
===
this
.
Footnotes
.
CheckHitInFootnote
(
X
,
Y
,
PageAbs
))
this
.
Footnotes
.
UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
else
this
.
LogicDocumentController
.
UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
}
this
.
Api
.
sync_MouseMoveEndCallback
();
this
.
Api
.
sync_MouseMoveEndCallback
();
};
};
/**
/**
...
@@ -7929,6 +7946,10 @@ CDocument.prototype.Document_UpdateSelectionState = function()
...
@@ -7929,6 +7946,10 @@ CDocument.prototype.Document_UpdateSelectionState = function()
return
;
return
;
this
.
DrawingDocument
.
UpdateTargetTransform
(
null
);
this
.
DrawingDocument
.
UpdateTargetTransform
(
null
);
// TODO: Надо подумать как это вынести в верхнюю функцию внутренние реализации типа controller_UpdateSelectionState
// потому что они все очень похожие.
this
.
Controller
.
UpdateSelectionState
();
this
.
Controller
.
UpdateSelectionState
();
// Обновим состояние кнопок Copy/Cut
// Обновим состояние кнопок Copy/Cut
...
@@ -8100,6 +8121,28 @@ CDocument.prototype.Can_CopyCut = function()
...
@@ -8100,6 +8121,28 @@ CDocument.prototype.Can_CopyCut = function()
{
{
DrawingObjects
=
this
.
DrawingObjects
;
DrawingObjects
=
this
.
DrawingObjects
;
}
}
else
if
(
docpostype_Footnotes
===
nDocPosType
)
{
if
(
0
===
this
.
Footnotes
.
Selection
.
Direction
)
{
var
oFootnote
=
this
.
Footnotes
.
GetCurFootnote
();
if
(
oFootnote
)
{
if
(
docpostype_DrawingObjects
===
oFootnote
.
Get_DocPosType
())
{
DrawingObjects
=
this
.
DrawingObjects
;
}
else
{
LogicDocument
=
oFootnote
;
}
}
}
else
{
return
true
;
}
}
else
//if (docpostype_Content === nDocPosType)
else
//if (docpostype_Content === nDocPosType)
{
{
LogicDocument
=
this
;
LogicDocument
=
this
;
...
@@ -8775,7 +8818,6 @@ CDocument.prototype.Get_SelectionState2 = function()
...
@@ -8775,7 +8818,6 @@ CDocument.prototype.Get_SelectionState2 = function()
this
.
Selection_Remove
();
this
.
Selection_Remove
();
// Сохраняем Id ближайшего элемента в текущем классе
// Сохраняем Id ближайшего элемента в текущем классе
var
State
=
new
CDocumentSelectionState
();
var
State
=
new
CDocumentSelectionState
();
var
nDocPosType
=
this
.
Get_DocPosType
();
var
nDocPosType
=
this
.
Get_DocPosType
();
if
(
docpostype_HdrFtr
===
nDocPosType
)
if
(
docpostype_HdrFtr
===
nDocPosType
)
...
@@ -8801,7 +8843,8 @@ CDocument.prototype.Get_SelectionState2 = function()
...
@@ -8801,7 +8843,8 @@ CDocument.prototype.Get_SelectionState2 = function()
}
}
else
if
(
docpostype_Footnotes
===
nDocPosType
)
else
if
(
docpostype_Footnotes
===
nDocPosType
)
{
{
// TODO: Реализовать для сносок
State
.
Type
=
docpostype_Footnotes
;
State
.
Id
=
this
.
Footnotes
.
GetCurFootnote
().
Get_Id
();
}
}
else
// if (docpostype_Content === nDocPosType)
else
// if (docpostype_Content === nDocPosType)
{
{
...
@@ -8831,11 +8874,23 @@ CDocument.prototype.Set_SelectionState2 = function(State)
...
@@ -8831,11 +8874,23 @@ CDocument.prototype.Set_SelectionState2 = function(State)
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Cursor_MoveToStartPos
();
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Cursor_MoveToStartPos
();
}
}
}
}
else
if
(
docpostype_Footnotes
===
State
.
Type
)
{
this
.
Set_DocPosType
(
docpostype_Footnotes
);
var
oFootnote
=
g_oTableId
.
Get_ById
(
State
.
Id
);
if
(
oFootnote
&&
true
===
this
.
Footnotes
.
Is_UseInDocument
(
State
.
Id
))
{
this
.
Footnotes
.
private_SetCurrentFootnoteNoSelection
(
oFootnote
);
oFootnote
.
Cursor_MoveToStartPos
(
false
);
}
else
{
this
.
EndFootnotesEditing
();
}
}
else
// if ( docpostype_Content === State.Type )
else
// if ( docpostype_Content === State.Type )
{
{
var
ElementId
=
State
.
Data
.
Id
;
var
CurId
=
State
.
Data
.
Id
;
var
CurId
=
ElementId
;
var
bFlag
=
false
;
var
bFlag
=
false
;
...
@@ -9946,7 +10001,7 @@ CDocument.prototype.Get_AllParagraphs = function(Props)
...
@@ -9946,7 +10001,7 @@ CDocument.prototype.Get_AllParagraphs = function(Props)
Element
.
Get_AllParagraphs
(
Props
,
ParaArray
);
Element
.
Get_AllParagraphs
(
Props
,
ParaArray
);
}
}
// TODO: Добавить обработку сносок
this
.
Footnotes
.
GetAllParagraphs
(
Props
,
ParaArray
);
}
}
return
ParaArray
;
return
ParaArray
;
...
...
word/Editor/Footnotes.js
View file @
b9268e07
...
@@ -346,6 +346,14 @@ CFootnotesController.prototype.CheckHitInFootnote = function(X, Y, PageAbs)
...
@@ -346,6 +346,14 @@ CFootnotesController.prototype.CheckHitInFootnote = function(X, Y, PageAbs)
return
false
;
return
false
;
};
};
CFootnotesController
.
prototype
.
GetAllParagraphs
=
function
(
Props
,
ParaArray
)
{
for
(
var
sId
in
this
.
Footnote
)
{
var
oFootnote
=
this
.
Footnote
[
sId
];
oFootnote
.
Get_AllParagraphs
(
Props
,
ParaArray
);
}
};
CFootnotesController
.
prototype
.
StartSelection
=
function
(
X
,
Y
,
PageAbs
,
MouseEvent
)
CFootnotesController
.
prototype
.
StartSelection
=
function
(
X
,
Y
,
PageAbs
,
MouseEvent
)
{
{
if
(
true
===
this
.
Selection
.
Use
)
if
(
true
===
this
.
Selection
.
Use
)
...
...
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