UNPKG

@microsoft/office-js

Version:
1,286 lines (1,284 loc) • 285 kB
/* Excel specific API library */ /* Version: 15.0.4980.3004 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ var OSF=OSF || {}; OSF.OUtil=(function () { var _uniqueId=-1; var _xdmInfoKey='&_xdm_Info='; var _xdmSessionKeyPrefix='_xdm_'; var _fragmentSeparator='#'; var _loadedScripts={}; var _defaultScriptLoadingTimeout=30000; var _localStorageNotWorking=false; function _random() { return Math.floor(100000001 * Math.random()).toString(); }; return { extend: function OSF_OUtil$extend(child, parent) { var F=function () { }; F.prototype=parent.prototype; child.prototype=new F(); child.prototype.constructor=child; child.uber=parent.prototype; if (parent.prototype.constructor===Object.prototype.constructor) { parent.prototype.constructor=parent; } }, setNamespace: function OSF_OUtil$setNamespace(name, parent) { if (parent && name && !parent[name]) { parent[name]={}; } }, unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { if (parent && name && parent[name]) { delete parent[name]; } }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; var _loadedScriptEntry=_loadedScripts[url]; if (!_loadedScriptEntry) { var script=doc.createElement("script"); script.type="text/javascript"; _loadedScriptEntry={ loaded: false, pendingCallbacks: [callback], timer: null }; _loadedScripts[url]=_loadedScriptEntry; var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() { if(_loadedScriptEntry.timer !=null) { clearTimeout(_loadedScriptEntry.timer); delete _loadedScriptEntry.timer; } _loadedScriptEntry.loaded=true; var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; for (var i=0; i < pendingCallbackCount; i++) { var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); currentCallback(); } }; var onLoadError=function OSF_OUtil_loadScript$onLoadError() { delete _loadedScripts[url]; if(_loadedScriptEntry.timer !=null) { clearTimeout(_loadedScriptEntry.timer); delete _loadedScriptEntry.timer; } var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; for (var i=0; i < pendingCallbackCount; i++) { var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); currentCallback(); } }; if (script.readyState) { script.onreadystatechange=function () { if (script.readyState=="loaded" || script.readyState=="complete") { script.onreadystatechange=null; onLoadCallback(); } }; } else { script.onload=onLoadCallback; } script.onerror=onLoadError; timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; _loadedScriptEntry.timer=setTimeout(onLoadError, timeoutInMs); script.src=url; doc.getElementsByTagName("head")[0].appendChild(script); } else if (_loadedScriptEntry.loaded) { callback(); } else { _loadedScriptEntry.pendingCallbacks.push(callback); } } }, loadCSS: function OSF_OUtil$loadCSS(url) { if (url) { var doc=window.document; var link=doc.createElement("link"); link.type="text/css"; link.rel="stylesheet"; link.href=url; doc.getElementsByTagName("head")[0].appendChild(link); } }, parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { var parsed=enumObject[str.trim()]; if (typeof (parsed)=='undefined') { OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); throw OsfMsAjaxFactory.msAjaxError.argument("str"); } return parsed; }, delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { var obj={ calc: arguments[0] }; return function() { if(obj.calc) { obj.val=obj.calc.apply(this, arguments); delete obj.calc; } return obj.val; }; }, getUniqueId: function OSF_OUtil$getUniqueId() { _uniqueId=_uniqueId+1; return _uniqueId.toString(); }, formatString: function OSF_OUtil$formatString() { var args=arguments; var source=args[0]; return source.replace(/{(\d+)}/gm, function (match, number) { var index=parseInt(number, 10)+1; return args[index]===undefined ? '{'+number+'}' : args[index]; }); }, generateConversationId: function OSF_OUtil$generateConversationId() { return [_random(), _random(), (new Date()).getTime().toString()].join('_'); }, getFrameNameAndConversationId: function OSF_OUtil$getFrameNameAndConversationId(cacheKey, frame) { var frameName=_xdmSessionKeyPrefix+cacheKey+this.generateConversationId(); frame.setAttribute("name", frameName); return this.generateConversationId(); }, addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { url=url.trim() || ''; var urlParts=url.split(_fragmentSeparator); var urlWithoutFragment=urlParts.shift(); var fragment=urlParts.join(_fragmentSeparator); return [urlWithoutFragment, _fragmentSeparator, fragment, _xdmInfoKey, xdmInfoValue].join(''); }, parseXdmInfo: function OSF_OUtil$parseXdmInfo() { var fragment=window.location.hash; var fragmentParts=fragment.split(_xdmInfoKey); var xdmInfoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; if (window.sessionStorage) { var sessionKeyStart=window.name.indexOf(_xdmSessionKeyPrefix); if (sessionKeyStart > -1) { var sessionKeyEnd=window.name.indexOf(";", sessionKeyStart); if (sessionKeyEnd==-1) { sessionKeyEnd=window.name.length; } var sessionKey=window.name.substring(sessionKeyStart, sessionKeyEnd); if (xdmInfoValue) { window.sessionStorage.setItem(sessionKey, xdmInfoValue); } else { xdmInfoValue=window.sessionStorage.getItem(sessionKey); } } } return xdmInfoValue; }, getConversationId: function OSF_OUtil$getConversationId() { var searchString=window.location.search; var conversationId=null; if (searchString) { var index=searchString.indexOf("&"); conversationId=index > 0 ? searchString.substring(1, index) : searchString.substr(1); if(conversationId && conversationId.charAt(conversationId.length-1)==='='){ conversationId=conversationId.substring(0, conversationId.length-1); if(conversationId) { conversationId=decodeURIComponent(conversationId); } } } return conversationId; }, validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { var e=Function._validateParams(arguments, [ { name: "params", type: Object, mayBeNull: false }, { name: "expectedProperties", type: Object, mayBeNull: false }, { name: "callback", type: Function, mayBeNull: true } ]); if (e) throw e; for (var p in expectedProperties) { e=Function._validateParameter(params[p], expectedProperties[p], p); if (e) throw e; } }, writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { if (window.msWriteProfilerMark) { window.msWriteProfilerMark(text); OsfMsAjaxFactory.msAjaxDebug.trace(text); } }, defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { descriptor=descriptor || {}; for (var nd in attributes) { var attribute=attributes[nd]; if (descriptor[attribute]==undefined) { descriptor[attribute]=true; } } Object.defineProperty(obj, prop, descriptor); return obj; }, defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { descriptors=descriptors || {}; for (var prop in descriptors) { OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); } return obj; }, defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); }, defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); }, defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); }, defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); }, finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { descriptor=descriptor || {}; var props=Object.getOwnPropertyNames(obj); var propsLength=props.length; for (var i=0; i < propsLength; i++) { var prop=props[i]; var desc=Object.getOwnPropertyDescriptor(obj, prop); if (!desc.get && !desc.set) { desc.writable=descriptor.writable || false; } desc.configurable=descriptor.configurable || false; desc.enumerable=descriptor.enumerable || true; Object.defineProperty(obj, prop, desc); } return obj; }, mapList: function OSF_OUtil$MapList(list, mapFunction) { var ret=[]; if (list) { for (var item in list) { ret.push(mapFunction(list[item])); } } return ret; }, listContainsKey: function OSF_OUtil$listContainsKey(list, key) { for (var item in list) { if (key==item) { return true; } } return false; }, listContainsValue: function OSF_OUtil$listContainsElement(list, value) { for (var item in list) { if (value==list[item]) { return true; } } return false; }, augmentList: function OSF_OUtil$augmentList(list, addenda) { var add=list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key]=value; }; for (var key in addenda) { add(key, addenda[key]); } }, redefineList: function OSF_Outil$redefineList(oldList, newList) { for (var key1 in oldList) { delete oldList[key1]; } for (var key2 in newList) { oldList[key2]=newList[key2]; } }, isArray: function OSF_OUtil$isArray(obj) { return Object.prototype.toString.apply(obj)==="[object Array]"; }, isFunction: function OSF_OUtil$isFunction(obj) { return Object.prototype.toString.apply(obj)==="[object Function]"; }, isDate: function OSF_OUtil$isDate(obj) { return Object.prototype.toString.apply(obj)==="[object Date]"; }, addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { if (element.attachEvent) { element.attachEvent("on"+eventName, listener); } else if (element.addEventListener) { element.addEventListener(eventName, listener, false); } else { element["on"+eventName]=listener; } }, removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { if (element.detachEvent) { element.detachEvent("on"+eventName, listener); } else if (element.removeEventListener) { element.removeEventListener(eventName, listener, false); } else { element["on"+eventName]=null; } }, encodeBase64: function OSF_Outil$encodeBase64(input) { var codex="ABCDEFGHIJKLMNOP"+ "QRSTUVWXYZabcdef"+ "ghijklmnopqrstuv"+ "wxyz0123456789+/"+ "="; var output=[]; var temp=[]; var index=0; var a, b, c; var length=input.length; do { a=input[index++]; b=input[index++]; c=input[index++]; temp[0]=a >> 2; temp[1]=((a & 3) << 4) | (b >> 4); temp[2]=((b & 15) << 2) | (c >> 6); temp[3]=c & 63; if (isNaN(b)) { temp[2]=temp[3]=64; } else if (isNaN(c)) { temp[3]=64; } for (var t=0; t < 4; t++) { output.push(codex.charAt(temp[t])); } } while (index < length); return output.join(""); }, getLocalStorage: function OSF_Outil$getLocalStorage() { var osfLocalStorage=null; if (!_localStorageNotWorking) { try { if (window.localStorage) { osfLocalStorage=window.localStorage; } } catch (ex) { _localStorageNotWorking=true; } } return osfLocalStorage; }, splitStringToList: function OSF_Outil$splitStringToList(input, spliter) { var backslash=false; var index=-1; var res=[]; var insideStr=false; var s=spliter+input; for (var i=0; i < s.length; i++) { if (s[i]=="\\" && !backslash) { backslash=true; } else { if (s[i]==spliter && !insideStr) { res.push(""); index++; } else if (s[i]=="\"" && !backslash) { insideStr=!insideStr; } else { res[index]+=s[i]; } backslash=false; } } return res; }, convertIntToHex: function OSF_Outil$convertIntToHex(val) { var hex="#"+(Number(val)+0x1000000).toString(16).slice(-6); return hex; } }; })(); OSF.OUtil.Guid=(function() { var hexCode=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; return { generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { var result=""; var tick=(new Date()).getTime(); var index=0; for (; index < 32 && tick > 0; index++) { if (index==8 || index==12 || index==16 || index==20) { result+="-"; } result+=hexCode[tick % 16]; tick=Math.floor(tick / 16); } for (; index < 32; index++) { if (index==8 || index==12 || index==16 || index==20) { result+="-"; } result+=hexCode[Math.floor(Math.random() * 16)]; } return result; } } })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" }; OSF.HostCallPerfMarker={ IssueCall: "Agave.HostCall.IssueCall", ReceiveResponse: "Agave.HostCall.ReceiveResponse", RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" }; OSF.AgaveHostAction={ "Select" : 0, "UnSelect": 1 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' }; OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, dialogRequirementMatrix) { this._id=id; this._appName=appName; this._appVersion=appVersion; this._appUILocale=appUILocale; this._dataLocale=dataLocale; this._docUrl=docUrl; this._clientMode=clientMode; this._settings=settings; this._reason=reason; this._osfControlType=osfControlType; this._eToken=eToken; this._correlationId=correlationId; this._appMinorVersion=appMinorVersion; this._requirementMatrix=requirementMatrix; this._appInstanceId=appInstanceId; this._isDialog=false; this._dialogRequirementMatrix=dialogRequirementMatrix; this.get_id=function get_id() { return this._id; }; this.get_appName=function get_appName() { return this._appName; }; this.get_appVersion=function get_appVersion() { return this._appVersion; }; this.get_appUILocale=function get_appUILocale() { return this._appUILocale; }; this.get_dataLocale=function get_dataLocale() { return this._dataLocale; }; this.get_docUrl=function get_docUrl() { return this._docUrl; }; this.get_clientMode=function get_clientMode() { return this._clientMode; }; this.get_bindings=function get_bindings() { return this._bindings; }; this.get_settings=function get_settings() { return this._settings; }; this.get_reason=function get_reason() { return this._reason; }; this.get_osfControlType=function get_osfControlType() { return this._osfControlType; }; this.get_eToken=function get_eToken() { return this._eToken; }; this.get_correlationId=function get_correlationId() { return this._correlationId; }; this.get_appInstanceId=function get_appInstanceId() { return this._appInstanceId; }; this.get_appMinorVersion=function get_appMinorVersion() { return this._appMinorVersion; }; this.get_requirementMatrix=function get_requirementMatrix() { return this._requirementMatrix; }; this.get_isDialog=function get_isDialog() { return this._isDialog; }; this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; }; OSF.AppName={ Unsupported: 0, Excel: 1, Word: 2, PowerPoint: 4, Outlook: 8, ExcelWebApp: 16, WordWebApp: 32, OutlookWebApp: 64, Project: 128 }; OSF.OsfControlType={ DocumentLevel: 0, ContainerLevel: 1 }; OSF.ClientMode={ ReadOnly: 0, ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Client", Microsoft.Office); OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); OSF.OUtil.setNamespace("Internal", Microsoft.Office); OSF.NamespaceManager=(function OSF_NamespaceManager() { var _userOffice; var _useShortcut=false; return { enableShortcut: function OSF_NamespaceManager$enableShortcut() { if (!_useShortcut) { if (window.Office) { _userOffice=window.Office; } else { OSF.OUtil.setNamespace("Office", window); } window.Office=Microsoft.Office.WebExtension; _useShortcut=true; } }, disableShortcut: function OSF_NamespaceManager$disableShortcut() { if (_useShortcut) { if (_userOffice) { window.Office=_userOffice; } else { OSF.OUtil.unsetNamespace("Office", window); } _useShortcut=false; } } }; })(); OSF.NamespaceManager.enableShortcut(); Microsoft.Office.WebExtension.InitializationReason={ Inserted: "inserted", DocumentOpened: "documentOpened", Browser: "browser" }; Microsoft.Office.WebExtension.ActiveView={ Read: "read", Edit: "edit" }; Microsoft.Office.WebExtension.ApplicationMode={ WebEditor: "webEditor", WebViewer: "webViewer", Client: "client" }; Microsoft.Office.WebExtension.DocumentMode={ ReadOnly: "readOnly", ReadWrite: "readWrite" }; Microsoft.Office.WebExtension.CoercionType={ Text: "text", Matrix: "matrix", Table: "table", Image: "image" }; Microsoft.Office.WebExtension.ValueFormat={ Unformatted: "unformatted", Formatted: "formatted" }; Microsoft.Office.WebExtension.FilterType={ All: "all" }; Microsoft.Office.WebExtension.PlatformType={ PC: "PC", OfficeOnline: "OfficeOnline", Mac: "Mac", iOS: "iOS", Android: "Android", Universal: "Universal" }; Microsoft.Office.WebExtension.HostType={ Word: "Word", Excel: "Excel", PowerPoint: "PowerPoint", Outlook: "Outlook", OneNote: "OneNote", Project: "Project", Access: "Access" } Microsoft.Office.WebExtension.BindingType={ Text: "text", Matrix: "matrix", Table: "table" }; Microsoft.Office.WebExtension.GoToType={ Binding: "binding", NamedItem: "namedItem", Slide: "slide", Index: "index" }; Microsoft.Office.WebExtension.SelectionMode={ Default: "default", Selected: "selected", None: "none" }; Microsoft.Office.WebExtension.EventType={ DocumentSelectionChanged: "documentSelectionChanged", BindingSelectionChanged: "bindingSelectionChanged", BindingDataChanged: "bindingDataChanged", DialogMessageReceived: "dialogMessageReceived", DialogEventReceived: "dialogEventReceived" }; Microsoft.Office.Internal.EventType={ OfficeThemeChanged: "officeThemeChanged", DocumentThemeChanged: "documentThemeChanged" }; Microsoft.Office.WebExtension.AsyncResultStatus={ Succeeded: "succeeded", Failed: "failed" }; Microsoft.Office.WebExtension.Parameters={ BindingType: "bindingType", CoercionType: "coercionType", ValueFormat: "valueFormat", FilterType: "filterType", Id: "id", GoToType: "goToType", SelectionMode: "selectionMode", PromptText: "promptText", ItemName: "itemName", FailOnCollision: "failOnCollision", StartRow: "startRow", StartColumn: "startColumn", RowCount: "rowCount", ColumnCount: "columnCount", Callback: "callback", AsyncContext: "asyncContext", Data: "data", Rows: "rows", OverwriteIfStale: "overwriteIfStale", FileType: "fileType", EventType: "eventType", Handler: "handler", SliceSize: "sliceSize", SliceIndex: "sliceIndex", ActiveView: "activeView", Xml: "xml", Namespace: "namespace", Prefix: "prefix", XPath: "xPath", Text: "text", HostType: "hostType", PlatformType: "platformType", ImageLeft: "imageLeft", ImageTop: "imageTop", ImageWidth: "imageWidth", ImageHeight: "imageHeight", TaskId: "taskId", FieldId: "fieldId", FieldValue: "fieldValue", ServerUrl: "serverUrl", ListName: "listName", ResourceId: "resourceId", ViewType: "viewType", ViewName: "viewName", GetRawValue: "getRawValue", CellFormat: "cellFormat", TableOptions: "tableOptions", Url: "url", MessageHandler: "messageHandler", Width: "width", Height: "height", RequireHTTPs: "requireHTTPS", MessageToParent: "messageToParent", XFrameDenySafe: "xFrameDenySafe" }; Microsoft.Office.Internal.Parameters={ DocumentTheme: "documentTheme", OfficeTheme: "officeTheme" }; Microsoft.Office.WebExtension.DefaultParameterValues={ }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ ReadOnly: 1, ReadWrite: 0 }; OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); OSF.DDA.DispIdHost.Methods={ InvokeMethod: "invokeMethod", AddEventHandler: "addEventHandler", RemoveEventHandler: "removeEventHandler", OpenDialog: "openDialog", CloseDialog: "closeDialog", MessageParent: "messageParent" }; OSF.DDA.DispIdHost.Delegates={ ExecuteAsync: "executeAsync", RegisterEventAsync: "registerEventAsync", UnregisterEventAsync: "unregisterEventAsync", ParameterMap: "parameterMap", MessageParent: "messageParent" }; OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); OSF.DDA.AsyncResultEnum.Properties={ Context: "Context", Value: "Value", Status: "Status", Error: "Error" }; OSF.DDA.AsyncResultEnum.ErrorProperties={ Name: "Name", Message: "Message", Code: "Code" }; OSF.DDA.PropertyDescriptors={ AsyncResultStatus: "AsyncResultStatus", FileProperties: "FileProperties", FilePropertiesDescriptor: "FilePropertiesDescriptor", FileSliceProperties: "FileSliceProperties", Subset: "subset", BindingProperties: "BindingProperties", TableDataProperties: "TableDataProperties", DataPartProperties: "DataPartProperties", DataNodeProperties: "DataNodeProperties", MessageType: "messageType", MessageContent: "messageContent" }; OSF.DDA.EventDescriptors={ BindingSelectionChangedEvent: "BindingSelectionChangedEvent", DataNodeInsertedEvent: "DataNodeInsertedEvent", DataNodeReplacedEvent: "DataNodeReplacedEvent", DataNodeDeletedEvent: "DataNodeDeletedEvent", OfficeThemeChangedEvent: "OfficeThemeChangedEvent", DocumentThemeChangedEvent: "DocumentThemeChangedEvent", ActiveViewChangedEvent: "ActiveViewChangedEvent", AppCommandInvokedEvent: "AppCommandInvokedEvent", DialogMessageReceivedEvent: "DialogMessageReceivedEvent" }; OSF.DDA.ListDescriptors={ BindingList: "BindingList", DataPartList: "DataPartList", DataNodeList: "DataNodeList" }; OSF.DDA.FileProperties={ Handle: "FileHandle", FileSize: "FileSize", SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize }; OSF.DDA.FilePropertiesDescriptor={ Url: "Url" }; OSF.DDA.BindingProperties={ Id: "BindingId", Type: Microsoft.Office.WebExtension.Parameters.BindingType, RowCount: "BindingRowCount", ColumnCount: "BindingColumnCount", HasHeaders: "HasHeaders" }; OSF.DDA.TableDataProperties={ TableRows: "TableRows", TableHeaders: "TableHeaders" }; OSF.DDA.DataPartProperties={ Id: Microsoft.Office.WebExtension.Parameters.Id, BuiltIn: "DataPartBuiltIn" }; OSF.DDA.DataNodeProperties={ Handle: "DataNodeHandle", BaseName: "DataNodeBaseName", NamespaceUri: "DataNodeNamespaceUri", NodeType: "DataNodeType" }; OSF.DDA.DataNodeEventProperties={ OldNode: "OldNode", NewNode: "NewNode", NextSiblingNode: "NextSiblingNode", InUndoRedo: "InUndoRedo" }; OSF.DDA.AsyncResultEnum.ErrorCode={ Success: 0, Failed: 1 }; OSF.DialogMessageType={ DialogMessageReceived: 0, DialogClosed: 12006 } OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(bindingId, eventType) { if (eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged) { return bindingId+"_"+eventType; } else { return eventType; } }; var __extends=this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; function __() { this.constructor=d; } __.prototype=b.prototype; d.prototype=new __(); }; var OfficeExt; (function (OfficeExt) { var Requirement; (function (Requirement) { var RequirementMatrix=(function () { function RequirementMatrix(_setMap) { this.isSetSupported=function _isSetSupported(name, minVersion) { if (name==undefined) { return false; } if (minVersion==undefined) { minVersion=0; } var setSupportArray=this._setMap; var sets=setSupportArray._sets; if (sets.hasOwnProperty(name.toLowerCase())) { var setMaxVersion=sets[name.toLowerCase()]; return setMaxVersion > 0 && setMaxVersion >=minVersion; } else { return false; } }; this._setMap=_setMap; } return RequirementMatrix; })(); Requirement.RequirementMatrix=RequirementMatrix; var DefaultSetRequirement=(function () { function DefaultSetRequirement(setMap) { this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) { for (var name in addedSet) { this._sets[name]=addedSet[name]; } }; this._sets=setMap; } return DefaultSetRequirement; })(); Requirement.DefaultSetRequirement=DefaultSetRequirement; var DefaultDialogSetRequirement=(function (_super) { __extends(DefaultDialogSetRequirement, _super); function DefaultDialogSetRequirement() { _super.call(this, { "dialogapi": 1.1 }); } return DefaultDialogSetRequirement; })(DefaultSetRequirement); Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement; var ExcelClientDefaultSetRequirement=(function (_super) { __extends(ExcelClientDefaultSetRequirement, _super); function ExcelClientDefaultSetRequirement() { _super.call(this, { "bindingevents": 1.1, "documentevents": 1.1, "matrixbindings": 1.1, "matrixcoercion": 1.1, "selection": 1.1, "settings": 1.1, "tablebindings": 1.1, "tablecoercion": 1.1, "textbindings": 1.1, "textcoercion": 1.1 }); } return ExcelClientDefaultSetRequirement; })(DefaultSetRequirement); Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; var ExcelClientV2DefaultSetRequirement=(function (_super) { __extends(ExcelClientV2DefaultSetRequirement, _super); function ExcelClientV2DefaultSetRequirement() { _super.call(this); this._addSetMap({ "imagecoercion": 1.1 }); } return ExcelClientV2DefaultSetRequirement; })(ExcelClientDefaultSetRequirement); Requirement.ExcelClientV2DefaultSetRequirement=ExcelClientV2DefaultSetRequirement; var OutlookClientDefaultSetRequirement=(function (_super) { __extends(OutlookClientDefaultSetRequirement, _super); function OutlookClientDefaultSetRequirement() { _super.call(this, { "mailbox": 1.1 }); } return OutlookClientDefaultSetRequirement; })(DefaultSetRequirement); Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; var OutlookClientV1DefaultSetRequirement=(function (_super) { __extends(OutlookClientV1DefaultSetRequirement, _super); function OutlookClientV1DefaultSetRequirement() { _super.call(this, { "mailbox": 1.1 }); } return OutlookClientV1DefaultSetRequirement; })(DefaultSetRequirement); Requirement.OutlookClientV1DefaultSetRequirement=OutlookClientV1DefaultSetRequirement; var OutlookClientV2DefaultSetRequirement=(function (_super) { __extends(OutlookClientV2DefaultSetRequirement, _super); function OutlookClientV2DefaultSetRequirement() { _super.call(this, { "mailbox": 1.2 }); } return OutlookClientV2DefaultSetRequirement; })(DefaultSetRequirement); Requirement.OutlookClientV2DefaultSetRequirement=OutlookClientV2DefaultSetRequirement; var OutlookClientV3DefaultSetRequirement=(function (_super) { __extends(OutlookClientV3DefaultSetRequirement, _super); function OutlookClientV3DefaultSetRequirement() { _super.call(this, { "mailbox": 1.3 }); } return OutlookClientV3DefaultSetRequirement; })(DefaultSetRequirement); Requirement.OutlookClientV3DefaultSetRequirement=OutlookClientV3DefaultSetRequirement; var WordClientDefaultSetRequirement=(function (_super) { __extends(WordClientDefaultSetRequirement, _super); function WordClientDefaultSetRequirement() { _super.call(this, { "bindingevents": 1.1, "compressedfile": 1.1, "customxmlparts": 1.1, "documentevents": 1.1, "file": 1.1, "htmlcoercion": 1.1, "matrixbindings": 1.1, "matrixcoercion": 1.1, "ooxmlcoercion": 1.1, "selection": 1.1, "settings": 1.1, "tablebindings": 1.1, "tablecoercion": 1.1, "textbindings": 1.1, "textcoercion": 1.1, "textfile": 1.1 }); } return WordClientDefaultSetRequirement; })(DefaultSetRequirement); Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; var WordClientV2DefaultSetRequirement=(function (_super) { __extends(WordClientV2DefaultSetRequirement, _super); function WordClientV2DefaultSetRequirement() { _super.call(this); this._addSetMap({ "imagecoercion": 1.1, "pdffile": 1.1 }); } return WordClientV2DefaultSetRequirement; })(WordClientDefaultSetRequirement); Requirement.WordClientV2DefaultSetRequirement=WordClientV2DefaultSetRequirement; var PowerpointClientDefaultSetRequirement=(function (_super) { __extends(PowerpointClientDefaultSetRequirement, _super); function PowerpointClientDefaultSetRequirement() { _super.call(this, { "compressedfile": 1.1, "documentevents": 1.1, "file": 1.1, "selection": 1.1, "settings": 1.1, "textcoercion": 1.1 }); } return PowerpointClientDefaultSetRequirement; })(DefaultSetRequirement); Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; var PowerpointClientV2DefaultSetRequirement=(function (_super) { __extends(PowerpointClientV2DefaultSetRequirement, _super); function PowerpointClientV2DefaultSetRequirement() { _super.call(this); this._addSetMap({ "activeview": 1.1, "imagecoercion": 1.1, "pdffile": 1.1 }); } return PowerpointClientV2DefaultSetRequirement; })(PowerpointClientDefaultSetRequirement); Requirement.PowerpointClientV2DefaultSetRequirement=PowerpointClientV2DefaultSetRequirement; var ProjectClientDefaultSetRequirement=(function (_super) { __extends(ProjectClientDefaultSetRequirement, _super); function ProjectClientDefaultSetRequirement() { _super.call(this, { "selection": 1.1, "textcoercion": 1.1 }); } return ProjectClientDefaultSetRequirement; })(DefaultSetRequirement); Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; var ExcelWebDefaultSetRequirement=(function (_super) { __extends(ExcelWebDefaultSetRequirement, _super); function ExcelWebDefaultSetRequirement() { _super.call(this, { "bindingevents": 1.1, "documentevents": 1.1, "matrixbindings": 1.1, "matrixcoercion": 1.1, "selection": 1.1, "settings": 1.1, "tablebindings": 1.1, "tablecoercion": 1.1, "textbindings": 1.1, "textcoercion": 1.1, "file": 1.1 }); } return ExcelWebDefaultSetRequirement; })(DefaultSetRequirement); Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; var ExcelWebV2DefaultSetRequirement=(function (_super) { __extends(ExcelWebV2DefaultSetRequirement, _super); function ExcelWebV2DefaultSetRequirement() { _super.call(this); this._addSetMap({ "activeview":1.1 }); } return ExcelWebV2DefaultSetRequirement; })(ExcelWebDefaultSetRequirement); Requirement.ExcelWebV2DefaultSetRequirement=ExcelWebV2DefaultSetRequirement; var OutlookWebDefaultSetRequirement=(function (_super) { __extends(OutlookWebDefaultSetRequirement, _super); function OutlookWebDefaultSetRequirement() { _super.call(this, { "mailbox": 1.1 }); } return OutlookWebDefaultSetRequirement; })(DefaultSetRequirement); Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; var OutlookWebV1DefaultSetRequirement=(function (_super) { __extends(OutlookWebV1DefaultSetRequirement, _super); function OutlookWebV1DefaultSetRequirement() { _super.call(this, { "mailbox": 1.3 }); } return OutlookWebV1DefaultSetRequirement; })(DefaultSetRequirement); Requirement.OutlookWebV1DefaultSetRequirement=OutlookWebV1DefaultSetRequirement; var RequirementsMatrixFactory=(function () { function RequirementsMatrixFactory() { } RequirementsMatrixFactory.initializeOsfDda=function () { OSF.OUtil.setNamespace("Requirement", OSF.DDA); }; RequirementsMatrixFactory.getDefaultRequirementMatrix=function (appContext) { this.initializeDefaultSetMatrix(); var defaultRequirementMatrix=undefined; var clientRequirement=appContext.get_requirementMatrix(); if (clientRequirement !=undefined && clientRequirement.length > 0 && typeof (JSON) !=="undefined") { var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)); } else { var appFullVersion=appContext.get_appVersion(); var appLocator=appContext.get_appName()+"-"+appFullVersion; if (RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) { defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); } else { defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})); } } return defaultRequirementMatrix; }; RequirementsMatrixFactory.getDialogDefaultRequirementMatrix=function (appContext) { var defaultRequirementMatrix=undefined; var clientRequirement=appContext.get_dialogRequirementMatrix(); if (clientRequirement !=undefined && clientRequirement.length > 0 && typeof (JSON) !=="undefined") { var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)); } else { defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement()); } return defaultRequirementMatrix; } RequirementsMatrixFactory.initializeDefaultSetMatrix=function () { RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1500]=new ExcelClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1501]=new ExcelClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1502]=new ExcelClientV2DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1500]=new WordClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1501]=new WordClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1502]=new WordClientV2DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1500]=new PowerpointClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1501]=new PowerpointClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1502]=new PowerpointClientV2DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1500]=new OutlookClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1501]=new OutlookClientV1DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1502]=new OutlookClientV2DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1503]=new OutlookClientV3DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1500]=new ExcelWebDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1501]=new ExcelWebDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1502]=new ExcelWebV2DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1500]=new OutlookWebDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1501]=new OutlookWebV1DefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1500]=new ProjectClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1501]=new ProjectClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1502]=new ProjectClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1500]=new ExcelClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1500]=new WordClientDefaultSetRequirement(); RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1500]=new PowerpointClientDefaultSetRequirement(); }; RequirementsMatrixFactory.Excel_RCLIENT_1500="1-15.00"; RequirementsMatrixFactory.Excel_RCLIENT_1501="1-15.01"; RequirementsMatrixFactory.Excel_RCLIENT_1502="1-15.02"; RequirementsMatrixFactory.Word_RCLIENT_1500="2-15.00"; RequirementsMatrixFactory.Word_RCLIENT_1501="2-15.01"; RequirementsMatrixFactory.Word_RCLIENT_1502="2-15.02"; RequirementsMatrixFactory.PowerPoint_RCLIENT_1500="4-15.00"; RequirementsMatrixFactory.PowerPoint_RCLIENT_1501="4-15.01"; RequirementsMatrixFactory.PowerPoint_RCLIENT_1502="4-15.02"; RequirementsMatrixFactory.Outlook_RCLIENT_1500="8-15.00"; RequirementsMatrixFactory.Outlook_RCLIENT_1501="8-15.01"; RequirementsMatrixFactory.Outlook_RCLIENT_1502="8-15.02"; RequirementsMatrixFactory.Outlook_RCLIENT_1503="8-15.03"; RequirementsMatrixFactory.Excel_WAC_1500="16-15.00"; RequirementsMatrixFactory.Excel_WAC_1501="16-15.01"; RequirementsMatrixFactory.Excel_WAC_1502="16-15.02"; RequirementsMatrixFactory.Outlook_WAC_1500="64-15.00"; RequirementsMatrixFactory.Outlook_WAC_1501="64-15.01"; RequirementsMatrixFactory.Project_RCLIENT_1500="128-15.00"; RequirementsMatrixFactory.Project_RCLIENT_1501="128-15.01"; RequirementsMatrixFactory.Project_RCLIENT_1502="128-15.02"; RequirementsMatrixFactory.Excel_IOS_1500="1024-15.00"; RequirementsMatrixFactory.Word_IOS_1500="4096-15.00"; RequirementsMatrixFactory.PowerPoint_IOS_1500="8192-15.00"; RequirementsMatrixFactory.DefaultSetArrayMatrix={}; return RequirementsMatrixFactory; })(); Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory; })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})); })(OfficeExt || (OfficeExt={})); OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); var OfficeExt; (function (OfficeExt) { var HostName; (function (HostName) { var Host=(function () { function Host() { this.getHost=function _getHost(appNumber) { var host=this.getFullHost(appNumber); if (host) { for (var key in this.platformPossibilities) { var platformIndex=host.indexOf(key); if (platformIndex >=0) { host=host.substring(0, platformIndex); return (Microsoft.Office.WebExtension.HostType[host] || null); } } return (Microsoft.Office.WebExtension.HostType[host] || null); } return null; }; this.getDiagnostics=function _getDiagnostics(appNumber) { var diagnostics={ host: this.getHost(appNumber), version: "15.0.0000.0000", platform: this.getPlatform(appNumber) }; return diagnostics; }; this.platformPossibilities={ "WebApp": Microsoft.Office.WebExtension.PlatformType.OfficeOnline, "Unsupported": null }; this.getHost=this.getHost.bind(this); this.getDiagnostics=this.getDiagnostics.bind(this); } Host.getInstance=function () { if (Host.hostObj===undefined) { Host.hostObj=new Host(); } return Host.hostObj; }; Host.prototype.getPlatform=function (appNumber) { var host=this.getFullHost(appNumber); if (host===null) { return null; } var platform=Microsoft.Office.WebExtension.PlatformType.PC; for (var key in this.platformPossibilities) { if (host.indexOf(key) >=0) { return this.platformPossibilities[key]; } } return platform; }; Host.prototype.getFullHost=function (appNumber) { var hostName=null; for (var key in OSF.AppName) { if (OSF.AppName[key]===appNumber) { hostName=key; break; } } return hostName; }; return Host; })(); HostName.Host=Host; })(HostName=OfficeExt.HostName || (OfficeExt.HostName={})); })(OfficeExt || (OfficeExt={})); OSF.DDA.ErrorCodeManager=(function () { var _errorMappings={}; return { getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { return _errorMappings[errorCode] || _errorMappings[this.errorCodes.ooeInternalError]; }, addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { _errorMappings[errorCode]=errorNameMessage; }, errorCodes : { ooeSuccess : 0, ooeCoercionTypeNotSupported : 1000, ooeGetSelectionNotMatchDataType : 1001, ooeCoercionTypeNotMatchBinding : 1002, ooeInvalidGetRowColumnCounts : 1003, ooeSelectionNotSupportCoercionType : 1004, ooeInvalidGetStartRowColumn : 1005, ooeNonUniformPartialGetNotSupported : 1006, ooeGetDataIsTooLarge : 1008, ooeFileTypeNotSupported : 1009, ooeUnsupportedDataObject : 2000, ooeCannotWriteToSelection : 2001, ooeDataNotMatchSelection : 2002, ooeOverwriteWorksheetData : 2003, ooeDataNotMatchBindingSize : 2004, ooeInvalidSetStartRowColumn : 2005, ooeInvalidDataFormat : 2006, ooeDataNotMatchCoercionType : 2007, ooeDataNotMatchBindingType : 2008, ooeSetDataIsTooLarge : 2009, ooeNonUniformPartialSetNotSupported : 2010, ooeSelectionCannotBound : 3000, ooeBindingNotExist : 3002, ooeBindingToMultipleSelection : 3003, ooeInvalidSelectionForBindingType : 3004, ooeOperationNotSupportedOnThisBindingType : 3005, ooeNamedItemNotFound : 3006, ooeMultipleNamedItemFound : 3007, ooeInvalidNamedItemForBindingType : 3008, ooeUnknownBindingType : 3009, ooeOperationNotSupportedOnMatrixData : 3010, ooeSettingNameNotExist : 4000, ooeSettingsCannotSave : 4001, ooeSettingsAreStale : 4002, ooeOperationNotSupported : 5000, ooeInternalError : 5001, ooeDocumentReadOnly : 5002, ooeEventHandlerNotExist : 5003, ooeInvalidApiCallInContext : 5004, ooeShuttingDown: 5005, ooeUnsupportedEnumeration: 5007, ooeIndexOutOfRange: 5008, ooeCustomXmlNodeNotFound : 6000, ooeCustomXmlError : 6100, ooeNoCapability : 7000, ooeCannotNavTo: 7001, ooeSpecifiedIdNotExist: 7002, ooeNavOutOfBound: 7004, ooeElementMissing: 8000, ooeProtectedError: 8001, ooeInvalidCellsValue: 8010, ooeInvalidTableOptionValue: 8011, ooeInvalidFormatValue: 8012, ooeRowIndexOutOfRange: 8020, ooeColIndexOutOfRange: 8021, ooeFormatValueOutOfRange: 8022 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ name: stringNS.L_InvalidBindingOperation , message: stringNS.L_OperationNotSupportedOnMatrixData }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ name: stringNS.L_SaveSettingsError, message: stringNS.L_Setting