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
aa61d3e7
Commit
aa61d3e7
authored
May 03, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added function for receiving an array with all ContentControls stored in the document.
parent
cb1b5845
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
123 additions
and
0 deletions
+123
-0
word/Editor/Document.js
word/Editor/Document.js
+37
-0
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+12
-0
word/Editor/DocumentContentElementBase.js
word/Editor/DocumentContentElementBase.js
+3
-0
word/Editor/HeaderFooter.js
word/Editor/HeaderFooter.js
+4
-0
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+13
-0
word/Editor/Paragraph/ParaDrawing.js
word/Editor/Paragraph/ParaDrawing.js
+5
-0
word/Editor/ParagraphContent.js
word/Editor/ParagraphContent.js
+5
-0
word/Editor/ParagraphContentBase.js
word/Editor/ParagraphContentBase.js
+13
-0
word/Editor/Run.js
word/Editor/Run.js
+14
-0
word/Editor/StructuredDocumentTags/BlockLevel.js
word/Editor/StructuredDocumentTags/BlockLevel.js
+5
-0
word/Editor/Table.js
word/Editor/Table.js
+12
-0
No files found.
word/Editor/Document.js
View file @
aa61d3e7
...
...
@@ -15150,6 +15150,18 @@ CDocument.prototype.AddContentControl = function()
return
this
.
Controller
.
AddContentControl
();
};
CDocument
.
prototype
.
GetAllContentControls
=
function
()
{
var
arrContentControls
=
[];
this
.
SectionsInfo
.
GetAllContentControls
(
arrContentControls
);
for
(
var
nIndex
=
0
,
nCount
=
this
.
Content
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
this
.
Content
[
nIndex
].
GetAllContentControls
(
arrContentControls
);
}
return
arrContentControls
;
};
function
CDocumentSelectionState
()
{
...
...
@@ -15493,6 +15505,31 @@ CDocumentSectionsInfo.prototype =
}
}
};
CDocumentSectionsInfo
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
for
(
var
nIndex
=
0
,
nCount
=
this
.
Elements
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
var
SectPr
=
this
.
Elements
[
nIndex
].
SectPr
;
if
(
null
!=
SectPr
.
HeaderFirst
)
SectPr
.
HeaderFirst
.
GetAllContentControls
(
arrContentControls
);
if
(
null
!=
SectPr
.
HeaderDefault
)
SectPr
.
HeaderDefault
.
GetAllContentControls
(
arrContentControls
);
if
(
null
!=
SectPr
.
HeaderEven
)
SectPr
.
HeaderEven
.
GetAllContentControls
(
arrContentControls
);
if
(
null
!=
SectPr
.
FooterFirst
)
SectPr
.
FooterFirst
.
GetAllContentControls
(
arrContentControls
);
if
(
null
!=
SectPr
.
FooterDefault
)
SectPr
.
FooterDefault
.
GetAllContentControls
(
arrContentControls
);
if
(
null
!=
SectPr
.
FooterEven
)
SectPr
.
FooterEven
.
GetAllContentControls
(
arrContentControls
);
}
};
function
CDocumentSectionsInfoElement
(
SectPr
,
Index
)
{
...
...
word/Editor/DocumentContent.js
View file @
aa61d3e7
...
...
@@ -8468,6 +8468,18 @@ CDocumentContent.prototype.AddContentControl = function()
else
return
this
.
private_AddContentControl
();
};
CDocumentContent
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
if
(
!
arrContentControls
)
arrContentControls
=
[];
for
(
var
nIndex
=
0
,
nCount
=
this
.
Content
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
this
.
Content
[
nIndex
].
GetAllContentControls
(
arrContentControls
);
}
return
arrContentControls
;
};
function
CDocumentContentStartState
(
DocContent
)
...
...
word/Editor/DocumentContentElementBase.js
View file @
aa61d3e7
...
...
@@ -626,6 +626,9 @@ CDocumentContentElementBase.prototype.GetStyleFromFormatting = function()
{
return
null
;
};
CDocumentContentElementBase
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
};
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с номерами страниц
//----------------------------------------------------------------------------------------------------------------------
...
...
word/Editor/HeaderFooter.js
View file @
aa61d3e7
...
...
@@ -1270,6 +1270,10 @@ CHeaderFooter.prototype.ForceRecalculate = function(nPageAbs)
{
this
.
RecalcInfo
.
NeedRecalc
[
nPageAbs
]
=
true
;
};
CHeaderFooter
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
return
this
.
Content
.
GetAllContentControls
(
arrContentControls
);
};
//-----------------------------------------------------------------------------------
// Класс для работы с колонтитулами
...
...
word/Editor/Paragraph.js
View file @
aa61d3e7
...
...
@@ -12098,6 +12098,19 @@ Paragraph.prototype.Get_FirstParagraph = function()
{
return
this
;
};
Paragraph
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
if
(
!
arrContentControls
)
arrContentControls
=
[];
for
(
var
nIndex
=
0
,
nCount
=
this
.
Content
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
if
(
this
.
Content
[
nIndex
].
GetAllContentControls
)
this
.
Content
[
nIndex
].
GetAllContentControls
(
arrContentControls
);
}
return
arrContentControls
;
};
var
pararecalc_0_All
=
0
;
var
pararecalc_0_None
=
1
;
...
...
word/Editor/Paragraph/ParaDrawing.js
View file @
aa61d3e7
...
...
@@ -2470,6 +2470,11 @@ ParaDrawing.prototype.Get_ObjectType = function()
return
AscDFH
.
historyitem_type_Drawing
;
};
ParaDrawing
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
// TODO: Реализовать
};
/**
* Класс, описывающий текущее положение параграфа при рассчете позиции автофигуры.
...
...
word/Editor/ParagraphContent.js
View file @
aa61d3e7
...
...
@@ -1729,6 +1729,11 @@ ParaFootnoteReference.prototype.CreateDocumentFontMap = function(FontMap)
if
(
this
.
Footnote
)
this
.
Footnote
.
Document_CreateFontMap
(
FontMap
);
};
ParaFootnoteReference
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
if
(
this
.
Footnote
)
this
.
Footnote
.
GetAllContentControls
(
arrContentControls
);
};
/**
* Класс представляющий номер сноски внутри сноски.
...
...
word/Editor/ParagraphContentBase.js
View file @
aa61d3e7
...
...
@@ -2677,6 +2677,19 @@ CParagraphContentWithParagraphLikeContent.prototype.GetFootnoteRefsInRange = fun
this
.
Content
[
CurPos
].
GetFootnoteRefsInRange
(
arrFootnotes
,
_CurLine
,
_CurRange
);
}
};
CParagraphContentWithParagraphLikeContent
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
if
(
!
arrContentControls
)
arrContentControls
=
[];
for
(
var
nIndex
=
0
,
nCount
=
this
.
Content
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
if
(
this
.
Content
[
nIndex
].
GetAllContentControls
)
this
.
Content
[
nIndex
].
GetAllContentControls
(
arrContentControls
);
}
return
arrContentControls
;
};
//----------------------------------------------------------------------------------------------------------------------
// Функции, которые должны быть реализованы в классах наследниках
//----------------------------------------------------------------------------------------------------------------------
...
...
word/Editor/Run.js
View file @
aa61d3e7
...
...
@@ -9131,6 +9131,20 @@ ParaRun.prototype.GetFootnoteRefsInRange = function(arrFootnotes, _CurLine, _Cur
arrFootnotes
.
push
(
this
.
Content
[
CurPos
]);
}
};
ParaRun
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
if
(
!
arrContentControls
)
return
;
for
(
var
nIndex
=
0
,
nCount
=
this
.
Content
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
var
oItem
=
this
.
Content
[
nIndex
];
if
(
para_Drawing
===
oItem
.
Type
||
para_FootnoteReference
===
oItem
.
Type
)
{
oItem
.
GetAllContentControls
(
arrContentControls
);
}
}
};
function
CParaRunStartState
(
Run
)
{
...
...
word/Editor/StructuredDocumentTags/BlockLevel.js
View file @
aa61d3e7
...
...
@@ -656,6 +656,11 @@ CBlockLevelSdt.prototype.GetStyleFromFormatting = function()
{
return
this
.
Content
.
GetStyleFromFormatting
();
};
CBlockLevelSdt
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
arrContentControls
.
push
(
this
);
this
.
Content
.
GetAllContentControls
(
arrContentControls
);
};
//----------------------------------------------------------------------------------------------------------------------
CBlockLevelSdt
.
prototype
.
Is_HdrFtr
=
function
(
bReturnHdrFtr
)
{
...
...
word/Editor/Table.js
View file @
aa61d3e7
...
...
@@ -12006,6 +12006,18 @@ CTable.prototype.AddContentControl = function()
return
null
;
};
CTable
.
prototype
.
GetAllContentControls
=
function
(
arrContentControls
)
{
for
(
var
nCurRow
=
0
,
nRowsCount
=
this
.
Content
.
length
;
nCurRow
<
nRowsCount
;
++
nCurRow
)
{
var
oRow
=
this
.
Content
[
nCurRow
];
for
(
var
nCurCell
=
0
,
nCellsCount
=
oRow
.
Get_CellsCount
();
nCurCell
<
nCellsCount
;
++
nCurCell
)
{
var
oCell
=
oRow
.
Get_Cell
(
nCurCell
);
oCell
.
Content
.
GetAllContentControls
(
arrContentControls
);
}
}
};
//----------------------------------------------------------------------------------------------------------------------
// Класс CTableLook
//----------------------------------------------------------------------------------------------------------------------
...
...
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