@univerjs/drawing 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,6 +30,12 @@ import { UniverDrawingPlugin } from '@univerjs/drawing';
30
30
  univer.registerPlugin(UniverDrawingPlugin);
31
31
  ```
32
32
 
33
+ ## OLE online references
34
+
35
+ An OLE drawing retains its `oleAttachmentId`, which identifies the original attachment's resource record. After explicit online conversion, `oleOnlineUnit` stores only the new Unit's `unitId` and `type`; it does not store a URL or embed the converted Unit's snapshot.
36
+
37
+ Configure `ole.getLink(unitId, type)` on `UniverDrawingPlugin` to resolve the application's current URL on each explicit Open action. There is no default application route. The existing Pro `UniverExchangeClientPlugin` supplies conversion callbacks without adding a separate OLE plugin or owning navigation. Legacy stored `url` fields remain unchanged and are ignored when opening. See the [OLE integration guide](./docs/ole-attachments.md) for configuration and transport boundaries.
38
+
33
39
  ## Resources
34
40
 
35
41
  - [Documentation](https://docs.univer.ai)
package/lib/cjs/index.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  let _univerjs_core = require("@univerjs/core");
3
3
  let rxjs = require("rxjs");
4
4
 
5
- //#region src/basics/config.ts
5
+ // src/basics/config.ts
6
6
  /**
7
7
  * Copyright 2023-present DreamNum Co., Ltd.
8
8
  *
@@ -36,12 +36,10 @@ const DRAWING_IMAGE_ALLOW_IMAGE_LIST = [
36
36
  "image/bmp"
37
37
  ];
38
38
 
39
- //#endregion
40
- //#region src/services/drawing-manager.service.ts
39
+ // src/services/drawing-manager.service.ts
41
40
  const IDrawingManagerService = (0, _univerjs_core.createIdentifier)("univer.drawing-manager.service");
42
41
 
43
- //#endregion
44
- //#region src/commands/operations/set-drawing-selected.operation.ts
42
+ // src/commands/operations/set-drawing-selected.operation.ts
45
43
  const SetDrawingSelectedOperation = {
46
44
  id: "drawing.operation.set-drawing-selected",
47
45
  type: _univerjs_core.CommandType.OPERATION,
@@ -53,19 +51,123 @@ const SetDrawingSelectedOperation = {
53
51
  }
54
52
  };
55
53
 
56
- //#endregion
57
- //#region package.json
54
+ // src/models/ole-model.ts
55
+ const OLE_RESOURCE_NAME = "UNIVER_OLE_ATTACHMENT_PLUGIN";
56
+ const OLE_MAX_RESOURCE_BYTES = 52428800;
57
+ function getOleOfficeType(mimeType) {
58
+ switch (mimeType) {
59
+ case "application/vnd.ms-excel":
60
+ case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return _univerjs_core.UniverInstanceType.UNIVER_SHEET;
61
+ case "application/msword":
62
+ case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return _univerjs_core.UniverInstanceType.UNIVER_DOC;
63
+ case "application/vnd.ms-powerpoint":
64
+ case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return _univerjs_core.UniverInstanceType.UNIVER_SLIDE;
65
+ default: return;
66
+ }
67
+ }
68
+ function parseOleResource(json) {
69
+ if (new TextEncoder().encode(json).byteLength > 52428800) throw new Error("OLE resource exceeds size limit");
70
+ const value = JSON.parse(json);
71
+ if (!value.files || !value.objects || Array.isArray(value.files) || Array.isArray(value.objects)) throw new Error("Invalid OLE resource");
72
+ let total = 0;
73
+ for (const [id, file] of Object.entries(value.files)) {
74
+ var _file$attachment;
75
+ if (!/^[a-f0-9]{64}$/.test(id) || id !== file.sha256 || !Number.isSafeInteger(file.size) || file.size < 0 || typeof file.name !== "string" || typeof file.mimeType !== "string") throw new Error("Invalid OLE file record");
76
+ total += file.size;
77
+ if (total > 52428800 || file.data != null && (typeof file.data !== "string" || file.data.length > Math.ceil(file.size / 3) * 4)) throw new Error("OLE files exceed size limit");
78
+ if (file.data == null && (!((_file$attachment = file.attachment) === null || _file$attachment === void 0 ? void 0 : _file$attachment.source) || file.attachment.sourceType !== "UUID")) throw new Error("Missing OLE attachment source");
79
+ }
80
+ for (const [id, object] of Object.entries(value.objects)) {
81
+ if (object.id !== id || typeof object.drawingId !== "string" || typeof object.subUnitId !== "string" || object.fileName != null && typeof object.fileName !== "string") throw new Error("Invalid OLE object identity");
82
+ for (const fileId of [
83
+ object.fileId,
84
+ object.rawFileId,
85
+ ...Object.values(object.parts)
86
+ ]) if (fileId != null && !Object.prototype.hasOwnProperty.call(value.files, fileId)) throw new Error("Missing OLE file record");
87
+ }
88
+ return {
89
+ files: value.files,
90
+ objects: value.objects
91
+ };
92
+ }
93
+ async function readOleFile(file, io, signal) {
94
+ var _globalThis$crypto;
95
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted) throw new Error("OLE request aborted");
96
+ let bytes;
97
+ if (file.data != null) {
98
+ const binary = atob(file.data);
99
+ bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));
100
+ } else if (file.attachment && io) bytes = await io.read(file.attachment, signal);
101
+ else throw new Error("OLE attachment reader is unavailable");
102
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted) throw new Error("OLE request aborted");
103
+ if (bytes.byteLength !== file.size || bytes.byteLength > 52428800) throw new Error("OLE attachment size mismatch");
104
+ const hash = ((_globalThis$crypto = globalThis.crypto) === null || _globalThis$crypto === void 0 ? void 0 : _globalThis$crypto.subtle) ? new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256", bytes)) : (await import("@noble/hashes/sha256")).sha256(bytes);
105
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted) throw new Error("OLE request aborted");
106
+ if (Array.from(hash, (byte) => byte.toString(16).padStart(2, "0")).join("") !== file.sha256) throw new Error("OLE attachment integrity mismatch");
107
+ return bytes;
108
+ }
109
+ /** Atomic model conversion: failures leave the caller's resource unchanged. */
110
+ async function prepareOleResource(resource, mode, targetUnitId, io) {
111
+ const candidate = parseOleResource(JSON.stringify(resource));
112
+ if (mode === "unit" && (!targetUnitId || !io)) throw new Error("OLE online import requires a target Unit and attachment IO");
113
+ for (const file of Object.values(candidate.files)) {
114
+ const bytes = await readOleFile(file, io);
115
+ if (mode === "unit") {
116
+ const attachment = await io.upload(new File([bytes], file.name, { type: file.mimeType }), targetUnitId);
117
+ if (!attachment.source || attachment.sourceType !== "UUID" || attachment.size !== file.size) throw new Error("Invalid persisted OLE attachment response");
118
+ file.attachment = attachment;
119
+ delete file.data;
120
+ } else {
121
+ let binary = "";
122
+ for (let offset = 0; offset < bytes.length; offset += 8192) binary += String.fromCharCode(...bytes.subarray(offset, offset + 8192));
123
+ file.data = btoa(binary);
124
+ delete file.attachment;
125
+ }
126
+ }
127
+ return parseOleResource(JSON.stringify(candidate));
128
+ }
129
+ /** Prepare a UnitData model or a native exchange JSON envelope without changing the caller's model. */
130
+ async function prepareOleSnapshot(snapshot, mode, targetUnitId, io) {
131
+ const clone = (value) => {
132
+ if (value instanceof Uint8Array) return Uint8Array.from(value);
133
+ if (Array.isArray(value)) return value.map(clone);
134
+ if (value && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, clone(item)]));
135
+ return value;
136
+ };
137
+ const candidate = clone(snapshot);
138
+ const envelope = candidate.snapshot ?? candidate;
139
+ const host = envelope.workbook ?? envelope.doc ?? envelope.slide ?? envelope;
140
+ let model = host;
141
+ let encoded = false;
142
+ if (envelope.slide && host.originalMeta != null) {
143
+ const bytes = typeof host.originalMeta === "string" ? Uint8Array.from(atob(host.originalMeta), (character) => character.charCodeAt(0)) : host.originalMeta;
144
+ model = JSON.parse(new TextDecoder().decode(bytes));
145
+ encoded = true;
146
+ }
147
+ for (const entry of model.resources ?? []) if (entry.name === "UNIVER_OLE_ATTACHMENT_PLUGIN") {
148
+ const text = typeof entry.data === "string" ? entry.data : new TextDecoder().decode(entry.data);
149
+ const prepared = JSON.stringify(await prepareOleResource(parseOleResource(text), mode, targetUnitId, io));
150
+ entry.data = typeof entry.data === "string" ? prepared : new TextEncoder().encode(prepared);
151
+ }
152
+ if (encoded) {
153
+ const bytes = new TextEncoder().encode(JSON.stringify(model));
154
+ let binary = "";
155
+ for (let offset = 0; offset < bytes.length; offset += 8192) binary += String.fromCharCode(...bytes.subarray(offset, offset + 8192));
156
+ host.originalMeta = typeof host.originalMeta === "string" ? btoa(binary) : bytes;
157
+ }
158
+ return candidate;
159
+ }
160
+
161
+ // package.json
58
162
  var name = "@univerjs/drawing";
59
- var version = "1.3.1";
163
+ var version = "1.4.0";
60
164
 
61
- //#endregion
62
- //#region src/config/config.ts
165
+ // src/config/config.ts
63
166
  const DRAWING_PLUGIN_CONFIG_KEY = "drawing.config";
64
167
  const configSymbol = Symbol(DRAWING_PLUGIN_CONFIG_KEY);
65
168
  const defaultPluginConfig = {};
66
169
 
67
- //#endregion
68
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
170
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
69
171
  function _typeof(o) {
70
172
  "@babel/helpers - typeof";
71
173
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -75,8 +177,7 @@ function _typeof(o) {
75
177
  }, _typeof(o);
76
178
  }
77
179
 
78
- //#endregion
79
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
180
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
80
181
  function toPrimitive(t, r) {
81
182
  if ("object" != _typeof(t) || !t) return t;
82
183
  var e = t[Symbol.toPrimitive];
@@ -88,15 +189,13 @@ function toPrimitive(t, r) {
88
189
  return ("string" === r ? String : Number)(t);
89
190
  }
90
191
 
91
- //#endregion
92
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
192
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
93
193
  function toPropertyKey(t) {
94
194
  var i = toPrimitive(t, "string");
95
195
  return "symbol" == _typeof(i) ? i : i + "";
96
196
  }
97
197
 
98
- //#endregion
99
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
198
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
100
199
  function _defineProperty(e, r, t) {
101
200
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
102
201
  value: t,
@@ -106,8 +205,7 @@ function _defineProperty(e, r, t) {
106
205
  }) : e[r] = t, e;
107
206
  }
108
207
 
109
- //#endregion
110
- //#region src/services/drawing-manager-impl.service.ts
208
+ // src/services/drawing-manager-impl.service.ts
111
209
  function isNonEmptyOp(op) {
112
210
  return Array.isArray(op) && op.length > 0;
113
211
  }
@@ -1040,8 +1138,7 @@ var UnitDrawingService = class {
1040
1138
  };
1041
1139
  var DrawingManagerService = class extends UnitDrawingService {};
1042
1140
 
1043
- //#endregion
1044
- //#region src/services/image-io-impl.service.ts
1141
+ // src/services/image-io-impl.service.ts
1045
1142
  var ImageIoService = class {
1046
1143
  constructor() {
1047
1144
  _defineProperty(this, "_waitCount", 0);
@@ -1111,8 +1208,68 @@ var ImageIoService = class {
1111
1208
  }
1112
1209
  };
1113
1210
 
1114
- //#endregion
1115
- //#region src/services/url-image.service.ts
1211
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorateParam.js
1212
+ function __decorateParam(paramIndex, decorator) {
1213
+ return function(target, key) {
1214
+ decorator(target, key, paramIndex);
1215
+ };
1216
+ }
1217
+
1218
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
1219
+ function __decorate(decorators, target, key, desc) {
1220
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1221
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1222
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1223
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1224
+ }
1225
+
1226
+ // src/services/ole.service.ts
1227
+ /**
1228
+ * Copyright 2023-present DreamNum Co., Ltd.
1229
+ *
1230
+ * Licensed under the Apache License, Version 2.0 (the "License");
1231
+ * you may not use this file except in compliance with the License.
1232
+ * You may obtain a copy of the License at
1233
+ *
1234
+ * http://www.apache.org/licenses/LICENSE-2.0
1235
+ *
1236
+ * Unless required by applicable law or agreed to in writing, software
1237
+ * distributed under the License is distributed on an "AS IS" BASIS,
1238
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1239
+ * See the License for the specific language governing permissions and
1240
+ * limitations under the License.
1241
+ */
1242
+ let OleService = class OleService extends _univerjs_core.Disposable {
1243
+ constructor(resourceManager) {
1244
+ super();
1245
+ _defineProperty(this, "_resources", /* @__PURE__ */ new Map());
1246
+ this.disposeWithMe(resourceManager.registerPluginResource({
1247
+ pluginName: OLE_RESOURCE_NAME,
1248
+ businesses: [
1249
+ _univerjs_core.UniverInstanceType.UNIVER_SHEET,
1250
+ _univerjs_core.UniverInstanceType.UNIVER_DOC,
1251
+ _univerjs_core.UniverInstanceType.UNIVER_SLIDE
1252
+ ],
1253
+ onLoad: (unitId, resource) => this._resources.set(unitId, resource),
1254
+ onUnLoad: (unitId) => this._resources.delete(unitId),
1255
+ toJson: (unitId) => JSON.stringify(this._resources.get(unitId) ?? {
1256
+ files: {},
1257
+ objects: {}
1258
+ }),
1259
+ parseJson: parseOleResource
1260
+ }));
1261
+ }
1262
+ getResource(unitId) {
1263
+ return this._resources.get(unitId);
1264
+ }
1265
+ dispose() {
1266
+ this._resources.clear();
1267
+ super.dispose();
1268
+ }
1269
+ };
1270
+ OleService = __decorate([__decorateParam(0, _univerjs_core.IResourceManagerService)], OleService);
1271
+
1272
+ // src/services/url-image.service.ts
1116
1273
  var URLImageService = class extends _univerjs_core.Disposable {
1117
1274
  constructor(..._args) {
1118
1275
  super(..._args);
@@ -1143,25 +1300,7 @@ var URLImageService = class extends _univerjs_core.Disposable {
1143
1300
  }
1144
1301
  };
1145
1302
 
1146
- //#endregion
1147
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
1148
- function __decorateParam(paramIndex, decorator) {
1149
- return function(target, key) {
1150
- decorator(target, key, paramIndex);
1151
- };
1152
- }
1153
-
1154
- //#endregion
1155
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
1156
- function __decorate(decorators, target, key, desc) {
1157
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1158
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1159
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1160
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1161
- }
1162
-
1163
- //#endregion
1164
- //#region src/plugin.ts
1303
+ // src/plugin.ts
1165
1304
  let UniverDrawingPlugin = class UniverDrawingPlugin extends _univerjs_core.Plugin {
1166
1305
  constructor(_config = defaultPluginConfig, _injector, _configService, _commandService) {
1167
1306
  super();
@@ -1176,13 +1315,15 @@ let UniverDrawingPlugin = class UniverDrawingPlugin extends _univerjs_core.Plugi
1176
1315
  onStarting() {
1177
1316
  this._initCommands();
1178
1317
  this._initDependencies();
1318
+ this._injector.get(OleService);
1179
1319
  }
1180
1320
  _initDependencies() {
1181
1321
  var _this$_config;
1182
1322
  (0, _univerjs_core.mergeOverrideWithDependencies)([
1183
1323
  [_univerjs_core.IImageIoService, { useClass: ImageIoService }],
1184
1324
  [_univerjs_core.IURLImageService, { useClass: URLImageService }],
1185
- [IDrawingManagerService, { useClass: DrawingManagerService }]
1325
+ [IDrawingManagerService, { useClass: DrawingManagerService }],
1326
+ [OleService]
1186
1327
  ], (_this$_config = this._config) === null || _this$_config === void 0 ? void 0 : _this$_config.override).forEach((d) => this._injector.add(d));
1187
1328
  }
1188
1329
  _initCommands() {
@@ -1198,8 +1339,7 @@ UniverDrawingPlugin = __decorate([
1198
1339
  __decorateParam(3, _univerjs_core.ICommandService)
1199
1340
  ], UniverDrawingPlugin);
1200
1341
 
1201
- //#endregion
1202
- //#region src/utils/drawing-copy-plan.ts
1342
+ // src/utils/drawing-copy-plan.ts
1203
1343
  /**
1204
1344
  * A command-scoped cache key shared by sheet-copy interceptors so every drawing model
1205
1345
  * resolves against the same copied drawing IDs.
@@ -1256,8 +1396,7 @@ function getOrCreateDrawingCopyPlan(copyContext, drawings, options) {
1256
1396
  return plan;
1257
1397
  }
1258
1398
 
1259
- //#endregion
1260
- //#region src/utils/drawing-group.ts
1399
+ // src/utils/drawing-group.ts
1261
1400
  const DRAWING_GROUPABLE_TYPES = [
1262
1401
  _univerjs_core.DrawingTypeEnum.DRAWING_IMAGE,
1263
1402
  _univerjs_core.DrawingTypeEnum.DRAWING_SHAPE,
@@ -1270,14 +1409,12 @@ function isGroupableDrawingType(type) {
1270
1409
  return DRAWING_GROUPABLE_TYPES.includes(type);
1271
1410
  }
1272
1411
 
1273
- //#endregion
1274
- //#region src/utils/get-image-shape-key.ts
1412
+ // src/utils/get-image-shape-key.ts
1275
1413
  function getDrawingShapeKeyByDrawingSearch({ unitId, subUnitId, drawingId }, index) {
1276
1414
  return typeof index === "number" ? `${unitId}#-#${subUnitId}#-#${drawingId}#-#${index}` : `${unitId}#-#${subUnitId}#-#${drawingId}`;
