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
16bc6020
Commit
16bc6020
authored
Jul 11, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update pivot fields info
parent
e61ba2d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
20 deletions
+48
-20
cell/model/PivotTables.js
cell/model/PivotTables.js
+48
-20
No files found.
cell/model/PivotTables.js
View file @
16bc6020
...
...
@@ -253,6 +253,8 @@ var st_datetimegroupingHOUR = 3;
var
st_datetimegroupingMINUTE
=
4
;
var
st_datetimegroupingSECOND
=
5
;
var
st_VALUES
=
-
2
;
function
FromXml_ST_SourceType
(
val
)
{
var
res
=
-
1
;
if
(
"
worksheet
"
===
val
)
{
...
...
@@ -1679,8 +1681,8 @@ CT_PivotCacheDefinition.prototype.toXml = function(writer) {
}
writer
.
WriteXmlNodeEnd
(
"
pivotCacheDefinition
"
);
};
CT_PivotCacheDefinition
.
prototype
.
getField
=
function
(
index
)
{
return
this
.
cacheFields
&&
this
.
cacheFields
.
cacheField
&&
this
.
cacheFields
.
cacheField
[
index
]
;
CT_PivotCacheDefinition
.
prototype
.
getField
s
=
function
(
)
{
return
this
.
cacheFields
&&
this
.
cacheFields
.
cacheField
;
};
function
CT_PivotCacheRecords
()
{
//Attributes
...
...
@@ -2620,7 +2622,7 @@ CT_pivotTableDefinition.prototype.getColumnFieldsCount = function () {
var
res
=
0
;
if
(
this
.
colFields
)
{
res
=
this
.
colFields
.
field
.
length
;
if
(
1
===
res
&&
-
2
===
this
.
colFields
.
field
[
0
].
x
)
{
if
(
1
===
res
&&
st_VALUES
===
this
.
colFields
.
field
[
0
].
x
)
{
res
=
0
;
}
}
...
...
@@ -2650,30 +2652,23 @@ CT_pivotTableDefinition.prototype.asc_getName = function () {
CT_pivotTableDefinition
.
prototype
.
asc_getStyleInfo
=
function
()
{
return
this
.
pivotTableStyleInfo
;
};
CT_pivotTableDefinition
.
prototype
.
asc_getFields
=
function
()
{
return
this
.
pivotFields
&&
this
.
getField
(
this
.
pivotFields
.
pivotField
,
function
(
element
,
index
)
{
return
element
.
name
||
this
.
cacheDefinition
.
getField
(
index
).
name
;
});
CT_pivotTableDefinition
.
prototype
.
asc_getCacheFields
=
function
()
{
return
this
.
cacheDefinition
.
getFields
();
};
CT_pivotTableDefinition
.
prototype
.
asc_getPivotFields
=
function
()
{
return
this
.
pivotFields
&&
this
.
pivotFields
.
pivotField
;
};
CT_pivotTableDefinition
.
prototype
.
asc_getPageFields
=
function
()
{
return
this
.
pageFields
&&
this
.
getField
(
this
.
pageFields
.
pageField
,
function
(
element
)
{
return
element
.
name
||
this
.
cacheDefinition
.
getField
(
element
.
fld
).
name
;
});
return
this
.
pageFields
&&
this
.
pageFields
.
pageField
;
};
CT_pivotTableDefinition
.
prototype
.
asc_getColumnFields
=
function
()
{
return
this
.
colFields
&&
this
.
getField
(
this
.
colFields
.
field
,
function
(
element
)
{
return
this
.
cacheDefinition
.
getField
(
element
.
x
).
name
;
});
return
this
.
colFields
&&
this
.
colFields
.
field
;
};
CT_pivotTableDefinition
.
prototype
.
asc_getRowFields
=
function
()
{
return
this
.
rowFields
&&
this
.
getField
(
this
.
rowFields
.
field
,
function
(
element
)
{
return
this
.
cacheDefinition
.
getField
(
element
.
x
).
name
;
});
return
this
.
rowFields
&&
this
.
rowFields
.
field
;
};
CT_pivotTableDefinition
.
prototype
.
asc_getDataFields
=
function
()
{
return
this
.
dataFields
&&
this
.
getField
(
this
.
dataFields
.
dataField
,
function
(
element
)
{
return
element
.
name
||
this
.
cacheDefinition
.
getField
(
element
.
fld
).
name
;
});
return
this
.
dataFields
&&
this
.
dataFields
.
dataField
;
};
CT_pivotTableDefinition
.
prototype
.
forEachColItems
=
function
(
callback
,
thisArg
)
{
return
this
.
colItems
&&
this
.
colItems
.
i
.
forEach
(
callback
,
thisArg
);
...
...
@@ -6192,6 +6187,9 @@ CT_PivotField.prototype.toXml = function(writer, name) {
}
writer
.
WriteXmlNodeEnd
(
name
);
};
CT_PivotField
.
prototype
.
asc_getName
=
function
()
{
return
this
.
name
;
};
function
CT_Field
()
{
//Attributes
this
.
x
=
null
;
...
...
@@ -6213,6 +6211,9 @@ CT_Field.prototype.toXml = function(writer, name) {
}
writer
.
WriteXmlNodeEnd
(
name
,
true
,
true
);
};
CT_Field
.
prototype
.
asc_getIndex
=
function
()
{
return
this
.
x
;
};
function
CT_I
()
{
//Attributes
this
.
t
=
null
;
//data
...
...
@@ -6345,6 +6346,12 @@ CT_PageField.prototype.toXml = function(writer, name) {
}
writer
.
WriteXmlNodeEnd
(
name
);
};
CT_PageField
.
prototype
.
asc_getName
=
function
()
{
return
this
.
name
;
};
CT_PageField
.
prototype
.
asc_getIndex
=
function
()
{
return
this
.
fld
;
};
function
CT_DataField
()
{
//Attributes
this
.
name
=
null
;
...
...
@@ -6439,6 +6446,12 @@ CT_DataField.prototype.toXml = function(writer, name) {
}
writer
.
WriteXmlNodeEnd
(
name
);
};
CT_DataField
.
prototype
.
asc_getName
=
function
()
{
return
this
.
name
;
};
CT_DataField
.
prototype
.
asc_getIndex
=
function
()
{
return
this
.
fld
;
};
function
CT_Format
()
{
//Attributes
this
.
action
=
null
;
//formatting
...
...
@@ -9648,7 +9661,8 @@ var prot;
prot
=
CT_pivotTableDefinition
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
[
"
asc_getFields
"
]
=
prot
.
asc_getFields
;
prot
[
"
asc_getCacheFields
"
]
=
prot
.
asc_getCacheFields
;
prot
[
"
asc_getPivotFields
"
]
=
prot
.
asc_getPivotFields
;
prot
[
"
asc_getStyleInfo
"
]
=
prot
.
asc_getStyleInfo
;
prot
[
"
asc_getPageFields
"
]
=
prot
.
asc_getPageFields
;
prot
[
"
asc_getColumnFields
"
]
=
prot
.
asc_getColumnFields
;
...
...
@@ -9664,3 +9678,17 @@ prot["asc_getShowColStripes"] = prot.asc_getShowColStripes;
prot
=
CT_CacheField
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
=
CT_PivotField
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
=
CT_Field
.
prototype
;
prot
[
"
asc_getIndex
"
]
=
prot
.
asc_getIndex
;
prot
=
CT_PageField
.
prototype
;
prot
[
"
asc_getIndex
"
]
=
prot
.
asc_getIndex
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
prot
=
CT_DataField
.
prototype
;
prot
[
"
asc_getIndex
"
]
=
prot
.
asc_getIndex
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
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