mirror of https://github.com/xwiki-labs/cryptpad
Fix PivotDataLocation.isEqual()
This commit is contained in:
parent
acf0ef68d0
commit
e06dc00044
|
@ -17697,7 +17697,7 @@ FourRedToBlack:10,FourRating:11,FourTrafficLights:12,FiveArrows:13,FiveArrowsGra
|
|||
"(Multiple Items)";var FIELD_CAPTION="%1 of %2";var GROUP_TEXT_CAPTION="Group";var GROUP_SECONDS_CAPTION="Seconds";var GROUP_MINUTES_CAPTION="Minutes";var GROUP_HOURS_CAPTION="Hours";var GROUP_DAYS_CAPTION="Days";var GROUP_MONTHS_CAPTION="Months";var GROUP_QUARTERS_CAPTION="Quarters";var GROUP_QUARTER_CAPTION="Qtr";var GROUP_YEARS_CAPTION="Years";var GROUP_OR_CAPTION="%1 or %2";var NEW_PIVOT_LAST_COL_OFFSET=2;var NEW_PIVOT_LAST_ROW_OFFSET=17;var NEW_PIVOT_LAST_COL_OFFSET_GRID_DROP_ZONES=6;var NEW_PIVOT_LAST_ROW_OFFSET_GRID_DROP_ZONES=
|
||||
13;var NEW_PIVOT_ROW=2;var NEW_PIVOT_COL=0;var cDate=Asc.cDate;var c_oAscError=window["Asc"].c_oAscError;var History=AscCommon.History;var c_oAscAutoFilterTypes=Asc.c_oAscAutoFilterTypes;var c_oAscCustomAutoFilter=Asc.c_oAscCustomAutoFilter;function cmpPivotItems(sharedItems,a,b){var sharedItem=sharedItems.Items.get(a.x);var aType=sharedItem.type;var aVal=sharedItem.val;sharedItem=sharedItems.Items.get(b.x);var bType=sharedItem.type;var bVal=sharedItem.val;if(aType===bType)if(c_oAscPivotRecType.String===
|
||||
aType){if(aVal>bVal)return 1;if(aVal<bVal)return-1}else{if(c_oAscPivotRecType.Missing!==aType)return aVal-bVal}else return aType-bType;return 0}function PivotDataElem(dataLength){this.subtotal=this.vals={};this.total=new Array(dataLength);for(var i=0;i<dataLength;++i)this.total[i]=new AscCommonExcel.StatisticOnlineAlgorithm}PivotDataElem.prototype.unionTotal=function(val){for(var i=0;i<this.total.length;++i)this.total[i].union(val.total[i])};PivotDataElem.prototype.getTotalCount=function(val){return this.total.length};
|
||||
PivotDataElem.prototype.resetTotal=function(dataLength){for(var i=0;i<this.total.length;++i)this.total[i].reset()};function PivotDataLocation(ws,bbox,headings){this.ws=ws;this.bbox=bbox;this.headings=headings}PivotDataLocation.prototype.isEqual=function(val){var res=val&&this.ws===val.ws&&(!this.bbox&&!val.bbox)||this.bbox&&val.bbox&&this.bbox.isEqual(val.bbox)&&(!this.headings&&!val.headings)||this.headings&&val.headings&&AscCommon.isEqualSortedArrays(this.headings,val.headings);return!!res};function setTableProperty(pivot,
|
||||
PivotDataElem.prototype.resetTotal=function(dataLength){for(var i=0;i<this.total.length;++i)this.total[i].reset()};function PivotDataLocation(ws,bbox,headings){this.ws=ws;this.bbox=bbox;this.headings=headings}PivotDataLocation.prototype.isEqual=function(val){var res=val&&this.ws===val.ws&&(!this.bbox&&!val.bbox||this.bbox&&val.bbox&&this.bbox.isEqual(val.bbox))&&(!this.headings&&!val.headings||this.headings&&val.headings&&AscCommon.isEqualSortedArrays(this.headings,val.headings));return!!res};function setTableProperty(pivot,
|
||||
oldVal,newVal,addToHistory,historyType,changeData){if(oldVal===newVal)return;if(addToHistory)History.Add(AscCommonExcel.g_oUndoRedoPivotTables,historyType,pivot.worksheet.getId(),null,new AscCommonExcel.UndoRedoData_PivotTable(pivot.Get_Id(),oldVal,newVal));if(pivot&&changeData)pivot.setChanged(true)}function setFieldProperty(pivot,index,oldVal,newVal,addToHistory,historyType,changeData){if(oldVal===newVal)return;if(addToHistory)History.Add(AscCommonExcel.g_oUndoRedoPivotFields,historyType,pivot.worksheet.getId(),
|
||||
null,new AscCommonExcel.UndoRedoData_PivotField(pivot.Get_Id(),index,oldVal,newVal));if(pivot&&changeData)pivot.setChanged(true)}function toXmlWithLength(w,elem,name,val1){var StartPos=w.GetCurPosition();w.WriteLong(0);elem.toXml(w,name,val1);var EndPos=w.GetCurPosition();w.Seek(StartPos);w.WriteLong(EndPos-StartPos-4);w.Seek(EndPos)}function XmlReaderWrapper(name,elem){this.name=name;this.elem=elem}XmlReaderWrapper.prototype.onStartNode=function(elem,attr,uq){var newContext=this;if(this.name===elem){newContext=
|
||||
this.elem;if(newContext.readAttributes)newContext.readAttributes(attr,uq)}else newContext=null;return newContext};function ReadNumXml(vals,uq,elem){var val;var formatId=null;var formatCode=null;val=vals["formatId"];if(undefined!==val)formatId=val-0;val=vals["formatCode"];if(undefined!==val)formatCode=AscCommon.unleakString(uq(val));if(null!==formatId||null!==formatCode)elem.num=AscCommonExcel.Num.prototype.initFromParams(formatId,formatCode,null);else{val=vals["numFmtId"];if(undefined!==val)elem.numFmtId=
|
||||
|
|
Loading…
Reference in New Issue