1277
1415
  }
1278
1416
 
1279
- //#endregion
1280
- //#region src/utils/get-image-size.ts
1417
+ // src/utils/get-image-size.ts
1281
1418
  const getImageSize = async (src) => {
1282
1419
  return new Promise((resolve, reject) => {
1283
1420
  const image = new Image();
@@ -1295,8 +1432,7 @@ const getImageSize = async (src) => {
1295
1432
  });
1296
1433
  };
1297
1434
 
1298
- //#endregion
1299
- //#region src/utils/image-opacity.ts
1435
+ // src/utils/image-opacity.ts
1300
1436
  /**
1301
1437
  * Copyright 2023-present DreamNum Co., Ltd.
1302
1438
  *
@@ -1317,13 +1453,13 @@ function normalizeImageOpacity(opacity) {
1317
1453
  return Math.min(Math.max(opacity, 0), 1);
1318
1454
  }
1319
1455
 
1320
- //#endregion
1321
- //#region src/utils/rotate-enabled.ts
1456
+ // src/utils/rotate-enabled.ts
1322
1457
  function getDrawingKey(drawing) {
1323
1458
  return `${drawing.unitId}\u0000${drawing.subUnitId}\u0000${drawing.drawingId}`;
1324
1459
  }
1325
1460
  function resolveDrawingRotateEnabled(drawing, options = {}, visiting = /* @__PURE__ */ new Set()) {
1326
1461
  var _drawing$transform, _options$getRenderObj, _options$isKnownNonRo;
1462
+ if (drawing.drawingType === _univerjs_core.DrawingTypeEnum.DRAWING_OLE) return false;
1327
1463
  const drawingKey = getDrawingKey(drawing);
1328
1464
  if (visiting.has(drawingKey)) return true;
1329
1465
  if (drawing.drawingType === _univerjs_core.DrawingTypeEnum.DRAWING_GROUP) {
@@ -1343,7 +1479,6 @@ function resolveDrawingRotateEnabled(drawing, options = {}, visiting = /* @__PUR
1343
1479
  return true;
1344
1480
  }
1345
1481
 
1346
- //#endregion
1347
1482
  exports.DRAWING_COPY_CONTEXT_KEY = DRAWING_COPY_CONTEXT_KEY;
1348
1483
  exports.DRAWING_GROUPABLE_TYPES = DRAWING_GROUPABLE_TYPES;
1349
1484
  exports.DRAWING_IMAGE_ALLOW_IMAGE_LIST = DRAWING_IMAGE_ALLOW_IMAGE_LIST;
@@ -1353,6 +1488,13 @@ exports.DRAWING_IMAGE_WIDTH_LIMIT = DRAWING_IMAGE_WIDTH_LIMIT;
1353
1488
  exports.DrawingManagerService = DrawingManagerService;
1354
1489
  exports.IDrawingManagerService = IDrawingManagerService;
1355
1490
  exports.ImageIoService = ImageIoService;
1491
+ exports.OLE_RESOURCE_NAME = OLE_RESOURCE_NAME;
1492
+ Object.defineProperty(exports, "OleService", {
1493
+ enumerable: true,
1494
+ get: function () {
1495
+ return OleService;
1496
+ }
1497
+ });
1356
1498
  exports.SetDrawingSelectedOperation = SetDrawingSelectedOperation;
1357
1499
  exports.URLImageService = URLImageService;
1358
1500
  exports.UnitDrawingService = UnitDrawingService;
@@ -1366,7 +1508,10 @@ exports.createDrawingCopyPlan = createDrawingCopyPlan;
1366
1508
  exports.getDrawingImageAllowSize = getDrawingImageAllowSize;
1367
1509
  exports.getDrawingShapeKeyByDrawingSearch = getDrawingShapeKeyByDrawingSearch;
1368
1510
  exports.getImageSize = getImageSize;
1511
+ exports.getOleOfficeType = getOleOfficeType;
1369
1512
  exports.getOrCreateDrawingCopyPlan = getOrCreateDrawingCopyPlan;
1370
1513
  exports.isGroupableDrawingType = isGroupableDrawingType;
1371
1514
  exports.normalizeImageOpacity = normalizeImageOpacity;
1515
+ exports.prepareOleSnapshot = prepareOleSnapshot;
1516
+ exports.readOleFile = readOleFile;
1372
1517
  exports.resolveDrawingRotateEnabled = resolveDrawingRotateEnabled;