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
50da75aa
Commit
50da75aa
authored
7 years ago
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formula ca only for RAND, RANDBETWEEN, INDIRECT, NOW, TODAY, OFFSET (todo cell, info)
parent
1077fee3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
cell/model/FormulaObjects/dateandtimeFunctions.js
cell/model/FormulaObjects/dateandtimeFunctions.js
+14
-15
cell/model/FormulaObjects/lookupandreferenceFunctions.js
cell/model/FormulaObjects/lookupandreferenceFunctions.js
+1
-1
cell/model/FormulaObjects/mathematicFunctions.js
cell/model/FormulaObjects/mathematicFunctions.js
+1
-1
No files found.
cell/model/FormulaObjects/dateandtimeFunctions.js
View file @
50da75aa
...
...
@@ -357,7 +357,6 @@
this
.
value
=
new
cNumber
(
Math
.
round
(
new
Date
(
Date
.
UTC
(
year
,
month
-
1
,
day
)).
getExcelDate
()));
}
this
.
value
.
numFormat
=
14
;
this
.
value
.
ca
=
true
;
return
this
.
value
;
};
cDATE
.
prototype
.
getInfo
=
function
()
{
...
...
@@ -584,19 +583,19 @@
if
(
val
<
60
)
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
val
-
AscCommonExcel
.
c_DateCorrectConst
)
*
c_msPerDay
)
).
getUTCDate
()),
tru
e
,
0
);
fals
e
,
0
);
}
else
if
(
val
==
60
)
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
val
-
AscCommonExcel
.
c_DateCorrectConst
-
1
)
*
c_msPerDay
)
).
getUTCDate
()
+
1
),
tru
e
,
0
);
1
),
fals
e
,
0
);
}
else
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
val
-
AscCommonExcel
.
c_DateCorrectConst
-
1
)
*
c_msPerDay
)
).
getUTCDate
()),
tru
e
,
0
);
fals
e
,
0
);
}
}
else
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
val
-
AscCommonExcel
.
c_DateCorrectConst
)
*
c_msPerDay
)
).
getUTCDate
()),
tru
e
,
new
cNumber
((
new
Date
((
val
-
AscCommonExcel
.
c_DateCorrectConst
)
*
c_msPerDay
)
).
getUTCDate
()),
fals
e
,
0
);
}
};
...
...
@@ -881,7 +880,7 @@
}
else
//1 2 3 4 4 3 2 1
{
return
this
.
setCA
(
new
cNumber
(
parseInt
((
(
val
-
Math
.
floor
(
val
)
)
*
24
).
toFixed
(
cExcelDateTimeDigits
))),
tru
e
,
0
);
fals
e
,
0
);
}
};
cHOUR
.
prototype
.
getInfo
=
function
()
{
...
...
@@ -948,7 +947,7 @@
return
this
.
setCA
(
new
cError
(
cErrorType
.
not_numeric
),
true
);
}
else
{
val
=
parseInt
((
(
val
*
24
-
Math
.
floor
(
val
*
24
)
)
*
60
).
toFixed
(
cExcelDateTimeDigits
))
%
60
;
return
this
.
setCA
(
new
cNumber
(
val
),
tru
e
,
0
);
return
this
.
setCA
(
new
cNumber
(
val
),
fals
e
,
0
);
}
};
cMINUTE
.
prototype
.
getInfo
=
function
()
{
...
...
@@ -1012,15 +1011,15 @@
}
if
(
!
AscCommon
.
bDate1904
)
{
if
(
val
==
60
)
{
return
this
.
setCA
(
new
cNumber
(
2
),
tru
e
,
0
);
return
this
.
setCA
(
new
cNumber
(
2
),
fals
e
,
0
);
}
else
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
(
val
==
0
?
1
:
val
)
-
AscCommonExcel
.
c_DateCorrectConst
-
1
)
*
c_msPerDay
)
).
getUTCMonth
()
+
1
),
tru
e
,
0
);
c_msPerDay
)
).
getUTCMonth
()
+
1
),
fals
e
,
0
);
}
}
else
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
(
val
==
0
?
1
:
val
)
-
AscCommonExcel
.
c_DateCorrectConst
)
*
c_msPerDay
)
).
getUTCMonth
()
+
1
),
tru
e
,
0
);
c_msPerDay
)
).
getUTCMonth
()
+
1
),
fals
e
,
0
);
}
};
cMONTH
.
prototype
.
getInfo
=
function
()
{
...
...
@@ -1253,7 +1252,7 @@
return
this
.
setCA
(
new
cError
(
cErrorType
.
not_numeric
),
true
);
}
else
{
val
=
parseInt
(((
val
*
24
*
60
-
Math
.
floor
(
val
*
24
*
60
)
)
*
60
).
toFixed
(
cExcelDateTimeDigits
))
%
60
;
return
this
.
setCA
(
new
cNumber
(
val
),
tru
e
,
0
);
return
this
.
setCA
(
new
cNumber
(
val
),
fals
e
,
0
);
}
};
cSECOND
.
prototype
.
getInfo
=
function
()
{
...
...
@@ -1314,7 +1313,7 @@
second
=
second
.
getValue
();
var
v
=
(
hour
*
60
*
60
+
minute
*
60
+
second
)
/
c_sPerDay
;
this
.
setCA
(
new
cNumber
(
v
-
Math
.
floor
(
v
)),
tru
e
);
this
.
setCA
(
new
cNumber
(
v
-
Math
.
floor
(
v
)),
fals
e
);
if
(
arguments
[
1
].
getNumFormatStr
().
toLowerCase
()
===
"
general
"
)
{
this
.
value
.
numFormat
=
18
;
}
...
...
@@ -1720,9 +1719,9 @@
}
if
(
arguments
[
1
].
getNumFormatStr
().
toLowerCase
()
===
"
general
"
)
{
return
this
.
setCA
(
new
cNumber
(
val
),
tru
e
,
14
);
return
this
.
setCA
(
new
cNumber
(
val
),
fals
e
,
14
);
}
else
{
return
this
.
setCA
(
new
cNumber
(
val
),
tru
e
);
return
this
.
setCA
(
new
cNumber
(
val
),
fals
e
);
}
};
cWORKDAY
.
prototype
.
getInfo
=
function
()
{
...
...
@@ -1799,7 +1798,7 @@
}
else
{
return
this
.
setCA
(
new
cNumber
((
new
Date
((
val
-
(
AscCommonExcel
.
c_DateCorrectConst
+
1
))
*
c_msPerDay
)).
getUTCFullYear
()),
tru
e
,
0
);
fals
e
,
0
);
}
};
cYEAR
.
prototype
.
getInfo
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
cell/model/FormulaObjects/lookupandreferenceFunctions.js
View file @
50da75aa
...
...
@@ -987,7 +987,7 @@
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
return
this
.
value
;
return
this
.
setCA
(
this
.
value
,
true
)
;
};
cOFFSET
.
prototype
.
getInfo
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
cell/model/FormulaObjects/mathematicFunctions.js
View file @
50da75aa
...
...
@@ -2496,7 +2496,7 @@
}
return
this
.
setCA
(
quotient
(
arg0
,
arg1
),
true
);
return
this
.
value
=
quotient
(
arg0
,
arg1
);
};
cQUOTIENT
.
prototype
.
getInfo
=
function
()
{
return
{
...
...
This diff is collapsed.
Click to expand it.
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