@sapui5/sap.zen.crosstab 1.84.33 → 1.84.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/{main/uilib/sap → sap}/zen/crosstab/.library +14 -13
- package/src/sap/zen/crosstab/BaseArea.js +933 -0
- package/src/sap/zen/crosstab/CellStyleHandler.js +109 -0
- package/src/sap/zen/crosstab/ColResizer.js +261 -0
- package/src/sap/zen/crosstab/ColumnHeaderArea.js +61 -0
- package/src/sap/zen/crosstab/Crosstab.js +1351 -0
- package/src/sap/zen/crosstab/CrosstabCellApi.js +141 -0
- package/src/sap/zen/crosstab/CrosstabContextMenu.js +96 -0
- package/src/sap/zen/crosstab/CrosstabHeaderInfo.js +699 -0
- package/src/sap/zen/crosstab/CrosstabRenderer.js +258 -0
- package/src/sap/zen/crosstab/CrosstabTestProxy.js +64 -0
- package/src/sap/zen/crosstab/DataArea.js +76 -0
- package/src/sap/zen/crosstab/DataCell.js +187 -0
- package/src/sap/zen/crosstab/DataCellRenderer.js +70 -0
- package/src/sap/zen/crosstab/DimensionHeaderArea.js +34 -0
- package/src/sap/zen/crosstab/EventHandler.js +664 -0
- package/src/sap/zen/crosstab/HeaderCell.js +357 -0
- package/src/sap/zen/crosstab/HeaderCellRenderer.js +333 -0
- package/src/sap/zen/crosstab/HeaderResizer.js +142 -0
- package/src/sap/zen/crosstab/IDataCell.js +34 -0
- package/src/sap/zen/crosstab/IHeaderCell.js +30 -0
- package/src/sap/zen/crosstab/PropertyBag.js +220 -0
- package/src/sap/zen/crosstab/RowHeaderArea.js +78 -0
- package/src/sap/zen/crosstab/SelectionHandler.js +892 -0
- package/src/sap/zen/crosstab/TextConstants.js +22 -0
- package/src/sap/zen/crosstab/TouchHandler.js +413 -0
- package/src/sap/zen/crosstab/datahandler/JsonDataHandler.js +777 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropAreaRenderer.js +446 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropHandler.js +674 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropHoverManager.js +474 -0
- package/src/sap/zen/crosstab/dragdrop/DragDropUtils.js +579 -0
- package/src/sap/zen/crosstab/dragdrop/MemberDragDropHandler.js +1156 -0
- package/src/sap/zen/crosstab/keyboard/CrosstabKeyboardNavHandler.js +585 -0
- package/src/sap/zen/crosstab/library.js +49 -0
- package/src/sap/zen/crosstab/paging/CellMerger.js +266 -0
- package/src/sap/zen/crosstab/paging/Page.js +331 -0
- package/src/sap/zen/crosstab/paging/PageManager.js +396 -0
- package/src/sap/zen/crosstab/paging/PagingConstants.js +19 -0
- package/src/sap/zen/crosstab/paging/RequestHandler.js +103 -0
- package/src/sap/zen/crosstab/paging/RequestStack.js +112 -0
- package/src/sap/zen/crosstab/rendering/CrossRequestManager.js +468 -0
- package/src/sap/zen/crosstab/rendering/DataModel.js +260 -0
- package/src/sap/zen/crosstab/rendering/DomElementProvider.js +24 -0
- package/src/sap/zen/crosstab/rendering/HeaderScrollManager.js +93 -0
- package/src/sap/zen/crosstab/rendering/PixelScrollManager.js +189 -0
- package/src/sap/zen/crosstab/rendering/RenderEngine.js +2694 -0
- package/src/sap/zen/crosstab/rendering/RenderingConstants.js +60 -0
- package/src/sap/zen/crosstab/rendering/ScrollManager.js +614 -0
- package/src/sap/zen/crosstab/rendering/ScrollbarRenderer.js +560 -0
- package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/Chart.less +0 -4
- package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/InfoFeeding.less +120 -120
- package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/InfoFeeding.less +85 -85
- package/src/sap/zen/crosstab/utils/Measuring.js +236 -0
- package/src/sap/zen/crosstab/utils/Utils.js +485 -0
- package/ui5.yaml +4 -2
- package/src/main/uilib/sap/zen/crosstab/BaseArea.js +0 -1013
- package/src/main/uilib/sap/zen/crosstab/CellStyleHandler.js +0 -111
- package/src/main/uilib/sap/zen/crosstab/ColResizer.js +0 -264
- package/src/main/uilib/sap/zen/crosstab/ColumnHeaderArea.js +0 -52
- package/src/main/uilib/sap/zen/crosstab/Crosstab.js +0 -1662
- package/src/main/uilib/sap/zen/crosstab/CrosstabCellApi.js +0 -142
- package/src/main/uilib/sap/zen/crosstab/CrosstabContextMenu.js +0 -96
- package/src/main/uilib/sap/zen/crosstab/CrosstabHeaderInfo.js +0 -698
- package/src/main/uilib/sap/zen/crosstab/CrosstabRenderer.js +0 -274
- package/src/main/uilib/sap/zen/crosstab/CrosstabTestProxy.js +0 -59
- package/src/main/uilib/sap/zen/crosstab/DataArea.js +0 -74
- package/src/main/uilib/sap/zen/crosstab/DataCell.js +0 -196
- package/src/main/uilib/sap/zen/crosstab/DataCellRenderer.js +0 -71
- package/src/main/uilib/sap/zen/crosstab/DimensionHeaderArea.js +0 -25
- package/src/main/uilib/sap/zen/crosstab/EventHandler.js +0 -651
- package/src/main/uilib/sap/zen/crosstab/HeaderCell.js +0 -329
- package/src/main/uilib/sap/zen/crosstab/HeaderCellRenderer.js +0 -374
- package/src/main/uilib/sap/zen/crosstab/HeaderResizer.js +0 -131
- package/src/main/uilib/sap/zen/crosstab/IDataCell.js +0 -21
- package/src/main/uilib/sap/zen/crosstab/IHeaderCell.js +0 -21
- package/src/main/uilib/sap/zen/crosstab/PropertyBag.js +0 -209
- package/src/main/uilib/sap/zen/crosstab/RowHeaderArea.js +0 -71
- package/src/main/uilib/sap/zen/crosstab/SelectionHandler.js +0 -911
- package/src/main/uilib/sap/zen/crosstab/TextConstants.js +0 -9
- package/src/main/uilib/sap/zen/crosstab/TouchHandler.js +0 -438
- package/src/main/uilib/sap/zen/crosstab/datahandler/JsonDataHandler.js +0 -760
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropAreaRenderer.js +0 -436
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropHandler.js +0 -682
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropHoverManager.js +0 -467
- package/src/main/uilib/sap/zen/crosstab/dragdrop/DragDropUtils.js +0 -580
- package/src/main/uilib/sap/zen/crosstab/dragdrop/MemberDragDropHandler.js +0 -1154
- package/src/main/uilib/sap/zen/crosstab/keyboard/CrosstabKeyboardNavHandler.js +0 -635
- package/src/main/uilib/sap/zen/crosstab/library.js +0 -38
- package/src/main/uilib/sap/zen/crosstab/nonphx/logic.js +0 -11
- package/src/main/uilib/sap/zen/crosstab/paging/CellMerger.js +0 -284
- package/src/main/uilib/sap/zen/crosstab/paging/Page.js +0 -357
- package/src/main/uilib/sap/zen/crosstab/paging/PageManager.js +0 -437
- package/src/main/uilib/sap/zen/crosstab/paging/PagingConstants.js +0 -7
- package/src/main/uilib/sap/zen/crosstab/paging/RequestHandler.js +0 -97
- package/src/main/uilib/sap/zen/crosstab/paging/RequestStack.js +0 -108
- package/src/main/uilib/sap/zen/crosstab/rendering/CrossRequestManager.js +0 -462
- package/src/main/uilib/sap/zen/crosstab/rendering/DataModel.js +0 -250
- package/src/main/uilib/sap/zen/crosstab/rendering/DomElementProvider.js +0 -13
- package/src/main/uilib/sap/zen/crosstab/rendering/HeaderScrollManager.js +0 -97
- package/src/main/uilib/sap/zen/crosstab/rendering/PixelScrollManager.js +0 -180
- package/src/main/uilib/sap/zen/crosstab/rendering/RenderEngine.js +0 -2757
- package/src/main/uilib/sap/zen/crosstab/rendering/RenderingConstants.js +0 -56
- package/src/main/uilib/sap/zen/crosstab/rendering/ScrollManager.js +0 -638
- package/src/main/uilib/sap/zen/crosstab/rendering/ScrollbarRenderer.js +0 -542
- package/src/main/uilib/sap/zen/crosstab/utils/Measuring.js +0 -225
- package/src/main/uilib/sap/zen/crosstab/utils/Utils.js +0 -480
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/ChartTypeSwitch.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/Crosstab.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/FilterBar.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/FilterPanel.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/Footerbar.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/InfoChart.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/NavigationPanel.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/chartconfig.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/CornerTornEffect.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/HTornEffect.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/HTornEffectData.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/HTornEffectHeader.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/VTornEffect.png +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/loading.gif +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/img/loading_comp.gif +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/base/zen.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize_hcb/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize_hcw/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_belize_plus/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_bluecrystal/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3_dark/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3_hcb/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_fiori_3_hcw/library.source.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/Chart.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/ChartTypeSwitch.less +0 -0
- /package/src/{main/uilib/sap → sap}/zen/crosstab/themes/sap_hcb/library.source.less +0 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAPUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE. All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
/*global sap*/
|
|
6
|
+
sap.ui.define(
|
|
7
|
+
[
|
|
8
|
+
"jquery.sap.global"
|
|
9
|
+
],
|
|
10
|
+
function(jQuery){
|
|
11
|
+
"use strict";
|
|
12
|
+
jQuery.sap.declare("sap.zen.crosstab.CrosstabHeaderInfo");
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
sap.zen.crosstab.CrosstabHeaderInfo = function(oCrosstab, oHeaderInfo) {
|
|
17
|
+
// "absolute" indices are e. g. BICS coordinates
|
|
18
|
+
// all other col/row indices are matrix coordinates (including key/text, attributes etc)
|
|
19
|
+
var oColInfoArray = oHeaderInfo.cols;
|
|
20
|
+
var oRowInfoArray = oHeaderInfo.rows;
|
|
21
|
+
var oColInfo = null;
|
|
22
|
+
var oRowInfo = null;
|
|
23
|
+
var oDimensionByCol = {};
|
|
24
|
+
var oDimensionByRow = {};
|
|
25
|
+
var oFirstColIndexByDimension = {};
|
|
26
|
+
var oFirstRowIndexByDimension = {};
|
|
27
|
+
|
|
28
|
+
var iRowDimensionCount = 0;
|
|
29
|
+
var iColDimensionCount = 0;
|
|
30
|
+
var iStartColForInnermostDimension = 0;
|
|
31
|
+
var oAbsoluteColIndexByDimension = {};
|
|
32
|
+
var oAbsoluteRowIndexByDimension = {};
|
|
33
|
+
|
|
34
|
+
var oRowIndexByAbsoluteRowIndex = {};
|
|
35
|
+
var oColIndexByAbsoluteColIndex = {};
|
|
36
|
+
|
|
37
|
+
var i = 0;
|
|
38
|
+
var index = 0;
|
|
39
|
+
var iMaxColIndex;
|
|
40
|
+
var sDimName;
|
|
41
|
+
var sPeekDimName;
|
|
42
|
+
var oDimensionNames = {};
|
|
43
|
+
|
|
44
|
+
function addDimensionName(sDimensionName) {
|
|
45
|
+
if (!oDimensionNames.hasOwnProperty(sDimensionName)) {
|
|
46
|
+
oDimensionNames[sDimensionName] = {};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function translateLegacyProperties(oArray, i) {
|
|
51
|
+
if (oArray[i].charname) {
|
|
52
|
+
oArray[i].sDimensionName = oArray[i].charname;
|
|
53
|
+
delete oArray[i].charname;
|
|
54
|
+
addDimensionName(oArray[i].sDimensionName);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (oArray[i].attrname) {
|
|
58
|
+
oArray[i].sAttributeName = oArray[i].attrname;
|
|
59
|
+
delete oArray[i].attrname;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (oArray[i].iskey) {
|
|
63
|
+
oArray[i].bIsKeyPresentation = oArray[i].iskey;
|
|
64
|
+
delete oArray[i].iskey;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (oColInfoArray) {
|
|
69
|
+
for (i = 0; i < oColInfoArray.length; i++) {
|
|
70
|
+
translateLegacyProperties(oColInfoArray, i);
|
|
71
|
+
|
|
72
|
+
oColInfoArray[i].sAxisName = "ROWS";
|
|
73
|
+
oColInfoArray[i].iIndex = i;
|
|
74
|
+
oColInfo = oColInfoArray[i];
|
|
75
|
+
oDimensionByCol[i] = oColInfo;
|
|
76
|
+
|
|
77
|
+
if (oFirstColIndexByDimension[oColInfo.sDimensionName] === undefined) {
|
|
78
|
+
oFirstColIndexByDimension[oColInfo.sDimensionName] = i;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (oAbsoluteColIndexByDimension[oColInfo.sDimensionName] === undefined) {
|
|
82
|
+
oAbsoluteColIndexByDimension[oColInfo.sDimensionName] = index;
|
|
83
|
+
|
|
84
|
+
oColIndexByAbsoluteColIndex[index] = i;
|
|
85
|
+
|
|
86
|
+
index++;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
iColDimensionCount = index;
|
|
90
|
+
|
|
91
|
+
iStartColForInnermostDimension = 0;
|
|
92
|
+
iMaxColIndex = oColInfoArray.length - 1;
|
|
93
|
+
sDimName = oColInfoArray[iMaxColIndex].sDimensionName;
|
|
94
|
+
for (i = iMaxColIndex; i > 0; i--) {
|
|
95
|
+
sPeekDimName = oColInfoArray[i - 1].sDimensionName;
|
|
96
|
+
if (sPeekDimName !== sDimName) {
|
|
97
|
+
iStartColForInnermostDimension = i;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (oRowInfoArray) {
|
|
104
|
+
index = 0;
|
|
105
|
+
for (i = 0; i < oRowInfoArray.length; i++) {
|
|
106
|
+
translateLegacyProperties(oRowInfoArray, i);
|
|
107
|
+
|
|
108
|
+
oRowInfoArray[i].sAxisName = "COLS";
|
|
109
|
+
oRowInfoArray[i].iIndex = i;
|
|
110
|
+
oRowInfo = oRowInfoArray[i];
|
|
111
|
+
oDimensionByRow[i] = oRowInfo;
|
|
112
|
+
|
|
113
|
+
if (oFirstRowIndexByDimension[oRowInfo.sDimensionName] === undefined) {
|
|
114
|
+
oFirstRowIndexByDimension[oRowInfo.sDimensionName] = i;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (oAbsoluteRowIndexByDimension[oRowInfo.sDimensionName] === undefined) {
|
|
118
|
+
oAbsoluteRowIndexByDimension[oRowInfo.sDimensionName] = index;
|
|
119
|
+
|
|
120
|
+
oRowIndexByAbsoluteRowIndex[index] = i;
|
|
121
|
+
|
|
122
|
+
index++;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
iRowDimensionCount = index;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
this.getDimensionNameByCol = function(iCol) {
|
|
129
|
+
if(oDimensionByCol && oDimensionByCol[iCol]){
|
|
130
|
+
return oDimensionByCol[iCol].sDimensionName;
|
|
131
|
+
} else {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
this.getDimensionNameByRow = function(iRow) {
|
|
137
|
+
if(oDimensionByRow && oDimensionByRow[iRow]){
|
|
138
|
+
return oDimensionByRow[iRow].sDimensionName;
|
|
139
|
+
} else {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
this.getFirstColForDimension = function(sDimName) {
|
|
145
|
+
var col = -1;
|
|
146
|
+
if (oFirstColIndexByDimension[sDimName] >= 0) {
|
|
147
|
+
col = oFirstColIndexByDimension[sDimName];
|
|
148
|
+
}
|
|
149
|
+
return col;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
this.getFirstRowForDimension = function(sDimName) {
|
|
153
|
+
var row = -1;
|
|
154
|
+
if (oFirstRowIndexByDimension[sDimName] >= 0) {
|
|
155
|
+
row = oFirstRowIndexByDimension[sDimName];
|
|
156
|
+
}
|
|
157
|
+
return row;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
this.getAbsoluteColIndexForDimension = function(sDimName) {
|
|
161
|
+
var col = -1;
|
|
162
|
+
if (oAbsoluteColIndexByDimension[sDimName] >= 0) {
|
|
163
|
+
col = oAbsoluteColIndexByDimension[sDimName];
|
|
164
|
+
}
|
|
165
|
+
return col;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
this.getAbsoluteRowIndexForDimension = function(sDimName) {
|
|
169
|
+
var row = -1;
|
|
170
|
+
if (oAbsoluteRowIndexByDimension[sDimName] >= 0) {
|
|
171
|
+
row = oAbsoluteRowIndexByDimension[sDimName];
|
|
172
|
+
}
|
|
173
|
+
return row;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
this.getRowForAbsoluteRow = function(iAbsRow) {
|
|
177
|
+
var iRow = -1;
|
|
178
|
+
if (oRowIndexByAbsoluteRowIndex[iAbsRow] >= 0) {
|
|
179
|
+
iRow = oRowIndexByAbsoluteRowIndex[iAbsRow];
|
|
180
|
+
}
|
|
181
|
+
return iRow;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
this.getColForAbsoluteCol = function(iAbsCol) {
|
|
185
|
+
var iCol = -1;
|
|
186
|
+
if (oColIndexByAbsoluteColIndex[iAbsCol] >= 0) {
|
|
187
|
+
iCol = oColIndexByAbsoluteColIndex[iAbsCol];
|
|
188
|
+
}
|
|
189
|
+
return iCol;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
this.getNumberOfDimensionsOnColsAxis = function() {
|
|
193
|
+
if (oRowInfoArray) {
|
|
194
|
+
return oRowInfoArray.length;
|
|
195
|
+
}
|
|
196
|
+
return 0;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
this.getNumberOfDimensionsOnRowsAxis = function() {
|
|
200
|
+
if (oColInfoArray) {
|
|
201
|
+
return oColInfoArray.length;
|
|
202
|
+
}
|
|
203
|
+
return 0;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
this.isColOfInnermostDimension = function (iCol) {
|
|
207
|
+
var sDimensionName = this.getDimensionNameByCol(iCol);
|
|
208
|
+
if (sDimensionName){
|
|
209
|
+
var iAbsCol = this.getAbsoluteColIndexForDimension(sDimensionName);
|
|
210
|
+
if (iAbsCol !== iColDimensionCount - 1) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
return false;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
this.getStartColForInnermostDimension = function() {
|
|
219
|
+
return iStartColForInnermostDimension;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
this.isRowOfInnermostDimension = function (iRow){
|
|
223
|
+
var sDimensionName = this.getDimensionNameByRow(iRow);
|
|
224
|
+
if(sDimensionName){
|
|
225
|
+
var iAbsRow = this.getAbsoluteRowIndexForDimension(sDimensionName);
|
|
226
|
+
if (iAbsRow !== iRowDimensionCount - 1) {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
return false;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
this.isBottomRightDimHeaderCell = function(oCell) {
|
|
235
|
+
return ((this.isBottomRowDimHeaderCell(oCell) === true) && (this.isRightColDimHeaderCell(oCell) === true));
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
this.isBottomRowDimHeaderCell = function(oCell) {
|
|
239
|
+
var iMaxDimHeaderRow = oCrosstab.getTableMaxDimHeaderRow();
|
|
240
|
+
var bIsBottomRowDimHeaderCell = ((oCell.getTableRow() + oCell.getRowSpan() - 1) === iMaxDimHeaderRow);
|
|
241
|
+
return bIsBottomRowDimHeaderCell;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
this.isRightColDimHeaderCell = function(oCell) {
|
|
245
|
+
var iMaxDimHeaderCol = oCrosstab.getTableMaxDimHeaderCol();
|
|
246
|
+
var isRightColDimHeaderCell = ((oCell.getTableCol() + oCell.getColSpan() - 1) === iMaxDimHeaderCol);
|
|
247
|
+
return isRightColDimHeaderCell;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
this.getDimensionInfoForNonSplitPivotCell = function(oCell) {
|
|
251
|
+
var oDimInfo;
|
|
252
|
+
if (oCell.getScalingAxis() === "ROWS") {
|
|
253
|
+
oDimInfo = oRowInfoArray[oCell.getTableRow()];
|
|
254
|
+
} else if (oCell.getScalingAxis() === "COLS") {
|
|
255
|
+
oDimInfo = oColInfoArray[oCell.getTableCol()];
|
|
256
|
+
}
|
|
257
|
+
return oDimInfo;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
this.getDimensionInfoForSplitPivotCell = function(oCell, sSplitCellAxisName) {
|
|
261
|
+
var oDimInfo;
|
|
262
|
+
|
|
263
|
+
if (sSplitCellAxisName) {
|
|
264
|
+
if (sSplitCellAxisName == "ROWS") {
|
|
265
|
+
oDimInfo = oColInfoArray[oCell.getTableCol()];
|
|
266
|
+
} else if (sSplitCellAxisName == "COLS") {
|
|
267
|
+
oDimInfo = oRowInfoArray[oCell.getTableRow()];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return oDimInfo;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
this.getDimensionInfoByRowCol = function(oCell, sSplitCellAxisName) {
|
|
274
|
+
var oDimInfo = null;
|
|
275
|
+
var iRow = oCell.getTableRow();
|
|
276
|
+
var iCol = oCell.getTableCol();
|
|
277
|
+
|
|
278
|
+
if (oCell.isPivotCell() === true) {
|
|
279
|
+
if (oCell.isSplitPivotCell() === true) {
|
|
280
|
+
oDimInfo = this.getDimensionInfoForSplitPivotCell(oCell, sSplitCellAxisName);
|
|
281
|
+
} else {
|
|
282
|
+
// no split dim cell => we have a scaling factor
|
|
283
|
+
oDimInfo = this.getDimensionInfoForNonSplitPivotCell(oCell);
|
|
284
|
+
}
|
|
285
|
+
} else if (this.isBottomRowDimHeaderCell(oCell) === true) {
|
|
286
|
+
// stuff on the rows axis, i. e. the columns of the dimension header
|
|
287
|
+
if (oColInfoArray) {
|
|
288
|
+
oDimInfo = oColInfoArray[iCol];
|
|
289
|
+
} else {
|
|
290
|
+
// nothing on rows, i. e. only one column in dimension header
|
|
291
|
+
oDimInfo = oRowInfoArray[iRow];
|
|
292
|
+
}
|
|
293
|
+
} else if (this.isRightColDimHeaderCell(oCell) === true) {
|
|
294
|
+
// stuff on the columns axis, i. e. the rows of the dimension header
|
|
295
|
+
if (oRowInfoArray) {
|
|
296
|
+
oDimInfo = oRowInfoArray[iRow];
|
|
297
|
+
} else {
|
|
298
|
+
// nothing on columns, i. e. only one row in dimension header
|
|
299
|
+
oDimInfo = oColInfoArray[iCol];
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return oDimInfo;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
this.getDimensionInfoByRow = function(iRow) {
|
|
306
|
+
var oDimInfo = null;
|
|
307
|
+
if (oRowInfoArray) {
|
|
308
|
+
oDimInfo = oRowInfoArray[iRow];
|
|
309
|
+
}
|
|
310
|
+
return oDimInfo;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
this.getDimensionInfoByCol = function(iCol) {
|
|
314
|
+
var oDimInfo = null;
|
|
315
|
+
if (oColInfoArray) {
|
|
316
|
+
oDimInfo = oColInfoArray[iCol];
|
|
317
|
+
}
|
|
318
|
+
return oDimInfo;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
this.hasDimensionsOnRowsAxis = function() {
|
|
322
|
+
if (oColInfoArray) {
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
return false;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
this.hasDimensionsOnColsAxis = function() {
|
|
329
|
+
if (oRowInfoArray) {
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
332
|
+
return false;
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
this.findIndexInterval = function(sDimensionName, sAxisName) {
|
|
336
|
+
var iIndex;
|
|
337
|
+
var aArray;
|
|
338
|
+
var iLength;
|
|
339
|
+
var sLoopDimName;
|
|
340
|
+
var oIndexInterval = {"iStartIndex" : -1, "iEndIndex" : -1};
|
|
341
|
+
|
|
342
|
+
if (sAxisName === "ROWS") {
|
|
343
|
+
aArray = oColInfoArray;
|
|
344
|
+
} else if (sAxisName === "COLS") {
|
|
345
|
+
aArray = oRowInfoArray;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
iLength = aArray.length;
|
|
349
|
+
sLoopDimName = null;
|
|
350
|
+
|
|
351
|
+
for (iIndex = 0; iIndex < iLength && oIndexInterval.iStartIndex < 0; iIndex++) {
|
|
352
|
+
sLoopDimName = aArray[iIndex].sDimensionName;
|
|
353
|
+
if (sLoopDimName === sDimensionName) {
|
|
354
|
+
oIndexInterval.iStartIndex = iIndex;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (oIndexInterval.iStartIndex >= 0) {
|
|
359
|
+
for (iIndex = oIndexInterval.iStartIndex; iIndex < iLength && oIndexInterval.iEndIndex < 0; iIndex++) {
|
|
360
|
+
sLoopDimName = aArray[iIndex].sDimensionName;
|
|
361
|
+
if (sLoopDimName !== sDimensionName) {
|
|
362
|
+
oIndexInterval.iEndIndex = iIndex - 1;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (oIndexInterval.iEndIndex < 0) {
|
|
366
|
+
oIndexInterval.iEndIndex = iLength - 1;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
return oIndexInterval;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
this.isEqualDimInfo = function(oDimInfo1, oDimInfo2) {
|
|
374
|
+
if (oDimInfo1.sDimensionName !== oDimInfo2.sDimensionName) {
|
|
375
|
+
return false;
|
|
376
|
+
}
|
|
377
|
+
if (oDimInfo1.sAttributeName !== oDimInfo2.sAttributeName) {
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
if (oDimInfo1.bIsKeyPresentation !== oDimInfo2.bIsKeyPresentation) {
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
if (oDimInfo1.bIsTextPresentation !== oDimInfo2.bIsTextPresentation) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
if (oDimInfo1.bIsMeasureStructure !== oDimInfo2.bIsMeasureStructure) {
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
if (oDimInfo1.bIsStructure !== oDimInfo2.bIsStructure) {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
if (oDimInfo1.bIsScaling !== oDimInfo2.bIsScaling) {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
return true;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
this.includeBottomRightCell = function(i, oCell, oArray) {
|
|
399
|
+
var oDimInfo;
|
|
400
|
+
var oDimInfo2;
|
|
401
|
+
var bIncludeCell = true;
|
|
402
|
+
|
|
403
|
+
if (this.isBottomRightDimHeaderCell(oCell) === true) {
|
|
404
|
+
if (!oCell.isSplitPivotCell() && i > 0) {
|
|
405
|
+
oDimInfo = oArray[i];
|
|
406
|
+
oDimInfo2 = oArray[i - 1];
|
|
407
|
+
bIncludeCell = (oDimInfo.sDimensionName === oDimInfo2.sDimensionName) && (!oDimInfo.bIsScaling);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return bIncludeCell;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
this.getCellsForInterval = function(oIndexInterval, sAxisName) {
|
|
414
|
+
var oCell;
|
|
415
|
+
var i = oIndexInterval.iStartIndex;
|
|
416
|
+
var iMaxDimHeaderRow = oCrosstab.getTableMaxDimHeaderRow();
|
|
417
|
+
var iMaxDimHeaderCol = oCrosstab.getTableMaxDimHeaderCol();
|
|
418
|
+
var aIndexCells = [];
|
|
419
|
+
var bIncludeCell;
|
|
420
|
+
var bSingleCell = oIndexInterval.iStartIndex === oIndexInterval.iEndIndex;
|
|
421
|
+
|
|
422
|
+
while (i <= oIndexInterval.iEndIndex) {
|
|
423
|
+
bIncludeCell = true;
|
|
424
|
+
if (sAxisName === "ROWS") {
|
|
425
|
+
oCell = oCrosstab.getTableCellWithColSpan(iMaxDimHeaderRow, i);
|
|
426
|
+
bIncludeCell = bSingleCell || this.includeBottomRightCell(i, oCell, oColInfoArray, oRowInfoArray);
|
|
427
|
+
i = i + oCell.getColSpan();
|
|
428
|
+
} else if (sAxisName === "COLS") {
|
|
429
|
+
oCell = oCrosstab.getTableCellWithRowSpan(i, iMaxDimHeaderCol);
|
|
430
|
+
bIncludeCell = bSingleCell || this.includeBottomRightCell(i, oCell, oRowInfoArray, oColInfoArray);
|
|
431
|
+
i = i + oCell.getRowSpan();
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (bIncludeCell === true) {
|
|
435
|
+
aIndexCells.push(oCell);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return aIndexCells;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
this.getCellsWithSameDimensionByDimInfo = function(oDimInfo) {
|
|
442
|
+
var aIndexCells;
|
|
443
|
+
var oIndexInterval;
|
|
444
|
+
var sDimName;
|
|
445
|
+
var sAxisName;
|
|
446
|
+
|
|
447
|
+
if (oDimInfo) {
|
|
448
|
+
sDimName = oDimInfo.sDimensionName;
|
|
449
|
+
sAxisName = oDimInfo.sAxisName;
|
|
450
|
+
oIndexInterval = this.findIndexInterval(sDimName, sAxisName);
|
|
451
|
+
aIndexCells = this.getCellsForInterval(oIndexInterval, sAxisName);
|
|
452
|
+
}
|
|
453
|
+
return aIndexCells;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
this.getCellsWithSameDimension = function(oCell, sAxisName) {
|
|
457
|
+
var oDimInfo;
|
|
458
|
+
var aIndexCells;
|
|
459
|
+
|
|
460
|
+
if (!sAxisName && oCell.isPivotCell() === true && oCell.isSplitPivotCell() === true) {
|
|
461
|
+
return [];
|
|
462
|
+
} else {
|
|
463
|
+
oDimInfo = this.getDimensionInfoByRowCol(oCell, sAxisName);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
aIndexCells = this.getCellsWithSameDimensionByDimInfo(oDimInfo);
|
|
467
|
+
|
|
468
|
+
return aIndexCells;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
this.setupPivotCell = function() {
|
|
472
|
+
var oCell;
|
|
473
|
+
var bIsPivotCell = false;
|
|
474
|
+
var bIsSplitPivotCell = false;
|
|
475
|
+
var iCol = -1;
|
|
476
|
+
var iRow = -1;
|
|
477
|
+
var oDimInfoByCol;
|
|
478
|
+
var oDimInfoByRow;
|
|
479
|
+
|
|
480
|
+
oCell = oCrosstab.getTableCellWithSpans(oCrosstab.getTableMaxDimHeaderRow(), oCrosstab.getTableMaxDimHeaderCol());
|
|
481
|
+
if (oCell) {
|
|
482
|
+
iRow = oCell.getTableRow();
|
|
483
|
+
iCol = oCell.getTableCol();
|
|
484
|
+
|
|
485
|
+
// Pivot?
|
|
486
|
+
if (this.isBottomRightDimHeaderCell(oCell) === true) {
|
|
487
|
+
bIsPivotCell = this.hasDimensionsOnRowsAxis() === true && this.hasDimensionsOnColsAxis() === true;
|
|
488
|
+
}
|
|
489
|
+
oCell.setPivotCell(bIsPivotCell);
|
|
490
|
+
|
|
491
|
+
oDimInfoByCol = this.getDimensionInfoByCol(iCol);
|
|
492
|
+
oDimInfoByRow = this.getDimensionInfoByRow(iRow);
|
|
493
|
+
|
|
494
|
+
// Split Pivot Cell
|
|
495
|
+
if (oCell.isPivotCell() === true) {
|
|
496
|
+
if (!(oDimInfoByCol && oDimInfoByCol.bIsScaling) && !(oDimInfoByRow && oDimInfoByRow.bIsScaling)) {
|
|
497
|
+
bIsSplitPivotCell = true;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
oCell.setSplitPivotCell(bIsSplitPivotCell);
|
|
501
|
+
|
|
502
|
+
// scaling factor
|
|
503
|
+
if (oDimInfoByCol && oDimInfoByCol.bIsScaling === true) {
|
|
504
|
+
oCell.setScalingAxis("ROWS");
|
|
505
|
+
} else if (oDimInfoByRow && oDimInfoByRow.bIsScaling === true) {
|
|
506
|
+
oCell.setScalingAxis("COLS");
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
}
|
|
510
|
+
return oCell;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
this.getDimensionInfoForMemberCell = function(oCell) {
|
|
514
|
+
if (oCell.getArea().isRowHeaderArea()) {
|
|
515
|
+
return oColInfoArray[oCell.getTableCol()];
|
|
516
|
+
} else if (oCell.getArea().isColHeaderArea()) {
|
|
517
|
+
return oRowInfoArray[oCell.getTableRow()];
|
|
518
|
+
}
|
|
519
|
+
return null;
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
this.getMemberCellsForSameDimension = function(oCell) {
|
|
523
|
+
var aCells;
|
|
524
|
+
var bExcludeLast;
|
|
525
|
+
|
|
526
|
+
// pivot cell may be null if e. g. only measure structure in drilldown
|
|
527
|
+
if (oCell.getArea().isRowHeaderArea()) {
|
|
528
|
+
if (oColInfoArray) {
|
|
529
|
+
bExcludeLast = oColInfoArray[oColInfoArray.length - 1].bIsScaling;
|
|
530
|
+
}
|
|
531
|
+
aCells = this.getRowHeaderMemberCellsForSameDimension(oCell, bExcludeLast);
|
|
532
|
+
} else if (oCell.getArea().isColHeaderArea()) {
|
|
533
|
+
if (oRowInfoArray) {
|
|
534
|
+
bExcludeLast = oRowInfoArray[oRowInfoArray.length - 1].bIsScaling;
|
|
535
|
+
}
|
|
536
|
+
aCells = this.getColHeaderMemberCellsForSameDimension(oCell, bExcludeLast);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
return aCells;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
this.getRowHeaderMemberCellsForSameDimension = function(oCell, bExcludeLastCol) {
|
|
543
|
+
var oDimInfo;
|
|
544
|
+
var aMemberCell;
|
|
545
|
+
var aMemberCells;
|
|
546
|
+
var i = 0;
|
|
547
|
+
var oIndexInterval;
|
|
548
|
+
var oRowHeaderArea;
|
|
549
|
+
var iMaxCol;
|
|
550
|
+
|
|
551
|
+
oDimInfo = this.getDimensionInfoByCol(oCell.getTableCol());
|
|
552
|
+
oIndexInterval = this.findIndexInterval(oDimInfo.sDimensionName, "ROWS");
|
|
553
|
+
aMemberCells = [];
|
|
554
|
+
oRowHeaderArea = oCrosstab.getRowHeaderArea();
|
|
555
|
+
iMaxCol = oRowHeaderArea.getColCnt() - 1;
|
|
556
|
+
|
|
557
|
+
i = oIndexInterval.iStartIndex;
|
|
558
|
+
while (i <= oIndexInterval.iEndIndex) {
|
|
559
|
+
aMemberCell = oRowHeaderArea.getCellWithColSpan(oCell.getRow(), i);
|
|
560
|
+
if (aMemberCell) {
|
|
561
|
+
if (bExcludeLastCol) {
|
|
562
|
+
if (aMemberCell.getCol() < iMaxCol) {
|
|
563
|
+
aMemberCells.push(aMemberCell);
|
|
564
|
+
}
|
|
565
|
+
} else {
|
|
566
|
+
aMemberCells.push(aMemberCell);
|
|
567
|
+
}
|
|
568
|
+
i = i + aMemberCell.getColSpan();
|
|
569
|
+
} else {
|
|
570
|
+
i++;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
return aMemberCells;
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
this.getColHeaderMemberCellsForSameDimension = function(oCell, bExcludeLastRow) {
|
|
578
|
+
var oDimInfo;
|
|
579
|
+
var aMemberCell;
|
|
580
|
+
var aMemberCells;
|
|
581
|
+
var i = 0;
|
|
582
|
+
var oIndexInterval;
|
|
583
|
+
var oColHeaderArea;
|
|
584
|
+
var iMaxRow;
|
|
585
|
+
|
|
586
|
+
oDimInfo = this.getDimensionInfoByRow(oCell.getTableRow());
|
|
587
|
+
oIndexInterval = this.findIndexInterval(oDimInfo.sDimensionName, "COLS");
|
|
588
|
+
aMemberCells = [];
|
|
589
|
+
oColHeaderArea = oCrosstab.getColumnHeaderArea();
|
|
590
|
+
iMaxRow = oColHeaderArea.getRowCnt() - 1;
|
|
591
|
+
|
|
592
|
+
i = oIndexInterval.iStartIndex;
|
|
593
|
+
while (i <= oIndexInterval.iEndIndex) {
|
|
594
|
+
aMemberCell = oColHeaderArea.getCellWithRowSpan(i, oCell.getCol());
|
|
595
|
+
if (aMemberCell) {
|
|
596
|
+
if (bExcludeLastRow) {
|
|
597
|
+
if (aMemberCell.getRow() < iMaxRow) {
|
|
598
|
+
aMemberCells.push(aMemberCell);
|
|
599
|
+
}
|
|
600
|
+
} else {
|
|
601
|
+
aMemberCells.push(aMemberCell);
|
|
602
|
+
}
|
|
603
|
+
i = i + aMemberCell.getRowSpan();
|
|
604
|
+
} else {
|
|
605
|
+
i++;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
return aMemberCells;
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
this.findStartIndexOfPreviousDimension = function(sDimensionName, sAxisName) {
|
|
613
|
+
var oInfoArray;
|
|
614
|
+
var iMaxIndex;
|
|
615
|
+
var i;
|
|
616
|
+
var bFound;
|
|
617
|
+
var oInfo;
|
|
618
|
+
var iFirstPreviousDimensionIndex = 0;
|
|
619
|
+
var sPreviousDimensionName;
|
|
620
|
+
|
|
621
|
+
if (sAxisName === "ROWS") {
|
|
622
|
+
oInfoArray = oColInfoArray;
|
|
623
|
+
} else if (sAxisName === "COLS") {
|
|
624
|
+
oInfoArray = oRowInfoArray;
|
|
625
|
+
}
|
|
626
|
+
if (oInfoArray) {
|
|
627
|
+
iMaxIndex = oInfoArray.length - 1;
|
|
628
|
+
i = iMaxIndex;
|
|
629
|
+
bFound = false;
|
|
630
|
+
while (i >= 0 && !bFound) {
|
|
631
|
+
oInfo = oInfoArray[i];
|
|
632
|
+
if (oInfo.sDimensionName === sDimensionName) {
|
|
633
|
+
bFound = true;
|
|
634
|
+
} else {
|
|
635
|
+
i--;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
while (oInfo.sDimensionName === sDimensionName && i >= 0) {
|
|
639
|
+
oInfo = oInfoArray[i];
|
|
640
|
+
if (oInfo.sDimensionName === sDimensionName) {
|
|
641
|
+
i--;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
sPreviousDimensionName = oInfo.sDimensionName;
|
|
645
|
+
while (oInfo.sDimensionName === sPreviousDimensionName && i >= 0) {
|
|
646
|
+
oInfo = oInfoArray[i];
|
|
647
|
+
if (oInfo.sDimensionName !== sPreviousDimensionName) {
|
|
648
|
+
iFirstPreviousDimensionIndex = i + 1;
|
|
649
|
+
} else {
|
|
650
|
+
i--;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
return iFirstPreviousDimensionIndex;
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
this.isFirstDimensionOnAxis = function(oDimInfo) {
|
|
658
|
+
if (oDimInfo.sAxisName === "ROWS" && oColInfoArray) {
|
|
659
|
+
return oColInfoArray[0].sDimensionName === oDimInfo.sDimensionName;
|
|
660
|
+
} else if (oDimInfo.sAxisName === "COLS" && oRowInfoArray) {
|
|
661
|
+
return oRowInfoArray[0].sDimensionName === oDimInfo.sDimensionName;
|
|
662
|
+
}
|
|
663
|
+
return true;
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
this.isDimensionInCrosstab = function(sDimensionName) {
|
|
667
|
+
if (oDimensionNames) {
|
|
668
|
+
if (oDimensionNames.hasOwnProperty(sDimensionName)) {
|
|
669
|
+
return true;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return false;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
this.hasOnlyMeasureStructure = function() {
|
|
676
|
+
var oInfoArray = null;
|
|
677
|
+
var i = 0;
|
|
678
|
+
var bHasOnlyMeasures = false;
|
|
679
|
+
if (!oColInfoArray && oRowInfoArray) {
|
|
680
|
+
oInfoArray = oRowInfoArray;
|
|
681
|
+
} else if (!oRowInfoArray && oColInfoArray) {
|
|
682
|
+
oInfoArray = oColInfoArray;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
if (oInfoArray && oInfoArray.length > 0) {
|
|
686
|
+
bHasOnlyMeasures = true;
|
|
687
|
+
for (i = 0; i < oInfoArray.length; i++) {
|
|
688
|
+
if (!oInfoArray[i].bIsMeasureStructure) {
|
|
689
|
+
bHasOnlyMeasures = false;
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return bHasOnlyMeasures;
|
|
695
|
+
};
|
|
696
|
+
};
|
|
697
|
+
return sap.zen.crosstab.CrosstabHeaderInfo;
|
|
698
|
+
}
|
|
699
|
+
);
|