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
af6a894a
Commit
af6a894a
authored
May 13, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support uniqueValues and duplicateValues in conditional formatting
parent
4cc453b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
cell/model/Workbook.js
cell/model/Workbook.js
+11
-3
No files found.
cell/model/Workbook.js
View file @
af6a894a
...
...
@@ -1901,7 +1901,7 @@ function angleInterfaceToFormat(val)
function
getUniqueKeys
(
array
)
{
var
i
,
o
=
{};
for
(
i
=
0
;
i
<
array
.
length
;
++
i
)
{
o
[
array
[
i
]]
=
!
o
.
hasOwnProperty
(
array
[
i
]);
o
[
array
[
i
]]
=
o
.
hasOwnProperty
(
array
[
i
]);
}
return
o
;
}
...
...
@@ -3496,7 +3496,7 @@ Woorksheet.prototype._updateConditionalFormatting = function(range) {
var
aRules
,
oRule
;
var
oRuleElement
=
null
;
var
o
;
var
i
,
j
,
cell
,
sqref
,
values
,
tmp
,
min
,
max
,
dxf
;
var
i
,
j
,
cell
,
sqref
,
values
,
tmp
,
min
,
max
,
dxf
,
condition
;
for
(
i
=
0
;
i
<
aCFs
.
length
;
++
i
)
{
sqref
=
aCFs
[
i
].
sqref
;
// ToDo убрать null === sqref когда научимся мультиселект обрабатывать (\\192.168.5.2\source\DOCUMENTS\XLSX\Matematika Quantum Sedekah.xlsx)
...
...
@@ -3549,8 +3549,16 @@ Woorksheet.prototype._updateConditionalFormatting = function(range) {
}
}
break
;
case
Asc
.
ECfType
.
duplicateValues
:
case
Asc
.
ECfType
.
uniqueValues
:
o
=
getUniqueKeys
(
values
.
v
);
if
(
oRule
.
dxf
)
{
condition
=
oRule
.
type
===
Asc
.
ECfType
.
uniqueValues
;
values
=
this
.
_getValuesForConditionalFormatting
(
sqref
);
o
=
getUniqueKeys
(
values
.
v
);
for
(
cell
=
0
;
cell
<
values
.
c
.
length
;
++
cell
)
{
values
.
c
[
cell
].
setConditionalFormattingStyle
((
condition
===
o
[
values
.
v
[
cell
]])
?
null
:
oRule
.
dxf
);
}
}
break
;
}
}
...
...
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