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
4d0c2412
Commit
4d0c2412
authored
Aug 03, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LengthCache deleted because few formulas used cache
parent
48b8edcd
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
253 deletions
+86
-253
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+7
-7
cell/model/Workbook.js
cell/model/Workbook.js
+76
-244
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+3
-2
No files found.
cell/model/FormulaObjects/parserFormula.js
View file @
4d0c2412
...
@@ -3562,7 +3562,7 @@ function parserFormula( formula, parent, _ws ) {
...
@@ -3562,7 +3562,7 @@ function parserFormula( formula, parent, _ws ) {
this
.
operand_str
=
null
;
this
.
operand_str
=
null
;
this
.
parenthesesNotEnough
=
false
;
this
.
parenthesesNotEnough
=
false
;
this
.
f
=
[];
this
.
f
=
[];
this
.
reRowCol
=
new
RegExp
(
"
^(ROW|ROWS|COLUMN|COLUMNS)$
"
,
"
gi
"
);
this
.
reRowCol
=
/^
(
ROW|ROWS|COLUMN|COLUMNS
)
$/gi
this
.
regSpace
=
/
\$
/g
;
this
.
regSpace
=
/
\$
/g
;
this
.
countRef
=
0
;
this
.
countRef
=
0
;
...
@@ -4758,7 +4758,7 @@ parserFormula.prototype.buildDependencies = function() {
...
@@ -4758,7 +4758,7 @@ parserFormula.prototype.buildDependencies = function() {
continue
;
continue
;
}
}
if
((
ref
instanceof
cRef
||
ref
instanceof
cRef3D
||
ref
instanceof
cArea
||
ref
instanceof
cArea3D
)
&&
if
((
cElementType
.
cell
===
ref
.
type
||
cElementType
.
cell3D
===
ref
.
type
||
cElementType
.
cellsRange
===
ref
.
type
||
cElementType
.
cellsRange3D
===
ref
.
type
)
&&
ref
.
isValid
()
&&
this
.
outStack
[
i
+
1
]
&&
this
.
outStack
[
i
+
1
]
instanceof
cBaseFunction
&&
ref
.
isValid
()
&&
this
.
outStack
[
i
+
1
]
&&
this
.
outStack
[
i
+
1
]
instanceof
cBaseFunction
&&
this
.
reRowCol
.
test
(
this
.
outStack
[
i
+
1
].
name
))
{
this
.
reRowCol
.
test
(
this
.
outStack
[
i
+
1
].
name
))
{
this
.
reRowCol
.
lastIndex
=
0
;
this
.
reRowCol
.
lastIndex
=
0
;
...
@@ -4767,10 +4767,10 @@ parserFormula.prototype.buildDependencies = function() {
...
@@ -4767,10 +4767,10 @@ parserFormula.prototype.buildDependencies = function() {
if
(
ref
.
type
==
cElementType
.
name
||
ref
.
type
==
cElementType
.
name3D
)
{
if
(
ref
.
type
==
cElementType
.
name
||
ref
.
type
==
cElementType
.
name3D
)
{
this
.
wb
.
dependencyFormulas
.
startListeningDefName
(
ref
.
value
,
this
);
this
.
wb
.
dependencyFormulas
.
startListeningDefName
(
ref
.
value
,
this
);
}
else
if
((
ref
instanceof
cRef
||
ref
instanceof
cRef3D
||
ref
instanceof
cArea
)
&&
ref
.
isValid
())
{
}
else
if
((
cElementType
.
cell
===
ref
.
type
||
cElementType
.
cell3D
===
ref
.
type
||
cElementType
.
cellsRange
===
ref
.
type
)
&&
ref
.
isValid
())
{
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
this
.
wb
.
dependencyFormulas
.
startListeningRange
(
ref
.
getWsId
(),
bbox
,
this
);
this
.
wb
.
dependencyFormulas
.
startListeningRange
(
ref
.
getWsId
(),
bbox
,
this
);
}
else
if
(
ref
instanceof
cArea3D
&&
ref
.
isValid
())
{
}
else
if
(
cElementType
.
cellsRange3D
===
ref
.
type
&&
ref
.
isValid
())
{
wsR
=
ref
.
wsRange
();
wsR
=
ref
.
wsRange
();
for
(
var
j
=
0
;
j
<
wsR
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
wsR
.
length
;
j
++
)
{
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
...
@@ -4795,7 +4795,7 @@ parserFormula.prototype.buildDependencies = function() {
...
@@ -4795,7 +4795,7 @@ parserFormula.prototype.buildDependencies = function() {
continue
;
continue
;
}
}
if
((
ref
instanceof
cRef
||
ref
instanceof
cRef3D
||
ref
instanceof
cArea
||
ref
instanceof
cArea3D
)
&&
if
((
cElementType
.
cell
===
ref
.
type
||
cElementType
.
cell3D
===
ref
.
type
||
cElementType
.
cellsRange
===
ref
.
type
||
cElementType
.
cellsRange3D
===
ref
.
type
)
&&
ref
.
isValid
()
&&
this
.
outStack
[
i
+
1
]
&&
this
.
outStack
[
i
+
1
]
instanceof
cBaseFunction
&&
ref
.
isValid
()
&&
this
.
outStack
[
i
+
1
]
&&
this
.
outStack
[
i
+
1
]
instanceof
cBaseFunction
&&
this
.
reRowCol
.
test
(
this
.
outStack
[
i
+
1
].
name
))
{
this
.
reRowCol
.
test
(
this
.
outStack
[
i
+
1
].
name
))
{
this
.
reRowCol
.
lastIndex
=
0
;
this
.
reRowCol
.
lastIndex
=
0
;
...
@@ -4804,10 +4804,10 @@ parserFormula.prototype.buildDependencies = function() {
...
@@ -4804,10 +4804,10 @@ parserFormula.prototype.buildDependencies = function() {
if
(
ref
.
type
==
cElementType
.
name
||
ref
.
type
==
cElementType
.
name3D
)
{
if
(
ref
.
type
==
cElementType
.
name
||
ref
.
type
==
cElementType
.
name3D
)
{
this
.
wb
.
dependencyFormulas
.
endListeningDefName
(
ref
.
value
,
this
);
this
.
wb
.
dependencyFormulas
.
endListeningDefName
(
ref
.
value
,
this
);
}
else
if
((
ref
instanceof
cRef
||
ref
instanceof
cRef3D
||
ref
instanceof
cArea
)
&&
ref
.
isValid
())
{
}
else
if
((
cElementType
.
cell
===
ref
.
type
||
cElementType
.
cell3D
===
ref
.
type
||
cElementType
.
cellsRange
===
ref
.
type
)
&&
ref
.
isValid
())
{
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
this
.
wb
.
dependencyFormulas
.
endListeningRange
(
ref
.
getWsId
(),
bbox
,
this
);
this
.
wb
.
dependencyFormulas
.
endListeningRange
(
ref
.
getWsId
(),
bbox
,
this
);
}
else
if
(
ref
instanceof
cArea3D
&&
ref
.
isValid
())
{
}
else
if
(
cElementType
.
cellsRange3D
===
ref
.
type
&&
ref
.
isValid
())
{
wsR
=
ref
.
wsRange
();
wsR
=
ref
.
wsRange
();
for
(
var
j
=
0
;
j
<
wsR
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
wsR
.
length
;
j
++
)
{
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
var
bbox
=
AscCommonExcel
.
g_oRangeCache
.
getActiveRange
(
ref
.
_cells
.
replace
(
this
.
regSpace
,
""
));
...
...
cell/model/Workbook.js
View file @
4d0c2412
This diff is collapsed.
Click to expand it.
cell/model/WorkbookElems.js
View file @
4d0c2412
...
@@ -3156,8 +3156,9 @@ CCellValue.prototype =
...
@@ -3156,8 +3156,9 @@ CCellValue.prototype =
}
}
if
(
null
==
aRes
)
if
(
null
==
aRes
)
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
);
aRes
=
this
.
_getValue2Result
(
cell
,
sText
,
aText
);
if
(
cell
.
sFormula
){
var
formula
=
cell
.
getFormula
();
aRes
[
0
].
sFormula
=
cell
.
sFormula
;
if
(
formula
){
aRes
[
0
].
sFormula
=
formula
;
aRes
[
0
].
sId
=
cell
.
getName
();
aRes
[
0
].
sId
=
cell
.
getName
();
}
}
...
...
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