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
f6eb9f43
Commit
f6eb9f43
authored
Jul 10, 2016
by
Alexander Trofimov
Committed by
GitHub
Jul 10, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #35 from ONLYOFFICE/release/4.0.1
fix bug 32795
parents
7e8b9f2f
0aa192f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+21
-22
No files found.
cell/view/WorksheetView.js
View file @
f6eb9f43
...
@@ -11088,38 +11088,37 @@
...
@@ -11088,38 +11088,37 @@
return
this
.
_replaceCellsText
(
aReplaceCells
,
options
,
lockDraw
,
callback
);
return
this
.
_replaceCellsText
(
aReplaceCells
,
options
,
lockDraw
,
callback
);
};
};
WorksheetView
.
prototype
.
_replaceCellsText
=
function
(
aReplaceCells
,
options
,
lockDraw
,
callback
)
{
WorksheetView
.
prototype
.
_replaceCellsText
=
function
(
aReplaceCells
,
options
,
lockDraw
,
callback
)
{
var
t
=
this
;
var
t
=
this
;
var
findFlags
=
"
g
"
;
// Заменяем все вхождения
var
findFlags
=
"
g
"
;
// Заменяем все вхождения
if
(
true
!==
options
.
isMatchCase
)
{
if
(
true
!==
options
.
isMatchCase
)
{
findFlags
+=
"
i
"
;
findFlags
+=
"
i
"
;
}
// Не чувствителен к регистру
}
// Не чувствителен к регистру
var
valueForSearching
=
options
.
findWhat
var
valueForSearching
=
options
.
findWhat
.
replace
(
/
(\\)
/g
,
"
\\\\
"
).
replace
(
/
(\^)
/g
,
"
\\
^
"
)
.
replace
(
/
(\\)
/g
,
"
\\\\
"
).
replace
(
/
(\^)
/g
,
"
\\
^
"
)
.
replace
(
/
(\()
/g
,
"
\\
(
"
).
replace
(
/
(\))
/g
,
"
\\
)
"
)
.
replace
(
/
(\()
/g
,
"
\\
(
"
).
replace
(
/
(\))
/g
,
"
\\
)
"
)
.
replace
(
/
(\+)
/g
,
"
\\
+
"
).
replace
(
/
(\[)
/g
,
"
\\
[
"
)
.
replace
(
/
(\+)
/g
,
"
\\
+
"
).
replace
(
/
(\[)
/g
,
"
\\
[
"
)
.
replace
(
/
(\])
/g
,
"
\\
]
"
).
replace
(
/
(\{)
/g
,
"
\\
{
"
)
.
replace
(
/
(\])
/g
,
"
\\
]
"
).
replace
(
/
(\{)
/g
,
"
\\
{
"
)
.
replace
(
/
(\})
/g
,
"
\\
}
"
).
replace
(
/
(\$)
/g
,
"
\\
$
"
)
.
replace
(
/
(\})
/g
,
"
\\
}
"
).
replace
(
/
(\$)
/g
,
"
\\
$
"
)
.
replace
(
/
(
~
)?\*
/g
,
function
(
$0
,
$1
)
{
.
replace
(
/
(
~
)?\*
/g
,
function
(
$0
,
$1
)
{
return
$1
?
$0
:
'
(.*)
'
;
return
$1
?
$0
:
'
(.*)
'
;
}
)
}
)
.
replace
(
/
(
~
)?\?
/g
,
function
(
$0
,
$1
)
{
.
replace
(
/
(
~
)?\?
/g
,
function
(
$0
,
$1
)
{
return
$1
?
$0
:
'
.
'
;
return
$1
?
$0
:
'
.
'
;
}
)
}
)
.
replace
(
/
(
~
\*)
/g
,
"
\\
*
"
).
replace
(
/
(
~
\?)
/g
,
"
\\
?
"
);
.
replace
(
/
(
~
\*)
/g
,
"
\\
*
"
).
replace
(
/
(
~
\?)
/g
,
"
\\
?
"
).
replace
(
/
(\.)
/g
,
"
\\
.
"
);
valueForSearching
=
new
RegExp
(
valueForSearching
,
findFlags
);
valueForSearching
=
new
RegExp
(
valueForSearching
,
findFlags
);
options
.
indexInArray
=
0
;
options
.
indexInArray
=
0
;
options
.
countFind
=
aReplaceCells
.
length
;
options
.
countFind
=
aReplaceCells
.
length
;
options
.
countReplace
=
0
;
options
.
countReplace
=
0
;
if
(
options
.
isReplaceAll
&&
false
===
this
.
collaborativeEditing
.
getCollaborativeEditing
()
)
{
if
(
options
.
isReplaceAll
&&
false
===
this
.
collaborativeEditing
.
getCollaborativeEditing
())
{
this
.
_isLockedCells
(
aReplaceCells
,
/*subType*/
null
,
function
()
{
this
.
_isLockedCells
(
aReplaceCells
,
/*subType*/
null
,
function
()
{
t
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
true
);
t
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
true
);
}
);
});
}
}
else
{
else
{
this
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
false
);
this
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
false
);
}
}
};
};
...
...
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