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
796ea449
Commit
796ea449
authored
Sep 14, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for bug 35841
parent
d92339ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
38 deletions
+40
-38
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+40
-38
No files found.
cell/view/WorksheetView.js
View file @
796ea449
...
...
@@ -6781,7 +6781,6 @@
};
WorksheetView
.
prototype
.
_getSelectionInfoCell
=
function
()
{
var
c_opt
=
this
.
settings
.
cells
;
var
selectionRange
=
this
.
model
.
selectionRange
;
var
cell
=
selectionRange
.
activeCell
;
var
mc
=
this
.
model
.
getMergedByCell
(
cell
.
row
,
cell
.
col
);
...
...
@@ -6810,7 +6809,7 @@
var
tableStyleInfo
=
curTablePart
&&
curTablePart
.
TableStyleInfo
?
curTablePart
.
TableStyleInfo
:
null
;
cell_info
.
autoFilterInfo
=
new
asc_CAutoFilterInfo
();
if
(
-
2
===
tablePartsOptions
)
{
if
(
-
2
===
tablePartsOptions
||
this
.
model
.
inPivotTable
(
selectionRange
.
getLast
())
)
{
cell_info
.
autoFilterInfo
.
isAutoFilter
=
null
;
cell_info
.
autoFilterInfo
.
isApplyAutoFilter
=
false
;
}
else
{
...
...
@@ -11888,12 +11887,12 @@
return
;
}
var
addNameColumn
,
filterRange
;
var
add
FilterCallBack
,
add
NameColumn
,
filterRange
;
if
(
addFormatTableOptionsObj
&&
isChangeAutoFilterToTablePart
(
addFormatTableOptionsObj
)
===
true
)
//CHANGE FILTER TO TABLEPART
{
filterRange
=
t
.
model
.
AutoFilter
.
Ref
.
clone
();
var
addFilterCallBack
=
function
()
{
addFilterCallBack
=
function
()
{
History
.
Create_NewPoint
();
History
.
StartTransaction
();
...
...
@@ -11916,7 +11915,7 @@
t
.
_isLockedCells
(
filterRange
,
/*subType*/
null
,
addFilterCallBack
);
}
else
//ADD
{
var
addFilterCallBack
=
function
()
{
addFilterCallBack
=
function
()
{
History
.
Create_NewPoint
();
History
.
StartTransaction
();
...
...
@@ -11944,7 +11943,7 @@
addFilterCallBack
();
}
else
{
var
filterInfo
=
t
.
model
.
autoFilters
.
_getFilterInfoByAddTableProps
(
ar
,
addFormatTableOptionsObj
);
filterRange
=
filterInfo
.
filterRange
filterRange
=
filterInfo
.
filterRange
;
addNameColumn
=
filterInfo
.
addNameColumn
;
t
.
_isLockedCells
(
filterRange
,
null
,
addFilterCallBack
)
...
...
@@ -12879,36 +12878,39 @@
return
(
x
>=
x1
&&
x
<=
x2
&&
y
>=
y1
&&
y
<=
y2
);
};
WorksheetView
.
prototype
.
_checkAddAutoFilter
=
function
(
activeRange
,
styleName
,
addFormatTableOptionsObj
,
filterByCellContextMenu
)
{
WorksheetView
.
prototype
.
_checkAddAutoFilter
=
function
(
activeRange
,
styleName
,
addFormatTableOptionsObj
,
filterByCellContextMenu
)
{
//write error, if not add autoFilter and return false
var
result
=
true
;
var
worksheet
=
this
.
model
;
var
filter
=
worksheet
.
AutoFilter
;
if
(
filter
&&
styleName
&&
filter
.
Ref
.
isIntersect
(
activeRange
)
&&
!
(
filter
.
Ref
.
containsRange
(
activeRange
)
&&
(
activeRange
.
isOneCell
()
||
(
filter
.
Ref
.
isEqual
(
activeRange
)))
||
if
(
filter
&&
styleName
&&
filter
.
Ref
.
isIntersect
(
activeRange
)
&&
!
(
filter
.
Ref
.
containsRange
(
activeRange
)
&&
(
activeRange
.
isOneCell
()
||
(
filter
.
Ref
.
isEqual
(
activeRange
)))
||
(
filter
.
Ref
.
r1
===
activeRange
.
r1
&&
activeRange
.
containsRange
(
filter
.
Ref
))))
{
worksheet
.
workbook
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
AutoFilterDataRangeError
,
c_oAscError
.
Level
.
NoCritical
);
result
=
false
;
}
else
if
(
!
styleName
&&
worksheet
.
autoFilters
.
_isEmptyRange
(
activeRange
,
1
))
//add filter to empty range
{
}
else
if
(
!
styleName
&&
worksheet
.
autoFilters
.
_isEmptyRange
(
activeRange
,
1
))
{
//add filter to empty range
worksheet
.
workbook
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
AutoFilterDataRangeError
,
c_oAscError
.
Level
.
NoCritical
);
result
=
false
;
}
else
if
(
!
styleName
&&
filterByCellContextMenu
&&
false
===
worksheet
.
autoFilters
.
_getAdjacentCellsAF
(
activeRange
,
this
).
isIntersect
(
activeRange
))
//add filter to empty range
{
}
else
if
(
!
styleName
&&
filterByCellContextMenu
&&
false
===
worksheet
.
autoFilters
.
_getAdjacentCellsAF
(
activeRange
,
this
).
isIntersect
(
activeRange
))
{
//add filter to empty range
worksheet
.
workbook
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
AutoFilterDataRangeError
,
c_oAscError
.
Level
.
NoCritical
);
result
=
false
;
}
else
if
(
styleName
&&
addFormatTableOptionsObj
&&
addFormatTableOptionsObj
.
isTitle
===
false
&&
}
else
if
(
styleName
&&
addFormatTableOptionsObj
&&
addFormatTableOptionsObj
.
isTitle
===
false
&&
worksheet
.
autoFilters
.
_isEmptyCellsUnderRange
(
activeRange
)
==
false
&&
worksheet
.
autoFilters
.
_isPartTablePartsUnderRange
(
activeRange
))
//add format table without title if down another format table
{
worksheet
.
autoFilters
.
_isPartTablePartsUnderRange
(
activeRange
))
{
//add format table without title if down another format table
worksheet
.
workbook
.
handlers
.
trigger
(
"
asc_onError
"
,
c_oAscError
.
ID
.
AutoFilterChangeFormatTableError
,
c_oAscError
.
Level
.
NoCritical
);
result
=
false
;
}
else
if
(
this
.
model
.
inPivotTable
(
activeRange
))
{
result
=
false
;
}
return
result
;
...
...
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