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
850b224e
Commit
850b224e
authored
Apr 06, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Functions for work with page numbers of paragraph/table were moved in the base class.
parent
ab6b6ada
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
97 deletions
+47
-97
word/Editor/DocumentContentElementBase.js
word/Editor/DocumentContentElementBase.js
+47
-0
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+0
-52
word/Editor/Table.js
word/Editor/Table.js
+0
-45
No files found.
word/Editor/DocumentContentElementBase.js
View file @
850b224e
...
@@ -142,6 +142,53 @@ CDocumentContentElementBase.prototype.Write_ToBinary2 = function(Writer)
...
@@ -142,6 +142,53 @@ CDocumentContentElementBase.prototype.Write_ToBinary2 = function(Writer)
CDocumentContentElementBase
.
prototype
.
Read_FromBinary2
=
function
(
Reader
)
CDocumentContentElementBase
.
prototype
.
Read_FromBinary2
=
function
(
Reader
)
{
{
};
};
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с номерами страниц
//----------------------------------------------------------------------------------------------------------------------
CDocumentContentElementBase
.
prototype
.
Get_StartPage_Absolute
=
function
()
{
return
this
.
Get_AbsolutePage
(
0
);
};
CDocumentContentElementBase
.
prototype
.
Get_StartPage_Relative
=
function
()
{
return
this
.
PageNum
;
};
CDocumentContentElementBase
.
prototype
.
Get_StartColumn
=
function
()
{
return
this
.
ColumnNum
;
};
CDocumentContentElementBase
.
prototype
.
Get_ColumnsCount
=
function
()
{
return
this
.
ColumnsCount
;
};
CDocumentContentElementBase
.
prototype
.
private_GetRelativePageIndex
=
function
(
CurPage
)
{
if
(
!
this
.
ColumnsCount
||
0
===
this
.
ColumnsCount
)
return
this
.
PageNum
+
CurPage
;
return
this
.
PageNum
+
((
this
.
ColumnNum
+
CurPage
)
/
this
.
ColumnsCount
|
0
);
};
CDocumentContentElementBase
.
prototype
.
private_GetAbsolutePageIndex
=
function
(
CurPage
)
{
return
this
.
Parent
.
Get_AbsolutePage
(
this
.
private_GetRelativePageIndex
(
CurPage
));
};
CDocumentContentElementBase
.
prototype
.
Get_AbsolutePage
=
function
(
CurPage
)
{
return
this
.
private_GetAbsolutePageIndex
(
CurPage
);
};
CDocumentContentElementBase
.
prototype
.
Get_AbsoluteColumn
=
function
(
CurPage
)
{
if
(
this
.
Parent
instanceof
CDocument
)
return
this
.
private_GetColumnIndex
(
CurPage
);
return
this
.
Parent
.
Get_AbsoluteColumn
(
this
.
private_GetRelativePageIndex
(
CurPage
));
};
CDocumentContentElementBase
.
prototype
.
private_GetColumnIndex
=
function
(
CurPage
)
{
return
(
this
.
ColumnNum
+
CurPage
)
-
(((
this
.
ColumnNum
+
CurPage
)
/
this
.
ColumnsCount
|
0
)
*
this
.
ColumnsCount
);
};
//----------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------export--------------------------------------------------------
//--------------------------------------------------------export--------------------------------------------------------
window
[
'
AscCommonWord
'
]
=
window
[
'
AscCommonWord
'
]
||
{};
window
[
'
AscCommonWord
'
]
=
window
[
'
AscCommonWord
'
]
||
{};
...
...
word/Editor/Paragraph.js
View file @
850b224e
...
@@ -7096,9 +7096,6 @@ Paragraph.prototype.Selection_IsEmpty = function(bCheckHidden)
...
@@ -7096,9 +7096,6 @@ Paragraph.prototype.Selection_IsEmpty = function(bCheckHidden)
return
true
;
return
true
;
};
};
//-----------------------------------------------------------------------------------
// Функции для работы с нумерацией параграфов в документах
//-----------------------------------------------------------------------------------
Paragraph
.
prototype
.
Get_StartTabsCount
=
function
(
TabsCounter
)
Paragraph
.
prototype
.
Get_StartTabsCount
=
function
(
TabsCounter
)
{
{
var
ContentLen
=
this
.
Content
.
length
;
var
ContentLen
=
this
.
Content
.
length
;
...
@@ -9441,25 +9438,6 @@ Paragraph.prototype.PreDelete = function()
...
@@ -9441,25 +9438,6 @@ Paragraph.prototype.PreDelete = function()
}
}
};
};
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с номерами страниц
//----------------------------------------------------------------------------------------------------------------------
Paragraph
.
prototype
.
Get_StartPage_Absolute
=
function
()
{
return
this
.
Get_AbsolutePage
(
0
);
};
Paragraph
.
prototype
.
Get_StartPage_Relative
=
function
()
{
return
this
.
PageNum
;
};
Paragraph
.
prototype
.
Get_StartColumn
=
function
()
{
return
this
.
ColumnNum
;
};
Paragraph
.
prototype
.
Get_ColumnsCount
=
function
()
{
return
this
.
ColumnsCount
;
};
//----------------------------------------------------------------------------------------------------------------------
// Дополнительные функции
// Дополнительные функции
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
Paragraph
.
prototype
.
Document_SetThisElementCurrent
=
function
(
bUpdateStates
)
Paragraph
.
prototype
.
Document_SetThisElementCurrent
=
function
(
bUpdateStates
)
...
@@ -11735,36 +11713,6 @@ Paragraph.prototype.Get_PagesCount = function()
...
@@ -11735,36 +11713,6 @@ Paragraph.prototype.Get_PagesCount = function()
{
{
return
this
.
Pages
.
length
;
return
this
.
Pages
.
length
;
};
};
Paragraph
.
prototype
.
private_GetRelativePageIndex
=
function
(
CurPage
)
{
if
(
!
this
.
ColumnsCount
||
0
===
this
.
ColumnsCount
)
return
this
.
PageNum
+
CurPage
;
return
this
.
PageNum
+
((
this
.
ColumnNum
+
CurPage
)
/
this
.
ColumnsCount
|
0
);
};
Paragraph
.
prototype
.
private_GetAbsolutePageIndex
=
function
(
CurPage
)
{
return
this
.
Parent
.
Get_AbsolutePage
(
this
.
private_GetRelativePageIndex
(
CurPage
));
};
Paragraph
.
prototype
.
Get_StartColumn
=
function
()
{
return
this
.
ColumnNum
;
};
Paragraph
.
prototype
.
Get_AbsolutePage
=
function
(
CurPage
)
{
return
this
.
private_GetAbsolutePageIndex
(
CurPage
);
};
Paragraph
.
prototype
.
Get_AbsoluteColumn
=
function
(
CurPage
)
{
if
(
this
.
Parent
instanceof
CDocument
)
return
this
.
private_GetColumnIndex
(
CurPage
);
return
this
.
Parent
.
Get_AbsoluteColumn
(
this
.
private_GetRelativePageIndex
(
CurPage
));
};
Paragraph
.
prototype
.
private_GetColumnIndex
=
function
(
CurPage
)
{
return
(
this
.
ColumnNum
+
CurPage
)
-
(((
this
.
ColumnNum
+
CurPage
)
/
this
.
ColumnsCount
|
0
)
*
this
.
ColumnsCount
);
};
Paragraph
.
prototype
.
Is_EmptyPage
=
function
(
CurPage
)
Paragraph
.
prototype
.
Is_EmptyPage
=
function
(
CurPage
)
{
{
if
(
!
this
.
Pages
[
CurPage
]
||
this
.
Pages
[
CurPage
].
EndLine
<
this
.
Pages
[
CurPage
].
StartLine
)
if
(
!
this
.
Pages
[
CurPage
]
||
this
.
Pages
[
CurPage
].
EndLine
<
this
.
Pages
[
CurPage
].
StartLine
)
...
...
word/Editor/Table.js
View file @
850b224e
...
@@ -2390,51 +2390,6 @@ CTable.prototype.Get_PrevElementEndInfo = function(RowIndex)
...
@@ -2390,51 +2390,6 @@ CTable.prototype.Get_PrevElementEndInfo = function(RowIndex)
return
this
.
Content
[
RowIndex
-
1
].
Get_EndInfo
();
return
this
.
Content
[
RowIndex
-
1
].
Get_EndInfo
();
};
};
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с номерами страниц
//----------------------------------------------------------------------------------------------------------------------
CTable
.
prototype
.
Get_StartPage_Absolute
=
function
()
{
return
this
.
Get_AbsolutePage
(
0
);
};
CTable
.
prototype
.
Get_StartPage_Relative
=
function
()
{
return
this
.
PageNum
;
};
CTable
.
prototype
.
Get_StartColumn
=
function
()
{
return
this
.
ColumnNum
;
};
CTable
.
prototype
.
Get_ColumnsCount
=
function
()
{
return
this
.
ColumnsCount
;
};
CTable
.
prototype
.
private_GetRelativePageIndex
=
function
(
CurPage
)
{
if
(
!
this
.
ColumnsCount
||
0
===
this
.
ColumnsCount
)
return
this
.
PageNum
+
CurPage
;
return
this
.
PageNum
+
((
this
.
ColumnNum
+
CurPage
)
/
this
.
ColumnsCount
|
0
);
};
CTable
.
prototype
.
private_GetAbsolutePageIndex
=
function
(
CurPage
)
{
return
this
.
Parent
.
Get_AbsolutePage
(
this
.
private_GetRelativePageIndex
(
CurPage
));
};
CTable
.
prototype
.
Get_AbsolutePage
=
function
(
CurPage
)
{
return
this
.
private_GetAbsolutePageIndex
(
CurPage
);
};
CTable
.
prototype
.
Get_AbsoluteColumn
=
function
(
CurPage
)
{
if
(
this
.
Parent
instanceof
CDocument
)
return
this
.
private_GetColumnIndex
(
CurPage
);
return
this
.
Parent
.
Get_AbsoluteColumn
(
this
.
private_GetRelativePageIndex
(
CurPage
));
};
CTable
.
prototype
.
private_GetColumnIndex
=
function
(
CurPage
)
{
return
(
this
.
ColumnNum
+
CurPage
)
-
(((
this
.
ColumnNum
+
CurPage
)
/
this
.
ColumnsCount
|
0
)
*
this
.
ColumnsCount
);
};
//----------------------------------------------------------------------------------------------------------------------
// Функции к которым идет обращение из родительского класса
// Функции к которым идет обращение из родительского класса
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
CTable
.
prototype
.
Copy
=
function
(
Parent
)
CTable
.
prototype
.
Copy
=
function
(
Parent
)
...
...
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