ppt-codec 1.4.11 → 1.6.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.
Files changed (58) hide show
  1. package/README.md +70 -58
  2. package/dist/base64.cjs +48 -0
  3. package/dist/base64.d.cts +5 -0
  4. package/dist/base64.d.ts +5 -0
  5. package/dist/base64.js +46 -0
  6. package/dist/diagnostics-CqxAnubw.d.cts +16 -0
  7. package/dist/diagnostics-CqxAnubw.d.ts +16 -0
  8. package/dist/diagnostics.cjs +11 -0
  9. package/dist/diagnostics.d.cts +2 -0
  10. package/dist/diagnostics.d.ts +2 -0
  11. package/dist/diagnostics.js +9 -0
  12. package/dist/document/color-scheme.cjs +4 -0
  13. package/dist/document/color-scheme.d.cts +2 -1
  14. package/dist/document/color-scheme.d.ts +2 -1
  15. package/dist/document/color-scheme.js +4 -1
  16. package/dist/document/master-write.cjs +20 -15
  17. package/dist/document/master-write.d.cts +2 -1
  18. package/dist/document/master-write.d.ts +2 -1
  19. package/dist/document/master-write.js +21 -16
  20. package/dist/document/notes-write.cjs +14 -6
  21. package/dist/document/notes-write.d.cts +2 -1
  22. package/dist/document/notes-write.d.ts +2 -1
  23. package/dist/document/notes-write.js +14 -6
  24. package/dist/document/notes.cjs +4 -3
  25. package/dist/document/notes.js +4 -3
  26. package/dist/drawing/blips.cjs +81 -0
  27. package/dist/drawing/blips.d.cts +16 -0
  28. package/dist/drawing/blips.d.ts +16 -0
  29. package/dist/drawing/blips.js +77 -0
  30. package/dist/drawing/properties.cjs +94 -0
  31. package/dist/drawing/properties.d.cts +25 -0
  32. package/dist/drawing/properties.d.ts +25 -0
  33. package/dist/drawing/properties.js +83 -0
  34. package/dist/drawing/shapes-write.cjs +204 -17
  35. package/dist/drawing/shapes-write.d.cts +15 -4
  36. package/dist/drawing/shapes-write.d.ts +15 -4
  37. package/dist/drawing/shapes-write.js +206 -18
  38. package/dist/drawing/shapes.cjs +34 -4
  39. package/dist/drawing/shapes.d.cts +11 -2
  40. package/dist/drawing/shapes.d.ts +11 -2
  41. package/dist/drawing/shapes.js +35 -5
  42. package/dist/index.cjs +38 -1
  43. package/dist/index.d.cts +10 -6
  44. package/dist/index.d.ts +10 -6
  45. package/dist/index.js +8 -4
  46. package/dist/read.cjs +101 -19
  47. package/dist/read.d.cts +3 -2
  48. package/dist/read.d.ts +3 -2
  49. package/dist/read.js +103 -22
  50. package/dist/record/types.cjs +28 -0
  51. package/dist/record/types.d.cts +15 -1
  52. package/dist/record/types.d.ts +15 -1
  53. package/dist/record/types.js +15 -1
  54. package/dist/write.cjs +100 -37
  55. package/dist/write.d.cts +9 -4
  56. package/dist/write.d.ts +9 -4
  57. package/dist/write.js +100 -37
  58. package/package.json +4 -3
package/dist/read.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_base64 = require("./base64.cjs");
2
3
  const require_errors = require("./errors.cjs");
3
4
  const require_record_tree = require("./record/tree.cjs");
4
5
  const require_record_types = require("./record/types.cjs");
@@ -11,6 +12,8 @@ const require_content = require("./content.cjs");
11
12
  const require_encryption = require("./encryption.cjs");
12
13
  const require_document_document_atom = require("./document/document-atom.cjs");
13
14
  const require_document_fonts = require("./document/fonts.cjs");
15
+ const require_drawing_blips = require("./drawing/blips.cjs");
16
+ require("./drawing/properties.cjs");
14
17
  const require_document_notes_list = require("./document/notes-list.cjs");
15
18
  const require_drawing_shapes = require("./drawing/shapes.cjs");
16
19
  const require_document_notes = require("./document/notes.cjs");
@@ -22,6 +25,7 @@ let document_schema_js = require("document-schema.js");
22
25
  //#region src/read.ts
23
26
  const CURRENT_USER_STREAM = "Current User";
24
27
  const POWERPOINT_DOCUMENT_STREAM = "PowerPoint Document";
28
+ const PICTURES_STREAM = "Pictures";
25
29
  /** The [MS-OLEPS] Property Set Stream a .ppt's title/author/dates live in when present ([MS-OSHARED] 2.3.3.2.2) -- a genuinely optional stream, unlike the two above, since a valid PowerPoint binary document need not carry document properties at all. */
26
30
  const SUMMARY_INFORMATION_STREAM = "SummaryInformation";
27
31
  const DEFAULT_INSET_LEFT_RIGHT_PT = 7.2;
@@ -55,14 +59,56 @@ function textRecordsFor(clientTextbox, persist) {
55
59
  records: outlineText.records
56
60
  };
57
61
  }
