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
c19772ec
Commit
c19772ec
authored
Mar 14, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete getBBox function. Use getBBox0.
cross return 0-base index
parent
b5144379
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
28 deletions
+13
-28
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+9
-19
cell/model/Workbook.js
cell/model/Workbook.js
+2
-7
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+2
-2
No files found.
cell/model/FormulaObjects/parserFormula.js
View file @
c19772ec
...
...
@@ -1016,9 +1016,6 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
cArea
.
prototype
.
getWS
=
function
()
{
return
this
.
ws
;
};
cArea
.
prototype
.
getBBox
=
function
()
{
return
this
.
getRange
().
getBBox
();
};
cArea
.
prototype
.
getBBox0
=
function
()
{
return
this
.
getRange
().
getBBox0
();
};
...
...
@@ -1029,10 +1026,10 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
}
cross
=
r
.
cross
(
arg
);
if
(
cross
)
{
if
(
cross
.
r
!=
undefined
)
{
return
this
.
getValue2
(
cross
.
r
-
this
.
getBBox
().
r1
,
0
);
}
else
if
(
cross
.
c
!=
undefined
)
{
return
this
.
getValue2
(
0
,
cross
.
c
-
this
.
getBBox
().
c1
);
if
(
undefined
!==
cross
.
r
)
{
return
this
.
getValue2
(
cross
.
r
-
this
.
getBBox
0
().
r1
,
0
);
}
else
if
(
undefined
!==
cross
.
c
)
{
return
this
.
getValue2
(
0
,
cross
.
c
-
this
.
getBBox
0
().
c1
);
}
}
return
new
cError
(
cErrorType
.
wrong_value_type
);
...
...
@@ -1270,20 +1267,13 @@ parserHelp.setDigitSeparator(AscCommon.g_oDefaultCultureInfo.NumberDecimalSepara
}
var
cross
=
r
.
cross
(
arg
);
if
(
cross
)
{
if
(
cross
.
r
!=
undefined
)
{
return
this
.
getValue2
(
new
CellAddress
(
cross
.
r
,
this
.
getBBox
().
c1
));
}
else
if
(
cross
.
c
!=
undefined
)
{
return
this
.
getValue2
(
new
CellAddress
(
this
.
getBBox
().
r1
,
cross
.
c
));
}
else
{
return
new
cError
(
cErrorType
.
wrong_value_type
);
if
(
undefined
!==
cross
.
r
)
{
return
this
.
getValue2
(
new
CellAddress
(
cross
.
r
,
this
.
getBBox0
().
c1
));
}
else
if
(
undefined
!==
cross
.
c
)
{
return
this
.
getValue2
(
new
CellAddress
(
this
.
getBBox0
().
r1
,
cross
.
c
));
}
}
else
{
return
new
cError
(
cErrorType
.
wrong_value_type
);
}
};
cArea3D
.
prototype
.
getBBox
=
function
()
{
var
range
=
this
.
getRange
();
return
range
?
range
.
getBBox
()
:
range
;
return
new
cError
(
cErrorType
.
wrong_value_type
);
};
cArea3D
.
prototype
.
getBBox0
=
function
()
{
var
range
=
this
.
getRange
();
...
...
cell/model/Workbook.js
View file @
c19772ec
...
...
@@ -5746,11 +5746,10 @@ Range.prototype._foreachNoEmpty=function(action, excludeHiddenRows){
cell
.
nRow
<=
this
.
bbox
.
r2
&&
cell
.
nCol
<=
this
.
bbox
.
c2
;
};
Range
.
prototype
.
cross
=
function
(
bbox
){
if
(
bbox
.
r1
>=
this
.
bbox
.
r1
&&
bbox
.
r1
<=
this
.
bbox
.
r2
&&
this
.
bbox
.
c1
==
this
.
bbox
.
c2
)
return
{
r
:
bbox
.
r1
+
1
};
return
{
r
:
bbox
.
r1
};
if
(
bbox
.
c1
>=
this
.
bbox
.
c1
&&
bbox
.
c1
<=
this
.
bbox
.
c2
&&
this
.
bbox
.
r1
==
this
.
bbox
.
r2
)
return
{
c
:
bbox
.
c1
+
1
};
return
{
c
:
bbox
.
c1
};
return
undefined
;
};
...
...
@@ -5767,10 +5766,6 @@ Range.prototype._foreachNoEmpty=function(action, excludeHiddenRows){
var
oBBox
=
this
.
bbox
;
return
oBBox
.
r1
==
oBBox
.
r2
&&
oBBox
.
c1
==
oBBox
.
c2
;
};
Range
.
prototype
.
getBBox
=
function
(){
//1 - based
return
{
r1
:
this
.
bbox
.
r1
+
1
,
r2
:
this
.
bbox
.
r2
+
1
,
c1
:
this
.
bbox
.
c1
+
1
,
c2
:
this
.
bbox
.
c2
+
1
};
};
Range
.
prototype
.
getBBox0
=
function
(){
//0 - based
return
this
.
bbox
;
...
...
cell/view/WorksheetView.js
View file @
c19772ec
...
...
@@ -5050,8 +5050,8 @@
apl
:
_t1
.
left
+
_t1
.
width
/
4
};
}
else
{
var
_t1
=
gCM
(
_wsV
,
me
[
id
].
getBBox
().
c1
,
me
[
id
].
getBBox
().
r1
),
_t2
=
gCM
(
_wsV
,
me
[
id
].
getBBox
().
c2
,
me
[
id
].
getBBox
().
r2
);
var
_t1
=
gCM
(
_wsV
,
me
[
id
].
getBBox
0
().
c1
,
me
[
id
].
getBBox0
().
r1
),
_t2
=
gCM
(
_wsV
,
me
[
id
].
getBBox0
().
c2
,
me
[
id
].
getBBox
0
().
r2
);
nodeCellMetrics
=
{
t
:
_t1
.
top
,
...
...
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