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
88b9ff1b
Commit
88b9ff1b
authored
Oct 23, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_waitRecalFormulasAfterTableRowHidden -> lockRecal/unlockRecal
parent
de5df82f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
52 deletions
+15
-52
cell/model/Workbook.js
cell/model/Workbook.js
+3
-3
cell/model/autofilters.js
cell/model/autofilters.js
+12
-49
No files found.
cell/model/Workbook.js
View file @
88b9ff1b
...
...
@@ -3970,8 +3970,7 @@
{
this
.
getRange3
(
start
,
0
,
stop
,
0
).
_foreachRow
(
fProcessRow
);
}
//todo возможно стоит вызывать эту функцию только в случае открытия строк
this
.
autoFilters
.
recalFormulasAfterTableRowHidden
(
start
,
stop
);
this
.
workbook
.
dependencyFormulas
.
calcTree
();
};
Worksheet
.
prototype
.
getRowHidden
=
function
(
index
){
var
res
;
...
...
@@ -4026,7 +4025,7 @@
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorksheet
,
AscCH
.
historyitem_Worksheet_RowHide
,
oThis
.
getId
(),
updateRange
,
new
UndoRedoData_FromToRowCol
(
bHidden
,
startIndex
,
endIndex
));
}
}
this
.
autoFilters
.
recalFormulasAfterTableRowHidden
(
start
,
stop
);
this
.
workbook
.
dependencyFormulas
.
calcTree
(
);
};
Worksheet
.
prototype
.
setRowBestFit
=
function
(
bBestFit
,
height
,
start
,
stop
){
//start, stop 0 based
...
...
@@ -4060,6 +4059,7 @@
range
.
_foreachRow
(
fProcessRow
);
}
}
this
.
workbook
.
dependencyFormulas
.
calcTree
();
};
Worksheet
.
prototype
.
getCell
=
function
(
oCellAdd
){
return
this
.
getRange
(
oCellAdd
,
oCellAdd
);
...
...
cell/model/autofilters.js
View file @
88b9ff1b
...
...
@@ -370,9 +370,6 @@
this
.
worksheet
=
currentSheet
;
this
.
changeFilters
=
null
;
this
.
needRecalcFormulas
=
false
;
this
.
doNotRecalcFormulas
=
false
;
this
.
m_oColor
=
new
AscCommon
.
CColor
(
120
,
120
,
120
);
return
this
;
}
...
...
@@ -601,7 +598,7 @@
if
(
filterObj
.
filter
===
null
)
return
;
this
.
_waitRecalFormulasAfterTableRowHidden
(
true
);
worksheet
.
workbook
.
dependencyFormulas
.
lockRecal
(
);
//if apply a/f from context menu
if
(
autoFiltersObject
&&
null
===
autoFiltersObject
.
automaticRowCount
&&
currentFilter
.
isAutoFilter
()
&&
currentFilter
.
isApplyAutoFilter
()
===
false
)
...
...
@@ -764,7 +761,7 @@
{
this
.
_resetTablePartStyle
();
}
this
.
_waitRecalFormulasAfterTableRowHidden
(
false
);
worksheet
.
workbook
.
dependencyFormulas
.
unlockRecal
(
);
return
{
minChangeRow
:
minChangeRow
,
rangeOldFilter
:
rangeOldFilter
,
nOpenRowsCount
:
nOpenRowsCount
,
nAllRowsCount
:
nAllRowsCount
};
},
...
...
@@ -776,7 +773,7 @@
var
bRedoChanges
=
worksheet
.
workbook
.
bRedoChanges
;
var
minChangeRow
;
this
.
_waitRecalFormulasAfterTableRowHidden
(
true
);
worksheet
.
workbook
.
dependencyFormulas
.
lockRecal
(
);
//**get filter**
var
filter
=
this
.
_getFilterByDisplayName
(
displayName
);
...
...
@@ -819,7 +816,7 @@
History
.
EndTransaction
();
this
.
_waitRecalFormulasAfterTableRowHidden
(
false
);
worksheet
.
workbook
.
dependencyFormulas
.
unlockRecal
(
);
return
{
minChangeRow
:
minChangeRow
,
updateRange
:
filter
.
Ref
,
filter
:
filter
};
},
...
...
@@ -1294,7 +1291,7 @@
return
bRes
;
};
this
.
_waitRecalFormulasAfterTableRowHidden
(
true
);
worksheet
.
workbook
.
dependencyFormulas
.
lockRecal
(
);
if
(
worksheet
.
AutoFilter
&&
!
bNotDeleteAutoFilter
)
{
...
...
@@ -1309,7 +1306,7 @@
}
}
this
.
_waitRecalFormulasAfterTableRowHidden
(
false
);
worksheet
.
workbook
.
dependencyFormulas
.
unlockRecal
(
);
t
.
_setStyleTablePartsAfterOpenRows
(
activeCells
);
History
.
EndTransaction
();
...
...
@@ -1370,40 +1367,6 @@
return
false
;
},
recalFormulasAfterTableRowHidden
:
function
(
start
,
stop
)
{
var
worksheet
=
this
.
worksheet
;
var
tableParts
=
worksheet
.
TableParts
;
var
tablePart
;
for
(
var
i
=
0
;
i
<
tableParts
.
length
;
i
++
)
{
tablePart
=
tableParts
[
i
];
if
(
tablePart
&&
tablePart
.
isTotalsRow
()
&&
start
>=
tablePart
.
Ref
.
r1
&&
stop
<=
tablePart
.
Ref
.
r2
)
{
if
(
this
.
doNotRecalcFormulas
){
this
.
needRecalcFormulas
=
true
;
}
else
{
this
.
_recalcFormulas
();
}
break
;
}
}
},
_waitRecalFormulasAfterTableRowHidden
:
function
(
bWait
){
if
(
bWait
){
this
.
doNotRecalcFormulas
=
true
;
}
else
{
if
(
this
.
needRecalcFormulas
){
this
.
_recalcFormulas
();
}
this
.
needRecalcFormulas
=
false
;
this
.
doNotRecalcFormulas
=
false
;
}
},
_recalcFormulas
:
function
(){
this
.
worksheet
.
workbook
.
dependencyFormulas
.
calcTree
();
},
_cleanStylesTables
:
function
(
redrawTablesArr
)
{
for
(
var
i
=
0
;
i
<
redrawTablesArr
.
length
;
i
++
)
{
this
.
_cleanStyleTable
(
redrawTablesArr
[
i
].
oldfilterRef
);
...
...
@@ -2131,7 +2094,7 @@
var
bUndoChanges
=
worksheet
.
workbook
.
bUndoChanges
;
var
bRedoChanges
=
worksheet
.
workbook
.
bRedoChanges
;
this
.
_waitRecalFormulasAfterTableRowHidden
(
true
);
worksheet
.
workbook
.
dependencyFormulas
.
lockRecal
(
);
if
(
arnTo
==
null
&&
arnFrom
==
null
&&
data
)
{
...
...
@@ -2233,7 +2196,7 @@
}
}
this
.
_waitRecalFormulasAfterTableRowHidden
(
false
);
worksheet
.
workbook
.
dependencyFormulas
.
unlockRecal
(
);
return
isUpdate
?
range
:
null
;
},
...
...
@@ -4066,7 +4029,7 @@
if
(
isOpenHiddenRows
)
{
this
.
_waitRecalFormulasAfterTableRowHidden
(
true
);
worksheet
.
workbook
.
dependencyFormulas
.
lockRecal
(
);
}
var
maxFilterRow
=
ref
.
r2
;
...
...
@@ -4169,7 +4132,7 @@
if
(
isOpenHiddenRows
)
{
this
.
_waitRecalFormulasAfterTableRowHidden
(
false
);
worksheet
.
workbook
.
dependencyFormulas
.
unlockRecal
(
);
}
return
{
values
:
this
.
_sortArrayMinMax
(
values
),
automaticRowCount
:
automaticRowCount
};
},
...
...
@@ -4273,7 +4236,7 @@
if
(
colId
===
null
)
return
;
this
.
_waitRecalFormulasAfterTableRowHidden
(
true
);
worksheet
.
workbook
.
dependencyFormulas
.
lockRecal
(
);
for
(
var
i
=
ref
.
r1
+
1
;
i
<=
ref
.
r2
;
i
++
)
{
if
(
worksheet
.
getRowHidden
(
i
)
===
false
)
...
...
@@ -4284,7 +4247,7 @@
worksheet
.
setRowHidden
(
false
,
i
,
i
);
}
}
this
.
_waitRecalFormulasAfterTableRowHidden
(
false
);
worksheet
.
workbook
.
dependencyFormulas
.
unlockRecal
(
);
},
_openAllHiddenRowsByFilter
:
function
(
filter
)
...
...
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