58
- function blocksFor(clientTextbox, persist, fontNames, masterInfo) {
62
+ function blocksFor(clientTextbox, context) {
59
63
  if (clientTextbox === void 0) return [];
60
- const { textType, records } = textRecordsFor(clientTextbox, persist);
64
+ const { textType, records } = textRecordsFor(clientTextbox, context.persist);
61
65
  const text = require_text_atoms.readTextBody(records);
62
66
  if (text === void 0) return [];
63
67
  const styleRecord = require_record_tree.findChild(records, require_record_types.RT_StyleTextPropAtom);
64
68
  const style = styleRecord === void 0 ? NO_STYLE : require_text_style.readStyleTextPropAtom(styleRecord, require_text_atoms.characterCountOf(text));
65
- return require_content.buildParagraphs(text, style, fontNames, masterInfo.styles, textType, masterInfo.colorScheme);
69
+ return require_content.buildParagraphs(text, style, context.fontNames, context.masterInfo.styles, textType, context.masterInfo.colorScheme);
70
+ }
71
+ function imageBlocksFor(pibProperty, context, widthPt, heightPt) {
72
+ if (pibProperty === void 0) return [];
73
+ const blip = require_drawing_blips.blipForPib(context.blips, pibProperty.value);
74
+ if (blip === void 0) return [];
75
+ return [{
76
+ kind: "image",
77
+ format: blip.format,
78
+ base64: require_base64.bytesToBase64(blip.bytes),
79
+ widthPt,
80
+ heightPt
81
+ }];
82
+ }
83
+ function tableBlockFor(table, context) {
84
+ const placed = table.cells.flatMap((cell) => cell.anchor === void 0 || cell.anchor.right <= cell.anchor.left || cell.anchor.bottom <= cell.anchor.top ? [] : [{
85
+ cell,
86
+ anchor: cell.anchor
87
+ }]);
88
+ const rowTops = [...new Set(placed.map((entry) => entry.anchor.top))].sort((a, b) => a - b);
89
+ const columnLefts = [...new Set(placed.map((entry) => entry.anchor.left))].sort((a, b) => a - b);
90
+ const rightmost = Math.max(...placed.map((entry) => entry.anchor.right), ...columnLefts);
91
+ const columnWidthsPt = columnLefts.map((left, index) => {
92
+ const right = columnLefts.at(index + 1) ?? rightmost;
93
+ return require_units.masterUnitsToPoints(right - left);
94
+ });
95
+ return {
96
+ kind: "table",
97
+ rows: rowTops.map((top) => {
98
+ const inRow = placed.filter((entry) => entry.anchor.top === top).sort((a, b) => a.anchor.left - b.anchor.left);
99
+ const bottom = Math.max(...inRow.map((entry) => entry.anchor.bottom), top);
100
+ const cells = columnLefts.map((left) => {
101
+ const at = inRow.find((entry) => entry.anchor.left === left);
102
+ return at === void 0 ? { blocks: [] } : { blocks: blocksFor(at.cell.clientTextbox, context) };
103
+ });
104
+ const heightPt = require_units.masterUnitsToPoints(bottom - top);
105
+ return heightPt > 0 ? {
106
+ cells,
107
+ heightPt
108
+ } : { cells };
109
+ }),
110
+ columnWidthsPt
111
+ };
66
112
  }
67
113
  function readNotesBySlideId(streamBytes, directory, notesList) {
68
114
  const notes = /* @__PURE__ */ new Map();
@@ -74,7 +120,7 @@ function readNotesBySlideId(streamBytes, directory, notesList) {
74
120
  return notes;
75
121
  }
76
122
  function colorSchemeFor(slideChildren, master) {
77
- const ownScheme = require_record_tree.findChild(slideChildren, require_record_types.RT_ColorSchemeAtom);
123
+ const ownScheme = require_document_color_scheme.findSlideSchemeColorSchemeAtom(slideChildren);
78
124
  return ownScheme === void 0 ? master.colorScheme : require_document_color_scheme.readSlideSchemeColorSchemeAtom(ownScheme);
79
125
  }
80
126
  function readMastersById(streamBytes, directory, masterList, documentDefault) {
@@ -86,7 +132,7 @@ function readMastersById(streamBytes, directory, masterList, documentDefault) {
86
132
  const masterChildren = require_record_tree.childRecords(masterContainer);
87
133
  const masterAtoms = masterChildren.filter((record) => record.header.recType === require_record_types.RT_TextMasterStyleAtom).map(require_text_style.readTextMasterStyleAtom);
88
134
  const styles = require_document_master.buildMasterStyleTable(masterAtoms, documentDefault);
89
- const colorSchemeRecord = require_record_tree.findChild(masterChildren, require_record_types.RT_ColorSchemeAtom);
135
+ const colorSchemeRecord = require_document_color_scheme.findSlideSchemeColorSchemeAtom(masterChildren);
90
136
  if (colorSchemeRecord === void 0) throw new require_errors.PptFormatError(`MainMasterContainer for master ${persist.slideId} has no SlideSchemeColorSchemeAtom, which [MS-PPT] 2.5.3 requires`);
91
137
  mastersById.set(persist.slideId, {
92
138
  styles,
@@ -95,7 +141,8 @@ function readMastersById(streamBytes, directory, masterList, documentDefault) {
95
141
  }
96
142
  return mastersById;
97
143
  }
98
- function readSlide(streamBytes, directory, persist, size, fontNames, notes, mastersById) {
144
+ function readSlide(base, size, notes, mastersById) {
145
+ const { streamBytes, directory, persist } = base;
99
146
  const slideContainer = require_stream_persist.resolvePersistObject(streamBytes, directory, persist.persistIdRef, `SlidePersistAtom for slide ${persist.slideId}`);
100
147
  if (slideContainer.header.recType !== 1006) throw new require_errors.PptFormatError(`persist object ${persist.persistIdRef} is record type 0x${slideContainer.header.recType.toString(16)}, not the RT_Slide (0x${require_record_types.RT_Slide.toString(16)}) its SlidePersistAtom promised`);
101
148
  const slideChildren = require_record_tree.childRecords(slideContainer);
@@ -104,28 +151,54 @@ function readSlide(streamBytes, directory, persist, size, fontNames, notes, mast
104
151
  const { masterIdRef } = require_document_master.readSlideAtom(slideAtomRecord);
105
152
  const master = mastersById.get(masterIdRef);
106
153
  if (master === void 0) throw new require_errors.PptFormatError(`slide ${persist.slideId}'s own SlideAtom names masterIdRef ${masterIdRef}, which the master list does not contain`);
107
- const masterInfo = {
108
- styles: master.styles,
109
- colorScheme: colorSchemeFor(slideChildren, master)
154
+ const context = {
155
+ ...base,
156
+ masterInfo: {
157
+ styles: master.styles,
158
+ colorScheme: colorSchemeFor(slideChildren, master)
159
+ }
110
160
  };
111
161
  const drawing = require_record_tree.findChild(slideChildren, require_record_types.RT_Drawing);
112
162
  const shapes = [];
113
163
  for (const shape of drawing === void 0 ? [] : require_drawing_shapes.readDrawingShapes(drawing)) {
164
+ if (!("clientTextbox" in shape)) {
165
+ const tableLeft = require_units.masterUnitsToPoints(shape.anchor.left);
166
+ const tableTop = require_units.masterUnitsToPoints(shape.anchor.top);
167
+ shapes.push({
168
+ frame: {
169
+ xPt: tableLeft,
170
+ yPt: tableTop,
171
+ widthPt: Math.max(0, require_units.masterUnitsToPoints(shape.anchor.right) - tableLeft),
172
+ heightPt: Math.max(0, require_units.masterUnitsToPoints(shape.anchor.bottom) - tableTop)
173
+ },
174
+ ...shape.rotationDeg === void 0 ? {} : { rotationDeg: shape.rotationDeg },
175
+ insetLeftPt: DEFAULT_INSET_LEFT_RIGHT_PT,
176
+ insetTopPt: DEFAULT_INSET_TOP_BOTTOM_PT,
177
+ insetRightPt: DEFAULT_INSET_LEFT_RIGHT_PT,
178
+ insetBottomPt: DEFAULT_INSET_TOP_BOTTOM_PT,
179
+ blocks: [tableBlockFor(shape, context)]
180
+ });
181
+ continue;
182
+ }
114
183
  if (shape.anchor === void 0) continue;
115
184
  const left = require_units.masterUnitsToPoints(shape.anchor.left);
116
185
  const top = require_units.masterUnitsToPoints(shape.anchor.top);
186
+ const widthPt = Math.max(0, require_units.masterUnitsToPoints(shape.anchor.right) - left);
187
+ const heightPt = Math.max(0, require_units.masterUnitsToPoints(shape.anchor.bottom) - top);
188
+ const isPicture = shape.properties.get(260) !== void 0;
117
189
  shapes.push({
118
190
  frame: {
119
191
  xPt: left,
120
192
  yPt: top,
121
- widthPt: Math.max(0, require_units.masterUnitsToPoints(shape.anchor.right) - left),
122
- heightPt: Math.max(0, require_units.masterUnitsToPoints(shape.anchor.bottom) - top)
193
+ widthPt,
194
+ heightPt
123
195
  },
124
- insetLeftPt: DEFAULT_INSET_LEFT_RIGHT_PT,
125
- insetTopPt: DEFAULT_INSET_TOP_BOTTOM_PT,
126
- insetRightPt: DEFAULT_INSET_LEFT_RIGHT_PT,
127
- insetBottomPt: DEFAULT_INSET_TOP_BOTTOM_PT,
128
- blocks: blocksFor(shape.clientTextbox, persist, fontNames, masterInfo)
196
+ ...shape.rotationDeg === void 0 ? {} : { rotationDeg: shape.rotationDeg },
197
+ insetLeftPt: isPicture ? 0 : DEFAULT_INSET_LEFT_RIGHT_PT,
198
+ insetTopPt: isPicture ? 0 : DEFAULT_INSET_TOP_BOTTOM_PT,
199
+ insetRightPt: isPicture ? 0 : DEFAULT_INSET_LEFT_RIGHT_PT,
200
+ insetBottomPt: isPicture ? 0 : DEFAULT_INSET_TOP_BOTTOM_PT,
201
+ blocks: [...imageBlocksFor(shape.properties.get(260), context, widthPt, heightPt), ...blocksFor(shape.clientTextbox, context)]
129
202
  });
130
203
  }
131
204
  return {
@@ -134,7 +207,7 @@ function readSlide(streamBytes, directory, persist, size, fontNames, notes, mast
134
207
  notes
135
208
  };
136
209
  }
137
- function readPptStreams(currentUserStream, powerPointDocumentStream, password) {
210
+ function readPptStreams(currentUserStream, powerPointDocumentStream, password, picturesStream) {
138
211
  const currentUser = require_stream_current_user.readCurrentUserAtom(currentUserStream);
139
212
  const { directory, currentEdit } = require_stream_persist.buildPersistDirectory(powerPointDocumentStream, currentUser.offsetToCurrentEdit);
140
213
  let streamBytes = powerPointDocumentStream;
@@ -162,14 +235,22 @@ function readPptStreams(currentUserStream, powerPointDocumentStream, password) {
162
235
  const slideList = listWithInstance(0);
163
236
  const persists = slideList === void 0 ? [] : require_document_slide_list.readSlideListWithText(slideList);
164
237
  const notesBySlideId = readNotesBySlideId(streamBytes, directory, listWithInstance(2));
238
+ const blips = require_drawing_blips.readBlipStore(documentContainer, currentUser.encrypted ? void 0 : picturesStream);
165
239
  return {
166
240
  metadata: {},
167
- slides: persists.map((persist) => readSlide(streamBytes, directory, persist, size, fontNames, notesBySlideId.get(persist.slideId) ?? "", mastersById))
241
+ slides: persists.map((persist) => readSlide({
242
+ streamBytes,
243
+ directory,
244
+ persist,
245
+ fontNames,
246
+ blips
247
+ }, size, notesBySlideId.get(persist.slideId) ?? "", mastersById))
168
248
  };
169
249
  }
170
250
  function readPptContent(bytes, password) {
171
251
  const streams = (0, archive_codec.readCompoundFile)(bytes);
172
- const document = readPptStreams(requireStream(streams, CURRENT_USER_STREAM), requireStream(streams, POWERPOINT_DOCUMENT_STREAM), password);
252
+ const pictures = streams.find((stream) => stream.path === PICTURES_STREAM);
253
+ const document = readPptStreams(requireStream(streams, CURRENT_USER_STREAM), requireStream(streams, POWERPOINT_DOCUMENT_STREAM), password, pictures === void 0 ? void 0 : pictures.bytes);
173
254
  const metadataStream = streams.find((stream) => stream.path === SUMMARY_INFORMATION_STREAM);
174
255
  if (metadataStream === void 0) return document;
175
256
  return {
@@ -190,6 +271,7 @@ function readPpt(bytes, password) {
190
271
  exports.CURRENT_USER_STREAM = CURRENT_USER_STREAM;
191
272
  exports.DEFAULT_INSET_LEFT_RIGHT_PT = DEFAULT_INSET_LEFT_RIGHT_PT;
192
273
  exports.DEFAULT_INSET_TOP_BOTTOM_PT = DEFAULT_INSET_TOP_BOTTOM_PT;
274
+ exports.PICTURES_STREAM = PICTURES_STREAM;
193
275
  exports.POWERPOINT_DOCUMENT_STREAM = POWERPOINT_DOCUMENT_STREAM;
194
276
  exports.SUMMARY_INFORMATION_STREAM = SUMMARY_INFORMATION_STREAM;
195
277
  exports.readPpt = readPpt;
package/dist/read.d.cts CHANGED
@@ -2,6 +2,7 @@ import { ContentSlide, DocumentTree, LayoutMetadata } from "document-schema.js";
2
2
  //#region src/read.d.ts
3
3
  declare const CURRENT_USER_STREAM = "Current User";
4
4
  declare const POWERPOINT_DOCUMENT_STREAM = "PowerPoint Document";
5
+ declare const PICTURES_STREAM = "Pictures";
5
6
  /** The [MS-OLEPS] Property Set Stream a .ppt's title/author/dates live in when present ([MS-OSHARED] 2.3.3.2.2) -- a genuinely optional stream, unlike the two above, since a valid PowerPoint binary document need not carry document properties at all. */
6
7
  declare const SUMMARY_INFORMATION_STREAM = "SummaryInformation";
7
8
  declare const DEFAULT_INSET_LEFT_RIGHT_PT: number;
@@ -10,8 +11,8 @@ interface PptDocument {
10
11
  readonly metadata: LayoutMetadata;
11
12
  readonly slides: readonly ContentSlide[];
12
13
  }
13
- declare function readPptStreams(currentUserStream: Uint8Array<ArrayBuffer>, powerPointDocumentStream: Uint8Array<ArrayBuffer>, password?: string): PptDocument;
14
+ declare function readPptStreams(currentUserStream: Uint8Array<ArrayBuffer>, powerPointDocumentStream: Uint8Array<ArrayBuffer>, password?: string, picturesStream?: Uint8Array<ArrayBuffer>): PptDocument;
14
15
  declare function readPptContent(bytes: Uint8Array<ArrayBuffer>, password?: string): PptDocument;
15
16
  declare function readPpt(bytes: Uint8Array<ArrayBuffer>, password?: string): DocumentTree;
16
17
  //#endregion
17
- export { CURRENT_USER_STREAM, DEFAULT_INSET_LEFT_RIGHT_PT, DEFAULT_INSET_TOP_BOTTOM_PT, POWERPOINT_DOCUMENT_STREAM, PptDocument, SUMMARY_INFORMATION_STREAM, readPpt, readPptContent, readPptStreams };
18
+ export { CURRENT_USER_STREAM, DEFAULT_INSET_LEFT_RIGHT_PT, DEFAULT_INSET_TOP_BOTTOM_PT, PICTURES_STREAM, POWERPOINT_DOCUMENT_STREAM, PptDocument, SUMMARY_INFORMATION_STREAM, readPpt, readPptContent, readPptStreams };
package/dist/read.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ContentSlide, DocumentTree, LayoutMetadata } from "document-schema.js";
2
2
  //#region src/read.d.ts
3
3
  declare const CURRENT_USER_STREAM = "Current User";
4
4
  declare const POWERPOINT_DOCUMENT_STREAM = "PowerPoint Document";
5
+ declare const PICTURES_STREAM = "Pictures";
5
6
  /** The [MS-OLEPS] Property Set Stream a .ppt's title/author/dates live in when present ([MS-OSHARED] 2.3.3.2.2) -- a genuinely optional stream, unlike the two above, since a valid PowerPoint binary document need not carry document properties at all. */
6
7
  declare const SUMMARY_INFORMATION_STREAM = "SummaryInformation";
7
8
  declare const DEFAULT_INSET_LEFT_RIGHT_PT: number;
@@ -10,8 +11,8 @@ interface PptDocument {
10
11
  readonly metadata: LayoutMetadata;
11
12
  readonly slides: readonly ContentSlide[];
12
13
  }
13
- declare function readPptStreams(currentUserStream: Uint8Array<ArrayBuffer>, powerPointDocumentStream: Uint8Array<ArrayBuffer>, password?: string): PptDocument;
14
+ declare function readPptStreams(currentUserStream: Uint8Array<ArrayBuffer>, powerPointDocumentStream: Uint8Array<ArrayBuffer>, password?: string, picturesStream?: Uint8Array<ArrayBuffer>): PptDocument;
14
15
  declare function readPptContent(bytes: Uint8Array<ArrayBuffer>, password?: string): PptDocument;
15
16
  declare function readPpt(bytes: Uint8Array<ArrayBuffer>, password?: string): DocumentTree;
16
17
  //#endregion
17
- export { CURRENT_USER_STREAM, DEFAULT_INSET_LEFT_RIGHT_PT, DEFAULT_INSET_TOP_BOTTOM_PT, POWERPOINT_DOCUMENT_STREAM, PptDocument, SUMMARY_INFORMATION_STREAM, readPpt, readPptContent, readPptStreams };
18
+ export { CURRENT_USER_STREAM, DEFAULT_INSET_LEFT_RIGHT_PT, DEFAULT_INSET_TOP_BOTTOM_PT, PICTURES_STREAM, POWERPOINT_DOCUMENT_STREAM, PptDocument, SUMMARY_INFORMATION_STREAM, readPpt, readPptContent, readPptStreams };
package/dist/read.js CHANGED
@@ -1,15 +1,18 @@
1
+ import { bytesToBase64 } from "./base64.js";
1
2
  import { PptEncryptedError, PptFormatError } from "./errors.js";
2
3
  import { childRecords, findChild } from "./record/tree.js";
3
- import { RT_ColorSchemeAtom, RT_Document, RT_DocumentAtom, RT_Drawing, RT_Environment, RT_MainMaster, RT_OutlineTextRefAtom, RT_Slide, RT_SlideAtom, RT_StyleTextPropAtom, RT_TextHeaderAtom, RT_TextMasterStyleAtom } from "./record/types.js";
4
+ import { RT_Document, RT_DocumentAtom, RT_Drawing, RT_Environment, RT_MainMaster, RT_OutlineTextRefAtom, RT_Slide, RT_SlideAtom, RT_StyleTextPropAtom, RT_TextHeaderAtom, RT_TextMasterStyleAtom } from "./record/types.js";
4
5
  import { readStyleTextPropAtom, readTextMasterStyleAtom } from "./text/style.js";
5
6
  import { characterCountOf, readTextBody, readTextHeaderAtom } from "./text/atoms.js";
6
7
  import { masterUnitsToPoints } from "./units.js";
7
- import { readSlideSchemeColorSchemeAtom } from "./document/color-scheme.js";
8
+ import { findSlideSchemeColorSchemeAtom, readSlideSchemeColorSchemeAtom } from "./document/color-scheme.js";
8
9
  import { buildMasterStyleTable, readSlideAtom } from "./document/master.js";
9
10
  import { buildParagraphs } from "./content.js";
10
11
  import { decryptPptDocumentStream } from "./encryption.js";
11
12
  import { readDocumentAtom } from "./document/document-atom.js";
12
13
  import { readFontNames } from "./document/fonts.js";
14
+ import { blipForPib, readBlipStore } from "./drawing/blips.js";
15
+ import "./drawing/properties.js";
13
16
  import { readNotesListWithText } from "./document/notes-list.js";
14
17
  import { readDrawingShapes } from "./drawing/shapes.js";
15
18
  import { readNotesContainerAtom, readNotesText } from "./document/notes.js";
@@ -21,6 +24,7 @@ import { assembleTree } from "document-schema.js";
21
24
  //#region src/read.ts
22
25
  const CURRENT_USER_STREAM = "Current User";
23
26
  const POWERPOINT_DOCUMENT_STREAM = "PowerPoint Document";
27
+ const PICTURES_STREAM = "Pictures";
24
28
  /** The [MS-OLEPS] Property Set Stream a .ppt's title/author/dates live in when present ([MS-OSHARED] 2.3.3.2.2) -- a genuinely optional stream, unlike the two above, since a valid PowerPoint binary document need not carry document properties at all. */
25
29
  const SUMMARY_INFORMATION_STREAM = "SummaryInformation";
26
30
  const DEFAULT_INSET_LEFT_RIGHT_PT = 7.2;
@@ -54,14 +58,56 @@ function textRecordsFor(clientTextbox, persist) {
54
58
  records: outlineText.records
55
59
  };
56
60
  }
57
- function blocksFor(clientTextbox, persist, fontNames, masterInfo) {
61
+ function blocksFor(clientTextbox, context) {
58
62
  if (clientTextbox === void 0) return [];
59
- const { textType, records } = textRecordsFor(clientTextbox, persist);
63
+ const { textType, records } = textRecordsFor(clientTextbox, context.persist);
60
64
  const text = readTextBody(records);
61
65
  if (text === void 0) return [];
62
66
  const styleRecord = findChild(records, RT_StyleTextPropAtom);
63
67
  const style = styleRecord === void 0 ? NO_STYLE : readStyleTextPropAtom(styleRecord, characterCountOf(text));
64
- return buildParagraphs(text, style, fontNames, masterInfo.styles, textType, masterInfo.colorScheme);
68
+ return buildParagraphs(text, style, context.fontNames, context.masterInfo.styles, textType, context.masterInfo.colorScheme);
69
+ }
70
+ function imageBlocksFor(pibProperty, context, widthPt, heightPt) {
71
+ if (pibProperty === void 0) return [];
72
+ const blip = blipForPib(context.blips, pibProperty.value);
73
+ if (blip === void 0) return [];
74
+ return [{
75
+ kind: "image",
76
+ format: blip.format,
77
+ base64: bytesToBase64(blip.bytes),
78
+ widthPt,
79
+ heightPt
80
+ }];
81
+ }
82
+ function tableBlockFor(table, context) {
83
+ const placed = table.cells.flatMap((cell) => cell.anchor === void 0 || cell.anchor.right <= cell.anchor.left || cell.anchor.bottom <= cell.anchor.top ? [] : [{
84
+ cell,
85
+ anchor: cell.anchor
86
+ }]);
87
+ const rowTops = [...new Set(placed.map((entry) => entry.anchor.top))].sort((a, b) => a - b);
88
+ const columnLefts = [...new Set(placed.map((entry) => entry.anchor.left))].sort((a, b) => a - b);
89
+ const rightmost = Math.max(...placed.map((entry) => entry.anchor.right), ...columnLefts);
90
+ const columnWidthsPt = columnLefts.map((left, index) => {
91
+ const right = columnLefts.at(index + 1) ?? rightmost;
92
+ return masterUnitsToPoints(right - left);
93
+ });
94
+ return {
95
+ kind: "table",
96
+ rows: rowTops.map((top) => {
97
+ const inRow = placed.filter((entry) => entry.anchor.top === top).sort((a, b) => a.anchor.left - b.anchor.left);
98
+ const bottom = Math.max(...inRow.map((entry) => entry.anchor.bottom), top);
99
+ const cells = columnLefts.map((left) => {
100
+ const at = inRow.find((entry) => entry.anchor.left === left);
101
+ return at === void 0 ? { blocks: [] } : { blocks: blocksFor(at.cell.clientTextbox, context) };
102
+ });
103
+ const heightPt = masterUnitsToPoints(bottom - top);
104
+ return heightPt > 0 ? {
105
+ cells,
106
+ heightPt
107
+ } : { cells };
108
+ }),
109
+ columnWidthsPt
110
+ };
65
111
  }
66
112
  function readNotesBySlideId(streamBytes, directory, notesList) {
67
113
  const notes = /* @__PURE__ */ new Map();
@@ -73,7 +119,7 @@ function readNotesBySlideId(streamBytes, directory, notesList) {
73
119
  return notes;
74
120
  }
75
121
  function colorSchemeFor(slideChildren, master) {
76
- const ownScheme = findChild(slideChildren, RT_ColorSchemeAtom);
122
+ const ownScheme = findSlideSchemeColorSchemeAtom(slideChildren);
77
123
  return ownScheme === void 0 ? master.colorScheme : readSlideSchemeColorSchemeAtom(ownScheme);
78
124
  }
79
125
  function readMastersById(streamBytes, directory, masterList, documentDefault) {
@@ -85,7 +131,7 @@ function readMastersById(streamBytes, directory, masterList, documentDefault) {
85
131
  const masterChildren = childRecords(masterContainer);
86
132
  const masterAtoms = masterChildren.filter((record) => record.header.recType === RT_TextMasterStyleAtom).map(readTextMasterStyleAtom);
87
133
  const styles = buildMasterStyleTable(masterAtoms, documentDefault);
88
- const colorSchemeRecord = findChild(masterChildren, RT_ColorSchemeAtom);
134
+ const colorSchemeRecord = findSlideSchemeColorSchemeAtom(masterChildren);
89
135
  if (colorSchemeRecord === void 0) throw new PptFormatError(`MainMasterContainer for master ${persist.slideId} has no SlideSchemeColorSchemeAtom, which [MS-PPT] 2.5.3 requires`);
90
136
  mastersById.set(persist.slideId, {
91
137
  styles,
@@ -94,7 +140,8 @@ function readMastersById(streamBytes, directory, masterList, documentDefault) {
94
140
  }
95
141
  return mastersById;
96
142
  }
97
- function readSlide(streamBytes, directory, persist, size, fontNames, notes, mastersById) {
143
+ function readSlide(base, size, notes, mastersById) {
144
+ const { streamBytes, directory, persist } = base;
98
145
  const slideContainer = resolvePersistObject(streamBytes, directory, persist.persistIdRef, `SlidePersistAtom for slide ${persist.slideId}`);
99
146
  if (slideContainer.header.recType !== 1006) throw new PptFormatError(`persist object ${persist.persistIdRef} is record type 0x${slideContainer.header.recType.toString(16)}, not the RT_Slide (0x${RT_Slide.toString(16)}) its SlidePersistAtom promised`);
100
147
  const slideChildren = childRecords(slideContainer);
@@ -103,28 +150,54 @@ function readSlide(streamBytes, directory, persist, size, fontNames, notes, mast
103
150
  const { masterIdRef } = readSlideAtom(slideAtomRecord);
104
151
  const master = mastersById.get(masterIdRef);
105
152
  if (master === void 0) throw new PptFormatError(`slide ${persist.slideId}'s own SlideAtom names masterIdRef ${masterIdRef}, which the master list does not contain`);
106
- const masterInfo = {
107
- styles: master.styles,
108
- colorScheme: colorSchemeFor(slideChildren, master)
153
+ const context = {
154
+ ...base,
155
+ masterInfo: {
156
+ styles: master.styles,
157
+ colorScheme: colorSchemeFor(slideChildren, master)
158
+ }
109
159
  };
110
160
  const drawing = findChild(slideChildren, RT_Drawing);
111
161
  const shapes = [];
112
162
  for (const shape of drawing === void 0 ? [] : readDrawingShapes(drawing)) {
163
+ if (!("clientTextbox" in shape)) {
164
+ const tableLeft = masterUnitsToPoints(shape.anchor.left);
165
+ const tableTop = masterUnitsToPoints(shape.anchor.top);
166
+ shapes.push({
167
+ frame: {
168
+ xPt: tableLeft,
169
+ yPt: tableTop,
170
+ widthPt: Math.max(0, masterUnitsToPoints(shape.anchor.right) - tableLeft),
171
+ heightPt: Math.max(0, masterUnitsToPoints(shape.anchor.bottom) - tableTop)
172
+ },
173
+ ...shape.rotationDeg === void 0 ? {} : { rotationDeg: shape.rotationDeg },
174
+ insetLeftPt: DEFAULT_INSET_LEFT_RIGHT_PT,
175
+ insetTopPt: DEFAULT_INSET_TOP_BOTTOM_PT,
176
+ insetRightPt: DEFAULT_INSET_LEFT_RIGHT_PT,
177
+ insetBottomPt: DEFAULT_INSET_TOP_BOTTOM_PT,
178
+ blocks: [tableBlockFor(shape, context)]
179
+ });
180
+ continue;
181
+ }
113
182
  if (shape.anchor === void 0) continue;
114
183
  const left = masterUnitsToPoints(shape.anchor.left);
115
184
  const top = masterUnitsToPoints(shape.anchor.top);
185
+ const widthPt = Math.max(0, masterUnitsToPoints(shape.anchor.right) - left);
186
+ const heightPt = Math.max(0, masterUnitsToPoints(shape.anchor.bottom) - top);
187
+ const isPicture = shape.properties.get(260) !== void 0;
116
188
  shapes.push({
117
189
  frame: {
118
190
  xPt: left,
119
191
  yPt: top,
120
- widthPt: Math.max(0, masterUnitsToPoints(shape.anchor.right) - left),
121
- heightPt: Math.max(0, masterUnitsToPoints(shape.anchor.bottom) - top)
192
+ widthPt,
193
+ heightPt
122
194
  },
123
- insetLeftPt: DEFAULT_INSET_LEFT_RIGHT_PT,
124
- insetTopPt: DEFAULT_INSET_TOP_BOTTOM_PT,
125
- insetRightPt: DEFAULT_INSET_LEFT_RIGHT_PT,
126
- insetBottomPt: DEFAULT_INSET_TOP_BOTTOM_PT,
127
- blocks: blocksFor(shape.clientTextbox, persist, fontNames, masterInfo)
195
+ ...shape.rotationDeg === void 0 ? {} : { rotationDeg: shape.rotationDeg },
196
+ insetLeftPt: isPicture ? 0 : DEFAULT_INSET_LEFT_RIGHT_PT,
197
+ insetTopPt: isPicture ? 0 : DEFAULT_INSET_TOP_BOTTOM_PT,
198
+ insetRightPt: isPicture ? 0 : DEFAULT_INSET_LEFT_RIGHT_PT,
199
+ insetBottomPt: isPicture ? 0 : DEFAULT_INSET_TOP_BOTTOM_PT,
200
+ blocks: [...imageBlocksFor(shape.properties.get(260), context, widthPt, heightPt), ...blocksFor(shape.clientTextbox, context)]
128
201
  });
129
202
  }
130
203
  return {
@@ -133,7 +206,7 @@ function readSlide(streamBytes, directory, persist, size, fontNames, notes, mast
133
206
  notes
134
207
  };
135
208
  }
136
- function readPptStreams(currentUserStream, powerPointDocumentStream, password) {
209
+ function readPptStreams(currentUserStream, powerPointDocumentStream, password, picturesStream) {
137
210
  const currentUser = readCurrentUserAtom(currentUserStream);
138
211
  const { directory, currentEdit } = buildPersistDirectory(powerPointDocumentStream, currentUser.offsetToCurrentEdit);
139
212
  let streamBytes = powerPointDocumentStream;
@@ -161,14 +234,22 @@ function readPptStreams(currentUserStream, powerPointDocumentStream, password) {
161
234
  const slideList = listWithInstance(0);
162
235
  const persists = slideList === void 0 ? [] : readSlideListWithText(slideList);
163
236
  const notesBySlideId = readNotesBySlideId(streamBytes, directory, listWithInstance(2));
237
+ const blips = readBlipStore(documentContainer, currentUser.encrypted ? void 0 : picturesStream);
164
238
  return {
165
239
  metadata: {},
166
- slides: persists.map((persist) => readSlide(streamBytes, directory, persist, size, fontNames, notesBySlideId.get(persist.slideId) ?? "", mastersById))
240
+ slides: persists.map((persist) => readSlide({
241
+ streamBytes,
242
+ directory,
243
+ persist,
244
+ fontNames,
245
+ blips
246
+ }, size, notesBySlideId.get(persist.slideId) ?? "", mastersById))
167
247
  };
168
248
  }
169
249
  function readPptContent(bytes, password) {
170
250
  const streams = readCompoundFile(bytes);
171
- const document = readPptStreams(requireStream(streams, CURRENT_USER_STREAM), requireStream(streams, POWERPOINT_DOCUMENT_STREAM), password);
251
+ const pictures = streams.find((stream) => stream.path === PICTURES_STREAM);
252
+ const document = readPptStreams(requireStream(streams, CURRENT_USER_STREAM), requireStream(streams, POWERPOINT_DOCUMENT_STREAM), password, pictures === void 0 ? void 0 : pictures.bytes);
172
253
  const metadataStream = streams.find((stream) => stream.path === SUMMARY_INFORMATION_STREAM);
173
254
  if (metadataStream === void 0) return document;
174
255
  return {
@@ -186,4 +267,4 @@ function readPpt(bytes, password) {
186
267
  return assembleTree(document);
187
268
  }
188
269
  //#endregion
189
- export { CURRENT_USER_STREAM, DEFAULT_INSET_LEFT_RIGHT_PT, DEFAULT_INSET_TOP_BOTTOM_PT, POWERPOINT_DOCUMENT_STREAM, SUMMARY_INFORMATION_STREAM, readPpt, readPptContent, readPptStreams };
270
+ export { CURRENT_USER_STREAM, DEFAULT_INSET_LEFT_RIGHT_PT, DEFAULT_INSET_TOP_BOTTOM_PT, PICTURES_STREAM, POWERPOINT_DOCUMENT_STREAM, SUMMARY_INFORMATION_STREAM, readPpt, readPptContent, readPptStreams };
@@ -10,11 +10,13 @@ const RT_Environment = 1010;
10
10
  const RT_SlidePersistAtom = 1011;
11
11
  const RT_MainMaster = 1016;
12
12
  const RT_ExternalObjectList = 1033;
13
+ const RT_ExternalObjectListAtom = 1034;
13
14
  const RT_DrawingGroup = 1035;
14
15
  const RT_Drawing = 1036;
15
16
  const RT_List = 2e3;
16
17
  const RT_FontCollection = 2005;
17
18
  const RT_ColorSchemeAtom = 2032;
19
+ const RT_ExternalObjectRefAtom = 3009;
18
20
  const RT_PlaceholderAtom = 3011;
19
21
  const RT_OutlineTextRefAtom = 3998;
20
22
  const RT_TextHeaderAtom = 3999;
@@ -28,17 +30,25 @@ const RT_TextSpecialInfoDefaultAtom = 4009;
28
30
  const RT_TextSpecialInfoAtom = 4010;
29
31
  const RT_FontEntityAtom = 4023;
30
32
  const RT_CString = 4026;
33
+ const RT_ExternalOleObjectAtom = 4035;
34
+ const RT_ExternalOleEmbed = 4044;
35
+ const RT_ExternalOleEmbedAtom = 4045;
31
36
  const RT_SlideListWithText = 4080;
32
37
  const RT_UserEditAtom = 4085;
33
38
  const RT_CurrentUserAtom = 4086;
39
+ const RT_ExternalOleObjectStg = 4113;
34
40
  const RT_PersistDirectoryAtom = 6002;
35
41
  const RT_CryptSession10Container = 12052;
36
42
  const SLIDE_LIST_INSTANCE_SLIDES = 0;
37
43
  const SLIDE_LIST_INSTANCE_MASTERS = 1;
38
44
  const SLIDE_LIST_INSTANCE_NOTES = 2;
45
+ const OfficeArtDggContainer = 61440;
46
+ const OfficeArtBStoreContainer = 61441;
39
47
  const OfficeArtDgContainer = 61442;
40
48
  const OfficeArtSpgrContainer = 61443;
41
49
  const OfficeArtSpContainer = 61444;
50
+ const OfficeArtFDGGBlock = 61446;
51
+ const OfficeArtFBSE = 61447;
42
52
  const OfficeArtFSPGR = 61449;
43
53
  const OfficeArtFSP = 61450;
44
54
  const OfficeArtFOPT = 61451;
@@ -46,17 +56,29 @@ const OfficeArtClientTextbox = 61453;
46
56
  const OfficeArtChildAnchor = 61455;
47
57
  const OfficeArtClientAnchor = 61456;
48
58
  const OfficeArtClientData = 61457;
59
+ const OfficeArtSecondaryFOPT = 61729;
60
+ const OfficeArtTertiaryFOPT = 61730;
61
+ const OfficeArtBlipJPEG = 61469;
62
+ const OfficeArtBlipPNG = 61470;
49
63
  //#endregion
64
+ exports.OfficeArtBStoreContainer = OfficeArtBStoreContainer;
65
+ exports.OfficeArtBlipJPEG = OfficeArtBlipJPEG;
66
+ exports.OfficeArtBlipPNG = OfficeArtBlipPNG;
50
67
  exports.OfficeArtChildAnchor = OfficeArtChildAnchor;
51
68
  exports.OfficeArtClientAnchor = OfficeArtClientAnchor;
52
69
  exports.OfficeArtClientData = OfficeArtClientData;
53
70
  exports.OfficeArtClientTextbox = OfficeArtClientTextbox;
54
71
  exports.OfficeArtDgContainer = OfficeArtDgContainer;
72
+ exports.OfficeArtDggContainer = OfficeArtDggContainer;
73
+ exports.OfficeArtFBSE = OfficeArtFBSE;
74
+ exports.OfficeArtFDGGBlock = OfficeArtFDGGBlock;
55
75
  exports.OfficeArtFOPT = OfficeArtFOPT;
56
76
  exports.OfficeArtFSP = OfficeArtFSP;
57
77
  exports.OfficeArtFSPGR = OfficeArtFSPGR;
78
+ exports.OfficeArtSecondaryFOPT = OfficeArtSecondaryFOPT;
58
79
  exports.OfficeArtSpContainer = OfficeArtSpContainer;
59
80
  exports.OfficeArtSpgrContainer = OfficeArtSpgrContainer;
81
+ exports.OfficeArtTertiaryFOPT = OfficeArtTertiaryFOPT;
60
82
  exports.RT_CString = RT_CString;
61
83
  exports.RT_ColorSchemeAtom = RT_ColorSchemeAtom;
62
84
  exports.RT_CryptSession10Container = RT_CryptSession10Container;
@@ -67,6 +89,12 @@ exports.RT_Drawing = RT_Drawing;
67
89
  exports.RT_DrawingGroup = RT_DrawingGroup;
68
90
  exports.RT_Environment = RT_Environment;
69
91
  exports.RT_ExternalObjectList = RT_ExternalObjectList;
92
+ exports.RT_ExternalObjectListAtom = RT_ExternalObjectListAtom;
93
+ exports.RT_ExternalObjectRefAtom = RT_ExternalObjectRefAtom;
94
+ exports.RT_ExternalOleEmbed = RT_ExternalOleEmbed;
95
+ exports.RT_ExternalOleEmbedAtom = RT_ExternalOleEmbedAtom;
96
+ exports.RT_ExternalOleObjectAtom = RT_ExternalOleObjectAtom;
97
+ exports.RT_ExternalOleObjectStg = RT_ExternalOleObjectStg;
70
98
  exports.RT_FontCollection = RT_FontCollection;
71
99
  exports.RT_FontEntityAtom = RT_FontEntityAtom;
72
100
  exports.RT_List = RT_List;
@@ -9,11 +9,13 @@ declare const RT_Environment = 1010;
9
9
  declare const RT_SlidePersistAtom = 1011;
10
10
  declare const RT_MainMaster = 1016;
11
11
  declare const RT_ExternalObjectList = 1033;
12
+ declare const RT_ExternalObjectListAtom = 1034;
12
13
  declare const RT_DrawingGroup = 1035;
13
14
  declare const RT_Drawing = 1036;
14
15
  declare const RT_List = 2000;
15
16
  declare const RT_FontCollection = 2005;
16
17
  declare const RT_ColorSchemeAtom = 2032;
18
+ declare const RT_ExternalObjectRefAtom = 3009;
17
19
  declare const RT_PlaceholderAtom = 3011;
18
20
  declare const RT_OutlineTextRefAtom = 3998;
19
21
  declare const RT_TextHeaderAtom = 3999;
@@ -27,17 +29,25 @@ declare const RT_TextSpecialInfoDefaultAtom = 4009;
27
29
  declare const RT_TextSpecialInfoAtom = 4010;
28
30
  declare const RT_FontEntityAtom = 4023;
29
31
  declare const RT_CString = 4026;
32
+ declare const RT_ExternalOleObjectAtom = 4035;
33
+ declare const RT_ExternalOleEmbed = 4044;
34
+ declare const RT_ExternalOleEmbedAtom = 4045;
30
35
  declare const RT_SlideListWithText = 4080;
31
36
  declare const RT_UserEditAtom = 4085;
32
37
  declare const RT_CurrentUserAtom = 4086;
38
+ declare const RT_ExternalOleObjectStg = 4113;
33
39
  declare const RT_PersistDirectoryAtom = 6002;
34
40
  declare const RT_CryptSession10Container = 12052;
35
41
  declare const SLIDE_LIST_INSTANCE_SLIDES = 0;
36
42
  declare const SLIDE_LIST_INSTANCE_MASTERS = 1;
37
43
  declare const SLIDE_LIST_INSTANCE_NOTES = 2;
44
+ declare const OfficeArtDggContainer = 61440;
45
+ declare const OfficeArtBStoreContainer = 61441;
38
46
  declare const OfficeArtDgContainer = 61442;
39
47
  declare const OfficeArtSpgrContainer = 61443;
40
48
  declare const OfficeArtSpContainer = 61444;
49
+ declare const OfficeArtFDGGBlock = 61446;
50
+ declare const OfficeArtFBSE = 61447;
41
51
  declare const OfficeArtFSPGR = 61449;
42
52
  declare const OfficeArtFSP = 61450;
43
53
  declare const OfficeArtFOPT = 61451;
@@ -45,5 +55,9 @@ declare const OfficeArtClientTextbox = 61453;
45
55
  declare const OfficeArtChildAnchor = 61455;
46
56
  declare const OfficeArtClientAnchor = 61456;
47
57
  declare const OfficeArtClientData = 61457;
58
+ declare const OfficeArtSecondaryFOPT = 61729;
59
+ declare const OfficeArtTertiaryFOPT = 61730;
60
+ declare const OfficeArtBlipJPEG = 61469;
61
+ declare const OfficeArtBlipPNG = 61470;
48
62
  //#endregion
49
- export { OfficeArtChildAnchor, OfficeArtClientAnchor, OfficeArtClientData, OfficeArtClientTextbox, OfficeArtDgContainer, OfficeArtFOPT, OfficeArtFSP, OfficeArtFSPGR, OfficeArtSpContainer, OfficeArtSpgrContainer, RT_CString, RT_ColorSchemeAtom, RT_CryptSession10Container, RT_CurrentUserAtom, RT_Document, RT_DocumentAtom, RT_Drawing, RT_DrawingGroup, RT_Environment, RT_ExternalObjectList, RT_FontCollection, RT_FontEntityAtom, RT_List, RT_MainMaster, RT_MasterTextPropAtom, RT_Notes, RT_NotesAtom, RT_OutlineTextRefAtom, RT_PersistDirectoryAtom, RT_PlaceholderAtom, RT_Slide, RT_SlideAtom, RT_SlideListWithText, RT_SlidePersistAtom, RT_StyleTextPropAtom, RT_TextBytesAtom, RT_TextCharsAtom, RT_TextHeaderAtom, RT_TextMasterStyleAtom, RT_TextRulerAtom, RT_TextSpecialInfoAtom, RT_TextSpecialInfoDefaultAtom, RT_UserEditAtom, SLIDE_LIST_INSTANCE_MASTERS, SLIDE_LIST_INSTANCE_NOTES, SLIDE_LIST_INSTANCE_SLIDES };
63
+ export { OfficeArtBStoreContainer, OfficeArtBlipJPEG, OfficeArtBlipPNG, OfficeArtChildAnchor, OfficeArtClientAnchor, OfficeArtClientData, OfficeArtClientTextbox, OfficeArtDgContainer, OfficeArtDggContainer, OfficeArtFBSE, OfficeArtFDGGBlock, OfficeArtFOPT, OfficeArtFSP, OfficeArtFSPGR, OfficeArtSecondaryFOPT, OfficeArtSpContainer, OfficeArtSpgrContainer, OfficeArtTertiaryFOPT, RT_CString, RT_ColorSchemeAtom, RT_CryptSession10Container, RT_CurrentUserAtom, RT_Document, RT_DocumentAtom, RT_Drawing, RT_DrawingGroup, RT_Environment, RT_ExternalObjectList, RT_ExternalObjectListAtom, RT_ExternalObjectRefAtom, RT_ExternalOleEmbed, RT_ExternalOleEmbedAtom, RT_ExternalOleObjectAtom, RT_ExternalOleObjectStg, RT_FontCollection, RT_FontEntityAtom, RT_List, RT_MainMaster, RT_MasterTextPropAtom, RT_Notes, RT_NotesAtom, RT_OutlineTextRefAtom, RT_PersistDirectoryAtom, RT_PlaceholderAtom, RT_Slide, RT_SlideAtom, RT_SlideListWithText, RT_SlidePersistAtom, RT_StyleTextPropAtom, RT_TextBytesAtom, RT_TextCharsAtom, RT_TextHeaderAtom, RT_TextMasterStyleAtom, RT_TextRulerAtom, RT_TextSpecialInfoAtom, RT_TextSpecialInfoDefaultAtom, RT_UserEditAtom, SLIDE_LIST_INSTANCE_MASTERS, SLIDE_LIST_INSTANCE_NOTES, SLIDE_LIST_INSTANCE_SLIDES };