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
0894de41
Commit
0894de41
authored
Jun 20, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/3.8.1' into develop
parents
8cfe8d40
826f44e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
10 deletions
+40
-10
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+36
-8
cell/model/autofilters.js
cell/model/autofilters.js
+1
-1
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+3
-1
No files found.
cell/model/WorkbookElems.js
View file @
0894de41
...
@@ -5005,7 +5005,7 @@ TablePart.prototype.generateTotalsRowLabel = function()
...
@@ -5005,7 +5005,7 @@ TablePart.prototype.generateTotalsRowLabel = function()
}
}
this
.
TableColumns
[
0
].
generateTotalsRowLabel
();
this
.
TableColumns
[
0
].
generateTotalsRowLabel
();
this
.
TableColumns
[
this
.
TableColumns
.
length
-
1
].
generateTotalsRowFunction
();
this
.
TableColumns
[
this
.
TableColumns
.
length
-
1
].
generateTotalsRowFunction
(
this
);
};
};
TablePart
.
prototype
.
changeDisplayName
=
function
(
newName
)
TablePart
.
prototype
.
changeDisplayName
=
function
(
newName
)
...
@@ -5021,6 +5021,17 @@ TablePart.prototype.getRangeWithoutHeaderFooter = function()
...
@@ -5021,6 +5021,17 @@ TablePart.prototype.getRangeWithoutHeaderFooter = function()
return
Asc
.
Range
(
this
.
Ref
.
c1
,
startRow
,
this
.
Ref
.
c2
,
endRow
);
return
Asc
.
Range
(
this
.
Ref
.
c1
,
startRow
,
this
.
Ref
.
c2
,
endRow
);
};
};
TablePart
.
prototype
.
checkTotalRowFormula
=
function
()
{
if
(
this
.
TotalsRowCount
)
{
for
(
var
i
=
0
;
i
<
this
.
TableColumns
.
length
;
i
++
)
{
this
.
TableColumns
[
i
].
checkTotalRowFormula
(
this
);
}
}
};
/** @constructor */
/** @constructor */
function
AutoFilter
()
{
function
AutoFilter
()
{
this
.
Ref
=
null
;
this
.
Ref
=
null
;
...
@@ -5270,11 +5281,12 @@ TableColumn.prototype.generateTotalsRowLabel = function(){
...
@@ -5270,11 +5281,12 @@ TableColumn.prototype.generateTotalsRowLabel = function(){
this
.
TotalsRowLabel
=
"
Summary
"
;
this
.
TotalsRowLabel
=
"
Summary
"
;
}
}
};
};
TableColumn
.
prototype
.
generateTotalsRowFunction
=
function
(){
TableColumn
.
prototype
.
generateTotalsRowFunction
=
function
(
tablePart
){
//TODO добавить в перевод
//TODO добавить в перевод
if
(
this
.
TotalsRowFunction
===
null
)
if
(
this
.
TotalsRowFunction
===
null
)
{
{
this
.
TotalsRowFunction
=
Asc
.
ETotalsRowFunction
.
totalrowfunctionSum
;
this
.
TotalsRowFunction
=
Asc
.
ETotalsRowFunction
.
totalrowfunctionCustom
;
this
.
TotalsRowFormula
=
"
SUBTOTAL(109,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
}
}
};
};
...
@@ -5287,10 +5299,12 @@ TableColumn.prototype.getTotalRowFormula = function(tablePart){
...
@@ -5287,10 +5299,12 @@ TableColumn.prototype.getTotalRowFormula = function(tablePart){
{
{
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionAverage
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionAverage
:
{
{
res
=
"
SUBTOTAL(101,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionCount
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionCount
:
{
{
res
=
"
SUBTOTAL(103,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionCountNums
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionCountNums
:
...
@@ -5299,14 +5313,17 @@ TableColumn.prototype.getTotalRowFormula = function(tablePart){
...
@@ -5299,14 +5313,17 @@ TableColumn.prototype.getTotalRowFormula = function(tablePart){
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionCustom
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionCustom
:
{
{
res
=
this
.
TotalsRowFormula
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionMax
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionMax
:
{
{
res
=
"
SUBTOTAL(104,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionMin
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionMin
:
{
{
res
=
"
SUBTOTAL(105,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionNone
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionNone
:
...
@@ -5315,23 +5332,21 @@ TableColumn.prototype.getTotalRowFormula = function(tablePart){
...
@@ -5315,23 +5332,21 @@ TableColumn.prototype.getTotalRowFormula = function(tablePart){
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionStdDev
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionStdDev
:
{
{
res
=
"
SUBTOTAL(107,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionSum
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionSum
:
{
{
res
=
"
=SUBTOTAL(109;
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
]
"
;
res
=
"
SUBTOTAL(109,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionVar
:
case
Asc
.
ETotalsRowFunction
.
totalrowfunctionVar
:
{
{
res
=
"
SUBTOTAL(110,
"
+
tablePart
.
DisplayName
+
"
[
"
+
this
.
Name
+
"
])
"
;
break
;
break
;
}
}
}
}
}
}
else
if
(
null
!==
this
.
TotalsRowFormula
)
{
res
=
this
.
TotalsRowFormula
;
}
return
res
;
return
res
;
};
};
...
@@ -5360,6 +5375,19 @@ TableColumn.prototype.setTotalsRowLabel = function(val){
...
@@ -5360,6 +5375,19 @@ TableColumn.prototype.setTotalsRowLabel = function(val){
this
.
TotalsRowLabel
=
val
;
this
.
TotalsRowLabel
=
val
;
};
};
TableColumn
.
prototype
.
checkTotalRowFormula
=
function
(
tablePart
){
if
(
null
!==
this
.
TotalsRowFunction
&&
Asc
.
ETotalsRowFunction
.
totalrowfunctionCustom
!==
this
.
TotalsRowFunction
)
{
var
totalRowFormula
=
this
.
getTotalRowFormula
(
tablePart
);
if
(
null
!==
totalRowFormula
)
{
this
.
TotalsRowFormula
=
totalRowFormula
;
this
.
TotalsRowFunction
=
Asc
.
ETotalsRowFunction
.
totalrowfunctionCustom
;
}
}
};
/** @constructor */
/** @constructor */
function
TableStyleInfo
()
{
function
TableStyleInfo
()
{
this
.
Name
=
null
;
this
.
Name
=
null
;
...
...
cell/model/autofilters.js
View file @
0894de41
...
@@ -4265,7 +4265,7 @@
...
@@ -4265,7 +4265,7 @@
var
formula
=
tableColumn
.
getTotalRowFormula
(
options
);
var
formula
=
tableColumn
.
getTotalRowFormula
(
options
);
if
(
null
!==
formula
)
if
(
null
!==
formula
)
{
{
range
.
setValue
(
formula
);
range
.
setValue
(
"
=
"
+
formula
,
null
,
true
);
if
(
isSetTotalRowType
)
if
(
isSetTotalRowType
)
{
{
var
numFormatType
=
this
.
_getFormatTableColumnRange
(
options
,
tableColumn
.
Name
);
var
numFormatType
=
this
.
_getFormatTableColumnRange
(
options
,
tableColumn
.
Name
);
...
...
cell/view/WorksheetView.js
View file @
0894de41
...
@@ -12428,7 +12428,9 @@
...
@@ -12428,7 +12428,9 @@
{
{
for
(
var
i
=
0
;
i
<
tableParts
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
tableParts
.
length
;
i
++
)
{
{
this
.
model
.
autoFilters
.
_setColorStyleTable
(
worksheet
.
TableParts
[
i
].
Ref
,
worksheet
.
TableParts
[
i
]);
this
.
model
.
autoFilters
.
_setColorStyleTable
(
tableParts
[
i
].
Ref
,
tableParts
[
i
]);
//TODO пока заменяем при открытии на TotalsRowFormula
tableParts
[
i
].
checkTotalRowFormula
();
}
}
}
}
...
...
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