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
40de021f
Commit
40de021f
authored
Aug 29, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 33008
parent
a10aca4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
23 deletions
+39
-23
cell/model/autofilters.js
cell/model/autofilters.js
+37
-23
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+2
-0
No files found.
cell/model/autofilters.js
View file @
40de021f
...
...
@@ -2104,6 +2104,43 @@
return
isUpdate
?
range
:
null
;
},
afterMoveAutoFilters
:
function
(
arnFrom
,
arnTo
)
{
//если переносим часть ф/т, применяем стиль к ячейкам arnTo
//todo пересмотреть перенос ячеек из ф/т. скорее всего нужно будет внести правки со стилями внутри moveRange
var
worksheet
=
this
.
worksheet
;
var
intersectionRangeWithTablePartsFrom
=
this
.
_intersectionRangeWithTableParts
(
arnFrom
);
var
intersectionRangeWithTablePartsTo
=
this
.
_intersectionRangeWithTableParts
(
arnTo
);
if
(
intersectionRangeWithTablePartsFrom
&&
intersectionRangeWithTablePartsFrom
.
length
===
1
&&
intersectionRangeWithTablePartsTo
===
false
)
{
var
refTable
=
intersectionRangeWithTablePartsFrom
[
0
]
?
intersectionRangeWithTablePartsFrom
[
0
].
Ref
:
null
;
if
(
refTable
&&
!
arnFrom
.
containsRange
(
refTable
))
{
var
intersection
=
refTable
.
intersection
(
arnFrom
);
//проходимся по всем ячейкам
var
cell
,
cellTo
;
var
diffRow
=
arnTo
.
r1
-
arnFrom
.
r1
;
var
diffCol
=
arnTo
.
c1
-
arnFrom
.
c1
;
for
(
var
i
=
intersection
.
r1
;
i
<=
intersection
.
r2
;
i
++
)
{
for
(
var
j
=
intersection
.
c1
;
j
<=
intersection
.
c2
;
j
++
)
{
cell
=
worksheet
.
_getCell
(
i
,
j
);
cellTo
=
worksheet
.
_getCell
(
i
+
diffRow
,
j
+
diffCol
);
var
xfsTo
=
cellTo
.
getCompiledStyle
();
if
(
null
===
xfsTo
)
{
var
xfsFrom
=
cell
.
getCompiledStyle
();
cellTo
.
setStyle
(
xfsFrom
);
}
}
}
}
}
},
//if active range intersect even a part tablePart(for insert(delete) cells)
isActiveCellsCrossHalfFTable
:
function
(
activeCells
,
val
,
prop
)
{
...
...
@@ -4472,8 +4509,6 @@
var
diffCol
=
arnTo
.
c1
-
arnFrom
.
c1
;
var
diffRow
=
arnTo
.
r1
-
arnFrom
.
r1
;
var
applyStyleByCells
=
true
;
if
(
!
copyRange
)
{
var
findFilters
=
this
.
_searchFiltersInRange
(
arnFrom
);
...
...
@@ -4500,7 +4535,6 @@
this
.
_openHiddenRows
(
findFilters
[
i
]);
}
applyStyleByCells
=
false
;
}
//TODO пока будем всегда чистить фильтры, которые будут в месте вставки. Позже сделать аналогично MS либо пересмотреть все возможные ситуации.
...
...
@@ -4515,26 +4549,6 @@
if
(
!
(
arnTo
.
r1
===
ref
.
r1
&&
arnTo
.
c1
===
ref
.
c1
)
&&
!
arnFrom
.
containsRange
(
ref
))
this
.
isEmptyAutoFilters
(
ref
,
null
,
findFilters
);
}
applyStyleByCells
=
false
;
}
}
if
(
applyStyleByCells
)
{
var
intersectionRangeWithTablePartsFrom
=
this
.
_intersectionRangeWithTableParts
(
arnFrom
);
var
intersectionRangeWithTablePartsTo
=
this
.
_intersectionRangeWithTableParts
(
arnTo
);
if
(
intersectionRangeWithTablePartsFrom
&&
intersectionRangeWithTablePartsFrom
.
length
===
1
&&
intersectionRangeWithTablePartsTo
===
false
)
{
//проходимся по всем ячейкам
var
cell
;
for
(
var
i
=
arnFrom
.
r1
;
i
<=
arnFrom
.
r2
;
i
++
)
{
for
(
var
j
=
arnFrom
.
c1
;
j
<=
arnFrom
.
c2
;
j
++
)
{
cell
=
worksheet
.
_getCell
(
i
,
j
);
cell
.
setStyle
(
cell
.
compiledXfs
);
}
}
}
}
},
...
...
cell/view/WorksheetView.js
View file @
40de021f
...
...
@@ -8819,6 +8819,8 @@
t
.
model
.
autoFilters
.
renameTableColumn
(
arnFrom
);
t
.
model
.
autoFilters
.
renameTableColumn
(
arnTo
);
t
.
model
.
autoFilters
.
reDrawFilter
(
arnFrom
);
t
.
model
.
autoFilters
.
afterMoveAutoFilters
(
arnFrom
,
arnTo
);
History
.
EndTransaction
();
...
...
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