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
1cb0824b
Commit
1cb0824b
authored
8 years ago
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #33366. Implemented a search inside a footnotes.
parent
2497b820
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
word/Editor/Document.js
word/Editor/Document.js
+1
-1
word/Editor/Search.js
word/Editor/Search.js
+60
-1
No files found.
word/Editor/Document.js
View file @
1cb0824b
...
...
@@ -74,9 +74,9 @@ var selectionflag_Numbering = 0x001;
var
selectionflag_DrawingObject
=
0x002
;
var
search_Common
=
0x0000
;
// Поиск в простом тексте
var
search_Header
=
0x0100
;
// Поиск в верхнем колонтитуле
var
search_Footer
=
0x0200
;
// Поиск в нижнем колонтитуле
var
search_Footnote
=
0x0400
;
// Поиск в сноске
var
search_HdrFtr_All
=
0x0001
;
// Поиск в колонтитуле, который находится на всех страницах
var
search_HdrFtr_All_no_First
=
0x0002
;
// Поиск в колонтитуле, который находится на всех страницах, кроме первой
...
...
This diff is collapsed.
Click to expand it.
word/Editor/Search.js
View file @
1cb0824b
...
...
@@ -64,6 +64,7 @@ function CDocumentSearch()
this
.
Direction
=
true
;
// направление true - вперед, false - назад
this
.
ClearOnRecalc
=
true
;
// Флаг, говорящий о том, запустился ли пересчет из-за Replace
this
.
Selection
=
false
;
this
.
Footnotes
=
[];
}
CDocumentSearch
.
prototype
=
...
...
@@ -217,13 +218,21 @@ CDocumentSearch.prototype =
this
.
Direction
=
bDirection
;
}
};
CDocumentSearch
.
prototype
.
SetFootnotes
=
function
(
arrFootnotes
)
{
this
.
Footnotes
=
arrFootnotes
;
};
CDocumentSearch
.
prototype
.
GetFootnotes
=
function
()
{
return
this
.
Footnotes
;
};
//----------------------------------------------------------------------------------------------------------------------
// CDocument
//----------------------------------------------------------------------------------------------------------------------
CDocument
.
prototype
.
Search
=
function
(
Str
,
Props
,
bDraw
)
{
var
StartTime
=
new
Date
().
getTime
();
//
var StartTime = new Date().getTime();
if
(
true
===
this
.
SearchEngine
.
Compare
(
Str
,
Props
)
)
return
this
.
SearchEngine
;
...
...
@@ -241,6 +250,15 @@ CDocument.prototype.Search = function(Str, Props, bDraw)
// Поиск в колонтитулах
this
.
SectionsInfo
.
Search
(
Str
,
Props
,
this
.
SearchEngine
);
// Ищем в сносках
var
arrFootnotes
=
this
.
Get_FootnotesList
(
null
,
null
);
this
.
SearchEngine
.
SetFootnotes
(
arrFootnotes
);
for
(
var
nIndex
=
0
,
nCount
=
arrFootnotes
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
var
oFootnote
=
arrFootnotes
[
nIndex
];
oFootnote
.
Search
(
Str
,
Props
,
this
.
SearchEngine
,
search_Footnote
);
}
if
(
false
!==
bDraw
)
{
this
.
DrawingDocument
.
ClearCachePages
();
...
...
@@ -430,6 +448,47 @@ CDocument.prototype.Search_GetId = function(bNext)
{
return
this
.
SectionsInfo
.
Search_GetId
(
bNext
,
this
.
HdrFtr
.
CurHdrFtr
);
}
else
if
(
docpostype_Footnotes
===
this
.
CurPos
.
Type
)
{
var
oCurFootnote
=
this
.
Footnotes
.
CurFootnote
;
var
Id
=
oCurFootnote
.
Search_GetId
(
bNext
,
true
);
if
(
null
!==
Id
)
return
Id
;
var
arrFootnotes
=
this
.
SearchEngine
.
GetFootnotes
();
var
nCurPos
=
-
1
;
var
nCount
=
arrFootnotes
.
length
;
for
(
var
nIndex
=
0
;
nIndex
<
nCount
;
++
nIndex
)
{
if
(
arrFootnotes
[
nIndex
]
===
oCurFootnote
)
{
nCurPos
=
nIndex
;
break
;
}
}
if
(
-
1
===
nCurPos
)
return
null
;
if
(
true
===
bNext
)
{
for
(
var
nIndex
=
nCurPos
+
1
;
nIndex
<
nCount
;
++
nIndex
)
{
Id
=
arrFootnotes
[
nIndex
].
Search_GetId
(
bNext
,
false
);
if
(
null
!=
Id
)
return
Id
;
}
}
else
{
for
(
var
nIndex
=
nCurPos
-
1
;
nIndex
>=
0
;
--
nIndex
)
{
Id
=
arrFootnotes
[
nIndex
].
Search_GetId
(
bNext
,
false
);
if
(
null
!=
Id
)
return
Id
;
}
}
}
return
null
;
};
...
...
This diff is collapsed.
Click to expand it.
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