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
213fd4f0
Commit
213fd4f0
authored
Jul 03, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/ONLYOFFICE/sdkjs
into develop
parents
fdb21f49
8f3c61df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
41 deletions
+26
-41
cell/model/FormulaObjects/lookupandreferenceFunctions.js
cell/model/FormulaObjects/lookupandreferenceFunctions.js
+23
-41
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+3
-0
No files found.
cell/model/FormulaObjects/lookupandreferenceFunctions.js
View file @
213fd4f0
...
...
@@ -874,7 +874,7 @@
if
(
this
.
argumentsCurrent
>=
4
)
{
arg3
=
arg
[
3
].
tocNumber
();
}
if
(
this
.
argumentsCurrent
==
5
)
{
if
(
5
===
this
.
argumentsCurrent
)
{
arg4
=
arg
[
4
].
tocNumber
();
}
...
...
@@ -896,53 +896,35 @@
arg4
=
1
;
}
if
(
cElementType
.
cell
===
arg0
.
type
||
cElementType
.
cell3D
===
arg0
.
type
)
{
var
range
=
arg0
.
getRange
(),
bbox
=
range
.
getBBox0
(),
box
=
{
r1
:
0
,
r2
:
0
,
c1
:
0
,
c2
:
0
},
ref
;
if
(
cElementType
.
cell
===
arg0
.
type
||
cElementType
.
cell3D
===
arg0
.
type
||
cElementType
.
cellsRange
===
arg0
.
type
||
cElementType
.
cellsRange3D
===
arg0
.
type
)
{
var
box
=
arg0
.
getBBox0
();
if
(
box
)
{
box
=
box
.
clone
(
true
);
box
.
r1
=
bbox
.
r1
+
arg
1
;
box
.
c1
=
bbox
.
c1
+
arg2
;
box
.
r2
=
bbox
.
r1
+
arg1
+
arg3
-
1
;
box
.
c2
=
bbox
.
c1
+
arg2
+
arg4
-
1
;
box
.
r2
=
box
.
r1
+
arg1
+
arg3
-
1
;
box
.
c2
=
box
.
c1
+
arg2
+
arg4
-
1
;
box
.
r1
=
box
.
r1
+
arg
1
;
box
.
c1
=
box
.
c1
+
arg2
;
if
(
!
validBBOX
(
box
))
{
return
this
.
value
=
new
cError
(
cErrorType
.
bad_reference
);
}
if
(
!
validBBOX
(
box
))
{
return
this
.
value
=
new
cError
(
cErrorType
.
bad_reference
);
}
if
(
box
.
r1
==
box
.
r2
&&
box
.
c1
==
box
.
c2
)
{
ref
=
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
box
.
c1
+
1
)
+
_getRowTitle
(
box
.
r1
);
this
.
value
=
(
cElementType
.
cell
===
arg0
.
type
)
?
new
cRef
(
ref
,
arg0
.
ws
)
:
new
cRef3D
(
ref
,
arg0
.
ws
)
;
}
else
{
ref
=
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
box
.
c1
+
1
)
+
_getRowTitle
(
box
.
r1
)
+
"
:
"
+
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
box
.
c2
+
1
)
+
_getRowTitle
(
box
.
r2
);
this
.
value
=
(
cElementType
.
cell
===
arg0
.
type
)
?
new
cArea
(
ref
,
arg0
.
ws
)
:
new
cArea3D
(
ref
,
arg0
.
ws
,
arg0
.
ws
);
var
name
=
box
.
getName
();
var
ws
=
arg0
.
getWS
(
);
var
wsCell
=
arguments
[
3
]
;
if
(
box
.
isOneCell
())
{
this
.
value
=
wsCell
===
ws
?
new
cRef
(
name
,
ws
)
:
new
cRef3D
(
name
,
ws
);
}
else
{
this
.
value
=
wsCell
===
ws
?
new
cArea
(
name
,
ws
)
:
new
cArea3D
(
name
,
ws
,
ws
);
}
}
}
}
else
if
(
cElementType
.
cellsRange
===
arg0
.
type
)
{
var
bbox
=
arg0
.
getBBox0
(),
box
=
{
r1
:
0
,
r2
:
0
,
c1
:
0
,
c2
:
0
},
ref
;
box
.
r1
=
bbox
.
r1
+
arg1
;
box
.
c1
=
bbox
.
c1
+
arg2
;
box
.
r2
=
bbox
.
r1
+
arg1
+
arg3
-
1
;
box
.
c2
=
bbox
.
c1
+
arg2
+
arg4
-
1
;
if
(
!
validBBOX
(
box
))
{
return
this
.
value
=
new
cError
(
cErrorType
.
bad_reference
);
}
if
(
box
.
r1
==
box
.
r2
&&
box
.
c1
==
box
.
c2
)
{
ref
=
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
box
.
c1
+
1
)
+
_getRowTitle
(
box
.
r1
);
this
.
value
=
new
cRef
(
ref
,
arg0
.
ws
);
}
else
{
ref
=
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
box
.
c1
+
1
)
+
_getRowTitle
(
box
.
r1
)
+
"
:
"
+
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
box
.
c2
+
1
)
+
_getRowTitle
(
box
.
r2
);
this
.
value
=
new
cArea
(
ref
,
arg0
.
ws
);
}
}
else
{
if
(
!
this
.
value
)
{
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
return
this
.
value
;
};
...
...
cell/model/FormulaObjects/parserFormula.js
View file @
213fd4f0
...
...
@@ -1509,6 +1509,9 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
cRef3D
.
prototype
.
getWS
=
function
()
{
return
this
.
ws
;
};
cRef3D
.
prototype
.
getMatrix
=
function
()
{
return
[[
this
.
getValue
()]];
};
cRef3D
.
prototype
.
getBBox0
=
function
()
{
var
range
=
this
.
getRange
();
if
(
range
)
{
...
...
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