Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

excel-15.02.debug.js 45KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674
  1. /* Excel specific API library */
  2. /* Version: 15.0.4777.3000 */
  3. /*
  4. Copyright (c) Microsoft Corporation. All rights reserved.
  5. */
  6. /*
  7. Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
  8. */
  9. OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, {
  10. OnlyVisible: "onlyVisible"
  11. });
  12. OSF.ClientMode={
  13. ReadWrite: 0,
  14. ReadOnly: 1
  15. }
  16. OSF.DDA.RichInitializationReason={
  17. 1: Microsoft.Office.WebExtension.InitializationReason.Inserted,
  18. 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened
  19. };
  20. Microsoft.Office.WebExtension.FileType={
  21. Text: "text",
  22. Compressed: "compressed"
  23. };
  24. OSF.DDA.RichClientSettingsManager={
  25. read: function OSF_DDA_RichClientSettingsManager$Read(onCalling, onReceiving) {
  26. var keys=[];
  27. var values=[];
  28. if (onCalling) {
  29. onCalling();
  30. }
  31. window.external.GetContext().GetSettings().Read(keys, values);
  32. if (onReceiving) {
  33. onReceiving();
  34. }
  35. var serializedSettings={};
  36. for (var index=0; index < keys.length; index++) {
  37. serializedSettings[keys[index]]=values[index];
  38. }
  39. return serializedSettings;
  40. },
  41. write: function OSF_DDA_RichClientSettingsManager$Write(serializedSettings, overwriteIfStale, onCalling, onReceiving) {
  42. var keys=[];
  43. var values=[];
  44. for (var key in serializedSettings) {
  45. keys.push(key);
  46. values.push(serializedSettings[key]);
  47. }
  48. if (onCalling) {
  49. onCalling();
  50. }
  51. window.external.GetContext().GetSettings().Write(keys, values);
  52. if (onReceiving) {
  53. onReceiving();
  54. }
  55. }
  56. };
  57. OSF.DDA.DispIdHost.getRichClientDelegateMethods=function (actionId) {
  58. var delegateMethods={};
  59. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;
  60. delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;
  61. delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;
  62. function getSettingsExecuteMethod(hostDelegateMethod) {
  63. return function (args) {
  64. var status, response;
  65. try {
  66. response=hostDelegateMethod(args.hostCallArgs, args.onCalling, args.onReceiving);
  67. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;
  68. } catch (ex) {
  69. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  70. response={ name : Strings.OfficeOM.L_InternalError, message : ex };
  71. }
  72. if (args.onComplete) {
  73. args.onComplete(status, response);
  74. }
  75. };
  76. }
  77. function readSerializedSettings(hostCallArgs, onCalling, onReceiving) {
  78. return OSF.DDA.RichClientSettingsManager.read(onCalling, onReceiving);
  79. }
  80. function writeSerializedSettings(hostCallArgs, onCalling, onReceiving) {
  81. return OSF.DDA.RichClientSettingsManager.write(
  82. hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],
  83. hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],
  84. onCalling,
  85. onReceiving
  86. );
  87. }
  88. switch (actionId) {
  89. case OSF.DDA.AsyncMethodNames.RefreshAsync.id:
  90. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=getSettingsExecuteMethod(readSerializedSettings);
  91. break;
  92. case OSF.DDA.AsyncMethodNames.SaveAsync.id:
  93. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=getSettingsExecuteMethod(writeSerializedSettings);
  94. break;
  95. default:
  96. break;
  97. }
  98. return delegateMethods;
  99. }
  100. OSF.DDA.File=function OSF_DDA_File(handle, fileSize, sliceSize) {
  101. OSF.OUtil.defineEnumerableProperties(this, {
  102. "size": {
  103. value: fileSize
  104. },
  105. "sliceCount": {
  106. value: Math.ceil(fileSize / sliceSize)
  107. }
  108. });
  109. var privateState={};
  110. privateState[OSF.DDA.FileProperties.Handle]=handle;
  111. privateState[OSF.DDA.FileProperties.SliceSize]=sliceSize;
  112. var am=OSF.DDA.AsyncMethodNames;
  113. OSF.DDA.DispIdHost.addAsyncMethods(
  114. this, [
  115. am.GetDocumentCopyChunkAsync,
  116. am.ReleaseDocumentCopyAsync
  117. ],
  118. privateState
  119. );
  120. }
  121. OSF.DDA.FileSliceOffset="fileSliceoffset";
  122. OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() {
  123. this._eventDispatches=[];
  124. var am=OSF.DDA.AsyncMethodNames;
  125. OSF.DDA.DispIdHost.addAsyncMethods(this, [
  126. am.AddDataPartAsync,
  127. am.GetDataPartByIdAsync,
  128. am.GetDataPartsByNameSpaceAsync
  129. ]);
  130. };
  131. OSF.DDA.CustomXmlPart=function OSF_DDA_CustomXmlPart(customXmlParts, id, builtIn) {
  132. OSF.OUtil.defineEnumerableProperties(this, {
  133. "builtIn": {
  134. value: builtIn
  135. },
  136. "id": {
  137. value: id
  138. },
  139. "namespaceManager": {
  140. value: new OSF.DDA.CustomXmlPrefixMappings(id)
  141. }
  142. });
  143. var am=OSF.DDA.AsyncMethodNames;
  144. OSF.DDA.DispIdHost.addAsyncMethods(this, [
  145. am.DeleteDataPartAsync,
  146. am.GetPartNodesAsync,
  147. am.GetPartXmlAsync
  148. ]);
  149. var customXmlPartEventDispatches=customXmlParts._eventDispatches;
  150. var dispatch=customXmlPartEventDispatches[id];
  151. if (!dispatch) {
  152. var et=Microsoft.Office.WebExtension.EventType;
  153. dispatch=new OSF.EventDispatch([
  154. et.DataNodeDeleted,
  155. et.DataNodeInserted,
  156. et.DataNodeReplaced
  157. ]);
  158. customXmlPartEventDispatches[id]=dispatch;
  159. }
  160. OSF.DDA.DispIdHost.addEventSupport(this, dispatch);
  161. };
  162. OSF.DDA.CustomXmlPrefixMappings=function OSF_DDA_CustomXmlPrefixMappings(partId) {
  163. var am=OSF.DDA.AsyncMethodNames;
  164. OSF.DDA.DispIdHost.addAsyncMethods(
  165. this,
  166. [
  167. am.AddDataPartNamespaceAsync,
  168. am.GetDataPartNamespaceAsync,
  169. am.GetDataPartPrefixAsync
  170. ],
  171. partId
  172. );
  173. };
  174. OSF.DDA.CustomXmlNode=function OSF_DDA_CustomXmlNode(handle, nodeType, ns, baseName) {
  175. OSF.OUtil.defineEnumerableProperties(this, {
  176. "baseName": {
  177. value: baseName
  178. },
  179. "namespaceUri": {
  180. value: ns
  181. },
  182. "nodeType": {
  183. value: nodeType
  184. }
  185. });
  186. var am=OSF.DDA.AsyncMethodNames;
  187. OSF.DDA.DispIdHost.addAsyncMethods(
  188. this,
  189. [
  190. am.GetRelativeNodesAsync,
  191. am.GetNodeValueAsync,
  192. am.GetNodeXmlAsync,
  193. am.SetNodeValueAsync,
  194. am.SetNodeXmlAsync,
  195. am.GetNodeTextAsync,
  196. am.SetNodeTextAsync
  197. ],
  198. handle
  199. );
  200. };
  201. OSF.DDA.NodeInsertedEventArgs=function OSF_DDA_NodeInsertedEventArgs(newNode, inUndoRedo) {
  202. OSF.OUtil.defineEnumerableProperties(this, {
  203. "type": {
  204. value: Microsoft.Office.WebExtension.EventType.DataNodeInserted
  205. },
  206. "newNode": {
  207. value: newNode
  208. },
  209. "inUndoRedo": {
  210. value: inUndoRedo
  211. }
  212. });
  213. };
  214. OSF.DDA.NodeReplacedEventArgs=function OSF_DDA_NodeReplacedEventArgs(oldNode, newNode, inUndoRedo) {
  215. OSF.OUtil.defineEnumerableProperties(this, {
  216. "type": {
  217. value: Microsoft.Office.WebExtension.EventType.DataNodeReplaced
  218. },
  219. "oldNode": {
  220. value: oldNode
  221. },
  222. "newNode": {
  223. value: newNode
  224. },
  225. "inUndoRedo": {
  226. value: inUndoRedo
  227. }
  228. });
  229. };
  230. OSF.DDA.NodeDeletedEventArgs=function OSF_DDA_NodeDeletedEventArgs(oldNode, oldNextSibling, inUndoRedo) {
  231. OSF.OUtil.defineEnumerableProperties(this, {
  232. "type": {
  233. value: Microsoft.Office.WebExtension.EventType.DataNodeDeleted
  234. },
  235. "oldNode": {
  236. value: oldNode
  237. },
  238. "oldNextSibling": {
  239. value: oldNextSibling
  240. },
  241. "inUndoRedo": {
  242. value: inUndoRedo
  243. }
  244. });
  245. };
  246. OSF.OUtil.setNamespace("SafeArray", OSF.DDA);
  247. OSF.DDA.SafeArray.Response={
  248. Status: 0,
  249. Payload: 1
  250. };
  251. OSF.DDA.SafeArray.UniqueArguments={
  252. Offset: "offset",
  253. Run: "run",
  254. BindingSpecificData: "bindingSpecificData",
  255. MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}"
  256. };
  257. OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray);
  258. OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() {
  259. function _2DVBArrayToJaggedArray(vbArr) {
  260. var ret;
  261. try {
  262. var rows=vbArr.ubound(1);
  263. var cols=vbArr.ubound(2);
  264. vbArr=vbArr.toArray();
  265. if (rows==1 && cols==1) {
  266. ret=[vbArr];
  267. } else {
  268. ret=[];
  269. for (var row=0; row < rows; row++) {
  270. var rowArr=[];
  271. for (var col=0; col < cols; col++) {
  272. var datum=vbArr[row * cols+col];
  273. if (datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) {
  274. rowArr.push(datum);
  275. }
  276. }
  277. if (rowArr.length > 0) {
  278. ret.push(rowArr);
  279. }
  280. }
  281. }
  282. } catch (ex) {
  283. }
  284. return ret;
  285. }
  286. var complexTypes=[
  287. OSF.DDA.PropertyDescriptors.FileProperties,
  288. OSF.DDA.PropertyDescriptors.FileSliceProperties,
  289. OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,
  290. OSF.DDA.PropertyDescriptors.BindingProperties,
  291. OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,
  292. OSF.DDA.SafeArray.UniqueArguments.Offset,
  293. OSF.DDA.SafeArray.UniqueArguments.Run,
  294. OSF.DDA.PropertyDescriptors.Subset,
  295. OSF.DDA.PropertyDescriptors.DataPartProperties,
  296. OSF.DDA.PropertyDescriptors.DataNodeProperties,
  297. OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,
  298. OSF.DDA.EventDescriptors.DataNodeInsertedEvent,
  299. OSF.DDA.EventDescriptors.DataNodeReplacedEvent,
  300. OSF.DDA.EventDescriptors.DataNodeDeletedEvent,
  301. OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,
  302. OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,
  303. OSF.DDA.EventDescriptors.ActiveViewChangedEvent,
  304. OSF.DDA.DataNodeEventProperties.OldNode,
  305. OSF.DDA.DataNodeEventProperties.NewNode,
  306. OSF.DDA.DataNodeEventProperties.NextSiblingNode,
  307. Microsoft.Office.Internal.Parameters.OfficeTheme,
  308. Microsoft.Office.Internal.Parameters.DocumentTheme
  309. ];
  310. var dynamicTypes={};
  311. dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=(function () {
  312. var tableRows=0;
  313. var tableHeaders=1;
  314. return {
  315. toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) {
  316. if (typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) {
  317. var tableData=[];
  318. tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows];
  319. tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders];
  320. data=tableData;
  321. }
  322. return data;
  323. },
  324. fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) {
  325. var ret;
  326. if (hostArgs.toArray) {
  327. var dimensions=hostArgs.dimensions();
  328. if(dimensions===2) {
  329. ret=_2DVBArrayToJaggedArray(hostArgs);
  330. } else {
  331. var array=hostArgs.toArray();
  332. if(array.length===2 && ((array[0] !=null && array[0].toArray) || (array[1] !=null && array[1].toArray))) {
  333. ret={};
  334. ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]);
  335. ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]);
  336. } else {
  337. ret=array;
  338. }
  339. }
  340. } else {
  341. ret=hostArgs;
  342. }
  343. return ret;
  344. }
  345. }
  346. })();
  347. OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes);
  348. this.pack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$pack(param, arg) {
  349. var value;
  350. if (this.isDynamicType(param)) {
  351. value=dynamicTypes[param].toHost(arg);
  352. } else {
  353. value=arg;
  354. }
  355. return value;
  356. };
  357. this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) {
  358. var value;
  359. if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) {
  360. try {
  361. value=arg.toArray();
  362. } catch (ex) {
  363. value=arg || {};
  364. }
  365. } else if (this.isDynamicType(param)) {
  366. value=dynamicTypes[param].fromHost(arg);
  367. } else {
  368. value=arg;
  369. }
  370. return value;
  371. };
  372. this.dynamicTypes=dynamicTypes;
  373. }
  374. OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor);
  375. OSF.DDA.SafeArray.Delegate.ParameterMap=(function () {
  376. var parameterMap=new OSF.DDA.HostParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor());
  377. var ns;
  378. var self=parameterMap.self;
  379. function createObject(properties) {
  380. var obj=null;
  381. if (properties) {
  382. obj={};
  383. var len=properties.length;
  384. for (var i=0; i < len; i++) {
  385. obj[properties[i].name]=properties[i].value;
  386. }
  387. }
  388. return obj;
  389. }
  390. function define(definition) {
  391. var args={};
  392. var toHost=createObject(definition.toHost);
  393. if (definition.invertible) {
  394. args.map=toHost;
  395. }
  396. else if (definition.canonical) {
  397. args.toHost=args.fromHost=toHost;
  398. }
  399. else {
  400. args.toHost=toHost;
  401. args.fromHost=createObject(definition.fromHost);
  402. }
  403. parameterMap.setMapping(definition.type, args);
  404. }
  405. ns=OSF.DDA.FileProperties;
  406. define({
  407. type: OSF.DDA.PropertyDescriptors.FileProperties,
  408. fromHost: [
  409. { name: ns.Handle, value: 0 },
  410. { name: ns.FileSize, value: 1 }
  411. ]
  412. });
  413. define({
  414. type: OSF.DDA.PropertyDescriptors.FileSliceProperties,
  415. fromHost: [
  416. { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 },
  417. { name: ns.SliceSize, value: 1}
  418. ]
  419. });
  420. ns=OSF.DDA.FilePropertiesDescriptor;
  421. define({
  422. type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,
  423. fromHost: [
  424. { name: ns.Url, value: 0 }
  425. ]
  426. });
  427. ns=OSF.DDA.BindingProperties;
  428. define({
  429. type: OSF.DDA.PropertyDescriptors.BindingProperties,
  430. fromHost: [
  431. { name: ns.Id, value: 0 },
  432. { name: ns.Type, value: 1 },
  433. { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 }
  434. ]
  435. });
  436. define({
  437. type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,
  438. fromHost: [
  439. { name: ns.RowCount, value: 0 },
  440. { name: ns.ColumnCount, value: 1 },
  441. { name: ns.HasHeaders, value: 2 }
  442. ]
  443. });
  444. ns=OSF.DDA.SafeArray.UniqueArguments;
  445. define({
  446. type: OSF.DDA.PropertyDescriptors.Subset,
  447. toHost: [
  448. { name: ns.Offset, value: 0 },
  449. { name: ns.Run, value: 1 }
  450. ],
  451. canonical: true
  452. });
  453. ns=Microsoft.Office.WebExtension.Parameters;
  454. define({
  455. type: OSF.DDA.SafeArray.UniqueArguments.Offset,
  456. toHost: [
  457. { name: ns.StartRow, value: 0 },
  458. { name: ns.StartColumn, value: 1 }
  459. ],
  460. canonical: true
  461. });
  462. define({
  463. type: OSF.DDA.SafeArray.UniqueArguments.Run,
  464. toHost: [
  465. { name: ns.RowCount, value: 0 },
  466. { name: ns.ColumnCount, value: 1 }
  467. ],
  468. canonical: true
  469. });
  470. ns=OSF.DDA.DataPartProperties;
  471. define({
  472. type: OSF.DDA.PropertyDescriptors.DataPartProperties,
  473. fromHost: [
  474. { name: ns.Id, value: 0 },
  475. { name: ns.BuiltIn, value: 1 }
  476. ]
  477. });
  478. ns=OSF.DDA.DataNodeProperties;
  479. define({
  480. type: OSF.DDA.PropertyDescriptors.DataNodeProperties,
  481. fromHost: [
  482. { name: ns.Handle, value: 0 },
  483. { name: ns.BaseName, value: 1 },
  484. { name: ns.NamespaceUri, value: 2 },
  485. { name: ns.NodeType, value: 3 }
  486. ]
  487. });
  488. define({
  489. type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,
  490. fromHost: [
  491. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 },
  492. { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 }
  493. ]
  494. });
  495. define({
  496. type: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,
  497. fromHost: [
  498. { name: Microsoft.Office.Internal.Parameters.DocumentTheme, value: self}
  499. ]
  500. })
  501. define({
  502. type: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,
  503. fromHost: [
  504. { name: Microsoft.Office.Internal.Parameters.OfficeTheme, value: self}
  505. ]
  506. })
  507. define({
  508. type: OSF.DDA.EventDescriptors.ActiveViewChangedEvent,
  509. fromHost: [
  510. { name: Microsoft.Office.WebExtension.Parameters.ActiveView, value: 0}
  511. ]
  512. })
  513. ns=OSF.DDA.DataNodeEventProperties;
  514. define({
  515. type: OSF.DDA.EventDescriptors.DataNodeInsertedEvent,
  516. fromHost: [
  517. { name: ns.InUndoRedo, value: 0 },
  518. { name: ns.NewNode, value: 1 }
  519. ]
  520. });
  521. define({
  522. type: OSF.DDA.EventDescriptors.DataNodeReplacedEvent,
  523. fromHost: [
  524. { name: ns.InUndoRedo, value: 0 },
  525. { name: ns.OldNode, value: 1 },
  526. { name: ns.NewNode, value: 2 }
  527. ]
  528. });
  529. define({
  530. type: OSF.DDA.EventDescriptors.DataNodeDeletedEvent,
  531. fromHost: [
  532. { name: ns.InUndoRedo, value: 0 },
  533. { name: ns.OldNode, value: 1 },
  534. { name: ns.NextSiblingNode, value: 2 }
  535. ]
  536. });
  537. define({
  538. type: ns.OldNode,
  539. fromHost: [
  540. { name: OSF.DDA.PropertyDescriptors.DataNodeProperties, value: self }
  541. ]
  542. });
  543. define({
  544. type: ns.NewNode,
  545. fromHost: [
  546. { name: OSF.DDA.PropertyDescriptors.DataNodeProperties, value: self }
  547. ]
  548. });
  549. define({
  550. type: ns.NextSiblingNode,
  551. fromHost: [
  552. { name: OSF.DDA.PropertyDescriptors.DataNodeProperties, value: self }
  553. ]
  554. });
  555. ns=Microsoft.Office.WebExtension.AsyncResultStatus;
  556. define({
  557. type: OSF.DDA.PropertyDescriptors.AsyncResultStatus,
  558. fromHost: [
  559. { name: ns.Succeeded, value: 0 },
  560. { name: ns.Failed, value: 1 }
  561. ]
  562. });
  563. ns=Microsoft.Office.WebExtension.CoercionType;
  564. define({
  565. type: Microsoft.Office.WebExtension.Parameters.CoercionType,
  566. toHost: [
  567. { name: ns.Text, value: 0 },
  568. { name: ns.Matrix, value: 1 },
  569. { name: ns.Table, value: 2 },
  570. { name: ns.Html, value: 3 },
  571. { name: ns.Ooxml, value: 4 },
  572. { name: ns.SlideRange, value:7 },
  573. { name: ns.Image, value:8 }
  574. ]
  575. });
  576. ns=Microsoft.Office.WebExtension.GoToType;
  577. define({
  578. type: Microsoft.Office.WebExtension.Parameters.GoToType,
  579. toHost: [
  580. { name: ns.Binding, value: 0 },
  581. { name: ns.NamedItem, value: 1 },
  582. { name: ns.Slide, value: 2 },
  583. { name: ns.Index, value: 3 }
  584. ]
  585. });
  586. ns=Microsoft.Office.WebExtension.FileType;
  587. if (ns) {
  588. define({
  589. type: Microsoft.Office.WebExtension.Parameters.FileType,
  590. toHost: [
  591. { name: ns.Text, value: 0 },
  592. { name: ns.Compressed, value: 5 },
  593. { name: ns.Pdf, value: 6 }
  594. ]
  595. });
  596. }
  597. ns=Microsoft.Office.WebExtension.BindingType;
  598. if (ns) {
  599. define({
  600. type: Microsoft.Office.WebExtension.Parameters.BindingType,
  601. toHost: [
  602. { name: ns.Text, value: 0 },
  603. { name: ns.Matrix, value: 1 },
  604. { name: ns.Table, value: 2 }
  605. ],
  606. invertible: true
  607. });
  608. }
  609. ns=Microsoft.Office.WebExtension.ValueFormat;
  610. define({
  611. type: Microsoft.Office.WebExtension.Parameters.ValueFormat,
  612. toHost: [
  613. { name: ns.Unformatted, value: 0 },
  614. { name: ns.Formatted, value: 1 }
  615. ]
  616. });
  617. ns=Microsoft.Office.WebExtension.FilterType;
  618. define({
  619. type: Microsoft.Office.WebExtension.Parameters.FilterType,
  620. toHost: [
  621. { name: ns.All, value: 0 },
  622. { name: ns.OnlyVisible, value: 1 }
  623. ]
  624. });
  625. ns=Microsoft.Office.Internal.OfficeTheme;
  626. if (ns) {
  627. define({
  628. type:Microsoft.Office.Internal.Parameters.OfficeTheme,
  629. fromHost: [
  630. {name: ns.PrimaryFontColor, value: 0},
  631. {name: ns.PrimaryBackgroundColor, value: 1},
  632. {name: ns.SecondaryFontColor, value:2},
  633. {name: ns.SecondaryBackgroundColor, value:3}
  634. ]
  635. })
  636. }
  637. ns=Microsoft.Office.WebExtension.ActiveView;
  638. if (ns) {
  639. define({
  640. type:Microsoft.Office.WebExtension.Parameters.ActiveView,
  641. fromHost: [
  642. {name: 0, value: ns.Read},
  643. {name: 1, value: ns.Edit}
  644. ]
  645. })
  646. }
  647. ns=Microsoft.Office.Internal.DocumentTheme;
  648. if (ns) {
  649. define({
  650. type:Microsoft.Office.Internal.Parameters.DocumentTheme,
  651. fromHost: [
  652. {name: ns.PrimaryBackgroundColor, value: 0},
  653. {name: ns.PrimaryFontColor, value: 1},
  654. {name: ns.SecondaryBackgroundColor, value: 2},
  655. {name: ns.SecondaryFontColor, value: 3},
  656. {name: ns.Accent1, value: 4},
  657. {name: ns.Accent2, value: 5},
  658. {name: ns.Accent3, value: 6},
  659. {name: ns.Accent4, value: 7},
  660. {name: ns.Accent5, value: 8},
  661. {name: ns.Accent6, value: 9},
  662. {name: ns.Hyperlink, value: 10},
  663. {name: ns.FollowedHyperlink, value: 11},
  664. {name: ns.HeaderLatinFont, value: 12},
  665. {name: ns.HeaderEastAsianFont, value: 13},
  666. {name: ns.HeaderScriptFont, value: 14},
  667. {name: ns.HeaderLocalizedFont, value: 15},
  668. {name: ns.BodyLatinFont, value: 16},
  669. {name: ns.BodyEastAsianFont, value: 17},
  670. {name: ns.BodyScriptFont, value: 18},
  671. {name: ns.BodyLocalizedFont, value: 19}
  672. ]
  673. })
  674. }
  675. ns=Microsoft.Office.WebExtension.SelectionMode;
  676. define({
  677. type: Microsoft.Office.WebExtension.Parameters.SelectionMode,
  678. toHost: [
  679. { name: ns.Default, value: 0 },
  680. { name: ns.Selected, value: 1 },
  681. { name: ns.None, value: 2 },
  682. ]
  683. });
  684. ns=Microsoft.Office.WebExtension.Parameters;
  685. var cns=OSF.DDA.MethodDispId;
  686. define({
  687. type: cns.dispidNavigateToMethod,
  688. toHost: [
  689. { name: ns.Id, value: 0 },
  690. { name: ns.GoToType, value: 1 },
  691. { name: ns.SelectionMode, value: 2 }
  692. ]
  693. });
  694. define({
  695. type: cns.dispidGetSelectedDataMethod,
  696. fromHost: [
  697. { name: ns.Data, value: self }
  698. ],
  699. toHost: [
  700. { name: ns.CoercionType, value: 0 },
  701. { name: ns.ValueFormat, value: 1 },
  702. { name: ns.FilterType, value: 2 }
  703. ]
  704. });
  705. define({
  706. type: cns.dispidSetSelectedDataMethod,
  707. toHost: [
  708. { name: ns.CoercionType, value: 0 },
  709. { name: ns.Data, value: 1 },
  710. { name: ns.ImageLeft, value: 2 },
  711. { name: ns.ImageTop, value: 3 },
  712. { name: ns.ImageWidth, value: 4 },
  713. { name: ns.ImageHeight, value: 5 }
  714. ]
  715. });
  716. define({
  717. type: cns.dispidGetFilePropertiesMethod,
  718. fromHost: [
  719. { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: self }
  720. ]
  721. });
  722. define({
  723. type: cns.dispidGetDocumentCopyMethod,
  724. toHost: [{ name: ns.FileType, value: 0}],
  725. fromHost: [
  726. { name: OSF.DDA.PropertyDescriptors.FileProperties, value: self }
  727. ]
  728. });
  729. define({
  730. type: cns.dispidGetDocumentCopyChunkMethod,
  731. toHost: [
  732. { name: OSF.DDA.FileProperties.Handle, value: 0 },
  733. { name: OSF.DDA.FileSliceOffset, value: 1 },
  734. { name: OSF.DDA.FileProperties.SliceSize, value: 2 }
  735. ],
  736. fromHost: [
  737. { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: self }
  738. ]
  739. });
  740. define({
  741. type: cns.dispidReleaseDocumentCopyMethod,
  742. toHost: [{ name: OSF.DDA.FileProperties.Handle, value: 0}]
  743. });
  744. define({
  745. type: cns.dispidAddBindingFromSelectionMethod,
  746. fromHost: [
  747. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  748. ],
  749. toHost: [
  750. { name: ns.Id, value: 0 },
  751. { name: ns.BindingType, value: 1 }
  752. ]
  753. });
  754. define({
  755. type: cns.dispidAddBindingFromPromptMethod,
  756. fromHost: [
  757. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  758. ],
  759. toHost: [
  760. { name: ns.Id, value: 0 },
  761. { name: ns.BindingType, value: 1 },
  762. { name: ns.PromptText, value: 2 }
  763. ]
  764. });
  765. define({
  766. type: cns.dispidAddBindingFromNamedItemMethod,
  767. fromHost: [
  768. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  769. ],
  770. toHost: [
  771. { name: ns.ItemName, value: 0 },
  772. { name: ns.Id, value: 1 },
  773. { name: ns.BindingType, value: 2 },
  774. { name: ns.FailOnCollision, value: 3 }
  775. ]
  776. });
  777. define({
  778. type: cns.dispidReleaseBindingMethod,
  779. toHost: [
  780. { name: ns.Id, value: 0 }
  781. ]
  782. });
  783. define({
  784. type: cns.dispidGetBindingMethod,
  785. fromHost: [
  786. { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self }
  787. ],
  788. toHost: [
  789. { name: ns.Id, value: 0 }
  790. ]
  791. });
  792. define({
  793. type: cns.dispidGetAllBindingsMethod,
  794. fromHost: [
  795. { name: OSF.DDA.ListDescriptors.BindingList, value: self }
  796. ]
  797. });
  798. define({
  799. type: cns.dispidGetBindingDataMethod,
  800. fromHost: [
  801. { name: ns.Data, value: self }
  802. ],
  803. toHost: [
  804. { name: ns.Id, value: 0 },
  805. { name: ns.CoercionType, value: 1 },
  806. { name: ns.ValueFormat, value: 2 },
  807. { name: ns.FilterType, value: 3 },
  808. { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 }
  809. ]
  810. });
  811. define({
  812. type: cns.dispidSetBindingDataMethod,
  813. toHost: [
  814. { name: ns.Id, value: 0 },
  815. { name: ns.CoercionType, value: 1 },
  816. { name: ns.Data, value: 2 },
  817. { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }
  818. ]
  819. });
  820. define({
  821. type: cns.dispidAddRowsMethod,
  822. toHost: [
  823. { name: ns.Id, value: 0 },
  824. { name: ns.Data, value: 1 }
  825. ]
  826. });
  827. define({
  828. type: cns.dispidAddColumnsMethod,
  829. toHost: [
  830. { name: ns.Id, value: 0 },
  831. { name: ns.Data, value: 1 }
  832. ]
  833. });
  834. define({
  835. type: cns.dispidClearAllRowsMethod,
  836. toHost: [
  837. { name: ns.Id, value: 0 }
  838. ]
  839. });
  840. define({
  841. type: cns.dispidClearFormatsMethod,
  842. toHost: [
  843. { name: ns.Id, value: 0 }
  844. ]
  845. });
  846. define({
  847. type: cns.dispidSetTableOptionsMethod,
  848. toHost: [
  849. { name: ns.Id, value: 0 },
  850. { name: ns.TableOptions, value: 1 },
  851. ]
  852. });
  853. define({
  854. type: cns.dispidSetFormatsMethod,
  855. toHost: [
  856. { name: ns.Id, value: 0 },
  857. { name: ns.CellFormat, value: 1 },
  858. ]
  859. });
  860. define({
  861. type: cns.dispidLoadSettingsMethod,
  862. fromHost: [
  863. { name: OSF.DDA.SettingsManager.SerializedSettings, value: self }
  864. ]
  865. });
  866. define({
  867. type: cns.dispidSaveSettingsMethod,
  868. toHost: [
  869. { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings },
  870. { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale }
  871. ]
  872. });
  873. define({
  874. type: OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod,
  875. fromHost: [
  876. { name: Microsoft.Office.Internal.Parameters.OfficeTheme, value: self }
  877. ]
  878. });
  879. define({
  880. type: OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod,
  881. fromHost: [
  882. { name: Microsoft.Office.Internal.Parameters.DocumentTheme, value: self }
  883. ]
  884. });
  885. define({
  886. type: OSF.DDA.MethodDispId.dispidGetActiveViewMethod,
  887. fromHost: [
  888. { name: Microsoft.Office.WebExtension.Parameters.ActiveView, value: self }
  889. ]
  890. });
  891. define({
  892. type: cns.dispidAddDataPartMethod,
  893. fromHost: [
  894. { name: OSF.DDA.PropertyDescriptors.DataPartProperties, value: self }
  895. ],
  896. toHost: [
  897. { name: ns.Xml, value: 0 }
  898. ]
  899. });
  900. define({
  901. type: cns.dispidGetDataPartByIdMethod,
  902. fromHost: [
  903. { name: OSF.DDA.PropertyDescriptors.DataPartProperties, value: self }
  904. ],
  905. toHost: [
  906. { name: ns.Id, value: 0 }
  907. ]
  908. });
  909. define({
  910. type: cns.dispidGetDataPartsByNamespaceMethod,
  911. fromHost: [
  912. { name: OSF.DDA.ListDescriptors.DataPartList, value: self }
  913. ],
  914. toHost: [
  915. { name: ns.Namespace, value: 0 }
  916. ]
  917. });
  918. define({
  919. type: cns.dispidGetDataPartXmlMethod,
  920. fromHost: [
  921. { name: ns.Data, value: self}
  922. ],
  923. toHost: [
  924. { name: ns.Id, value: 0 }
  925. ]
  926. });
  927. define({
  928. type: cns.dispidGetDataPartNodesMethod,
  929. fromHost: [
  930. { name: OSF.DDA.ListDescriptors.DataNodeList, value: self }
  931. ],
  932. toHost: [
  933. { name: ns.Id, value: 0 },
  934. { name: ns.XPath, value: 1 }
  935. ]
  936. });
  937. define({
  938. type: cns.dispidDeleteDataPartMethod,
  939. toHost: [
  940. { name: ns.Id, value: 0 }
  941. ]
  942. });
  943. define({
  944. type: cns.dispidGetDataNodeValueMethod,
  945. fromHost: [
  946. { name: ns.Data, value: self}
  947. ],
  948. toHost: [
  949. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 }
  950. ]
  951. });
  952. define({
  953. type: cns.dispidGetDataNodeXmlMethod,
  954. fromHost: [
  955. { name: ns.Data, value: self}
  956. ],
  957. toHost: [
  958. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 }
  959. ]
  960. });
  961. define({
  962. type: cns.dispidGetDataNodesMethod,
  963. fromHost: [
  964. { name: OSF.DDA.ListDescriptors.DataNodeList, value: self }
  965. ],
  966. toHost: [
  967. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  968. { name: ns.XPath, value: 1 }
  969. ]
  970. });
  971. define({
  972. type: cns.dispidSetDataNodeValueMethod,
  973. toHost: [
  974. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  975. { name: ns.Data, value: 1 }
  976. ]
  977. });
  978. define({
  979. type: cns.dispidSetDataNodeXmlMethod,
  980. toHost: [
  981. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  982. { name: ns.Xml, value: 1 }
  983. ]
  984. });
  985. define({
  986. type: cns.dispidAddDataNamespaceMethod,
  987. toHost: [
  988. { name: OSF.DDA.DataPartProperties.Id, value: 0 },
  989. { name: ns.Prefix, value: 1 },
  990. { name: ns.Namespace, value: 2 }
  991. ]
  992. });
  993. define({
  994. type: cns.dispidGetDataUriByPrefixMethod,
  995. fromHost: [
  996. { name: ns.Data, value: self}
  997. ],
  998. toHost: [
  999. { name: OSF.DDA.DataPartProperties.Id, value: 0 },
  1000. { name: ns.Prefix, value: 1 }
  1001. ]
  1002. });
  1003. define({
  1004. type: cns.dispidGetDataPrefixByUriMethod,
  1005. fromHost: [
  1006. { name: ns.Data, value: self}
  1007. ],
  1008. toHost: [
  1009. { name: OSF.DDA.DataPartProperties.Id, value: 0 },
  1010. { name: ns.Namespace, value: 1 }
  1011. ]
  1012. });
  1013. define({
  1014. type: cns.dispidGetDataNodeTextMethod,
  1015. fromHost: [
  1016. { name: ns.Data, value: self}
  1017. ],
  1018. toHost: [
  1019. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 }
  1020. ]
  1021. });
  1022. define({
  1023. type: cns.dispidSetDataNodeTextMethod,
  1024. toHost: [
  1025. { name: OSF.DDA.DataNodeProperties.Handle, value: 0 },
  1026. { name: ns.Text, value: 1 }
  1027. ]
  1028. });
  1029. define({
  1030. type: cns.dispidGetSelectedTaskMethod,
  1031. fromHost: [
  1032. { name: ns.TaskId, value: self }
  1033. ]
  1034. });
  1035. define({
  1036. type: cns.dispidGetTaskMethod,
  1037. fromHost: [
  1038. { name: "taskName", value: 0 },
  1039. { name: "wssTaskId", value: 1 },
  1040. { name: "resourceNames", value: 2 }
  1041. ],
  1042. toHost: [
  1043. { name: ns.TaskId, value: 0 }
  1044. ]
  1045. });
  1046. define({
  1047. type: cns.dispidGetTaskFieldMethod,
  1048. fromHost: [
  1049. { name: ns.FieldValue, value: self }
  1050. ],
  1051. toHost: [
  1052. { name: ns.TaskId, value: 0 },
  1053. { name: ns.FieldId, value: 1 },
  1054. { name: ns.GetRawValue, value: 2 }
  1055. ]
  1056. });
  1057. define({
  1058. type: cns.dispidGetWSSUrlMethod,
  1059. fromHost: [
  1060. { name: ns.ServerUrl, value: 0 },
  1061. { name: ns.ListName, value: 1 }
  1062. ]
  1063. });
  1064. define({
  1065. type: cns.dispidGetSelectedResourceMethod,
  1066. fromHost: [
  1067. { name: ns.ResourceId, value: self }
  1068. ]
  1069. });
  1070. define({
  1071. type: cns.dispidGetResourceFieldMethod,
  1072. fromHost: [
  1073. { name: ns.FieldValue, value: self }
  1074. ],
  1075. toHost: [
  1076. { name: ns.ResourceId, value: 0 },
  1077. { name: ns.FieldId, value: 1 },
  1078. { name: ns.GetRawValue, value: 2 }
  1079. ]
  1080. });
  1081. define({
  1082. type: cns.dispidGetProjectFieldMethod,
  1083. fromHost: [
  1084. { name: ns.FieldValue, value: self }
  1085. ],
  1086. toHost: [
  1087. { name: ns.FieldId, value: 0 },
  1088. { name: ns.GetRawValue, value: 1 }
  1089. ]
  1090. });
  1091. define({
  1092. type: cns.dispidGetSelectedViewMethod,
  1093. fromHost: [
  1094. { name: ns.ViewType, value: 0 },
  1095. { name: ns.ViewName, value: 1 }
  1096. ]
  1097. });
  1098. cns=OSF.DDA.EventDispId
  1099. define({ type: cns.dispidDocumentSelectionChangedEvent });
  1100. define({
  1101. type: cns.dispidBindingSelectionChangedEvent,
  1102. fromHost: [
  1103. {name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: self}
  1104. ]
  1105. });
  1106. define({
  1107. type: cns.dispidBindingDataChangedEvent,
  1108. fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: self}]
  1109. });
  1110. define({ type: cns.dispidSettingsChangedEvent });
  1111. define({
  1112. type: cns.dispidDocumentThemeChangedEvent,
  1113. fromHost: [
  1114. {name: OSF.DDA.EventDescriptors.DocumentThemeChangedEvent, value: self}
  1115. ]
  1116. });
  1117. define({
  1118. type: cns.dispidOfficeThemeChangedEvent,
  1119. fromHost: [
  1120. {name: OSF.DDA.EventDescriptors.OfficeThemeChangedEvent, value: self}
  1121. ]
  1122. });
  1123. define({
  1124. type: cns.dispidActiveViewChangedEvent,
  1125. fromHost: [{ name: OSF.DDA.EventDescriptors.ActiveViewChangedEvent, value: self}]
  1126. });
  1127. define({
  1128. type: cns.dispidDataNodeAddedEvent,
  1129. fromHost: [{ name: OSF.DDA.EventDescriptors.DataNodeInsertedEvent, value: self}]
  1130. });
  1131. define({
  1132. type: cns.dispidDataNodeReplacedEvent,
  1133. fromHost: [{ name: OSF.DDA.EventDescriptors.DataNodeReplacedEvent, value: self}]
  1134. });
  1135. define({
  1136. type: cns.dispidDataNodeDeletedEvent,
  1137. fromHost: [{ name: OSF.DDA.EventDescriptors.DataNodeDeletedEvent, value: self}]
  1138. });
  1139. define({ type: cns.dispidTaskSelectionChangedEvent });
  1140. define({ type: cns.dispidResourceSelectionChangedEvent });
  1141. define({ type: cns.dispidViewSelectionChangedEvent });
  1142. parameterMap.define=define;
  1143. return parameterMap;
  1144. })();
  1145. OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) {
  1146. var status;
  1147. var number=ex.number;
  1148. if (number) {
  1149. switch (number) {
  1150. case -2146828218:
  1151. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;
  1152. break;
  1153. case -2146827850:
  1154. default:
  1155. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  1156. break;
  1157. }
  1158. }
  1159. if (args.onComplete) {
  1160. args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);
  1161. }
  1162. }
  1163. OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) {
  1164. try {
  1165. if (args.onCalling) {
  1166. args.onCalling();
  1167. }
  1168. function toArray(args) {
  1169. var arrArgs=args;
  1170. if (OSF.OUtil.isArray(args)) {
  1171. var len=arrArgs.length;
  1172. for (var i=0; i < len; i++) {
  1173. arrArgs[i]=toArray(arrArgs[i]);
  1174. }
  1175. } else if (OSF.OUtil.isDate(args)) {
  1176. arrArgs=args.getVarDate();
  1177. } else if (typeof args==="object" && !OSF.OUtil.isArray(args)) {
  1178. arrArgs=[];
  1179. for (var index in args) {
  1180. if (!OSF.OUtil.isFunction(args[index])) {
  1181. arrArgs[index]=toArray(args[index]);
  1182. }
  1183. }
  1184. }
  1185. return arrArgs;
  1186. }
  1187. var startTime=(new Date()).getTime();
  1188. window.external.Execute(
  1189. args.dispId,
  1190. toArray(args.hostCallArgs),
  1191. function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs) {
  1192. if (args.onReceiving) {
  1193. args.onReceiving();
  1194. }
  1195. var result=hostResponseArgs.toArray();
  1196. var status=result[OSF.DDA.SafeArray.Response.Status];
  1197. if (args.onComplete) {
  1198. var payload;
  1199. if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) {
  1200. if (result.length > 2) {
  1201. payload=[];
  1202. for (var i=1; i < result.length; i++)
  1203. payload[i - 1]=result[i];
  1204. }
  1205. else {
  1206. payload=result[OSF.DDA.SafeArray.Response.Payload];
  1207. }
  1208. }
  1209. else {
  1210. payload=result[OSF.DDA.SafeArray.Response.Payload];
  1211. }
  1212. args.onComplete(status, payload);
  1213. }
  1214. if (OSF.AppTelemetry) {
  1215. OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status);
  1216. }
  1217. }
  1218. );
  1219. }
  1220. catch (ex) {
  1221. OSF.DDA.SafeArray.Delegate._onException(ex, args);
  1222. }
  1223. };
  1224. OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) {
  1225. var startTime=(new Date()).getTime();
  1226. return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) {
  1227. if (args.onReceiving) {
  1228. args.onReceiving();
  1229. }
  1230. var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs;
  1231. if (args.onComplete) {
  1232. args.onComplete(status)
  1233. }
  1234. if (OSF.AppTelemetry) {
  1235. OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status);
  1236. }
  1237. }
  1238. }
  1239. OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) {
  1240. if (args.onCalling) {
  1241. args.onCalling();
  1242. }
  1243. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args);
  1244. try {
  1245. window.external.RegisterEvent(
  1246. args.dispId,
  1247. args.targetId,
  1248. function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) {
  1249. if (args.onEvent) {
  1250. args.onEvent(payload);
  1251. }
  1252. if (OSF.AppTelemetry) {
  1253. OSF.AppTelemetry.onEventDone(args.dispId);
  1254. }
  1255. },
  1256. callback
  1257. );
  1258. }
  1259. catch (ex) {
  1260. OSF.DDA.SafeArray.Delegate._onException(ex, args);
  1261. }
  1262. };
  1263. OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) {
  1264. if (args.onCalling) {
  1265. args.onCalling();
  1266. }
  1267. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args);
  1268. try {
  1269. window.external.UnregisterEvent(
  1270. args.dispId,
  1271. args.targetId,
  1272. callback
  1273. );
  1274. }
  1275. catch (ex) {
  1276. OSF.DDA.SafeArray.Delegate._onException(ex, args);
  1277. }
  1278. };
  1279. delete Microsoft.Office.WebExtension.FileType;
  1280. OSF.DDA.ExcelDocument=function OSF_DDA_ExcelDocument(officeAppContext, settings) {
  1281. var bf=new OSF.DDA.BindingFacade(this);
  1282. OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);
  1283. OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);
  1284. OSF.DDA.ExcelDocument.uber.constructor.call(this,
  1285. officeAppContext,
  1286. bf,
  1287. settings
  1288. );
  1289. OSF.DDA.DispIdHost.addAsyncMethods(this, [
  1290. OSF.DDA.AsyncMethodNames.GoToByIdAsync
  1291. ]);
  1292. OSF.OUtil.finalizeProperties(this);
  1293. };
  1294. OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument);
  1295. OSF.DDA.ExcelTableBinding=function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) {
  1296. var am=OSF.DDA.AsyncMethodNames;
  1297. OSF.DDA.DispIdHost.addAsyncMethods(this, [
  1298. am.ClearFormatsAsync,
  1299. am.SetTableOptionsAsync,
  1300. am.SetFormatsAsync
  1301. ]);
  1302. OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders);
  1303. OSF.OUtil.finalizeProperties(this);
  1304. };
  1305. OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding);
  1306. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  1307. type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,
  1308. toHost: [
  1309. { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 },
  1310. { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 },
  1311. { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 },
  1312. { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 },
  1313. { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 },
  1314. { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 },
  1315. { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 },
  1316. { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }
  1317. ]
  1318. });
  1319. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  1320. type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod,
  1321. toHost: [
  1322. { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 },
  1323. { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 },
  1324. { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 },
  1325. { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 },
  1326. { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 },
  1327. { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 }
  1328. ]
  1329. });
  1330. Microsoft.Office.WebExtension.Table={
  1331. All : 0,
  1332. Data : 1,
  1333. Headers : 2
  1334. };
  1335. (function (){
  1336. var tableOptionProperties={
  1337. headerRow : 0,
  1338. bandedRows : 1,
  1339. firstColumn : 2,
  1340. lastColumn : 3,
  1341. bandedColumns : 4,
  1342. filterButton : 5,
  1343. style : 6,
  1344. totalRow : 7
  1345. };
  1346. var cellProperties={
  1347. row : 0,
  1348. column : 1
  1349. };
  1350. var formatProperties={
  1351. alignHorizontal : {text:"alignHorizontal", type:1},
  1352. alignVertical : {text:"alignVertical", type:2},
  1353. backgroundColor : {text:"backgroundColor", type:101},
  1354. borderStyle : {text:"borderStyle", type:201},
  1355. borderColor : {text:"borderColor", type:202},
  1356. borderTopStyle : {text:"borderTopStyle", type:203},
  1357. borderTopColor : {text:"borderTopColor", type:204},
  1358. borderBottomStyle : {text:"borderBottomStyle", type:205},
  1359. borderBottomColor : {text:"borderBottomColor", type:206},
  1360. borderLeftStyle : {text:"borderLeftStyle", type:207},
  1361. borderLeftColor : {text:"borderLeftColor", type:208},
  1362. borderRightStyle : {text:"borderRightStyle", type:209},
  1363. borderRightColor : {text:"borderRightColor", type:210},
  1364. borderOutlineStyle : {text:"borderOutlineStyle", type:211},
  1365. borderOutlineColor : {text:"borderOutlineColor", type:212},
  1366. borderInlineStyle : {text:"borderInlineStyle", type:213},
  1367. borderInlineColor : {text:"borderInlineColor", type:214},
  1368. fontFamily : {text:"fontFamily", type:301},
  1369. fontStyle : {text:"fontStyle", type:302},
  1370. fontSize : {text:"fontSize", type:303},
  1371. fontUnderlineStyle : {text:"fontUnderlineStyle", type:304},
  1372. fontColor : {text:"fontColor", type:305},
  1373. fontDirection : {text:"fontDirection", type:306},
  1374. fontStrikethrough : {text:"fontStrikethrough", type:307},
  1375. fontSuperscript : {text:"fontSuperscript", type:308},
  1376. fontSubscript : {text:"fontSubscript", type:309},
  1377. fontNormal : {text:"fontNormal", type:310},
  1378. indentLeft : {text:"indentLeft", type:401},
  1379. indentRight : {text:"indentRight", type:402},
  1380. numberFormat: {text:"numberFormat", type:501},
  1381. width : {text:"width", type:701},
  1382. height : {text:"height", type:702},
  1383. wrapping : {text:"wrapping", type:703}
  1384. };
  1385. var borderStyleSet=[
  1386. {name:"none", value: 0},
  1387. {name:"thin", value: 1},
  1388. {name:"medium", value: 2},
  1389. {name:"dashed", value: 3},
  1390. {name:"dotted", value: 4},
  1391. {name:"thick", value: 5},
  1392. {name:"double", value: 6},
  1393. {name:"hair", value: 7},
  1394. {name:"medium dashed", value: 8},
  1395. {name:"dash dot", value: 9},
  1396. {name:"medium dash dot", value: 10},
  1397. {name:"dash dot dot", value: 11},
  1398. {name:"medium dash dot dot", value: 12},
  1399. {name:"slant dash dot", value: 13},
  1400. ];
  1401. var colorSet=[
  1402. {name: "none", value: 0},
  1403. {name: "black", value: 1},
  1404. {name: "blue", value: 2},
  1405. {name: "gray", value: 3},
  1406. {name: "green", value: 4},
  1407. {name: "orange", value: 5},
  1408. {name: "pink", value: 6},
  1409. {name: "purple", value: 7},
  1410. {name: "red", value: 8},
  1411. {name: "teal", value: 9},
  1412. {name: "turquoise", value: 10},
  1413. {name: "violet", value: 11},
  1414. {name: "white", value: 12},
  1415. {name: "yellow", value: 13},
  1416. {name: "automatic", value: 14},
  1417. ];
  1418. var ns=OSF.DDA.SafeArray.Delegate.ParameterMap;
  1419. ns.define({
  1420. type: formatProperties.alignHorizontal.text,
  1421. toHost: [
  1422. {name: "general", value: 0},
  1423. {name: "left", value: 1},
  1424. {name: "center", value: 2},
  1425. {name: "right", value: 3},
  1426. {name: "fill", value: 4},
  1427. {name: "justify", value: 5},
  1428. {name: "center across selection", value: 6},
  1429. {name: "distributed", value: 7},
  1430. ]});
  1431. ns.define({
  1432. type: formatProperties.alignVertical.text,
  1433. toHost: [
  1434. {name: "top", value: 0},
  1435. {name: "center", value: 1},
  1436. {name: "bottom", value: 2},
  1437. {name: "justify", value: 3},
  1438. {name: "distributed", value: 4},
  1439. ]});
  1440. ns.define({
  1441. type: formatProperties.backgroundColor.text,
  1442. toHost: colorSet
  1443. });
  1444. ns.define({
  1445. type: formatProperties.borderStyle.text,
  1446. toHost: borderStyleSet
  1447. });
  1448. ns.define({
  1449. type: formatProperties.borderColor.text,
  1450. toHost: colorSet
  1451. });
  1452. ns.define({
  1453. type: formatProperties.borderTopStyle.text,
  1454. toHost: borderStyleSet
  1455. });
  1456. ns.define({
  1457. type: formatProperties.borderTopColor.text,
  1458. toHost: colorSet
  1459. });
  1460. ns.define({
  1461. type: formatProperties.borderBottomStyle.text,
  1462. toHost: borderStyleSet
  1463. });
  1464. ns.define({
  1465. type: formatProperties.borderBottomColor.text,
  1466. toHost: colorSet
  1467. });
  1468. ns.define({
  1469. type: formatProperties.borderLeftStyle.text,
  1470. toHost: borderStyleSet
  1471. });
  1472. ns.define({
  1473. type: formatProperties.borderLeftColor.text,
  1474. toHost: colorSet
  1475. });
  1476. ns.define({
  1477. type: formatProperties.borderRightStyle.text,
  1478. toHost: borderStyleSet
  1479. });
  1480. ns.define({
  1481. type: formatProperties.borderRightColor.text,
  1482. toHost: colorSet
  1483. });
  1484. ns.define({
  1485. type: formatProperties.borderOutlineStyle.text,
  1486. toHost: borderStyleSet
  1487. });
  1488. ns.define({
  1489. type: formatProperties.borderOutlineColor.text,
  1490. toHost: colorSet
  1491. });
  1492. ns.define({
  1493. type: formatProperties.borderInlineStyle.text,
  1494. toHost: borderStyleSet
  1495. });
  1496. ns.define({
  1497. type: formatProperties.borderInlineColor.text,
  1498. toHost: colorSet
  1499. });
  1500. ns.define({
  1501. type: formatProperties.fontStyle.text,
  1502. toHost: [
  1503. {name: "regular", value: 0},
  1504. {name: "italic", value: 1},
  1505. {name: "bold", value: 2},
  1506. {name: "bold italic", value: 3},
  1507. ]});
  1508. ns.define({
  1509. type: formatProperties.fontUnderlineStyle.text,
  1510. toHost: [
  1511. {name: "none", value: 0},
  1512. {name: "single", value: 1},
  1513. {name: "double", value: 2},
  1514. {name: "single accounting", value: 3},
  1515. {name: "double accounting", value: 4},
  1516. ]});
  1517. ns.define({
  1518. type: formatProperties.fontColor.text,
  1519. toHost: colorSet
  1520. });
  1521. ns.define({
  1522. type: formatProperties.fontDirection.text,
  1523. toHost: [
  1524. {name: "context", value: 0},
  1525. {name: "left-to-right", value: 1},
  1526. {name: "right-to-left", value: 2},
  1527. ]});
  1528. ns.define({
  1529. type: formatProperties.width.text,
  1530. toHost: [
  1531. {name: "auto fit", value: -1},
  1532. ]});
  1533. ns.define({
  1534. type: formatProperties.height.text,
  1535. toHost: [
  1536. {name: "auto fit", value: -1},
  1537. ]});
  1538. ns.define({
  1539. type: Microsoft.Office.WebExtension.Parameters.TableOptions,
  1540. toHost: [
  1541. {name: "headerRow", value: 0 },
  1542. {name: "bandedRows", value: 1 },
  1543. {name: "firstColumn", value: 2 },
  1544. {name: "lastColumn", value: 3 },
  1545. {name: "bandedColumns", value: 4 },
  1546. {name: "filterButton", value: 5 },
  1547. {name: "style", value: 6 },
  1548. {name: "totalRow", value: 7 }
  1549. ]});
  1550. ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={
  1551. toHost: function (data) {
  1552. for (entry in data) {
  1553. if (data[entry].format) {
  1554. data[entry].format=ns.mapValues(data[entry].format, "toHost");
  1555. }
  1556. }
  1557. return data;
  1558. },
  1559. fromHost: function (args) {
  1560. return args;
  1561. }
  1562. }
  1563. ns.specialProcessorDynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]=(function () {
  1564. return {
  1565. toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) {
  1566. var textCells="cells";
  1567. var textFormat="format";
  1568. var posCells=0;
  1569. var posFormat=1;
  1570. var ret=[];
  1571. for (index in cellFormats) {
  1572. var cfOld=cellFormats[index];
  1573. var cfNew=[];
  1574. if (cfOld[textCells] !=='undefined') {
  1575. var cellsOld=cfOld[textCells];
  1576. var cellsNew;
  1577. if (typeof cfOld[textCells]==="object") {
  1578. cellsNew=[];
  1579. for (entry in cellsOld) {
  1580. if (typeof(cellProperties[entry])!=='undefined') {
  1581. cellsNew[cellProperties[entry]]=cellsOld[entry];
  1582. }
  1583. }
  1584. } else {
  1585. cellsNew=cellsOld;
  1586. }
  1587. cfNew[posCells]=cellsNew;
  1588. }
  1589. if (cfOld[textFormat]) {
  1590. var formatOld=cfOld[textFormat];
  1591. var formatNew=[];
  1592. for (entry in formatOld) {
  1593. if (typeof(formatProperties[entry])!=='undefined') {
  1594. formatNew.push([formatProperties[entry].type, formatOld[entry]]);
  1595. }
  1596. }
  1597. cfNew[posFormat]=formatNew;
  1598. }
  1599. ret[index]=cfNew;
  1600. }
  1601. return ret;
  1602. },
  1603. fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) {
  1604. return hostArgs;
  1605. }
  1606. }
  1607. })();
  1608. ns.specialProcessorDynamicTypes[Microsoft.Office.WebExtension.Parameters.TableOptions]=(function () {
  1609. return {
  1610. toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) {
  1611. var ret=[];
  1612. for (entry in tableOptions) {
  1613. if (tableOptionProperties[entry]!=undefined){
  1614. ret[tableOptionProperties[entry]]=tableOptions[entry];
  1615. }
  1616. }
  1617. return ret;
  1618. },
  1619. fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) {
  1620. return hostArgs;
  1621. }
  1622. }
  1623. })();
  1624. OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.SetSelectedDataAsync.id]=OSF.DDA.AsyncMethodCallFactory.manufacture({
  1625. method : OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,
  1626. requiredArguments : [
  1627. {
  1628. "name": Microsoft.Office.WebExtension.Parameters.Data,
  1629. "types": ["string", "object", "number", "boolean"]
  1630. }
  1631. ],
  1632. supportedOptions : [
  1633. {
  1634. name : Microsoft.Office.WebExtension.Parameters.CoercionType,
  1635. value : {
  1636. "enum": Microsoft.Office.WebExtension.CoercionType,
  1637. "calculate": function(requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); }
  1638. }
  1639. },
  1640. {
  1641. name: Microsoft.Office.WebExtension.Parameters.CellFormat,
  1642. value: {
  1643. "types": ["object"],
  1644. "defaultValue": []
  1645. }
  1646. },
  1647. {
  1648. name: Microsoft.Office.WebExtension.Parameters.TableOptions,
  1649. value: {
  1650. "types": ["object"],
  1651. "defaultValue": []
  1652. }
  1653. },
  1654. {
  1655. name: Microsoft.Office.WebExtension.Parameters.ImageWidth,
  1656. value: {
  1657. "types": ["number", "boolean"],
  1658. "defaultValue": false
  1659. }
  1660. },
  1661. {
  1662. name: Microsoft.Office.WebExtension.Parameters.ImageHeight,
  1663. value: {
  1664. "types": ["number", "boolean"],
  1665. "defaultValue": false
  1666. }
  1667. }
  1668. ],
  1669. privateStateCallbacks : []
  1670. });
  1671. })();