Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
0fc38d3b
Commit
0fc38d3b
authored
Dec 06, 2017
by
Boris Kocherov
Committed by
Romain Courteaud
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_only_office] fix parserFormula.changeOffset
parent
1528eda9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/sdkjs/cell/model/FormulaObjects/cubeFunctions.js.js
...ffice/sdkjs/cell/model/FormulaObjects/cubeFunctions.js.js
+0
-2
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/sdkjs/cell/model/FormulaObjects/parserFormula.js.js
...ffice/sdkjs/cell/model/FormulaObjects/parserFormula.js.js
+16
-5
No files found.
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/sdkjs/cell/model/FormulaObjects/cubeFunctions.js.js
View file @
0fc38d3b
...
...
@@ -614,8 +614,6 @@
new_member
=
level
[
member
.
level_index
+
offset
.
offsetCol
+
offset
.
offsetRow
];
if
(
new_member
)
{
elem
.
value
=
new_member
.
uname
;
}
else
{
elem
.
value
=
""
;
}
}
}
...
...
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice/sdkjs/cell/model/FormulaObjects/parserFormula.js.js
View file @
0fc38d3b
...
...
@@ -5543,7 +5543,8 @@ parserFormula.prototype.setFormula = function(formula) {
/* Для обратной сборки функции иногда необходимо поменять ссылки на ячейки */
parserFormula
.
prototype
.
changeOffset
=
function
(
offset
,
canResize
)
{
//offset = AscCommonExcel.CRangeOffset
var
elemArr
=
[],
currentElement
=
null
,
arg
,
disable_changeOffset_run
=
false
;
disable_changeOffset_run
=
false
,
argumentsCount
;
for
(
var
i
=
0
;
i
<
this
.
outStack
.
length
;
i
++
)
{
currentElement
=
this
.
outStack
[
i
];
this
.
changeOffsetElem
(
currentElement
,
this
.
outStack
,
i
,
offset
,
canResize
);
...
...
@@ -5553,14 +5554,24 @@ parserFormula.prototype.setFormula = function(formula) {
if
(
currentElement
.
name
==
"
(
"
)
{
continue
;
}
if
(
currentElement
.
type
===
cElementType
.
specialFunctionStart
){
continue
;
}
if
(
currentElement
.
type
===
cElementType
.
specialFunctionEnd
){
continue
;
}
if
(
"
number
"
===
typeof
(
currentElement
)){
continue
;
}
if
(
currentElement
.
type
===
cElementType
.
operator
||
currentElement
.
type
===
cElementType
.
func
)
{
if
(
elemArr
.
length
<
currentElement
.
getArguments
())
{
argumentsCount
=
"
number
"
===
typeof
(
this
.
outStack
[
i
-
1
])
?
this
.
outStack
[
i
-
1
]
:
currentElement
.
argumentsCurrent
;
if
(
elemArr
.
length
<
argumentsCount
)
{
disable_changeOffset_run
=
true
;
continue
;
}
else
{
if
(
currentElement
&&
currentElement
.
changeOffsetElem
)
{
arg
=
[];
for
(
var
ind
=
0
;
ind
<
currentElement
.
getArguments
()
;
ind
++
)
{
for
(
var
ind
=
0
;
ind
<
argumentsCount
;
ind
++
)
{
arg
.
unshift
(
elemArr
.
pop
());
}
currentElement
.
changeOffsetElem
(
arg
,
offset
);
...
...
@@ -5569,9 +5580,9 @@ parserFormula.prototype.setFormula = function(formula) {
elemArr
.
push
(
new
cEmpty
());
}
}
else
if
(
currentElement
.
type
===
cElementType
.
name
||
currentElement
.
type
===
cElementType
.
name3D
)
{
elemArr
.
push
(
currentElement
.
Calculate
(
null
,
rangeCe
ll
));
elemArr
.
push
(
currentElement
.
Calculate
(
null
,
nu
ll
));
}
else
if
(
currentElement
.
type
===
cElementType
.
table
)
{
elemArr
.
push
(
currentElement
.
toRef
(
rangeCell
.
getBBox0
()
));
elemArr
.
push
(
currentElement
.
toRef
(
null
));
}
else
{
elemArr
.
push
(
currentElement
);
}
...
...
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