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
0aa192f7
Commit
0aa192f7
authored
Jul 10, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 32795
symbol '.' in find-replace string value
parent
a7f33a1f
Changes
1
Show 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 @
0aa192f7
...
...
@@ -11028,38 +11028,37 @@
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
findFlags
=
"
g
"
;
// Заменяем все вхождения
if
(
true
!==
options
.
isMatchCase
)
{
if
(
true
!==
options
.
isMatchCase
)
{
findFlags
+=
"
i
"
;
}
// Не чувствителен к регистру
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
,
function
(
$0
,
$1
)
{
.
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
)
{
return
$1
?
$0
:
'
(.*)
'
;
}
)
.
replace
(
/
(
~
)?\?
/g
,
function
(
$0
,
$1
)
{
}
)
.
replace
(
/
(
~
)?\?
/g
,
function
(
$0
,
$1
)
{
return
$1
?
$0
:
'
.
'
;
}
)
.
replace
(
/
(
~
\*)
/g
,
"
\\
*
"
).
replace
(
/
(
~
\?)
/g
,
"
\\
?
"
);
valueForSearching
=
new
RegExp
(
valueForSearching
,
findFlags
);
}
)
.
replace
(
/
(
~
\*)
/g
,
"
\\
*
"
).
replace
(
/
(
~
\?)
/g
,
"
\\
?
"
).
replace
(
/
(\.)
/g
,
"
\\
.
"
);
valueForSearching
=
new
RegExp
(
valueForSearching
,
findFlags
);
options
.
indexInArray
=
0
;
options
.
countFind
=
aReplaceCells
.
length
;
options
.
countReplace
=
0
;
if
(
options
.
isReplaceAll
&&
false
===
this
.
collaborativeEditing
.
getCollaborativeEditing
()
)
{
this
.
_isLockedCells
(
aReplaceCells
,
/*subType*/
null
,
function
()
{
t
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
true
);
}
);
}
else
{
this
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
false
);
if
(
options
.
isReplaceAll
&&
false
===
this
.
collaborativeEditing
.
getCollaborativeEditing
())
{
this
.
_isLockedCells
(
aReplaceCells
,
/*subType*/
null
,
function
()
{
t
.
_replaceCellText
(
aReplaceCells
,
valueForSearching
,
options
,
lockDraw
,
callback
,
true
);
});
}
else
{
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