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
4ce06863
Commit
4ce06863
authored
Aug 29, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 20137
parent
f6401886
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
cell/model/FormulaObjects/lookupandreferenceFunctions.js
cell/model/FormulaObjects/lookupandreferenceFunctions.js
+16
-12
No files found.
cell/model/FormulaObjects/lookupandreferenceFunctions.js
View file @
4ce06863
...
@@ -111,7 +111,6 @@
...
@@ -111,7 +111,6 @@
cADDRESS
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cADDRESS
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cADDRESS
.
prototype
.
Calculate
=
function
(
arg
)
{
cADDRESS
.
prototype
.
Calculate
=
function
(
arg
)
{
var
rowNumber
=
arg
[
0
],
colNumber
=
arg
[
1
],
refType
=
arg
[
2
]
?
arg
[
2
]
:
new
cNumber
(
1
),
A1RefType
=
arg
[
3
]
?
var
rowNumber
=
arg
[
0
],
colNumber
=
arg
[
1
],
refType
=
arg
[
2
]
?
arg
[
2
]
:
new
cNumber
(
1
),
A1RefType
=
arg
[
3
]
?
arg
[
3
]
:
new
cBool
(
true
),
sheetName
=
arg
[
4
]
?
arg
[
4
]
:
new
cEmpty
();
arg
[
3
]
:
new
cBool
(
true
),
sheetName
=
arg
[
4
]
?
arg
[
4
]
:
new
cEmpty
();
...
@@ -176,25 +175,29 @@
...
@@ -176,25 +175,29 @@
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
}
var
strRef
;
var
strRef
;
var
strColumn
=
A1RefType
?
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
colNumber
)
:
colNumber
;
var
absR
,
absC
;
var
strRow
;
switch
(
refType
-
1
)
{
switch
(
refType
-
1
)
{
case
AscCommonExcel
.
referenceType
.
A
:
case
AscCommonExcel
.
referenceType
.
A
:
strRow
=
this
.
_absolute
(
rowNumber
,
A1RefType
)
;
absR
=
true
;
strColumn
=
this
.
_absolute
(
strColumn
,
A1RefType
)
;
absC
=
true
;
break
;
break
;
case
AscCommonExcel
.
referenceType
.
ARRC
:
case
AscCommonExcel
.
referenceType
.
ARRC
:
strRow
=
this
.
_absolute
(
rowNumber
,
A1RefType
);
absR
=
true
;
absC
=
false
;
break
;
break
;
case
AscCommonExcel
.
referenceType
.
RRAC
:
case
AscCommonExcel
.
referenceType
.
RRAC
:
strColumn
=
this
.
_absolute
(
strColumn
,
A1RefType
)
;
absR
=
false
;
strRow
=
rowNumber
;
absC
=
true
;
break
;
break
;
case
AscCommonExcel
.
referenceType
.
R
:
case
AscCommonExcel
.
referenceType
.
R
:
strRow
=
rowNumber
;
absR
=
false
;
absC
=
false
;
break
;
break
;
}
}
strRef
=
this
.
_getRef
(
strRow
,
strColumn
,
A1RefType
);
strRef
=
this
.
_getRef
(
this
.
_absolute
(
absR
,
rowNumber
,
A1RefType
),
this
.
_absolute
(
absC
,
A1RefType
?
g_oCellAddressUtils
.
colnumToColstrFromWsView
(
colNumber
)
:
colNumber
,
A1RefType
),
A1RefType
);
return
this
.
value
=
return
this
.
value
=
new
cString
((
cElementType
.
empty
===
sheetName
.
type
)
?
strRef
:
parserHelp
.
get3DRef
(
sheetName
.
toString
(),
strRef
));
new
cString
((
cElementType
.
empty
===
sheetName
.
type
)
?
strRef
:
parserHelp
.
get3DRef
(
sheetName
.
toString
(),
strRef
));
...
@@ -202,8 +205,9 @@
...
@@ -202,8 +205,9 @@
cADDRESS
.
prototype
.
_getRef
=
function
(
row
,
col
,
A1RefType
)
{
cADDRESS
.
prototype
.
_getRef
=
function
(
row
,
col
,
A1RefType
)
{
return
A1RefType
?
col
+
row
:
'
R
'
+
row
+
'
C
'
+
col
;
return
A1RefType
?
col
+
row
:
'
R
'
+
row
+
'
C
'
+
col
;
};
};
cADDRESS
.
prototype
.
_absolute
=
function
(
val
,
A1RefType
)
{
cADDRESS
.
prototype
.
_absolute
=
function
(
abs
,
val
,
A1RefType
)
{
return
A1RefType
?
'
$
'
+
val
:
'
[
'
+
val
+
'
]
'
;
return
abs
?
(
A1RefType
?
'
$
'
+
val
:
val
)
:
(
A1RefType
?
val
:
'
[
'
+
val
+
'
]
'
);
};
};
cADDRESS
.
prototype
.
getInfo
=
function
()
{
cADDRESS
.
prototype
.
getInfo
=
function
()
{
return
{
return
{
...
...
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