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
f133e24a
Commit
f133e24a
authored
Jul 04, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented working with properties of a paragraph, a text, an image, a table in footnotes.
parent
f74e196a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
68 deletions
+77
-68
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+77
-68
No files found.
word/Editor/Footnotes.js
View file @
f133e24a
...
...
@@ -1590,14 +1590,10 @@ CFootnotesController.prototype.SetParagraphIndent = function(Ind)
};
CFootnotesController
.
prototype
.
SetParagraphNumbering
=
function
(
NumInfo
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
if
(
null
!==
this
.
CurFootnote
)
this
.
Cur
Footnote
.
Set_ParagraphNumbering
(
NumInfo
);
var
oFootnote
=
this
.
Selection
.
Footnotes
[
sId
];
o
Footnote
.
Set_ParagraphNumbering
(
NumInfo
);
}
};
CFootnotesController
.
prototype
.
SetParagraphShd
=
function
(
Shd
)
...
...
@@ -1686,88 +1682,71 @@ CFootnotesController.prototype.IncreaseOrDecreaseParagraphIndent = function(bInc
};
CFootnotesController
.
prototype
.
SetImageProps
=
function
(
Props
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Set_ImageProps
(
Props
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
;
return
this
.
CurFootnote
.
Set_ImageProps
(
Props
);
};
CFootnotesController
.
prototype
.
SetTableProps
=
function
(
Props
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Set_TableProps
(
Props
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
;
return
this
.
CurFootnote
.
Set_TableProps
(
Props
);
};
CFootnotesController
.
prototype
.
GetCurrentParaPr
=
function
()
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
var
StartPr
=
this
.
CurFootnote
.
Get_Paragraph_ParaPr
();
var
Pr
=
StartPr
.
Copy
();
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
if
(
null
!==
this
.
CurFootnote
)
return
this
.
CurFootnote
.
Get_Paragraph_ParaPr
();
var
oFootnote
=
this
.
Selection
.
Footnotes
[
sId
];
var
TempPr
=
oFootnote
.
Get_Paragraph_ParaPr
();
Pr
=
Pr
.
Compare
(
TempPr
);
}
var
ParaPr
=
new
CParaPr
();
ParaPr
.
Init_Default
();
return
ParaPr
;
if
(
undefined
===
Pr
.
Ind
.
Left
)
Pr
.
Ind
.
Left
=
StartPr
.
Ind
.
Left
;
if
(
undefined
===
Pr
.
Ind
.
Right
)
Pr
.
Ind
.
Right
=
StartPr
.
Ind
.
Right
;
if
(
undefined
===
Pr
.
Ind
.
FirstLine
)
Pr
.
Ind
.
FirstLine
=
StartPr
.
Ind
.
FirstLine
;
if
(
true
!==
this
.
private_IsOnFootnoteSelected
())
Pr
.
CanAddTable
=
false
;
return
Pr
;
};
CFootnotesController
.
prototype
.
GetCurrentTextPr
=
function
()
{
var
StartPr
=
this
.
CurFootnote
.
Get_Paragraph_TextPr
();
var
Pr
=
StartPr
.
Copy
();
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
if
(
null
!==
this
.
CurFootnote
)
return
this
.
CurFootnote
.
Get_Paragraph_TextPr
();
var
oFootnote
=
this
.
Selection
.
Footnotes
[
sId
];
var
TempPr
=
oFootnote
.
Get_Paragraph_TextPr
();
Pr
=
Pr
.
Compare
(
TempPr
);
}
var
TextPr
=
new
CTextPr
();
TextPr
.
Init_Default
();
return
TextPr
;
return
Pr
;
};
CFootnotesController
.
prototype
.
GetDirectParaPr
=
function
()
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
return
this
.
CurFootnote
.
Get_Paragraph_ParaPr_Copy
();
}
if
(
null
!==
this
.
CurFootnote
)
return
this
.
CurFootnote
.
Get_Paragraph_ParaPr_Copy
();
return
n
ull
;
return
n
ew
CParaPr
()
;
};
CFootnotesController
.
prototype
.
GetDirectTextPr
=
function
()
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
return
this
.
CurFootnote
.
Get_Paragraph_TextPr_Copy
();
}
if
(
null
!==
this
.
CurFootnote
)
return
this
.
CurFootnote
.
Get_Paragraph_TextPr_Copy
();
return
n
ull
;
return
n
ew
CTextPr
()
;
};
CFootnotesController
.
prototype
.
RemoveSelection
=
function
(
bNoCheckDrawing
)
{
...
...
@@ -1976,11 +1955,42 @@ CFootnotesController.prototype.CanSplitTableCells = function()
};
CFootnotesController
.
prototype
.
UpdateInterfaceState
=
function
()
{
// TODO: Реализовать
if
(
true
===
this
.
private_IsOnFootnoteSelected
())
{
this
.
CurFootnote
.
Document_UpdateInterfaceState
();
}
else
{
var
Api
=
this
.
LogicDocument
.
Get_Api
();
if
(
!
Api
)
return
;
var
ParaPr
=
this
.
GetCurrentParaPr
();
if
(
undefined
!=
ParaPr
.
Tabs
)
Api
.
Update_ParaTab
(
AscCommonWord
.
Default_Tab_Stop
,
ParaPr
.
Tabs
);
Api
.
UpdateParagraphProp
(
ParaPr
);
Api
.
UpdateTextPr
(
this
.
GetCurrentTextPr
());
}
};
CFootnotesController
.
prototype
.
UpdateRulersState
=
function
()
{
// TODO: Реализовать
var
PageAbs
=
this
.
CurFootnote
.
Get_StartPage_Absolute
();
if
(
this
.
LogicDocument
.
Pages
[
PageAbs
])
{
var
Pos
=
this
.
LogicDocument
.
Pages
[
PageAbs
].
Pos
;
var
SectPr
=
this
.
LogicDocument
.
SectionsInfo
.
Get_SectPr
(
Pos
).
SectPr
;
var
L
=
SectPr
.
Get_PageMargin_Left
();
var
T
=
SectPr
.
Get_PageMargin_Top
();
var
R
=
SectPr
.
Get_PageWidth
()
-
SectPr
.
Get_PageMargin_Right
();
var
B
=
SectPr
.
Get_PageHeight
()
-
SectPr
.
Get_PageMargin_Bottom
();
this
.
DrawingDocument
.
Set_RulerState_Paragraph
({
L
:
L
,
T
:
T
,
R
:
R
,
B
:
B
},
true
);
}
if
(
true
===
this
.
private_IsOnFootnoteSelected
())
this
.
CurFootnote
.
Document_UpdateRulersState
();
};
CFootnotesController
.
prototype
.
UpdateSelectionState
=
function
()
{
...
...
@@ -2026,7 +2036,6 @@ CFootnotesController.prototype.UpdateSelectionState = function()
this
.
DrawingDocument
.
SelectEnabled
(
false
);
this
.
DrawingDocument
.
TargetShow
();
}
};
CFootnotesController
.
prototype
.
GetSelectionState
=
function
()
{
...
...
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