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
d21eb72f
Commit
d21eb72f
authored
Jun 21, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Рефакторинг
parent
93a4d3c9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
328 additions
and
219 deletions
+328
-219
word/Editor/Document.js
word/Editor/Document.js
+164
-212
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+0
-4
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+37
-1
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+28
-0
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+42
-0
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+29
-0
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+28
-2
No files found.
word/Editor/Document.js
View file @
d21eb72f
...
@@ -7596,140 +7596,63 @@ CDocument.prototype.Document_End_HdrFtrEditing = function()
...
@@ -7596,140 +7596,63 @@ CDocument.prototype.Document_End_HdrFtrEditing = function()
this
.
Document_UpdateSelectionState
();
this
.
Document_UpdateSelectionState
();
}
}
};
};
CDocument
.
prototype
.
Document_Format_Paste
=
function
()
CDocument
.
prototype
.
Document_Format_Paste
=
function
()
{
{
// Работаем с колонтитулом
this
.
Controller
.
PasteFormatting
(
this
.
CopyTextPr
,
this
.
CopyParaPr
);
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
this
.
Recalculate
();
this
.
HdrFtr
.
Paragraph_Format_Paste
(
this
.
CopyTextPr
,
this
.
CopyParaPr
,
false
);
this
.
Document_UpdateInterfaceState
();
else
if
(
docpostype_DrawingObjects
==
this
.
CurPos
.
Type
)
this
.
Document_UpdateSelectionState
();
this
.
DrawingObjects
.
paragraphFormatPaste
(
this
.
CopyTextPr
,
this
.
CopyParaPr
,
false
);
else
//if ( docpostype_Content == this.CurPos.Type )
{
if
(
true
===
this
.
Selection
.
Use
)
{
switch
(
this
.
Selection
.
Flag
)
{
case
selectionflag_Numbering
:
return
;
case
selectionflag_Common
:
{
var
Start
=
this
.
Selection
.
StartPos
;
var
End
=
this
.
Selection
.
EndPos
;
if
(
Start
>
End
)
{
Start
=
this
.
Selection
.
EndPos
;
End
=
this
.
Selection
.
StartPos
;
}
for
(
var
Pos
=
Start
;
Pos
<=
End
;
Pos
++
)
{
this
.
Content
[
Pos
].
Paragraph_Format_Paste
(
this
.
CopyTextPr
,
this
.
CopyParaPr
,
(
Start
===
End
?
false
:
true
));
}
this
.
ContentLastChangePos
=
Math
.
max
(
Start
-
1
,
0
);
this
.
Recalculate
();
break
;
}
}
}
else
{
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Paragraph_Format_Paste
(
this
.
CopyTextPr
,
this
.
CopyParaPr
,
true
);
this
.
ContentLastChangePos
=
this
.
CurPos
.
ContentPos
-
1
;
this
.
Recalculate
();
}
}
this
.
Document_UpdateInterfaceState
();
this
.
Document_UpdateSelectionState
();
};
};
CDocument
.
prototype
.
Is_TableCellContent
=
function
()
CDocument
.
prototype
.
Is_TableCellContent
=
function
()
{
{
return
false
;
return
false
;
};
};
CDocument
.
prototype
.
Check_AutoFit
=
function
()
CDocument
.
prototype
.
Check_AutoFit
=
function
()
{
{
return
false
;
return
false
;
};
};
CDocument
.
prototype
.
Is_TopDocument
=
function
(
bReturnTopDocument
)
CDocument
.
prototype
.
Is_TopDocument
=
function
(
bReturnTopDocument
)
{
{
if
(
true
===
bReturnTopDocument
)
if
(
true
===
bReturnTopDocument
)
return
this
;
return
this
;
return
true
;
return
true
;
};
};
CDocument
.
prototype
.
Is_InTable
=
function
(
bReturnTopTable
)
CDocument
.
prototype
.
Is_InTable
=
function
(
bReturnTopTable
)
{
{
if
(
true
===
bReturnTopTable
)
if
(
true
===
bReturnTopTable
)
return
null
;
return
null
;
return
false
;
return
false
;
};
};
CDocument
.
prototype
.
Is_DrawingShape
=
function
(
bRetShape
)
CDocument
.
prototype
.
Is_DrawingShape
=
function
(
bRetShape
)
{
{
if
(
bRetShape
===
true
)
if
(
bRetShape
===
true
)
{
{
return
null
;
return
null
;
}
}
return
false
;
return
false
;
};
};
CDocument
.
prototype
.
Is_HdrFtr
=
function
(
bReturnHdrFtr
)
CDocument
.
prototype
.
Is_HdrFtr
=
function
(
bReturnHdrFtr
)
{
{
if
(
true
===
bReturnHdrFtr
)
if
(
true
===
bReturnHdrFtr
)
return
null
;
return
null
;
return
false
;
return
false
;
};
};
CDocument
.
prototype
.
Is_SelectionUse
=
function
()
CDocument
.
prototype
.
Is_SelectionUse
=
function
()
{
{
// Работаем с колонтитулом
return
this
.
Controller
.
IsSelectionUse
();
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
return
this
.
HdrFtr
.
Is_SelectionUse
();
else
if
(
docpostype_DrawingObjects
===
this
.
CurPos
.
Type
)
return
this
.
DrawingObjects
.
isSelectionUse
();
else
//if ( docpostype_Content === this.CurPos.Type )
{
if
(
true
===
this
.
Selection
.
Use
)
return
true
;
return
false
;
}
};
};
CDocument
.
prototype
.
Is_TextSelectionUse
=
function
()
CDocument
.
prototype
.
Is_TextSelectionUse
=
function
()
{
{
// Работаем с колонтитулом
return
this
.
Controller
.
IsTextSelectionUse
();
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
return
this
.
HdrFtr
.
Is_TextSelectionUse
();
else
if
(
docpostype_DrawingObjects
===
this
.
CurPos
.
Type
)
return
this
.
DrawingObjects
.
isTextSelectionUse
();
else
//if ( docpostype_Content === this.CurPos.Type )
return
this
.
Selection
.
Use
;
};
};
CDocument
.
prototype
.
Get_CurPosXY
=
function
()
CDocument
.
prototype
.
Get_CurPosXY
=
function
()
{
{
var
TempXY
;
var
TempXY
=
this
.
Controller
.
GetCurPosXY
();
// Работаем с колонтитулом
this
.
Internal_CheckCurPage
();
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
return
{
X
:
TempXY
.
X
,
Y
:
TempXY
.
Y
,
PageNum
:
this
.
CurPage
};
TempXY
=
this
.
HdrFtr
.
Get_CurPosXY
();
else
if
(
docpostype_DrawingObjects
===
this
.
CurPos
.
Type
)
TempXY
=
this
.
DrawingObjects
.
getCurPosXY
();
else
// if ( docpostype_Content == this.CurPos.Type )
{
if
(
true
===
this
.
Selection
.
Use
)
{
if
(
selectionflag_Numbering
===
this
.
Selection
.
Flag
)
TempXY
=
{
X
:
0
,
Y
:
0
};
else
// if ( selectionflag_Common === this.Selection.Flag )
TempXY
=
this
.
Content
[
this
.
Selection
.
EndPos
].
Get_CurPosXY
();
}
else
TempXY
=
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Get_CurPosXY
();
}
this
.
Internal_CheckCurPage
();
return
{
X
:
TempXY
.
X
,
Y
:
TempXY
.
Y
,
PageNum
:
this
.
CurPage
};
};
};
/**
/**
* Возвращаем выделенный текст, если в выделении не более 1 параграфа, и там нет картинок, нумерации страниц и т.д.
* Возвращаем выделенный текст, если в выделении не более 1 параграфа, и там нет картинок, нумерации страниц и т.д.
...
@@ -7738,112 +7661,20 @@ CDocument.prototype.Get_CurPosXY = function()
...
@@ -7738,112 +7661,20 @@ CDocument.prototype.Get_CurPosXY = function()
*/
*/
CDocument
.
prototype
.
Get_SelectedText
=
function
(
bClearText
)
CDocument
.
prototype
.
Get_SelectedText
=
function
(
bClearText
)
{
{
if
(
"
undefined
"
===
typeof
(
bClearText
))
if
(
undefined
===
bClearText
)
bClearText
=
false
;
bClearText
=
false
;
// Работаем с колонтитулом
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
return
this
.
HdrFtr
.
Get_SelectedText
(
bClearText
);
else
if
(
docpostype_DrawingObjects
===
this
.
CurPos
.
Type
)
return
this
.
DrawingObjects
.
getSelectedText
(
bClearText
);
// Либо у нас нет выделения, либо выделение внутри одного элемента
else
if
(
docpostype_Content
==
this
.
CurPos
.
Type
&&
(
(
true
===
this
.
Selection
.
Use
&&
selectionflag_Common
===
this
.
Selection
.
Flag
)
||
false
===
this
.
Selection
.
Use
))
{
if
(
true
===
bClearText
&&
this
.
Selection
.
StartPos
===
this
.
Selection
.
EndPos
)
{
var
Pos
=
(
true
==
this
.
Selection
.
Use
?
this
.
Selection
.
StartPos
:
this
.
CurPos
.
ContentPos
);
return
this
.
Content
[
Pos
].
Get_SelectedText
(
true
);
}
else
if
(
false
===
bClearText
)
{
var
StartPos
=
(
true
==
this
.
Selection
.
Use
?
Math
.
min
(
this
.
Selection
.
StartPos
,
this
.
Selection
.
EndPos
)
:
this
.
CurPos
.
ContentPos
);
var
EndPos
=
(
true
==
this
.
Selection
.
Use
?
Math
.
max
(
this
.
Selection
.
StartPos
,
this
.
Selection
.
EndPos
)
:
this
.
CurPos
.
ContentPos
);
var
ResultText
=
""
;
for
(
var
Index
=
StartPos
;
Index
<=
EndPos
;
Index
++
)
{
ResultText
+=
this
.
Content
[
Index
].
Get_SelectedText
(
false
);
}
return
ResultText
;
}
}
return
null
;
return
this
.
Controller
.
GetSelectedText
(
bClearText
)
;
};
};
CDocument
.
prototype
.
Get_CurrentParagraph
=
function
()
CDocument
.
prototype
.
Get_CurrentParagraph
=
function
()
{
{
// Работаем с колонтитулом
return
this
.
Controller
.
GetCurrentParagraph
();
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
{
return
this
.
HdrFtr
.
Get_CurrentParagraph
();
}
else
if
(
docpostype_DrawingObjects
===
this
.
CurPos
.
Type
)
{
return
this
.
DrawingObjects
.
getCurrentParagraph
();
}
else
//if ( docpostype_Content === this.CurPos.Type )
{
var
Pos
=
true
===
this
.
Selection
.
Use
?
this
.
Selection
.
StartPos
:
this
.
CurPos
.
ContentPos
;
if
(
Pos
<
0
||
Pos
>=
this
.
Content
.
length
)
return
null
;
if
(
type_Paragraph
===
this
.
Content
[
Pos
].
Get_Type
())
return
this
.
Content
[
Pos
];
else
if
(
type_Table
===
this
.
Content
[
Pos
].
Get_Type
())
return
this
.
Content
[
Pos
].
Get_CurrentParagraph
();
return
null
;
}
};
};
CDocument
.
prototype
.
Get_SelectedElementsInfo
=
function
()
CDocument
.
prototype
.
Get_SelectedElementsInfo
=
function
()
{
{
var
Info
=
new
CSelectedElementsInfo
();
var
oInfo
=
new
CSelectedElementsInfo
();
this
.
Controller
.
GetSelectedElementsInfo
(
oInfo
);
// Работаем с колонтитулом
return
oInfo
;
if
(
docpostype_HdrFtr
===
this
.
CurPos
.
Type
)
{
this
.
HdrFtr
.
Get_SelectedElementsInfo
(
Info
);
}
else
if
(
docpostype_DrawingObjects
==
this
.
CurPos
.
Type
)
{
this
.
DrawingObjects
.
getSelectedElementsInfo
(
Info
);
}
else
if
(
docpostype_Content
==
this
.
CurPos
.
Type
)
{
if
(
true
===
this
.
Selection
.
Use
)
{
if
(
selectionflag_Numbering
===
this
.
Selection
.
Flag
)
{
// Текстовые настройки применяем к конкретной нумерации
if
(
!
(
null
==
this
.
Selection
.
Data
||
this
.
Selection
.
Data
.
length
<=
0
))
{
var
CurPara
=
this
.
Content
[
this
.
Selection
.
Data
[
0
]];
for
(
var
Index
=
0
;
Index
<
this
.
Selection
.
Data
.
length
;
Index
++
)
{
if
(
this
.
CurPos
.
ContentPos
===
this
.
Selection
.
Data
[
Index
])
CurPara
=
this
.
Content
[
this
.
Selection
.
Data
[
Index
]];
}
CurPara
.
Get_SelectedElementsInfo
(
Info
);
}
}
else
{
if
(
this
.
Selection
.
StartPos
!=
this
.
Selection
.
EndPos
)
Info
.
Set_MixedSelection
();
else
this
.
Content
[
this
.
Selection
.
StartPos
].
Get_SelectedElementsInfo
(
Info
);
}
}
else
{
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Get_SelectedElementsInfo
(
Info
);
}
}
return
Info
;
};
};
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с таблицами
// Функции для работы с таблицами
...
@@ -15878,7 +15709,128 @@ CDocument.prototype.controller_UpdateCursorType = function(X, Y, PageAbs, MouseE
...
@@ -15878,7 +15709,128 @@ CDocument.prototype.controller_UpdateCursorType = function(X, Y, PageAbs, MouseE
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
X
,
Y
,
PageAbs
);
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
X
,
Y
,
PageAbs
);
Item
.
Update_CursorType
(
X
,
Y
,
ElementPageIndex
);
Item
.
Update_CursorType
(
X
,
Y
,
ElementPageIndex
);
};
};
CDocument
.
prototype
.
controller_PasteFormatting
=
function
(
TextPr
,
ParaPr
)
{
if
(
true
===
this
.
Selection
.
Use
)
{
if
(
selectionflag_Common
===
this
.
Selection
.
Flag
)
{
var
Start
=
this
.
Selection
.
StartPos
;
var
End
=
this
.
Selection
.
EndPos
;
if
(
Start
>
End
)
{
Start
=
this
.
Selection
.
EndPos
;
End
=
this
.
Selection
.
StartPos
;
}
for
(
var
Pos
=
Start
;
Pos
<=
End
;
Pos
++
)
{
this
.
Content
[
Pos
].
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
Start
===
End
?
false
:
true
);
}
}
}
else
{
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
true
);
}
};
CDocument
.
prototype
.
controller_IsSelectionUse
=
function
()
{
if
(
true
===
this
.
Selection
.
Use
)
return
true
;
return
false
;
};
CDocument
.
prototype
.
controller_IsTextSelectionUse
=
function
()
{
return
this
.
Selection
.
Use
;
};
CDocument
.
prototype
.
controller_GetCurPosXY
=
function
()
{
if
(
true
===
this
.
Selection
.
Use
)
{
if
(
selectionflag_Numbering
===
this
.
Selection
.
Flag
)
return
{
X
:
0
,
Y
:
0
};
else
return
this
.
Content
[
this
.
Selection
.
EndPos
].
Get_CurPosXY
();
}
else
{
return
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Get_CurPosXY
();
}
};
CDocument
.
prototype
.
controller_GetSelectedText
=
function
(
bClearText
)
{
if
((
true
===
this
.
Selection
.
Use
&&
selectionflag_Common
===
this
.
Selection
.
Flag
)
||
false
===
this
.
Selection
.
Use
)
{
if
(
true
===
bClearText
&&
this
.
Selection
.
StartPos
===
this
.
Selection
.
EndPos
)
{
var
Pos
=
(
true
==
this
.
Selection
.
Use
?
this
.
Selection
.
StartPos
:
this
.
CurPos
.
ContentPos
);
return
this
.
Content
[
Pos
].
Get_SelectedText
(
true
);
}
else
if
(
false
===
bClearText
)
{
var
StartPos
=
(
true
==
this
.
Selection
.
Use
?
Math
.
min
(
this
.
Selection
.
StartPos
,
this
.
Selection
.
EndPos
)
:
this
.
CurPos
.
ContentPos
);
var
EndPos
=
(
true
==
this
.
Selection
.
Use
?
Math
.
max
(
this
.
Selection
.
StartPos
,
this
.
Selection
.
EndPos
)
:
this
.
CurPos
.
ContentPos
);
var
ResultText
=
""
;
for
(
var
Index
=
StartPos
;
Index
<=
EndPos
;
Index
++
)
{
ResultText
+=
this
.
Content
[
Index
].
Get_SelectedText
(
false
);
}
return
ResultText
;
}
}
return
null
;
};
CDocument
.
prototype
.
controller_GetCurrentParagraph
=
function
()
{
var
Pos
=
true
===
this
.
Selection
.
Use
?
this
.
Selection
.
StartPos
:
this
.
CurPos
.
ContentPos
;
if
(
Pos
<
0
||
Pos
>=
this
.
Content
.
length
)
return
null
;
if
(
type_Paragraph
===
this
.
Content
[
Pos
].
Get_Type
())
return
this
.
Content
[
Pos
];
else
if
(
type_Table
===
this
.
Content
[
Pos
].
Get_Type
())
return
this
.
Content
[
Pos
].
Get_CurrentParagraph
();
return
null
;
};
CDocument
.
prototype
.
controller_GetSelectedElementsInfo
=
function
(
Info
)
{
if
(
true
===
this
.
Selection
.
Use
)
{
if
(
selectionflag_Numbering
===
this
.
Selection
.
Flag
)
{
// Текстовые настройки применяем к конкретной нумерации
if
(
!
(
null
==
this
.
Selection
.
Data
||
this
.
Selection
.
Data
.
length
<=
0
))
{
var
CurPara
=
this
.
Content
[
this
.
Selection
.
Data
[
0
]];
for
(
var
Index
=
0
;
Index
<
this
.
Selection
.
Data
.
length
;
Index
++
)
{
if
(
this
.
CurPos
.
ContentPos
===
this
.
Selection
.
Data
[
Index
])
CurPara
=
this
.
Content
[
this
.
Selection
.
Data
[
Index
]];
}
CurPara
.
Get_SelectedElementsInfo
(
Info
);
}
}
else
{
if
(
this
.
Selection
.
StartPos
!=
this
.
Selection
.
EndPos
)
Info
.
Set_MixedSelection
();
else
this
.
Content
[
this
.
Selection
.
StartPos
].
Get_SelectedElementsInfo
(
Info
);
}
}
else
{
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Get_SelectedElementsInfo
(
Info
);
}
};
CDocument
.
prototype
.
controller_AddToParagraph
=
function
(
ParaItem
,
bRecalculate
)
CDocument
.
prototype
.
controller_AddToParagraph
=
function
(
ParaItem
,
bRecalculate
)
{
{
...
...
word/Editor/DocumentContent.js
View file @
d21eb72f
...
@@ -6647,9 +6647,6 @@ CDocumentContent.prototype.Paragraph_Format_Paste = function(TextPr,
...
@@ -6647,9 +6647,6 @@ CDocumentContent.prototype.Paragraph_Format_Paste = function(TextPr,
{
{
this
.
Content
[
Pos
].
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
(
Start
===
End
?
false
:
true
));
this
.
Content
[
Pos
].
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
(
Start
===
End
?
false
:
true
));
}
}
this
.
Recalculate
();
break
;
break
;
}
}
}
}
...
@@ -6657,7 +6654,6 @@ CDocumentContent.prototype.Paragraph_Format_Paste = function(TextPr,
...
@@ -6657,7 +6654,6 @@ CDocumentContent.prototype.Paragraph_Format_Paste = function(TextPr,
else
else
{
{
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
true
);
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
true
);
this
.
Recalculate
();
}
}
}
}
};
};
...
...
word/Editor/DocumentControllerBase.js
View file @
d21eb72f
...
@@ -235,7 +235,6 @@ CDocumentControllerBase.prototype.Is_DrawingShape = function(bRetShape)
...
@@ -235,7 +235,6 @@ CDocumentControllerBase.prototype.Is_DrawingShape = function(bRetShape)
* Событие о том, что контент изменился и пересчитался.
* Событие о том, что контент изменился и пересчитался.
* @param bChange
* @param bChange
* @param bForceRecalc
* @param bForceRecalc
* @constructor
*/
*/
CDocumentControllerBase
.
prototype
.
OnContentRecalculate
=
function
(
bChange
,
bForceRecalc
)
CDocumentControllerBase
.
prototype
.
OnContentRecalculate
=
function
(
bChange
,
bForceRecalc
)
{
{
...
@@ -545,6 +544,43 @@ CDocumentControllerBase.prototype.GetSelectedContent = function(SelectedContent)
...
@@ -545,6 +544,43 @@ CDocumentControllerBase.prototype.GetSelectedContent = function(SelectedContent)
* Обновляем вид курсора.
* Обновляем вид курсора.
*/
*/
CDocumentControllerBase
.
prototype
.
UpdateCursorType
=
function
(
X
,
Y
,
PageAbs
,
MouseEvent
){};
CDocumentControllerBase
.
prototype
.
UpdateCursorType
=
function
(
X
,
Y
,
PageAbs
,
MouseEvent
){};
/**
* Вставляем форматирование.
* @param TextPr
* @param ParaPr
*/
CDocumentControllerBase
.
prototype
.
PasteFormatting
=
function
(
TextPr
,
ParaPr
){};
/**
* Проверяем используется ли в данный момент селект.
* @returns {boolean}
*/
CDocumentControllerBase
.
prototype
.
IsSelectionUse
=
function
(){
return
false
;};
/**
* Проверяем выделен ли именно текст сейчас.
* @returns {boolean}
*/
CDocumentControllerBase
.
prototype
.
IsTextSelectionUse
=
function
(){
return
false
;};
/**
* Получаем XY текущей позиции.
* @returns {{X: number, Y: number}}
*/
CDocumentControllerBase
.
prototype
.
GetCurPosXY
=
function
(){
return
{
X
:
0
,
Y
:
0
};};
/**
* Получаем выделенный текст.
* @param {boolean} bClearText
* @returns {String}
*/
CDocumentControllerBase
.
prototype
.
GetSelectedText
=
function
(
bClearText
){
return
""
;};
/**
* Получаем текущий параграф.
* @returns {?Paragraph}
*/
CDocumentControllerBase
.
prototype
.
GetCurrentParagraph
=
function
(){
return
null
};
/**
* Собираем информацию о выделенной части документа.
* @param oInfo
*/
CDocumentControllerBase
.
prototype
.
GetSelectedElementsInfo
=
function
(
oInfo
){};
/**
/**
* Добавляем элемент в параграф.
* Добавляем элемент в параграф.
...
...
word/Editor/DrawingsController.js
View file @
d21eb72f
...
@@ -304,6 +304,34 @@ CDrawingsController.prototype.UpdateCursorType = function(X, Y, PageAbs, MouseEv
...
@@ -304,6 +304,34 @@ CDrawingsController.prototype.UpdateCursorType = function(X, Y, PageAbs, MouseEv
// TODO: Надо вызывать не у LogicDocument, а у DocumentContent заданного
// TODO: Надо вызывать не у LogicDocument, а у DocumentContent заданного
this
.
LogicDocument
.
controller_UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
this
.
LogicDocument
.
controller_UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
};
};
CDrawingsController
.
prototype
.
PasteFormatting
=
function
(
TextPr
,
ParaPr
)
{
this
.
DrawingObjects
.
paragraphFormatPaste
(
TextPr
,
ParaPr
,
false
);
};
CDrawingsController
.
prototype
.
IsSelectionUse
=
function
()
{
return
this
.
DrawingObjects
.
isSelectionUse
();
};
CDrawingsController
.
prototype
.
IsTextSelectionUse
=
function
()
{
return
this
.
DrawingObjects
.
isTextSelectionUse
();
};
CDrawingsController
.
prototype
.
GetCurPosXY
=
function
()
{
return
this
.
DrawingObjects
.
getCurPosXY
();
};
CDrawingsController
.
prototype
.
GetSelectedText
=
function
(
bClearText
)
{
return
this
.
DrawingObjects
.
getSelectedText
(
bClearText
);
};
CDrawingsController
.
prototype
.
GetCurrentParagraph
=
function
()
{
return
this
.
DrawingObjects
.
getCurrentParagraph
();
};
CDrawingsController
.
prototype
.
GetSelectedElementsInfo
=
function
(
oInfo
)
{
this
.
DrawingObjects
.
getSelectedElementsInfo
(
oInfo
);
};
CDrawingsController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
CDrawingsController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
{
...
...
word/Editor/Footnotes.js
View file @
d21eb72f
...
@@ -904,6 +904,48 @@ CFootnotesController.prototype.UpdateCursorType = function(X, Y, PageAbs, MouseE
...
@@ -904,6 +904,48 @@ CFootnotesController.prototype.UpdateCursorType = function(X, Y, PageAbs, MouseE
this
.
CurFootnote
.
Update_CursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
this
.
CurFootnote
.
Update_CursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
}
}
};
};
CFootnotesController
.
prototype
.
PasteFormatting
=
function
(
TextPr
,
ParaPr
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
true
);
}
};
CFootnotesController
.
prototype
.
IsSelectionUse
=
function
()
{
// TODO: Добавить селект
return
false
;
};
CFootnotesController
.
prototype
.
IsTextSelectionUse
=
function
()
{
// TODO: Реализовать
return
false
;
};
CFootnotesController
.
prototype
.
GetCurPosXY
=
function
()
{
// TODO: Реализовать
return
{
X
:
0
,
Y
:
0
};
};
CFootnotesController
.
prototype
.
GetSelectedText
=
function
(
bClearText
)
{
// TODO: Реализовать
return
""
;
};
CFootnotesController
.
prototype
.
GetCurrentParagraph
=
function
()
{
// TODO: Реализовать
return
null
;
};
CFootnotesController
.
prototype
.
GetSelectedElementsInfo
=
function
(
oInfo
)
{
// TODO: Реализовать
};
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
{
...
...
word/Editor/HeaderFooterController.js
View file @
d21eb72f
...
@@ -253,6 +253,35 @@ CHdrFtrController.prototype.UpdateCursorType = function(X, Y, PageAbs, MouseEven
...
@@ -253,6 +253,35 @@ CHdrFtrController.prototype.UpdateCursorType = function(X, Y, PageAbs, MouseEven
{
{
this
.
HdrFtr
.
Update_CursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
this
.
HdrFtr
.
Update_CursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
};
};
CHdrFtrController
.
prototype
.
PasteFormatting
=
function
(
TextPr
,
ParaPr
)
{
this
.
HdrFtr
.
Paragraph_Format_Paste
(
TextPr
,
ParaPr
,
false
);
};
CHdrFtrController
.
prototype
.
IsSelectionUse
=
function
()
{
return
this
.
HdrFtr
.
Is_SelectionUse
();
};
CHdrFtrController
.
prototype
.
IsTextSelectionUse
=
function
()
{
return
this
.
HdrFtr
.
Is_TextSelectionUse
();
};
CHdrFtrController
.
prototype
.
GetCurPosXY
=
function
()
{
return
this
.
HdrFtr
.
Get_CurPosXY
();
};
CHdrFtrController
.
prototype
.
GetSelectedText
=
function
(
bClearText
)
{
return
this
.
HdrFtr
.
Get_SelectedText
(
bClearText
);
};
CHdrFtrController
.
prototype
.
GetCurrentParagraph
=
function
()
{
return
this
.
HdrFtr
.
Get_CurrentParagraph
();
};
CHdrFtrController
.
prototype
.
GetSelectedElementsInfo
=
function
(
oInfo
)
{
this
.
HdrFtr
.
Get_SelectedElementsInfo
(
oInfo
);
};
CHdrFtrController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
CHdrFtrController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
{
...
...
word/Editor/LogicDocumentController.js
View file @
d21eb72f
...
@@ -229,8 +229,34 @@ CLogicDocumentController.prototype.UpdateCursorType = function(X, Y, PageAbs, Mo
...
@@ -229,8 +229,34 @@ CLogicDocumentController.prototype.UpdateCursorType = function(X, Y, PageAbs, Mo
{
{
this
.
LogicDocument
.
controller_UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
this
.
LogicDocument
.
controller_UpdateCursorType
(
X
,
Y
,
PageAbs
,
MouseEvent
);
};
};
CLogicDocumentController
.
prototype
.
PasteFormatting
=
function
(
TextPr
,
ParaPr
)
{
this
.
LogicDocument
.
controller_PasteFormatting
(
TextPr
,
ParaPr
);
};
CLogicDocumentController
.
prototype
.
IsSelectionUse
=
function
()
{
return
this
.
LogicDocument
.
controller_IsSelectionUse
();
};
CLogicDocumentController
.
prototype
.
IsTextSelectionUse
=
function
()
{
return
this
.
LogicDocument
.
controller_IsTextSelectionUse
();
};
CLogicDocumentController
.
prototype
.
GetCurPosXY
=
function
()
{
return
this
.
LogicDocument
.
controller_GetCurPosXY
();
};
CLogicDocumentController
.
prototype
.
GetSelectedText
=
function
(
bClearText
)
{
return
this
.
LogicDocument
.
controller_GetSelectedText
(
bClearText
);
};
CLogicDocumentController
.
prototype
.
GetCurrentParagraph
=
function
()
{
return
this
.
LogicDocument
.
controller_GetCurrentParagraph
();
};
CLogicDocumentController
.
prototype
.
GetSelectedElementsInfo
=
function
(
oInfo
)
{
this
.
LogicDocument
.
controller_GetSelectedElementsInfo
(
oInfo
);
};
CLogicDocumentController
.
prototype
.
AddToParagraph
=
function
(
oItem
)
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