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
c9b8a23f
Commit
c9b8a23f
authored
Jul 26, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set correct row/col page count
parent
d471dbd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
+12
-19
cell/model/PivotTables.js
cell/model/PivotTables.js
+12
-19
No files found.
cell/model/PivotTables.js
View file @
c9b8a23f
...
@@ -2585,6 +2585,8 @@ CT_pivotTableDefinition.prototype.toXml = function(writer) {
...
@@ -2585,6 +2585,8 @@ CT_pivotTableDefinition.prototype.toXml = function(writer) {
CT_pivotTableDefinition
.
prototype
.
init
=
function
()
{
CT_pivotTableDefinition
.
prototype
.
init
=
function
()
{
this
.
pageFieldsPositions
=
[];
this
.
pageFieldsPositions
=
[];
var
rowPageCount
=
null
,
colPageCount
=
null
;
if
(
this
.
pageFields
)
{
if
(
this
.
pageFields
)
{
var
wrap
,
pageOverThenDown
;
var
wrap
,
pageOverThenDown
;
var
l
=
this
.
pageFields
.
pageField
.
length
;
var
l
=
this
.
pageFields
.
pageField
.
length
;
...
@@ -2599,9 +2601,12 @@ CT_pivotTableDefinition.prototype.init = function () {
...
@@ -2599,9 +2601,12 @@ CT_pivotTableDefinition.prototype.init = function () {
var
_c
=
range
.
c1
;
var
_c
=
range
.
c1
;
var
_r
=
range
.
r1
-
1
-
dr
;
var
_r
=
range
.
r1
-
1
-
dr
;
var
c
=
_c
,
r
=
_r
;
var
c
=
_c
,
r
=
_r
;
var
minC
=
_c
,
minR
=
_r
,
maxC
=
_c
,
maxR
=
_r
;
for
(
var
i
=
0
;
i
<
l
;
++
i
)
{
for
(
var
i
=
0
;
i
<
l
;
++
i
)
{
this
.
pageFieldsPositions
.
push
(
new
AscCommon
.
CellBase
(
r
,
c
));
this
.
pageFieldsPositions
.
push
(
new
AscCommon
.
CellBase
(
r
,
c
));
maxR
=
Math
.
max
(
maxR
,
r
);
maxC
=
Math
.
max
(
maxC
,
c
);
wrap
=
(
this
.
pageWrap
&&
0
===
(
i
+
1
)
%
this
.
pageWrap
);
wrap
=
(
this
.
pageWrap
&&
0
===
(
i
+
1
)
%
this
.
pageWrap
);
pageOverThenDown
=
this
.
pageOverThenDown
;
pageOverThenDown
=
this
.
pageOverThenDown
;
...
@@ -2618,8 +2623,12 @@ CT_pivotTableDefinition.prototype.init = function () {
...
@@ -2618,8 +2623,12 @@ CT_pivotTableDefinition.prototype.init = function () {
c
=
_c
;
c
=
_c
;
}
}
}
}
rowPageCount
=
maxR
-
minR
+
1
;
colPageCount
=
(
maxC
-
minC
)
/
3
+
1
;
}
}
}
}
this
.
location
.
setPageCount
(
rowPageCount
,
colPageCount
);
};
};
CT_pivotTableDefinition
.
prototype
.
intersection
=
function
(
range
)
{
CT_pivotTableDefinition
.
prototype
.
intersection
=
function
(
range
)
{
return
(
this
.
location
&&
this
.
location
.
intersection
(
range
))
||
this
.
pageFieldsIntersection
(
range
);
return
(
this
.
location
&&
this
.
location
.
intersection
(
range
))
||
this
.
pageFieldsIntersection
(
range
);
...
@@ -2770,7 +2779,6 @@ CT_pivotTableDefinition.prototype.addPageField = function (index) {
...
@@ -2770,7 +2779,6 @@ CT_pivotTableDefinition.prototype.addPageField = function (index) {
this
.
pageFields
.
add
(
newField
);
this
.
pageFields
.
add
(
newField
);
pivotField
.
axis
=
c_oAscAxis
.
AxisPage
;
pivotField
.
axis
=
c_oAscAxis
.
AxisPage
;
this
.
location
.
addColPage
();
}
}
};
};
CT_pivotTableDefinition
.
prototype
.
removeField
=
function
(
index
)
{
CT_pivotTableDefinition
.
prototype
.
removeField
=
function
(
index
)
{
...
@@ -2786,7 +2794,6 @@ CT_pivotTableDefinition.prototype.removeField = function (index) {
...
@@ -2786,7 +2794,6 @@ CT_pivotTableDefinition.prototype.removeField = function (index) {
}
else
{
}
else
{
this
.
pageFields
.
remove
(
index
);
this
.
pageFields
.
remove
(
index
);
}
}
this
.
location
.
removeColPage
();
break
;
break
;
case
c_oAscAxis
.
AxisValues
:
case
c_oAscAxis
.
AxisValues
:
break
;
break
;
...
@@ -4071,23 +4078,9 @@ CT_Location.prototype.intersection = function (range) {
...
@@ -4071,23 +4078,9 @@ CT_Location.prototype.intersection = function (range) {
CT_Location
.
prototype
.
contains
=
function
(
col
,
row
)
{
CT_Location
.
prototype
.
contains
=
function
(
col
,
row
)
{
return
this
.
ref
&&
this
.
ref
.
contains
(
col
,
row
);
return
this
.
ref
&&
this
.
ref
.
contains
(
col
,
row
);
};
};
CT_Location
.
prototype
.
addRowPage
=
function
()
{
CT_Location
.
prototype
.
setPageCount
=
function
(
row
,
col
)
{
if
(
null
===
this
.
rowPageCount
)
{
this
.
rowPageCount
=
row
;
this
.
rowPageCount
=
0
;
this
.
colPageCount
=
col
;
}
++
this
.
rowPageCount
;
};
CT_Location
.
prototype
.
addColPage
=
function
()
{
if
(
null
===
this
.
colPageCount
)
{
this
.
colPageCount
=
0
;
}
++
this
.
colPageCount
;
};
CT_Location
.
prototype
.
removeColPage
=
function
()
{
--
this
.
colPageCount
;
if
(
0
===
this
.
colPageCount
)
{
this
.
colPageCount
=
null
;
}
};
};
function
CT_PivotFields
()
{
function
CT_PivotFields
()
{
//Attributes
//Attributes
...
...
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