1 /* This code was generated by msoscheme (http://gitorious.org/msoscheme) */
2 /* version aca4fd06f1ad330ecadf05b9e862d7c91338f051 */
3 #include "simpleParser.h"
4 using namespace MSO;
5 #include "leinputstream.h"
parseRecordHeader(LEInputStream & in,RecordHeader & _s)6 void MSO::parseRecordHeader(LEInputStream& in, RecordHeader& _s) {
7 _s.streamOffset = in.getPosition();
8 _s.recVer = in.readuint4();
9 _s.recInstance = in.readuint12();
10 _s.recType = in.readuint16();
11 _s.recLen = in.readuint32();
12 }
parseCurrentUserAtom(LEInputStream & in,CurrentUserAtom & _s)13 void MSO::parseCurrentUserAtom(LEInputStream& in, CurrentUserAtom& _s) {
14 _s.streamOffset = in.getPosition();
15 int _c;
16 LEInputStream::Mark _m;
17 parseRecordHeader(in, _s.rh);
18 if (!(_s.rh.recVer == 0)) {
19 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
20 }
21 if (!(_s.rh.recInstance == 0)) {
22 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
23 }
24 if (!(_s.rh.recType == 0x0FF6)) {
25 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FF6");
26 }
27 _s.size = in.readuint32();
28 if (!(((quint32)_s.size) == 0x14)) {
29 throw IncorrectValueException(in.getPosition(), "((quint32)_s.size) == 0x14");
30 }
31 _s.headerToken = in.readuint32();
32 if (!(((quint32)_s.headerToken) == 0xE391C05F || ((quint32)_s.headerToken) == 0xF3D1C4DF)) {
33 throw IncorrectValueException(in.getPosition(), "((quint32)_s.headerToken) == 0xE391C05F || ((quint32)_s.headerToken) == 0xF3D1C4DF");
34 }
35 _s.offsetToCurrentEdit = in.readuint32();
36 _s.lenUserName = in.readuint16();
37 if (!(((quint16)_s.lenUserName)<=255)) {
38 throw IncorrectValueException(in.getPosition(), "((quint16)_s.lenUserName)<=255");
39 }
40 _s.docFileVersion = in.readuint16();
41 if (!(((quint16)_s.docFileVersion) == 0x03F4)) {
42 throw IncorrectValueException(in.getPosition(), "((quint16)_s.docFileVersion) == 0x03F4");
43 }
44 _s.majorVersion = in.readuint8();
45 if (!(((quint8)_s.majorVersion) == 0x03)) {
46 throw IncorrectValueException(in.getPosition(), "((quint8)_s.majorVersion) == 0x03");
47 }
48 _s.minorVersion = in.readuint8();
49 if (!(((quint8)_s.minorVersion) == 0x00)) {
50 throw IncorrectValueException(in.getPosition(), "((quint8)_s.minorVersion) == 0x00");
51 }
52 _s.unused = in.readuint16();
53 _c = _s.lenUserName;
54 _s.ansiUserName.resize(_c);
55 in.readBytes(_s.ansiUserName);
56 _s.relVersion = in.readuint32();
57 if (!(((quint32)_s.relVersion) == 0x8 || ((quint32)_s.relVersion) == 0x9)) {
58 throw IncorrectValueException(in.getPosition(), "((quint32)_s.relVersion) == 0x8 || ((quint32)_s.relVersion) == 0x9");
59 }
60 _s._has_unicodeUserName = _s.rh.recLen>3*_s.lenUserName+0x18;
61 if (_s._has_unicodeUserName) {
62 _c = _s.lenUserName;
63 _s.unicodeUserName.resize(_c);
64 for (int _i=0; _i<_c; ++_i) {
65 _s.unicodeUserName[_i] = in.readuint16();
66 }
67 }
68 _s._has_unknown = _s.rh.recLen-0x18-3*_s.lenUserName>0;
69 if (_s._has_unknown) {
70 _c = _s.rh.recLen-0x18-3*_s.lenUserName;
71 _s.unknown.resize(_c);
72 in.readBytes(_s.unknown);
73 }
74 }
parseTODOS(LEInputStream & in,TODOS & _s)75 void MSO::parseTODOS(LEInputStream& in, TODOS& _s) {
76 _s.streamOffset = in.getPosition();
77 LEInputStream::Mark _m;
78 bool _atend;
79 _atend = false;
80 while (!_atend) {
81 _m = in.setMark();
82 try {
83 _s.anon.append(Byte(&_s));
84 parseByte(in, _s.anon.last());
85 } catch(IncorrectValueException _e) {
86 _s.anon.removeLast();
87 _atend = true;
88 in.rewind(_m);
89 } catch(EOFException _e) {
90 _s.anon.removeLast();
91 _atend = true;
92 in.rewind(_m);
93 }
94 }
95 }
parseByte(LEInputStream & in,Byte & _s)96 void MSO::parseByte(LEInputStream& in, Byte& _s) {
97 _s.streamOffset = in.getPosition();
98 _s.b = in.readuint8();
99 }
parseZeroByte(LEInputStream & in,ZeroByte & _s)100 void MSO::parseZeroByte(LEInputStream& in, ZeroByte& _s) {
101 _s.streamOffset = in.getPosition();
102 _s.b = in.readuint8();
103 if (!(((quint8)_s.b) == 0)) {
104 throw IncorrectValueException(in.getPosition(), "((quint8)_s.b) == 0");
105 }
106 }
parseCurrentUserStream(LEInputStream & in,CurrentUserStream & _s)107 void MSO::parseCurrentUserStream(LEInputStream& in, CurrentUserStream& _s) {
108 _s.streamOffset = in.getPosition();
109 LEInputStream::Mark _m;
110 bool _atend;
111 parseCurrentUserAtom(in, _s.anon1);
112 _atend = false;
113 while (!_atend) {
114 _m = in.setMark();
115 try {
116 _s.trailing.append(Byte(&_s));
117 parseByte(in, _s.trailing.last());
118 } catch(IncorrectValueException _e) {
119 _s.trailing.removeLast();
120 _atend = true;
121 in.rewind(_m);
122 } catch(EOFException _e) {
123 _s.trailing.removeLast();
124 _atend = true;
125 in.rewind(_m);
126 }
127 }
128 }
parseOfficeArtBStoreDelay(LEInputStream & in,OfficeArtBStoreDelay & _s)129 void MSO::parseOfficeArtBStoreDelay(LEInputStream& in, OfficeArtBStoreDelay& _s) {
130 _s.streamOffset = in.getPosition();
131 LEInputStream::Mark _m;
132 bool _atend;
133 _atend = false;
134 while (!_atend) {
135 _m = in.setMark();
136 try {
137 _s.rgfb.append(OfficeArtBStoreContainerFileBlock(&_s));
138 parseOfficeArtBStoreContainerFileBlock(in, _s.rgfb.last());
139 } catch(IncorrectValueException _e) {
140 _s.rgfb.removeLast();
141 _atend = true;
142 in.rewind(_m);
143 } catch(EOFException _e) {
144 _s.rgfb.removeLast();
145 _atend = true;
146 in.rewind(_m);
147 }
148 }
149 }
parseOfficeArtRecordHeader(LEInputStream & in,OfficeArtRecordHeader & _s)150 void MSO::parseOfficeArtRecordHeader(LEInputStream& in, OfficeArtRecordHeader& _s) {
151 _s.streamOffset = in.getPosition();
152 _s.recVer = in.readuint4();
153 _s.recInstance = in.readuint12();
154 _s.recType = in.readuint16();
155 _s.recLen = in.readuint32();
156 }
parseOfficeArtBlipJPEG(LEInputStream & in,OfficeArtBlipJPEG & _s)157 void MSO::parseOfficeArtBlipJPEG(LEInputStream& in, OfficeArtBlipJPEG& _s) {
158 _s.streamOffset = in.getPosition();
159 int _c;
160 LEInputStream::Mark _m;
161 parseOfficeArtRecordHeader(in, _s.rh);
162 if (!(_s.rh.recVer == 0)) {
163 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
164 }
165 if (!(_s.rh.recInstance == 0x46A || _s.rh.recInstance == 0x46B || _s.rh.recInstance == 0x6E2 || _s.rh.recInstance == 0x6E3)) {
166 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x46A || _s.rh.recInstance == 0x46B || _s.rh.recInstance == 0x6E2 || _s.rh.recInstance == 0x6E3");
167 }
168 if (!(_s.rh.recType == 0xF01D)) {
169 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01D");
170 }
171 _c = 16;
172 _s.rgbUid1.resize(_c);
173 in.readBytes(_s.rgbUid1);
174 _s._has_rgbUid2 = _s.rh.recInstance == 0x46B || _s.rh.recInstance == 0x6E3;
175 if (_s._has_rgbUid2) {
176 _c = 16;
177 _s.rgbUid2.resize(_c);
178 in.readBytes(_s.rgbUid2);
179 }
180 _s.tag = in.readuint8();
181 _c = _s.rh.recLen-((_s.rh.recInstance == 0x46A || _s.rh.recInstance == 0x6E2)?17:33);
182 _s.BLIPFileData.resize(_c);
183 in.readBytes(_s.BLIPFileData);
184 }
parseOfficeArtBlipPNG(LEInputStream & in,OfficeArtBlipPNG & _s)185 void MSO::parseOfficeArtBlipPNG(LEInputStream& in, OfficeArtBlipPNG& _s) {
186 _s.streamOffset = in.getPosition();
187 int _c;
188 LEInputStream::Mark _m;
189 parseOfficeArtRecordHeader(in, _s.rh);
190 if (!(_s.rh.recVer == 0)) {
191 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
192 }
193 if (!(_s.rh.recInstance == 0x6E0 || _s.rh.recInstance == 0x6E1)) {
194 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x6E0 || _s.rh.recInstance == 0x6E1");
195 }
196 if (!(_s.rh.recType == 0xF01E)) {
197 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01E");
198 }
199 _c = 16;
200 _s.rgbUid1.resize(_c);
201 in.readBytes(_s.rgbUid1);
202 _s._has_rgbUid2 = _s.rh.recInstance == 0x6E1;
203 if (_s._has_rgbUid2) {
204 _c = 16;
205 _s.rgbUid2.resize(_c);
206 in.readBytes(_s.rgbUid2);
207 }
208 _s.tag = in.readuint8();
209 _c = _s.rh.recLen-((_s.rh.recInstance==0x6E0)?17:33);
210 _s.BLIPFileData.resize(_c);
211 in.readBytes(_s.BLIPFileData);
212 }
parseOfficeArtBlipDIB(LEInputStream & in,OfficeArtBlipDIB & _s)213 void MSO::parseOfficeArtBlipDIB(LEInputStream& in, OfficeArtBlipDIB& _s) {
214 _s.streamOffset = in.getPosition();
215 int _c;
216 LEInputStream::Mark _m;
217 parseOfficeArtRecordHeader(in, _s.rh);
218 if (!(_s.rh.recVer == 0)) {
219 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
220 }
221 if (!(_s.rh.recInstance == 0x7A8 || _s.rh.recInstance == 0x7A9)) {
222 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x7A8 || _s.rh.recInstance == 0x7A9");
223 }
224 if (!(_s.rh.recType == 0xF01F)) {
225 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01F");
226 }
227 _c = 16;
228 _s.rgbUid1.resize(_c);
229 in.readBytes(_s.rgbUid1);
230 _s._has_rgbUid2 = _s.rh.recInstance == 0x7A9;
231 if (_s._has_rgbUid2) {
232 _c = 16;
233 _s.rgbUid2.resize(_c);
234 in.readBytes(_s.rgbUid2);
235 }
236 _s.tag = in.readuint8();
237 _c = _s.rh.recLen-((_s.rh.recInstance==0x7A8)?17:33);
238 _s.BLIPFileData.resize(_c);
239 in.readBytes(_s.BLIPFileData);
240 }
parseOfficeArtBlipTIFF(LEInputStream & in,OfficeArtBlipTIFF & _s)241 void MSO::parseOfficeArtBlipTIFF(LEInputStream& in, OfficeArtBlipTIFF& _s) {
242 _s.streamOffset = in.getPosition();
243 int _c;
244 LEInputStream::Mark _m;
245 parseOfficeArtRecordHeader(in, _s.rh);
246 if (!(_s.rh.recVer == 0)) {
247 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
248 }
249 if (!(_s.rh.recInstance == 0x6E4 || _s.rh.recInstance == 0x6E5)) {
250 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x6E4 || _s.rh.recInstance == 0x6E5");
251 }
252 if (!(_s.rh.recType == 0xF020)) {
253 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF020");
254 }
255 _c = 16;
256 _s.rgbUid1.resize(_c);
257 in.readBytes(_s.rgbUid1);
258 _s._has_rgbUid2 = _s.rh.recInstance == 0x6E5;
259 if (_s._has_rgbUid2) {
260 _c = 16;
261 _s.rgbUid2.resize(_c);
262 in.readBytes(_s.rgbUid2);
263 }
264 _s.tag = in.readuint8();
265 _c = _s.rh.recLen-((_s.rh.recInstance==0x6E4)?17:33);
266 _s.BLIPFileData.resize(_c);
267 in.readBytes(_s.BLIPFileData);
268 }
parseRECT(LEInputStream & in,RECT & _s)269 void MSO::parseRECT(LEInputStream& in, RECT& _s) {
270 _s.streamOffset = in.getPosition();
271 _s.left = in.readint32();
272 _s.top = in.readint32();
273 _s.right = in.readint32();
274 _s.bottom = in.readint32();
275 }
parsePOINT(LEInputStream & in,POINT & _s)276 void MSO::parsePOINT(LEInputStream& in, POINT& _s) {
277 _s.streamOffset = in.getPosition();
278 _s.x = in.readint32();
279 _s.y = in.readint32();
280 }
parsePowerPointStructs(LEInputStream & in,PowerPointStructs & _s)281 void MSO::parsePowerPointStructs(LEInputStream& in, PowerPointStructs& _s) {
282 _s.streamOffset = in.getPosition();
283 LEInputStream::Mark _m;
284 bool _atend;
285 _atend = false;
286 while (!_atend) {
287 _m = in.setMark();
288 try {
289 _s.anon.append(PowerPointStruct(&_s));
290 parsePowerPointStruct(in, _s.anon.last());
291 } catch(IncorrectValueException _e) {
292 _s.anon.removeLast();
293 _atend = true;
294 in.rewind(_m);
295 } catch(EOFException _e) {
296 _s.anon.removeLast();
297 _atend = true;
298 in.rewind(_m);
299 }
300 }
301 }
parseSoundCollectionAtom(LEInputStream & in,SoundCollectionAtom & _s)302 void MSO::parseSoundCollectionAtom(LEInputStream& in, SoundCollectionAtom& _s) {
303 _s.streamOffset = in.getPosition();
304 parseRecordHeader(in, _s.rh);
305 if (!(_s.rh.recVer == 0)) {
306 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
307 }
308 if (!(_s.rh.recInstance == 0)) {
309 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
310 }
311 if (!(_s.rh.recType == 0x7e5)) {
312 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7e5");
313 }
314 if (!(_s.rh.recLen == 4)) {
315 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
316 }
317 _s.soundIdSeed = in.readuint32();
318 }
parseHeadersFootersAtom(LEInputStream & in,HeadersFootersAtom & _s)319 void MSO::parseHeadersFootersAtom(LEInputStream& in, HeadersFootersAtom& _s) {
320 _s.streamOffset = in.getPosition();
321 parseRecordHeader(in, _s.rh);
322 if (!(_s.rh.recVer == 0)) {
323 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
324 }
325 if (!(_s.rh.recInstance == 0)) {
326 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
327 }
328 if (!(_s.rh.recType == 0xFDA)) {
329 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFDA");
330 }
331 if (!(_s.rh.recLen == 4)) {
332 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
333 }
334 _s.formatId = in.readint16();
335 if (!(((qint16)_s.formatId)>=0)) {
336 throw IncorrectValueException(in.getPosition(), "((qint16)_s.formatId)>=0");
337 }
338 if (!(((qint16)_s.formatId)<=13)) {
339 throw IncorrectValueException(in.getPosition(), "((qint16)_s.formatId)<=13");
340 }
341 _s.fHasDate = in.readbit();
342 _s.fHasTodayDate = in.readbit();
343 _s.fHasUserDate = in.readbit();
344 _s.fHasSlideNumber = in.readbit();
345 _s.fHasHeader = in.readbit();
346 _s.fHasFooter = in.readbit();
347 _s.reserved1 = in.readuint2();
348 _s.reserved2 = in.readuint8();
349 }
parseUserDateAtom(LEInputStream & in,UserDateAtom & _s)350 void MSO::parseUserDateAtom(LEInputStream& in, UserDateAtom& _s) {
351 _s.streamOffset = in.getPosition();
352 int _c;
353 LEInputStream::Mark _m;
354 parseRecordHeader(in, _s.rh);
355 if (!(_s.rh.recVer == 0)) {
356 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
357 }
358 if (!(_s.rh.recInstance == 0)) {
359 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
360 }
361 if (!(_s.rh.recType == 0xFBA)) {
362 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
363 }
364 if (!(_s.rh.recLen%2==0)) {
365 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
366 }
367 if (!(_s.rh.recLen<=510)) {
368 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen<=510");
369 }
370 _c = _s.rh.recLen/2;
371 _s.userDate.resize(_c);
372 for (int _i=0; _i<_c; ++_i) {
373 _s.userDate[_i] = in.readuint16();
374 }
375 }
parseHeaderAtom(LEInputStream & in,HeaderAtom & _s)376 void MSO::parseHeaderAtom(LEInputStream& in, HeaderAtom& _s) {
377 _s.streamOffset = in.getPosition();
378 int _c;
379 LEInputStream::Mark _m;
380 parseRecordHeader(in, _s.rh);
381 if (!(_s.rh.recVer == 0)) {
382 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
383 }
384 if (!(_s.rh.recInstance == 1)) {
385 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
386 }
387 if (!(_s.rh.recType == 0xFBA)) {
388 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
389 }
390 if (!(_s.rh.recLen%2==0)) {
391 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
392 }
393 _c = _s.rh.recLen/2;
394 _s.header.resize(_c);
395 for (int _i=0; _i<_c; ++_i) {
396 _s.header[_i] = in.readuint16();
397 }
398 }
parseFooterAtom(LEInputStream & in,FooterAtom & _s)399 void MSO::parseFooterAtom(LEInputStream& in, FooterAtom& _s) {
400 _s.streamOffset = in.getPosition();
401 int _c;
402 LEInputStream::Mark _m;
403 parseRecordHeader(in, _s.rh);
404 if (!(_s.rh.recVer == 0)) {
405 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
406 }
407 if (!(_s.rh.recInstance == 2)) {
408 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 2");
409 }
410 if (!(_s.rh.recType == 0xFBA)) {
411 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
412 }
413 if (!(_s.rh.recLen%2==0)) {
414 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
415 }
416 _c = _s.rh.recLen/2;
417 _s.footer.resize(_c);
418 for (int _i=0; _i<_c; ++_i) {
419 _s.footer[_i] = in.readuint16();
420 }
421 }
parsePerSlideHeadersFootersContainer(LEInputStream & in,PerSlideHeadersFootersContainer & _s)422 void MSO::parsePerSlideHeadersFootersContainer(LEInputStream& in, PerSlideHeadersFootersContainer& _s) {
423 _s.streamOffset = in.getPosition();
424 LEInputStream::Mark _m;
425 bool _possiblyPresent;
426 parseRecordHeader(in, _s.rh);
427 if (!(_s.rh.recVer == 0xF)) {
428 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
429 }
430 if (!(_s.rh.recInstance == 0)) {
431 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
432 }
433 if (!(_s.rh.recType == 0xFD9)) {
434 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD9");
435 }
436 parseHeadersFootersAtom(in, _s.hfAtom);
437 _m = in.setMark();
438 try {
439 RecordHeader _optionCheck(&_s);
440 parseRecordHeader(in, _optionCheck);
441 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0)&&(_optionCheck.recLen<=510);
442 } catch(EOFException _e) {
443 _possiblyPresent = false;
444 }
445 in.rewind(_m);
446 _m = in.setMark();
447 if (_possiblyPresent) {
448 try {
449 _s.userDateAtom = QSharedPointer<UserDateAtom>(new UserDateAtom(&_s));
450 parseUserDateAtom(in, *_s.userDateAtom.data());
451 } catch(IncorrectValueException _e) {
452 _s.userDateAtom.clear();
453 in.rewind(_m);
454 } catch(EOFException _e) {
455 _s.userDateAtom.clear();
456 in.rewind(_m);
457 }
458 }
459 _m = in.setMark();
460 try {
461 RecordHeader _optionCheck(&_s);
462 parseRecordHeader(in, _optionCheck);
463 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0);
464 } catch(EOFException _e) {
465 _possiblyPresent = false;
466 }
467 in.rewind(_m);
468 _m = in.setMark();
469 if (_possiblyPresent) {
470 try {
471 _s.headerAtom = QSharedPointer<HeaderAtom>(new HeaderAtom(&_s));
472 parseHeaderAtom(in, *_s.headerAtom.data());
473 } catch(IncorrectValueException _e) {
474 _s.headerAtom.clear();
475 in.rewind(_m);
476 } catch(EOFException _e) {
477 _s.headerAtom.clear();
478 in.rewind(_m);
479 }
480 }
481 _m = in.setMark();
482 try {
483 RecordHeader _optionCheck(&_s);
484 parseRecordHeader(in, _optionCheck);
485 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 2)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0);
486 } catch(EOFException _e) {
487 _possiblyPresent = false;
488 }
489 in.rewind(_m);
490 _m = in.setMark();
491 if (_possiblyPresent) {
492 try {
493 _s.footerAtom = QSharedPointer<FooterAtom>(new FooterAtom(&_s));
494 parseFooterAtom(in, *_s.footerAtom.data());
495 } catch(IncorrectValueException _e) {
496 _s.footerAtom.clear();
497 in.rewind(_m);
498 } catch(EOFException _e) {
499 _s.footerAtom.clear();
500 in.rewind(_m);
501 }
502 }
503 _m = in.setMark();
504 try {
505 RecordHeader _optionCheck(&_s);
506 parseRecordHeader(in, _optionCheck);
507 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0)&&(_optionCheck.recLen<=510);
508 } catch(EOFException _e) {
509 _possiblyPresent = false;
510 }
511 in.rewind(_m);
512 _m = in.setMark();
513 if (_possiblyPresent) {
514 try {
515 _s.userDateAtom2 = QSharedPointer<UserDateAtom>(new UserDateAtom(&_s));
516 parseUserDateAtom(in, *_s.userDateAtom2.data());
517 } catch(IncorrectValueException _e) {
518 _s.userDateAtom2.clear();
519 in.rewind(_m);
520 } catch(EOFException _e) {
521 _s.userDateAtom2.clear();
522 in.rewind(_m);
523 }
524 }
525 }
parseEndDocumentAtom(LEInputStream & in,EndDocumentAtom & _s)526 void MSO::parseEndDocumentAtom(LEInputStream& in, EndDocumentAtom& _s) {
527 _s.streamOffset = in.getPosition();
528 parseRecordHeader(in, _s.rh);
529 if (!(_s.rh.recVer == 0)) {
530 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
531 }
532 if (!(_s.rh.recInstance == 0)) {
533 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
534 }
535 if (!(_s.rh.recType == 0x3EA)) {
536 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3EA");
537 }
538 if (!(_s.rh.recLen == 0)) {
539 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0");
540 }
541 }
parseDocInfoListContainer(LEInputStream & in,DocInfoListContainer & _s)542 void MSO::parseDocInfoListContainer(LEInputStream& in, DocInfoListContainer& _s) {
543 _s.streamOffset = in.getPosition();
544 LEInputStream::Mark _m;
545 bool _atend;
546 parseRecordHeader(in, _s.rh);
547 if (!(_s.rh.recVer == 0xF)) {
548 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
549 }
550 if (!(_s.rh.recInstance == 0)) {
551 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
552 }
553 if (!(_s.rh.recType == 0x7D0)) {
554 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7D0");
555 }
556 _atend = false;
557 while (!_atend) {
558 _m = in.setMark();
559 try {
560 _s.rgChildRec.append(DocInfoListSubContainerOrAtom(&_s));
561 parseDocInfoListSubContainerOrAtom(in, _s.rgChildRec.last());
562 } catch(IncorrectValueException _e) {
563 _s.rgChildRec.removeLast();
564 _atend = true;
565 in.rewind(_m);
566 } catch(EOFException _e) {
567 _s.rgChildRec.removeLast();
568 _atend = true;
569 in.rewind(_m);
570 }
571 }
572 }
parseSlideViewInfoAtom(LEInputStream & in,SlideViewInfoAtom & _s)573 void MSO::parseSlideViewInfoAtom(LEInputStream& in, SlideViewInfoAtom& _s) {
574 _s.streamOffset = in.getPosition();
575 parseRecordHeader(in, _s.rh);
576 if (!(_s.rh.recVer == 0)) {
577 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
578 }
579 if (!(_s.rh.recInstance == 0)) {
580 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
581 }
582 if (!(_s.rh.recType == 0x3FE)) {
583 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FE");
584 }
585 if (!(_s.rh.recLen == 3)) {
586 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 3");
587 }
588 _s.unused1 = in.readuint8();
589 _s.fSnapToGrid = in.readuint8();
590 _s.fSnapToShape = in.readuint8();
591 }
parseGuideAtom(LEInputStream & in,GuideAtom & _s)592 void MSO::parseGuideAtom(LEInputStream& in, GuideAtom& _s) {
593 _s.streamOffset = in.getPosition();
594 parseRecordHeader(in, _s.rh);
595 if (!(_s.rh.recVer == 0)) {
596 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
597 }
598 if (!(_s.rh.recInstance == 7)) {
599 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 7");
600 }
601 if (!(_s.rh.recType == 0x3FB)) {
602 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FB");
603 }
604 if (!(_s.rh.recLen == 8)) {
605 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
606 }
607 _s.type = in.readuint32();
608 if (!(((quint32)_s.type) == 0 || ((quint32)_s.type) == 1)) {
609 throw IncorrectValueException(in.getPosition(), "((quint32)_s.type) == 0 || ((quint32)_s.type) == 1");
610 }
611 _s.pos = in.readint32();
612 if (!(((qint32)_s.pos)>=-15840)) {
613 throw IncorrectValueException(in.getPosition(), "((qint32)_s.pos)>=-15840");
614 }
615 if (!(((qint32)_s.pos)<=32255)) {
616 throw IncorrectValueException(in.getPosition(), "((qint32)_s.pos)<=32255");
617 }
618 }
parseDocProgTagsContainer(LEInputStream & in,DocProgTagsContainer & _s)619 void MSO::parseDocProgTagsContainer(LEInputStream& in, DocProgTagsContainer& _s) {
620 _s.streamOffset = in.getPosition();
621 LEInputStream::Mark _m;
622 bool _atend;
623 parseRecordHeader(in, _s.rh);
624 if (!(_s.rh.recVer == 0xF)) {
625 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
626 }
627 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1)) {
628 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1");
629 }
630 if (!(_s.rh.recType == 0x1388)) {
631 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1388");
632 }
633 qint64 _startPos = in.getPosition();
634 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
635 _atend = in.getPosition() - _startPos >= _totalSize;
636 while (!_atend) {
637 _s.rgChildRec.append(DocProgTagsSubContainerOrAtom(&_s));
638 parseDocProgTagsSubContainerOrAtom(in, _s.rgChildRec.last());
639 _atend = in.getPosition() - _startPos >= _totalSize;
640 }
641 }
parseTextAutoNumberScheme(LEInputStream & in,TextAutoNumberScheme & _s)642 void MSO::parseTextAutoNumberScheme(LEInputStream& in, TextAutoNumberScheme& _s) {
643 _s.streamOffset = in.getPosition();
644 _s.scheme = in.readuint16();
645 if (!(((quint16)_s.scheme)<=40)) {
646 throw IncorrectValueException(in.getPosition(), "((quint16)_s.scheme)<=40");
647 }
648 _s.startNum = in.readuint16();
649 if (!(((quint16)_s.startNum)>=1)) {
650 throw IncorrectValueException(in.getPosition(), "((quint16)_s.startNum)>=1");
651 }
652 }
parseBlipCollection9Container(LEInputStream & in,BlipCollection9Container & _s)653 void MSO::parseBlipCollection9Container(LEInputStream& in, BlipCollection9Container& _s) {
654 _s.streamOffset = in.getPosition();
655 LEInputStream::Mark _m;
656 bool _atend;
657 parseRecordHeader(in, _s.rh);
658 if (!(_s.rh.recVer == 0xF)) {
659 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
660 }
661 if (!(_s.rh.recInstance == 0x0)) {
662 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
663 }
664 if (!(_s.rh.recType == 0x07F8)) {
665 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07F8");
666 }
667 qint64 _startPos = in.getPosition();
668 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
669 _atend = in.getPosition() - _startPos >= _totalSize;
670 while (!_atend) {
671 _s.rgBlipEntityAtom.append(BlipEntityAtom(&_s));
672 parseBlipEntityAtom(in, _s.rgBlipEntityAtom.last());
673 _atend = in.getPosition() - _startPos >= _totalSize;
674 }
675 }
parseKinsoku9Atom(LEInputStream & in,Kinsoku9Atom & _s)676 void MSO::parseKinsoku9Atom(LEInputStream& in, Kinsoku9Atom& _s) {
677 _s.streamOffset = in.getPosition();
678 parseRecordHeader(in, _s.rh);
679 if (!(_s.rh.recVer == 0x0)) {
680 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
681 }
682 if (!(_s.rh.recInstance == 0x3)) {
683 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x3");
684 }
685 if (!(_s.rh.recType == 0x0FD2)) {
686 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FD2");
687 }
688 if (!(_s.rh.recLen == 0x0004)) {
689 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x0004");
690 }
691 _s.korLevel = in.readuint2();
692 if (!(((quint8)_s.korLevel) == 0x0 || ((quint8)_s.korLevel) == 0x2)) {
693 throw IncorrectValueException(in.getPosition(), "((quint8)_s.korLevel) == 0x0 || ((quint8)_s.korLevel) == 0x2");
694 }
695 _s.scLevel = in.readuint2();
696 if (!(((quint8)_s.scLevel) == 0x0 || ((quint8)_s.scLevel) == 0x2)) {
697 throw IncorrectValueException(in.getPosition(), "((quint8)_s.scLevel) == 0x0 || ((quint8)_s.scLevel) == 0x2");
698 }
699 _s.tcLevel = in.readuint2();
700 if (!(((quint8)_s.tcLevel) == 0x0 || ((quint8)_s.tcLevel) == 0x2)) {
701 throw IncorrectValueException(in.getPosition(), "((quint8)_s.tcLevel) == 0x0 || ((quint8)_s.tcLevel) == 0x2");
702 }
703 _s.jpnLevel = in.readuint2();
704 if (!(((quint8)_s.jpnLevel) == 0x0 || ((quint8)_s.jpnLevel) == 0x1 || ((quint8)_s.jpnLevel) == 0x2)) {
705 throw IncorrectValueException(in.getPosition(), "((quint8)_s.jpnLevel) == 0x0 || ((quint8)_s.jpnLevel) == 0x1 || ((quint8)_s.jpnLevel) == 0x2");
706 }
707 _s.reserveda = in.readuint4();
708 if (!(((quint8)_s.reserveda) == 0)) {
709 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserveda) == 0");
710 }
711 _s.reservedb = in.readuint20();
712 if (!(((quint32)_s.reservedb) == 0)) {
713 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reservedb) == 0");
714 }
715 }
parseExHyperlink9Container(LEInputStream & in,ExHyperlink9Container & _s)716 void MSO::parseExHyperlink9Container(LEInputStream& in, ExHyperlink9Container& _s) {
717 _s.streamOffset = in.getPosition();
718 int _c;
719 LEInputStream::Mark _m;
720 parseRecordHeader(in, _s.rh);
721 if (!(_s.rh.recVer == 0xF)) {
722 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
723 }
724 if (!(_s.rh.recInstance == 0)) {
725 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
726 }
727 if (!(_s.rh.recType == 0xFE4)) {
728 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFE4");
729 }
730 _c = _s.rh.recLen;
731 _s.todo.resize(_c);
732 in.readBytes(_s.todo);
733 }
parsePresAdvisorFlags9Atom(LEInputStream & in,PresAdvisorFlags9Atom & _s)734 void MSO::parsePresAdvisorFlags9Atom(LEInputStream& in, PresAdvisorFlags9Atom& _s) {
735 _s.streamOffset = in.getPosition();
736 parseRecordHeader(in, _s.rh);
737 if (!(_s.rh.recVer == 0x0)) {
738 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
739 }
740 if (!(_s.rh.recInstance == 0)) {
741 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
742 }
743 if (!(_s.rh.recType == 0x177A)) {
744 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177A");
745 }
746 if (!(_s.rh.recLen == 0x4)) {
747 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x4");
748 }
749 _s.fDisableCaseStyleTitleRule = in.readbit();
750 _s.fDisableCaseStyleBodyRule = in.readbit();
751 _s.fDisableEndPunctuationTitleRule = in.readbit();
752 _s.fDisableEndPunctuationBodyRule = in.readbit();
753 _s.fDisableTooManyBulletsRule = in.readbit();
754 _s.fDisableFontSizeTitleRule = in.readbit();
755 _s.fDisableFontSizeBodyRule = in.readbit();
756 _s.fDisableNumberOfLinesTitleRule = in.readbit();
757 _s.fDisableNumberOfLinesBodyRule = in.readbit();
758 _s.fDisableTooManyFontsRule = in.readbit();
759 _s.fDisablePrintTip = in.readbit();
760 _s.reserveda = in.readuint5();
761 if (!(((quint8)_s.reserveda) == 0)) {
762 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserveda) == 0");
763 }
764 _s.reservedb = in.readuint16();
765 if (!(((quint16)_s.reservedb) == 0)) {
766 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reservedb) == 0");
767 }
768 }
parseEnvelopeData9Atom(LEInputStream & in,EnvelopeData9Atom & _s)769 void MSO::parseEnvelopeData9Atom(LEInputStream& in, EnvelopeData9Atom& _s) {
770 _s.streamOffset = in.getPosition();
771 int _c;
772 LEInputStream::Mark _m;
773 parseRecordHeader(in, _s.rh);
774 if (!(_s.rh.recVer == 0x0)) {
775 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
776 }
777 if (!(_s.rh.recInstance == 0)) {
778 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
779 }
780 if (!(_s.rh.recType == 0x1785)) {
781 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1785");
782 }
783 _c = _s.rh.recLen;
784 _s.todo.resize(_c);
785 in.readBytes(_s.todo);
786 }
parseEnvelopeFlags9Atom(LEInputStream & in,EnvelopeFlags9Atom & _s)787 void MSO::parseEnvelopeFlags9Atom(LEInputStream& in, EnvelopeFlags9Atom& _s) {
788 _s.streamOffset = in.getPosition();
789 parseRecordHeader(in, _s.rh);
790 if (!(_s.rh.recVer == 0x0)) {
791 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
792 }
793 if (!(_s.rh.recInstance == 0)) {
794 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
795 }
796 if (!(_s.rh.recType == 0x1784)) {
797 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1784");
798 }
799 if (!(_s.rh.recLen == 4)) {
800 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
801 }
802 _s.fHasEnvelope = in.readbit();
803 _s.fEnvelopeVisible = in.readbit();
804 _s.reserved1 = in.readuint2();
805 if (!(((quint8)_s.reserved1) == 0)) {
806 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved1) == 0");
807 }
808 _s.fEnvelopeDirty = in.readbit();
809 _s.reserved2a = in.readuint3();
810 if (!(((quint8)_s.reserved2a) == 0)) {
811 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2a) == 0");
812 }
813 _s.reserved2b = in.readuint8();
814 if (!(((quint8)_s.reserved2b) == 0)) {
815 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2b) == 0");
816 }
817 _s.reserved2c = in.readuint16();
818 if (!(((quint16)_s.reserved2c) == 0)) {
819 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reserved2c) == 0");
820 }
821 }
parseHTMLDocInfo9Atom(LEInputStream & in,HTMLDocInfo9Atom & _s)822 void MSO::parseHTMLDocInfo9Atom(LEInputStream& in, HTMLDocInfo9Atom& _s) {
823 _s.streamOffset = in.getPosition();
824 parseRecordHeader(in, _s.rh);
825 if (!(_s.rh.recVer == 0x0)) {
826 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
827 }
828 if (!(_s.rh.recInstance == 0)) {
829 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
830 }
831 if (!(_s.rh.recType == 0x177B)) {
832 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177B");
833 }
834 if (!(_s.rh.recLen == 0x10)) {
835 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
836 }
837 _s.unused1 = in.readuint32();
838 _s.encoding = in.readuint32();
839 _s.frameColorType = in.readuint16();
840 if (!(((quint16)_s.frameColorType) == 0 || ((quint16)_s.frameColorType) == 1 || ((quint16)_s.frameColorType) == 2 || ((quint16)_s.frameColorType) == 3 || ((quint16)_s.frameColorType) == 4 || ((quint16)_s.frameColorType) == 5)) {
841 throw IncorrectValueException(in.getPosition(), "((quint16)_s.frameColorType) == 0 || ((quint16)_s.frameColorType) == 1 || ((quint16)_s.frameColorType) == 2 || ((quint16)_s.frameColorType) == 3 || ((quint16)_s.frameColorType) == 4 || ((quint16)_s.frameColorType) == 5");
842 }
843 _s.screenSize = in.readuint8();
844 _s.unused2 = in.readuint8();
845 _s.outputType = in.readuint8();
846 _s.fShowFrame = in.readbit();
847 _s.fResizeGraphics = in.readbit();
848 _s.fOrganizeInFolder = in.readbit();
849 _s.fUseLongFileNames = in.readbit();
850 _s.fRelyOnVML = in.readbit();
851 _s.fAllowPNG = in.readbit();
852 _s.fShowSlideAnimation = in.readbit();
853 _s.reserved1 = in.readbit();
854 if (!(((bool)_s.reserved1) == false)) {
855 throw IncorrectValueException(in.getPosition(), "((bool)_s.reserved1) == false");
856 }
857 _s.unused3 = in.readuint16();
858 }
parseHTMLPublishInfo9Container(LEInputStream & in,HTMLPublishInfo9Container & _s)859 void MSO::parseHTMLPublishInfo9Container(LEInputStream& in, HTMLPublishInfo9Container& _s) {
860 _s.streamOffset = in.getPosition();
861 int _c;
862 LEInputStream::Mark _m;
863 parseRecordHeader(in, _s.rh);
864 if (!(_s.rh.recVer == 0xF)) {
865 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
866 }
867 if (!(_s.rh.recInstance == 0x0)) {
868 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
869 }
870 if (!(_s.rh.recType == 0x177D)) {
871 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177D");
872 }
873 _c = _s.rh.recLen;
874 _s.todo.resize(_c);
875 in.readBytes(_s.todo);
876 }
parseBroadcastDocInfo9Container(LEInputStream & in,BroadcastDocInfo9Container & _s)877 void MSO::parseBroadcastDocInfo9Container(LEInputStream& in, BroadcastDocInfo9Container& _s) {
878 _s.streamOffset = in.getPosition();
879 int _c;
880 LEInputStream::Mark _m;
881 parseRecordHeader(in, _s.rh);
882 if (!(_s.rh.recVer == 0xF)) {
883 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
884 }
885 if (!(_s.rh.recInstance == 0)) {
886 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
887 }
888 if (!(_s.rh.recType == 0x177E)) {
889 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177E");
890 }
891 _c = _s.rh.recLen;
892 _s.todo.resize(_c);
893 in.readBytes(_s.todo);
894 }
parseOutlineTextProps9Container(LEInputStream & in,OutlineTextProps9Container & _s)895 void MSO::parseOutlineTextProps9Container(LEInputStream& in, OutlineTextProps9Container& _s) {
896 _s.streamOffset = in.getPosition();
897 LEInputStream::Mark _m;
898 bool _atend;
899 parseRecordHeader(in, _s.rh);
900 if (!(_s.rh.recVer == 0xF)) {
901 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
902 }
903 if (!(_s.rh.recInstance == 0)) {
904 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
905 }
906 if (!(_s.rh.recType == 0x0FAE)) {
907 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FAE");
908 }
909 _atend = false;
910 while (!_atend) {
911 _m = in.setMark();
912 try {
913 _s.rgOutlineTextProps9Entry.append(OutlineTextProps9Entry(&_s));
914 parseOutlineTextProps9Entry(in, _s.rgOutlineTextProps9Entry.last());
915 } catch(IncorrectValueException _e) {
916 _s.rgOutlineTextProps9Entry.removeLast();
917 _atend = true;
918 in.rewind(_m);
919 } catch(EOFException _e) {
920 _s.rgOutlineTextProps9Entry.removeLast();
921 _atend = true;
922 in.rewind(_m);
923 }
924 }
925 }
parseOutlineTextPropsHeaderExAtom(LEInputStream & in,OutlineTextPropsHeaderExAtom & _s)926 void MSO::parseOutlineTextPropsHeaderExAtom(LEInputStream& in, OutlineTextPropsHeaderExAtom& _s) {
927 _s.streamOffset = in.getPosition();
928 parseRecordHeader(in, _s.rh);
929 if (!(_s.rh.recVer == 0)) {
930 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
931 }
932 if (!(_s.rh.recInstance<=5)) {
933 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<=5");
934 }
935 if (!(_s.rh.recType == 0xFAF)) {
936 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFAF");
937 }
938 _s.slideIdRef = in.readuint32();
939 _s.txType = in.readuint32();
940 }
parseStyleTextProp9Atom(LEInputStream & in,StyleTextProp9Atom & _s)941 void MSO::parseStyleTextProp9Atom(LEInputStream& in, StyleTextProp9Atom& _s) {
942 _s.streamOffset = in.getPosition();
943 LEInputStream::Mark _m;
944 bool _atend;
945 parseRecordHeader(in, _s.rh);
946 if (!(_s.rh.recVer == 0)) {
947 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
948 }
949 if (!(_s.rh.recInstance == 0)) {
950 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
951 }
952 if (!(_s.rh.recType == 0xFAC)) {
953 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFAC");
954 }
955 qint64 _startPos = in.getPosition();
956 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
957 _atend = in.getPosition() - _startPos >= _totalSize;
958 while (!_atend) {
959 _s.rgStyleTextProp9.append(StyleTextProp9(&_s));
960 parseStyleTextProp9(in, _s.rgStyleTextProp9.last());
961 _atend = in.getPosition() - _startPos >= _totalSize;
962 }
963 }
parseFontCollection10Container(LEInputStream & in,FontCollection10Container & _s)964 void MSO::parseFontCollection10Container(LEInputStream& in, FontCollection10Container& _s) {
965 _s.streamOffset = in.getPosition();
966 LEInputStream::Mark _m;
967 bool _atend;
968 parseRecordHeader(in, _s.rh);
969 if (!(_s.rh.recVer == 0xF)) {
970 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
971 }
972 if (!(_s.rh.recInstance == 0x0)) {
973 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
974 }
975 if (!(_s.rh.recType == 0x07D6)) {
976 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07D6");
977 }
978 qint64 _startPos = in.getPosition();
979 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
980 _atend = in.getPosition() - _startPos >= _totalSize;
981 while (!_atend) {
982 _s.rgFontCollectionEntry.append(FontCollectionEntry(&_s));
983 parseFontCollectionEntry(in, _s.rgFontCollectionEntry.last());
984 _atend = in.getPosition() - _startPos >= _totalSize;
985 }
986 }
parseGridSpacing10Atom(LEInputStream & in,GridSpacing10Atom & _s)987 void MSO::parseGridSpacing10Atom(LEInputStream& in, GridSpacing10Atom& _s) {
988 _s.streamOffset = in.getPosition();
989 parseRecordHeader(in, _s.rh);
990 if (!(_s.rh.recVer == 0x0)) {
991 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
992 }
993 if (!(_s.rh.recInstance == 0x0)) {
994 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
995 }
996 if (!(_s.rh.recType == 0x040D)) {
997 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x040D");
998 }
999 if (!(_s.rh.recLen == 0x08)) {
1000 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x08");
1001 }
1002 _s.x = in.readuint32();
1003 if (!(((quint32)_s.x)>=23224)) {
1004 throw IncorrectValueException(in.getPosition(), "((quint32)_s.x)>=23224");
1005 }
1006 if (!(((quint32)_s.x)<=1179648)) {
1007 throw IncorrectValueException(in.getPosition(), "((quint32)_s.x)<=1179648");
1008 }
1009 _s.y = in.readuint32();
1010 if (!(((quint32)_s.y)>=23224)) {
1011 throw IncorrectValueException(in.getPosition(), "((quint32)_s.y)>=23224");
1012 }
1013 if (!(((quint32)_s.y)<=1179648)) {
1014 throw IncorrectValueException(in.getPosition(), "((quint32)_s.y)<=1179648");
1015 }
1016 }
parseAuthorNameAtom(LEInputStream & in,AuthorNameAtom & _s)1017 void MSO::parseAuthorNameAtom(LEInputStream& in, AuthorNameAtom& _s) {
1018 _s.streamOffset = in.getPosition();
1019 int _c;
1020 LEInputStream::Mark _m;
1021 parseRecordHeader(in, _s.rh);
1022 if (!(_s.rh.recVer == 0x0)) {
1023 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1024 }
1025 if (!(_s.rh.recInstance == 0x0)) {
1026 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1027 }
1028 if (!(_s.rh.recType == 0x0FBA)) {
1029 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
1030 }
1031 if (!(_s.rh.recLen<=104)) {
1032 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen<=104");
1033 }
1034 if (!(_s.rh.recLen%2==0)) {
1035 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
1036 }
1037 _c = _s.rh.recLen;
1038 _s.authorName.resize(_c);
1039 in.readBytes(_s.authorName);
1040 }
parseCommentIndex10Atom(LEInputStream & in,CommentIndex10Atom & _s)1041 void MSO::parseCommentIndex10Atom(LEInputStream& in, CommentIndex10Atom& _s) {
1042 _s.streamOffset = in.getPosition();
1043 parseRecordHeader(in, _s.rh);
1044 if (!(_s.rh.recVer == 0x0)) {
1045 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1046 }
1047 if (!(_s.rh.recInstance == 0x0)) {
1048 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1049 }
1050 if (!(_s.rh.recType == 0x2EE5)) {
1051 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EE5");
1052 }
1053 if (!(_s.rh.recLen == 0x08)) {
1054 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x08");
1055 }
1056 _s.colorIndex = in.readint32();
1057 if (!(((qint32)_s.colorIndex)>=0)) {
1058 throw IncorrectValueException(in.getPosition(), "((qint32)_s.colorIndex)>=0");
1059 }
1060 _s.commentIndexSeed = in.readint32();
1061 if (!(((qint32)_s.commentIndexSeed)>=0)) {
1062 throw IncorrectValueException(in.getPosition(), "((qint32)_s.commentIndexSeed)>=0");
1063 }
1064 }
parseFontEmbedFlags10Atom(LEInputStream & in,FontEmbedFlags10Atom & _s)1065 void MSO::parseFontEmbedFlags10Atom(LEInputStream& in, FontEmbedFlags10Atom& _s) {
1066 _s.streamOffset = in.getPosition();
1067 parseRecordHeader(in, _s.rh);
1068 if (!(_s.rh.recVer == 0x0)) {
1069 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1070 }
1071 if (!(_s.rh.recInstance == 0x0)) {
1072 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1073 }
1074 if (!(_s.rh.recType == 0x32C8)) {
1075 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x32C8");
1076 }
1077 if (!(_s.rh.recLen == 0x04)) {
1078 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x04");
1079 }
1080 _s.fSubset = in.readbit();
1081 _s.fSubsetOptionConfirmed = in.readbit();
1082 _s.unuseda = in.readuint14();
1083 _s.unusedb = in.readuint16();
1084 }
parseCopyrightAtom(LEInputStream & in,CopyrightAtom & _s)1085 void MSO::parseCopyrightAtom(LEInputStream& in, CopyrightAtom& _s) {
1086 _s.streamOffset = in.getPosition();
1087 int _c;
1088 LEInputStream::Mark _m;
1089 parseRecordHeader(in, _s.rh);
1090 if (!(_s.rh.recVer == 0x0)) {
1091 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1092 }
1093 if (!(_s.rh.recInstance == 0x1)) {
1094 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x1");
1095 }
1096 if (!(_s.rh.recType == 0x0FBA)) {
1097 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
1098 }
1099 if (!(_s.rh.recLen<=510)) {
1100 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen<=510");
1101 }
1102 if (!(_s.rh.recLen%2==0)) {
1103 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
1104 }
1105 _c = _s.rh.recLen;
1106 _s.copyright.resize(_c);
1107 in.readBytes(_s.copyright);
1108 }
parseKeywordsAtom(LEInputStream & in,KeywordsAtom & _s)1109 void MSO::parseKeywordsAtom(LEInputStream& in, KeywordsAtom& _s) {
1110 _s.streamOffset = in.getPosition();
1111 int _c;
1112 LEInputStream::Mark _m;
1113 parseRecordHeader(in, _s.rh);
1114 if (!(_s.rh.recVer == 0x0)) {
1115 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1116 }
1117 if (!(_s.rh.recInstance == 0x2)) {
1118 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x2");
1119 }
1120 if (!(_s.rh.recType == 0x0FBA)) {
1121 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
1122 }
1123 if (!(_s.rh.recLen<=510)) {
1124 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen<=510");
1125 }
1126 if (!(_s.rh.recLen%2==0)) {
1127 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
1128 }
1129 _c = _s.rh.recLen;
1130 _s.keywords.resize(_c);
1131 in.readBytes(_s.keywords);
1132 }
parseFilterPrivacyFlags10Atom(LEInputStream & in,FilterPrivacyFlags10Atom & _s)1133 void MSO::parseFilterPrivacyFlags10Atom(LEInputStream& in, FilterPrivacyFlags10Atom& _s) {
1134 _s.streamOffset = in.getPosition();
1135 parseRecordHeader(in, _s.rh);
1136 if (!(_s.rh.recVer == 0x0)) {
1137 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1138 }
1139 if (!(_s.rh.recInstance == 0x0)) {
1140 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1141 }
1142 if (!(_s.rh.recType == 0x36B0)) {
1143 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x36B0");
1144 }
1145 if (!(_s.rh.recLen == 0x04)) {
1146 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x04");
1147 }
1148 _s.fRemovePII = in.readbit();
1149 _s.reserved2a = in.readuint7();
1150 if (!(((quint8)_s.reserved2a) == 0x0)) {
1151 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2a) == 0x0");
1152 }
1153 _s.reserved2b = in.readuint8();
1154 if (!(((quint8)_s.reserved2b) == 0x0)) {
1155 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2b) == 0x0");
1156 }
1157 _s.reserved2c = in.readuint16();
1158 if (!(((quint16)_s.reserved2c) == 0x0)) {
1159 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reserved2c) == 0x0");
1160 }
1161 }
parseOutlineTextProps10Container(LEInputStream & in,OutlineTextProps10Container & _s)1162 void MSO::parseOutlineTextProps10Container(LEInputStream& in, OutlineTextProps10Container& _s) {
1163 _s.streamOffset = in.getPosition();
1164 LEInputStream::Mark _m;
1165 bool _atend;
1166 parseRecordHeader(in, _s.rh);
1167 if (!(_s.rh.recVer == 0xF)) {
1168 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1169 }
1170 if (!(_s.rh.recInstance == 0)) {
1171 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1172 }
1173 if (!(_s.rh.recType == 0x0FB3)) {
1174 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FB3");
1175 }
1176 _atend = false;
1177 while (!_atend) {
1178 _m = in.setMark();
1179 try {
1180 _s.rgOutlineTextProps10Entry.append(OutlineTextProps10Entry(&_s));
1181 parseOutlineTextProps10Entry(in, _s.rgOutlineTextProps10Entry.last());
1182 } catch(IncorrectValueException _e) {
1183 _s.rgOutlineTextProps10Entry.removeLast();
1184 _atend = true;
1185 in.rewind(_m);
1186 } catch(EOFException _e) {
1187 _s.rgOutlineTextProps10Entry.removeLast();
1188 _atend = true;
1189 in.rewind(_m);
1190 }
1191 }
1192 }
parseStyleTextProp10Atom(LEInputStream & in,StyleTextProp10Atom & _s)1193 void MSO::parseStyleTextProp10Atom(LEInputStream& in, StyleTextProp10Atom& _s) {
1194 _s.streamOffset = in.getPosition();
1195 LEInputStream::Mark _m;
1196 bool _atend;
1197 parseRecordHeader(in, _s.rh);
1198 if (!(_s.rh.recVer == 0)) {
1199 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1200 }
1201 if (!(_s.rh.recInstance == 0x0)) {
1202 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1203 }
1204 if (!(_s.rh.recType == 0xFB1)) {
1205 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFB1");
1206 }
1207 _atend = false;
1208 while (!_atend) {
1209 _m = in.setMark();
1210 try {
1211 _s.rgStyleTextProp10.append(TextCFException10(&_s));
1212 parseTextCFException10(in, _s.rgStyleTextProp10.last());
1213 } catch(IncorrectValueException _e) {
1214 _s.rgStyleTextProp10.removeLast();
1215 _atend = true;
1216 in.rewind(_m);
1217 } catch(EOFException _e) {
1218 _s.rgStyleTextProp10.removeLast();
1219 _atend = true;
1220 in.rewind(_m);
1221 }
1222 }
1223 }
parseDocToolbarStates10Atom(LEInputStream & in,DocToolbarStates10Atom & _s)1224 void MSO::parseDocToolbarStates10Atom(LEInputStream& in, DocToolbarStates10Atom& _s) {
1225 _s.streamOffset = in.getPosition();
1226 parseRecordHeader(in, _s.rh);
1227 if (!(_s.rh.recVer == 0x0)) {
1228 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1229 }
1230 if (!(_s.rh.recInstance == 0)) {
1231 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1232 }
1233 if (!(_s.rh.recType == 0x36B1)) {
1234 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x36B1");
1235 }
1236 if (!(_s.rh.recLen == 0x01)) {
1237 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x01");
1238 }
1239 _s.fShowReviewingToolbar = in.readbit();
1240 _s.fShowReviewingGallery = in.readbit();
1241 _s.reserved = in.readuint6();
1242 if (!(((quint8)_s.reserved) == 0x0)) {
1243 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved) == 0x0");
1244 }
1245 }
parseSlideListTable10Container(LEInputStream & in,SlideListTable10Container & _s)1246 void MSO::parseSlideListTable10Container(LEInputStream& in, SlideListTable10Container& _s) {
1247 _s.streamOffset = in.getPosition();
1248 int _c;
1249 LEInputStream::Mark _m;
1250 parseRecordHeader(in, _s.rh);
1251 if (!(_s.rh.recVer == 0xF)) {
1252 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1253 }
1254 if (!(_s.rh.recInstance == 0)) {
1255 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1256 }
1257 if (!(_s.rh.recType == 0x2EF1)) {
1258 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EF1");
1259 }
1260 _c = _s.rh.recLen;
1261 _s.todo.resize(_c);
1262 in.readBytes(_s.todo);
1263 }
parseDiffTree10Container(LEInputStream & in,DiffTree10Container & _s)1264 void MSO::parseDiffTree10Container(LEInputStream& in, DiffTree10Container& _s) {
1265 _s.streamOffset = in.getPosition();
1266 int _c;
1267 LEInputStream::Mark _m;
1268 parseRecordHeader(in, _s.rh);
1269 if (!(_s.rh.recVer == 0xF)) {
1270 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1271 }
1272 if (!(_s.rh.recInstance == 0)) {
1273 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1274 }
1275 if (!(_s.rh.recType == 0x2EEC)) {
1276 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EEC");
1277 }
1278 _c = _s.rh.recLen;
1279 _s.todo.resize(_c);
1280 in.readBytes(_s.todo);
1281 }
parseModifyPasswordAtom(LEInputStream & in,ModifyPasswordAtom & _s)1282 void MSO::parseModifyPasswordAtom(LEInputStream& in, ModifyPasswordAtom& _s) {
1283 _s.streamOffset = in.getPosition();
1284 int _c;
1285 LEInputStream::Mark _m;
1286 parseRecordHeader(in, _s.rh);
1287 if (!(_s.rh.recVer == 0x0)) {
1288 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1289 }
1290 if (!(_s.rh.recInstance == 0x03)) {
1291 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x03");
1292 }
1293 if (!(_s.rh.recType == 0x0FBA)) {
1294 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
1295 }
1296 if (!(_s.rh.recLen<=510)) {
1297 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen<=510");
1298 }
1299 if (!(_s.rh.recLen%2==0)) {
1300 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
1301 }
1302 _c = _s.rh.recLen;
1303 _s.modifyPassword.resize(_c);
1304 in.readBytes(_s.modifyPassword);
1305 }
parsePhotoAlbumInfo10Atom(LEInputStream & in,PhotoAlbumInfo10Atom & _s)1306 void MSO::parsePhotoAlbumInfo10Atom(LEInputStream& in, PhotoAlbumInfo10Atom& _s) {
1307 _s.streamOffset = in.getPosition();
1308 parseRecordHeader(in, _s.rh);
1309 if (!(_s.rh.recVer == 0x0)) {
1310 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1311 }
1312 if (!(_s.rh.recInstance == 0x0)) {
1313 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1314 }
1315 if (!(_s.rh.recType == 0x036B2)) {
1316 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x036B2");
1317 }
1318 if (!(_s.rh.recLen == 0x06)) {
1319 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x06");
1320 }
1321 _s.fUseBlackWhite = in.readuint8();
1322 _s.fHasCaption = in.readuint8();
1323 _s.layout = in.readuint8();
1324 if (!(((quint8)_s.layout) == 0 || ((quint8)_s.layout) == 1 || ((quint8)_s.layout) == 2 || ((quint8)_s.layout) == 3 || ((quint8)_s.layout) == 4 || ((quint8)_s.layout) == 5 || ((quint8)_s.layout) == 6)) {
1325 throw IncorrectValueException(in.getPosition(), "((quint8)_s.layout) == 0 || ((quint8)_s.layout) == 1 || ((quint8)_s.layout) == 2 || ((quint8)_s.layout) == 3 || ((quint8)_s.layout) == 4 || ((quint8)_s.layout) == 5 || ((quint8)_s.layout) == 6");
1326 }
1327 _s.unused = in.readuint8();
1328 _s.frameShape = in.readuint16();
1329 if (!(((quint16)_s.frameShape) == 0x0000 || ((quint16)_s.frameShape) == 0x0001 || ((quint16)_s.frameShape) == 0x0002 || ((quint16)_s.frameShape) == 0x0003 || ((quint16)_s.frameShape) == 0x0004 || ((quint16)_s.frameShape) == 0x0005 || ((quint16)_s.frameShape) == 0x0006)) {
1330 throw IncorrectValueException(in.getPosition(), "((quint16)_s.frameShape) == 0x0000 || ((quint16)_s.frameShape) == 0x0001 || ((quint16)_s.frameShape) == 0x0002 || ((quint16)_s.frameShape) == 0x0003 || ((quint16)_s.frameShape) == 0x0004 || ((quint16)_s.frameShape) == 0x0005 || ((quint16)_s.frameShape) == 0x0006");
1331 }
1332 }
parseSmartTagStore11Container(LEInputStream & in,SmartTagStore11Container & _s)1333 void MSO::parseSmartTagStore11Container(LEInputStream& in, SmartTagStore11Container& _s) {
1334 _s.streamOffset = in.getPosition();
1335 int _c;
1336 LEInputStream::Mark _m;
1337 parseRecordHeader(in, _s.rh);
1338 if (!(_s.rh.recVer == 0xF)) {
1339 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1340 }
1341 if (!(_s.rh.recInstance == 0x0)) {
1342 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1343 }
1344 if (!(_s.rh.recType == 0x36B3)) {
1345 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x36B3");
1346 }
1347 _c = _s.rh.recLen;
1348 _s.todo.resize(_c);
1349 in.readBytes(_s.todo);
1350 }
parseOutlineTextProps11Container(LEInputStream & in,OutlineTextProps11Container & _s)1351 void MSO::parseOutlineTextProps11Container(LEInputStream& in, OutlineTextProps11Container& _s) {
1352 _s.streamOffset = in.getPosition();
1353 int _c;
1354 LEInputStream::Mark _m;
1355 parseRecordHeader(in, _s.rh);
1356 if (!(_s.rh.recVer == 0xF)) {
1357 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1358 }
1359 if (!(_s.rh.recInstance == 0x0)) {
1360 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1361 }
1362 if (!(_s.rh.recType == 0x0FB5)) {
1363 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FB5");
1364 }
1365 _c = _s.rh.recLen;
1366 _s.todo.resize(_c);
1367 in.readBytes(_s.todo);
1368 }
parseBinaryTagDataBlob(LEInputStream & in,BinaryTagDataBlob & _s)1369 void MSO::parseBinaryTagDataBlob(LEInputStream& in, BinaryTagDataBlob& _s) {
1370 _s.streamOffset = in.getPosition();
1371 int _c;
1372 LEInputStream::Mark _m;
1373 parseRecordHeader(in, _s.rh);
1374 if (!(_s.rh.recVer == 0x0)) {
1375 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1376 }
1377 if (!(_s.rh.recInstance == 0x0)) {
1378 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1379 }
1380 if (!(_s.rh.recType == 0x138B)) {
1381 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x138B");
1382 }
1383 _c = _s.rh.recLen;
1384 _s.data.resize(_c);
1385 in.readBytes(_s.data);
1386 }
parsePP12DocBinaryTagExtension(LEInputStream & in,PP12DocBinaryTagExtension & _s)1387 void MSO::parsePP12DocBinaryTagExtension(LEInputStream& in, PP12DocBinaryTagExtension& _s) {
1388 _s.streamOffset = in.getPosition();
1389 int _c;
1390 LEInputStream::Mark _m;
1391 parseRecordHeader(in, _s.rh);
1392 if (!(_s.rh.recVer == 0x0)) {
1393 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1394 }
1395 if (!(_s.rh.recInstance == 0)) {
1396 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1397 }
1398 if (!(_s.rh.recType == 0x0FBA)) {
1399 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
1400 }
1401 if (!(_s.rh.recLen == 0x10)) {
1402 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
1403 }
1404 _c = 16;
1405 _s.tagName.resize(_c);
1406 in.readBytes(_s.tagName);
1407 parseRecordHeader(in, _s.rhData);
1408 if (!(_s.rhData.recVer == 0x0)) {
1409 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0x0");
1410 }
1411 if (!(_s.rhData.recInstance == 0)) {
1412 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0");
1413 }
1414 if (!(_s.rhData.recType == 0x138B)) {
1415 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B");
1416 }
1417 _c = _s.rhData.recLen;
1418 _s.todo.resize(_c);
1419 in.readBytes(_s.todo);
1420 }
parseSorterViewInfoContainer(LEInputStream & in,SorterViewInfoContainer & _s)1421 void MSO::parseSorterViewInfoContainer(LEInputStream& in, SorterViewInfoContainer& _s) {
1422 _s.streamOffset = in.getPosition();
1423 int _c;
1424 LEInputStream::Mark _m;
1425 parseRecordHeader(in, _s.rh);
1426 if (!(_s.rh.recVer == 0xF)) {
1427 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1428 }
1429 if (!(_s.rh.recInstance == 1)) {
1430 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
1431 }
1432 if (!(_s.rh.recType == 0x408)) {
1433 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x408");
1434 }
1435 _c = _s.rh.recLen;
1436 _s.todo.resize(_c);
1437 in.readBytes(_s.todo);
1438 }
parseVBAInfoAtom(LEInputStream & in,VBAInfoAtom & _s)1439 void MSO::parseVBAInfoAtom(LEInputStream& in, VBAInfoAtom& _s) {
1440 _s.streamOffset = in.getPosition();
1441 parseRecordHeader(in, _s.rh);
1442 if (!(_s.rh.recVer == 2)) {
1443 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 2");
1444 }
1445 if (!(_s.rh.recInstance == 0)) {
1446 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1447 }
1448 if (!(_s.rh.recType == 0x400)) {
1449 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x400");
1450 }
1451 if (!(_s.rh.recLen == 0xC)) {
1452 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0xC");
1453 }
1454 _s.persistIdRef = in.readuint32();
1455 _s.fHasMacros = in.readuint32();
1456 if (!(((quint32)_s.fHasMacros) == 0 || ((quint32)_s.fHasMacros) == 1)) {
1457 throw IncorrectValueException(in.getPosition(), "((quint32)_s.fHasMacros) == 0 || ((quint32)_s.fHasMacros) == 1");
1458 }
1459 _s.version = in.readuint32();
1460 if (!(((quint32)_s.version) == 0 || ((quint32)_s.version) == 1 || ((quint32)_s.version) == 2)) {
1461 throw IncorrectValueException(in.getPosition(), "((quint32)_s.version) == 0 || ((quint32)_s.version) == 1 || ((quint32)_s.version) == 2");
1462 }
1463 }
parseMasterListWithTextContainer(LEInputStream & in,MasterListWithTextContainer & _s)1464 void MSO::parseMasterListWithTextContainer(LEInputStream& in, MasterListWithTextContainer& _s) {
1465 _s.streamOffset = in.getPosition();
1466 int _c;
1467 LEInputStream::Mark _m;
1468 parseRecordHeader(in, _s.rh);
1469 if (!(_s.rh.recVer == 0xF)) {
1470 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1471 }
1472 if (!(_s.rh.recInstance == 0x1)) {
1473 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x1");
1474 }
1475 if (!(_s.rh.recType == 0x0FF0)) {
1476 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FF0");
1477 }
1478 if (!(_s.rh.recLen%28==0)) {
1479 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%28==0");
1480 }
1481 _c = _s.rh.recLen/28;
1482 for (int _i=0; _i<_c; ++_i) {
1483 _s.rgMasterPersistAtom.append(MasterPersistAtom(&_s));
1484 parseMasterPersistAtom(in, _s.rgMasterPersistAtom[_i]);
1485 }
1486 }
parseMasterPersistAtom(LEInputStream & in,MasterPersistAtom & _s)1487 void MSO::parseMasterPersistAtom(LEInputStream& in, MasterPersistAtom& _s) {
1488 _s.streamOffset = in.getPosition();
1489 parseRecordHeader(in, _s.rh);
1490 if (!(_s.rh.recVer == 0)) {
1491 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1492 }
1493 if (!(_s.rh.recInstance == 0)) {
1494 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1495 }
1496 if (!(_s.rh.recType == 0x3F3)) {
1497 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3F3");
1498 }
1499 if (!(_s.rh.recLen == 0x14)) {
1500 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x14");
1501 }
1502 _s.persistIdRef = in.readuint32();
1503 _s.reserved1 = in.readuint2();
1504 if (!(((quint8)_s.reserved1) == 0)) {
1505 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved1) == 0");
1506 }
1507 _s.fNonOutLineData = in.readbit();
1508 _s.reserved2 = in.readuint5();
1509 if (!(((quint8)_s.reserved2) == 0)) {
1510 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2) == 0");
1511 }
1512 _s.reserved3 = in.readuint8();
1513 if (!(((quint8)_s.reserved3) == 0)) {
1514 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved3) == 0");
1515 }
1516 _s.reserved4 = in.readuint16();
1517 if (!(((quint16)_s.reserved4) == 0)) {
1518 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reserved4) == 0");
1519 }
1520 _s.reserved5 = in.readuint32();
1521 if (!(((quint32)_s.reserved5) == 0)) {
1522 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved5) == 0");
1523 }
1524 _s.masterId = in.readuint32();
1525 _s.reserved6 = in.readuint32();
1526 if (!(((quint32)_s.reserved6) == 0)) {
1527 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved6) == 0");
1528 }
1529 }
parseSlideListWithTextContainer(LEInputStream & in,SlideListWithTextContainer & _s)1530 void MSO::parseSlideListWithTextContainer(LEInputStream& in, SlideListWithTextContainer& _s) {
1531 _s.streamOffset = in.getPosition();
1532 LEInputStream::Mark _m;
1533 bool _atend;
1534 parseRecordHeader(in, _s.rh);
1535 if (!(_s.rh.recVer == 0xF)) {
1536 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1537 }
1538 if (!(_s.rh.recInstance == 0x0)) {
1539 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
1540 }
1541 if (!(_s.rh.recType == 0x0FF0)) {
1542 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FF0");
1543 }
1544 _atend = false;
1545 while (!_atend) {
1546 _m = in.setMark();
1547 try {
1548 _s.rgChildRec.append(SlideListWithTextSubContainerOrAtom(&_s));
1549 parseSlideListWithTextSubContainerOrAtom(in, _s.rgChildRec.last());
1550 } catch(IncorrectValueException _e) {
1551 _s.rgChildRec.removeLast();
1552 _atend = true;
1553 in.rewind(_m);
1554 } catch(EOFException _e) {
1555 _s.rgChildRec.removeLast();
1556 _atend = true;
1557 in.rewind(_m);
1558 }
1559 }
1560 }
parseNotesListWithTextContainer(LEInputStream & in,NotesListWithTextContainer & _s)1561 void MSO::parseNotesListWithTextContainer(LEInputStream& in, NotesListWithTextContainer& _s) {
1562 _s.streamOffset = in.getPosition();
1563 LEInputStream::Mark _m;
1564 bool _atend;
1565 parseRecordHeader(in, _s.rh);
1566 if (!(_s.rh.recVer == 0xF)) {
1567 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
1568 }
1569 if (!(_s.rh.recInstance == 2)) {
1570 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 2");
1571 }
1572 if (!(_s.rh.recType == 0x0FF0)) {
1573 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FF0");
1574 }
1575 _atend = false;
1576 while (!_atend) {
1577 _m = in.setMark();
1578 try {
1579 _s.rgNotesPersistAtom.append(NotesPersistAtom(&_s));
1580 parseNotesPersistAtom(in, _s.rgNotesPersistAtom.last());
1581 } catch(IncorrectValueException _e) {
1582 _s.rgNotesPersistAtom.removeLast();
1583 _atend = true;
1584 in.rewind(_m);
1585 } catch(EOFException _e) {
1586 _s.rgNotesPersistAtom.removeLast();
1587 _atend = true;
1588 in.rewind(_m);
1589 }
1590 }
1591 }
parseNotesPersistAtom(LEInputStream & in,NotesPersistAtom & _s)1592 void MSO::parseNotesPersistAtom(LEInputStream& in, NotesPersistAtom& _s) {
1593 _s.streamOffset = in.getPosition();
1594 parseRecordHeader(in, _s.rh);
1595 if (!(_s.rh.recVer == 0x0)) {
1596 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
1597 }
1598 if (!(_s.rh.recInstance == 0)) {
1599 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1600 }
1601 if (!(_s.rh.recType == 0x03F3)) {
1602 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03F3");
1603 }
1604 if (!(_s.rh.recLen == 0x14)) {
1605 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x14");
1606 }
1607 _s.persistIdRef = in.readuint32();
1608 _s.reserved1 = in.readuint2();
1609 if (!(((quint8)_s.reserved1) == 0)) {
1610 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved1) == 0");
1611 }
1612 _s.fNonOutlineData = in.readbit();
1613 _s.reserved2a = in.readuint5();
1614 if (!(((quint8)_s.reserved2a) == 0)) {
1615 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2a) == 0");
1616 }
1617 _s.reserved2b = in.readuint8();
1618 if (!(((quint8)_s.reserved2b) == 0)) {
1619 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2b) == 0");
1620 }
1621 _s.reserved2c = in.readuint16();
1622 if (!(((quint16)_s.reserved2c) == 0)) {
1623 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reserved2c) == 0");
1624 }
1625 _s.reserved3 = in.readuint32();
1626 if (!(((quint32)_s.reserved3) == 0)) {
1627 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved3) == 0");
1628 }
1629 _s.notesId = in.readuint32();
1630 _s.reserved4 = in.readuint32();
1631 if (!(((quint32)_s.reserved4) == 0)) {
1632 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved4) == 0");
1633 }
1634 }
parseTextHeaderAtom(LEInputStream & in,TextHeaderAtom & _s)1635 void MSO::parseTextHeaderAtom(LEInputStream& in, TextHeaderAtom& _s) {
1636 _s.streamOffset = in.getPosition();
1637 parseRecordHeader(in, _s.rh);
1638 if (!(_s.rh.recVer == 0)) {
1639 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1640 }
1641 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1 || _s.rh.recInstance == 2 || _s.rh.recInstance == 3 || _s.rh.recInstance == 4 || _s.rh.recInstance == 5)) {
1642 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1 || _s.rh.recInstance == 2 || _s.rh.recInstance == 3 || _s.rh.recInstance == 4 || _s.rh.recInstance == 5");
1643 }
1644 if (!(_s.rh.recType == 0xF9F)) {
1645 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF9F");
1646 }
1647 if (!(_s.rh.recLen == 4)) {
1648 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
1649 }
1650 _s.textType = in.readuint32();
1651 }
parseTextCharsAtom(LEInputStream & in,TextCharsAtom & _s)1652 void MSO::parseTextCharsAtom(LEInputStream& in, TextCharsAtom& _s) {
1653 _s.streamOffset = in.getPosition();
1654 int _c;
1655 LEInputStream::Mark _m;
1656 parseRecordHeader(in, _s.rh);
1657 if (!(_s.rh.recVer == 0)) {
1658 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1659 }
1660 if (!(_s.rh.recInstance == 0)) {
1661 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1662 }
1663 if (!(_s.rh.recType == 0xFA0)) {
1664 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFA0");
1665 }
1666 if (!(_s.rh.recLen%2==0)) {
1667 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
1668 }
1669 _c = _s.rh.recLen/2;
1670 _s.textChars.resize(_c);
1671 for (int _i=0; _i<_c; ++_i) {
1672 _s.textChars[_i] = in.readuint16();
1673 }
1674 }
parseTextBytesAtom(LEInputStream & in,TextBytesAtom & _s)1675 void MSO::parseTextBytesAtom(LEInputStream& in, TextBytesAtom& _s) {
1676 _s.streamOffset = in.getPosition();
1677 int _c;
1678 LEInputStream::Mark _m;
1679 parseRecordHeader(in, _s.rh);
1680 if (!(_s.rh.recVer == 0)) {
1681 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1682 }
1683 if (!(_s.rh.recInstance == 0)) {
1684 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1685 }
1686 if (!(_s.rh.recType == 0xFA8)) {
1687 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFA8");
1688 }
1689 _c = _s.rh.recLen;
1690 _s.textChars.resize(_c);
1691 in.readBytes(_s.textChars);
1692 }
parseMasterTextPropAtom(LEInputStream & in,MasterTextPropAtom & _s)1693 void MSO::parseMasterTextPropAtom(LEInputStream& in, MasterTextPropAtom& _s) {
1694 _s.streamOffset = in.getPosition();
1695 LEInputStream::Mark _m;
1696 bool _atend;
1697 parseRecordHeader(in, _s.rh);
1698 if (!(_s.rh.recVer == 0)) {
1699 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1700 }
1701 if (!(_s.rh.recInstance == 0)) {
1702 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1703 }
1704 if (!(_s.rh.recType == 0xFA2)) {
1705 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFA2");
1706 }
1707 qint64 _startPos = in.getPosition();
1708 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
1709 _atend = in.getPosition() - _startPos >= _totalSize;
1710 while (!_atend) {
1711 _s.rgMasterTextPropRun.append(MasterTextPropRun(&_s));
1712 parseMasterTextPropRun(in, _s.rgMasterTextPropRun.last());
1713 _atend = in.getPosition() - _startPos >= _totalSize;
1714 }
1715 }
parseMasterTextPropRun(LEInputStream & in,MasterTextPropRun & _s)1716 void MSO::parseMasterTextPropRun(LEInputStream& in, MasterTextPropRun& _s) {
1717 _s.streamOffset = in.getPosition();
1718 _s.count = in.readuint32();
1719 _s.indentLevel = in.readuint16();
1720 if (!(((quint16)_s.indentLevel)<=4)) {
1721 throw IncorrectValueException(in.getPosition(), "((quint16)_s.indentLevel)<=4");
1722 }
1723 }
parseStyleTextPropAtom(LEInputStream & in,StyleTextPropAtom & _s)1724 void MSO::parseStyleTextPropAtom(LEInputStream& in, StyleTextPropAtom& _s) {
1725 _s.streamOffset = in.getPosition();
1726 int _c;
1727 LEInputStream::Mark _m;
1728 parseRecordHeader(in, _s.rh);
1729 if (!(_s.rh.recVer == 0)) {
1730 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1731 }
1732 if (!(_s.rh.recInstance == 0)) {
1733 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1734 }
1735 if (!(_s.rh.recType == 0xFA1)) {
1736 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFA1");
1737 }
1738 }
parseSlideNumberMCAtom(LEInputStream & in,SlideNumberMCAtom & _s)1739 void MSO::parseSlideNumberMCAtom(LEInputStream& in, SlideNumberMCAtom& _s) {
1740 _s.streamOffset = in.getPosition();
1741 parseRecordHeader(in, _s.rh);
1742 if (!(_s.rh.recVer == 0)) {
1743 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1744 }
1745 if (!(_s.rh.recInstance == 0)) {
1746 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1747 }
1748 if (!(_s.rh.recType == 0xFD8)) {
1749 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD8");
1750 }
1751 if (!(_s.rh.recLen == 4)) {
1752 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
1753 }
1754 _s.position = in.readint32();
1755 }
parseDateTimeMCAtom(LEInputStream & in,DateTimeMCAtom & _s)1756 void MSO::parseDateTimeMCAtom(LEInputStream& in, DateTimeMCAtom& _s) {
1757 _s.streamOffset = in.getPosition();
1758 int _c;
1759 LEInputStream::Mark _m;
1760 parseRecordHeader(in, _s.rh);
1761 if (!(_s.rh.recVer == 0)) {
1762 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1763 }
1764 if (!(_s.rh.recInstance == 0)) {
1765 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1766 }
1767 if (!(_s.rh.recType == 0xFF7)) {
1768 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF7");
1769 }
1770 if (!(_s.rh.recLen == 8)) {
1771 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
1772 }
1773 _s.position = in.readint32();
1774 _s.index = in.readuint8();
1775 _c = 3;
1776 _s.unused.resize(_c);
1777 in.readBytes(_s.unused);
1778 }
parseGenericDateMCAtom(LEInputStream & in,GenericDateMCAtom & _s)1779 void MSO::parseGenericDateMCAtom(LEInputStream& in, GenericDateMCAtom& _s) {
1780 _s.streamOffset = in.getPosition();
1781 parseRecordHeader(in, _s.rh);
1782 if (!(_s.rh.recVer == 0)) {
1783 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1784 }
1785 if (!(_s.rh.recInstance == 0)) {
1786 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1787 }
1788 if (!(_s.rh.recType == 0xFF8)) {
1789 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF8");
1790 }
1791 if (!(_s.rh.recLen == 4)) {
1792 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
1793 }
1794 _s.position = in.readint32();
1795 }
parseHeaderMCAtom(LEInputStream & in,HeaderMCAtom & _s)1796 void MSO::parseHeaderMCAtom(LEInputStream& in, HeaderMCAtom& _s) {
1797 _s.streamOffset = in.getPosition();
1798 parseRecordHeader(in, _s.rh);
1799 if (!(_s.rh.recVer == 0)) {
1800 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1801 }
1802 if (!(_s.rh.recInstance == 0)) {
1803 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1804 }
1805 if (!(_s.rh.recType == 0xFF9)) {
1806 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF9");
1807 }
1808 if (!(_s.rh.recLen == 4)) {
1809 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
1810 }
1811 _s.position = in.readint32();
1812 }
parseFooterMCAtom(LEInputStream & in,FooterMCAtom & _s)1813 void MSO::parseFooterMCAtom(LEInputStream& in, FooterMCAtom& _s) {
1814 _s.streamOffset = in.getPosition();
1815 parseRecordHeader(in, _s.rh);
1816 if (!(_s.rh.recVer == 0)) {
1817 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1818 }
1819 if (!(_s.rh.recInstance == 0)) {
1820 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1821 }
1822 if (!(_s.rh.recType == 0xFFA)) {
1823 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFFA");
1824 }
1825 if (!(_s.rh.recLen == 4)) {
1826 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
1827 }
1828 _s.position = in.readint32();
1829 }
parseRTFDateTimeMCAtom(LEInputStream & in,RTFDateTimeMCAtom & _s)1830 void MSO::parseRTFDateTimeMCAtom(LEInputStream& in, RTFDateTimeMCAtom& _s) {
1831 _s.streamOffset = in.getPosition();
1832 int _c;
1833 LEInputStream::Mark _m;
1834 parseRecordHeader(in, _s.rh);
1835 if (!(_s.rh.recVer == 0)) {
1836 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1837 }
1838 if (!(_s.rh.recInstance == 0)) {
1839 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1840 }
1841 if (!(_s.rh.recType == 0x1015)) {
1842 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1015");
1843 }
1844 if (!(_s.rh.recLen == 0x84)) {
1845 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x84");
1846 }
1847 _s.position = in.readint32();
1848 _c = 128;
1849 _s.format.resize(_c);
1850 in.readBytes(_s.format);
1851 }
parseTextBookmarkAtom(LEInputStream & in,TextBookmarkAtom & _s)1852 void MSO::parseTextBookmarkAtom(LEInputStream& in, TextBookmarkAtom& _s) {
1853 _s.streamOffset = in.getPosition();
1854 parseRecordHeader(in, _s.rh);
1855 if (!(_s.rh.recVer == 0)) {
1856 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1857 }
1858 if (!(_s.rh.recInstance == 0)) {
1859 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1860 }
1861 if (!(_s.rh.recType == 0xFA7)) {
1862 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFA7");
1863 }
1864 if (!(_s.rh.recLen == 0xC)) {
1865 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0xC");
1866 }
1867 _s.begin = in.readint32();
1868 _s.end = in.readint32();
1869 _s.bookmarkID = in.readint32();
1870 }
parseTextRange(LEInputStream & in,TextRange & _s)1871 void MSO::parseTextRange(LEInputStream& in, TextRange& _s) {
1872 _s.streamOffset = in.getPosition();
1873 _s.begin = in.readint32();
1874 _s.end = in.readint32();
1875 }
parseMouseClickTextInteractiveInfoAtom(LEInputStream & in,MouseClickTextInteractiveInfoAtom & _s)1876 void MSO::parseMouseClickTextInteractiveInfoAtom(LEInputStream& in, MouseClickTextInteractiveInfoAtom& _s) {
1877 _s.streamOffset = in.getPosition();
1878 parseRecordHeader(in, _s.rh);
1879 if (!(_s.rh.recVer == 0)) {
1880 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1881 }
1882 if (!(_s.rh.recInstance == 0)) {
1883 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
1884 }
1885 if (!(_s.rh.recType == 0xFDF)) {
1886 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFDF");
1887 }
1888 if (!(_s.rh.recLen == 8)) {
1889 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
1890 }
1891 parseTextRange(in, _s.range);
1892 }
parseMouseOverTextInteractiveInfoAtom(LEInputStream & in,MouseOverTextInteractiveInfoAtom & _s)1893 void MSO::parseMouseOverTextInteractiveInfoAtom(LEInputStream& in, MouseOverTextInteractiveInfoAtom& _s) {
1894 _s.streamOffset = in.getPosition();
1895 parseRecordHeader(in, _s.rh);
1896 if (!(_s.rh.recVer == 0)) {
1897 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
1898 }
1899 if (!(_s.rh.recInstance == 1)) {
1900 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
1901 }
1902 if (!(_s.rh.recType == 0xFDF)) {
1903 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFDF");
1904 }
1905 if (!(_s.rh.recLen == 8)) {
1906 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
1907 }
1908 parseTextRange(in, _s.range);
1909 }
parseSlideId(LEInputStream & in,SlideId & _s)1910 void MSO::parseSlideId(LEInputStream& in, SlideId& _s) {
1911 _s.streamOffset = in.getPosition();
1912 _s.slideId = in.readuint32();
1913 if (!(((quint32)_s.slideId)>=100)) {
1914 throw IncorrectValueException(in.getPosition(), "((quint32)_s.slideId)>=100");
1915 }
1916 if (!(((quint32)_s.slideId)<2147483647)) {
1917 throw IncorrectValueException(in.getPosition(), "((quint32)_s.slideId)<2147483647");
1918 }
1919 }
parseTabStops(LEInputStream & in,TabStops & _s)1920 void MSO::parseTabStops(LEInputStream& in, TabStops& _s) {
1921 _s.streamOffset = in.getPosition();
1922 int _c;
1923 LEInputStream::Mark _m;
1924 _s.count = in.readuint16();
1925 _c = _s.count;
1926 for (int _i=0; _i<_c; ++_i) {
1927 _s.rgTabStop.append(TabStop(&_s));
1928 parseTabStop(in, _s.rgTabStop[_i]);
1929 }
1930 }
parseTabStop(LEInputStream & in,TabStop & _s)1931 void MSO::parseTabStop(LEInputStream& in, TabStop& _s) {
1932 _s.streamOffset = in.getPosition();
1933 _s.position = in.readint16();
1934 _s.type = in.readuint16();
1935 }
parsePFWrapFlags(LEInputStream & in,PFWrapFlags & _s)1936 void MSO::parsePFWrapFlags(LEInputStream& in, PFWrapFlags& _s) {
1937 _s.streamOffset = in.getPosition();
1938 _s.charWrap = in.readbit();
1939 _s.wordWrap = in.readbit();
1940 _s.overflow = in.readbit();
1941 _s.reserved1 = in.readuint5();
1942 _s.reserved2 = in.readuint8();
1943 }
parseColorIndexStruct(LEInputStream & in,ColorIndexStruct & _s)1944 void MSO::parseColorIndexStruct(LEInputStream& in, ColorIndexStruct& _s) {
1945 _s.streamOffset = in.getPosition();
1946 _s.red = in.readuint8();
1947 _s.green = in.readuint8();
1948 _s.blue = in.readuint8();
1949 _s.index = in.readuint8();
1950 }
parseBulletFlags(LEInputStream & in,BulletFlags & _s)1951 void MSO::parseBulletFlags(LEInputStream& in, BulletFlags& _s) {
1952 _s.streamOffset = in.getPosition();
1953 _s.fHasBullet = in.readbit();
1954 _s.fBulletHasFont = in.readbit();
1955 _s.fBulletHasColor = in.readbit();
1956 _s.fBulletHasSize = in.readbit();
1957 _s.reserved = in.readuint12();
1958 }
parsePFMasks(LEInputStream & in,PFMasks & _s)1959 void MSO::parsePFMasks(LEInputStream& in, PFMasks& _s) {
1960 _s.streamOffset = in.getPosition();
1961 _s.hasBullet = in.readbit();
1962 _s.bulletHasFont = in.readbit();
1963 _s.bulletHasColor = in.readbit();
1964 _s.bulletHasSize = in.readbit();
1965 _s.bulletFont = in.readbit();
1966 _s.bulletColor = in.readbit();
1967 _s.bulletSize = in.readbit();
1968 _s.bulletChar = in.readbit();
1969 _s.leftMargin = in.readbit();
1970 _s.unused = in.readbit();
1971 _s.indent = in.readbit();
1972 _s.align = in.readbit();
1973 _s.lineSpacing = in.readbit();
1974 _s.spaceBefore = in.readbit();
1975 _s.spaceAfter = in.readbit();
1976 _s.defaultTabSize = in.readbit();
1977 _s.fontAlign = in.readbit();
1978 _s.charWrap = in.readbit();
1979 _s.wordWrap = in.readbit();
1980 _s.overflow = in.readbit();
1981 _s.tabStops = in.readbit();
1982 _s.textDirection = in.readbit();
1983 _s.reserved = in.readbit();
1984 _s.bulletBlip = in.readbit();
1985 _s.bulletScheme = in.readbit();
1986 _s.bulletHasScheme = in.readbit();
1987 _s.reserved2 = in.readuint6();
1988 }
parseCFMasks(LEInputStream & in,CFMasks & _s)1989 void MSO::parseCFMasks(LEInputStream& in, CFMasks& _s) {
1990 _s.streamOffset = in.getPosition();
1991 _s.bold = in.readbit();
1992 _s.italic = in.readbit();
1993 _s.underline = in.readbit();
1994 _s.unused1 = in.readbit();
1995 _s.shadow = in.readbit();
1996 _s.fehint = in.readbit();
1997 _s.unused2 = in.readbit();
1998 _s.kumi = in.readbit();
1999 _s.unused3 = in.readbit();
2000 _s.emboss = in.readbit();
2001 _s.fHasStyle = in.readuint4();
2002 _s.unused4 = in.readuint2();
2003 _s.typeface = in.readbit();
2004 _s.size = in.readbit();
2005 _s.color = in.readbit();
2006 _s.position = in.readbit();
2007 _s.pp10ext = in.readbit();
2008 _s.oldEATypeface = in.readbit();
2009 _s.ansiTypeface = in.readbit();
2010 _s.symbolTypeface = in.readbit();
2011 _s.newEATypeface = in.readbit();
2012 _s.csTypeface = in.readbit();
2013 _s.pp11ext = in.readbit();
2014 _s.reserved = in.readuint5();
2015 }
parseCFStyle(LEInputStream & in,CFStyle & _s)2016 void MSO::parseCFStyle(LEInputStream& in, CFStyle& _s) {
2017 _s.streamOffset = in.getPosition();
2018 _s.bold = in.readbit();
2019 _s.italic = in.readbit();
2020 _s.underline = in.readbit();
2021 _s.unused1 = in.readbit();
2022 _s.shadow = in.readbit();
2023 _s.fehint = in.readbit();
2024 _s.unused2 = in.readbit();
2025 _s.kumi = in.readbit();
2026 _s.unused3 = in.readbit();
2027 _s.emboss = in.readbit();
2028 _s.pp9rt = in.readuint4();
2029 _s.unused4 = in.readuint2();
2030 }
parseFontCollectionContainer(LEInputStream & in,FontCollectionContainer & _s)2031 void MSO::parseFontCollectionContainer(LEInputStream& in, FontCollectionContainer& _s) {
2032 _s.streamOffset = in.getPosition();
2033 LEInputStream::Mark _m;
2034 bool _atend;
2035 parseRecordHeader(in, _s.rh);
2036 if (!(_s.rh.recVer == 0xF)) {
2037 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2038 }
2039 if (!(_s.rh.recInstance == 0x0)) {
2040 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
2041 }
2042 if (!(_s.rh.recType == 0x07D5)) {
2043 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07D5");
2044 }
2045 qint64 _startPos = in.getPosition();
2046 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
2047 _atend = in.getPosition() - _startPos >= _totalSize;
2048 while (!_atend) {
2049 _s.rgFontCollectionEntry.append(FontCollectionEntry(&_s));
2050 parseFontCollectionEntry(in, _s.rgFontCollectionEntry.last());
2051 _atend = in.getPosition() - _startPos >= _totalSize;
2052 }
2053 }
parseFontEntityAtom(LEInputStream & in,FontEntityAtom & _s)2054 void MSO::parseFontEntityAtom(LEInputStream& in, FontEntityAtom& _s) {
2055 _s.streamOffset = in.getPosition();
2056 int _c;
2057 LEInputStream::Mark _m;
2058 parseRecordHeader(in, _s.rh);
2059 if (!(_s.rh.recVer == 0)) {
2060 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2061 }
2062 if (!(_s.rh.recInstance<=128)) {
2063 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<=128");
2064 }
2065 if (!(_s.rh.recType == 0xFB7)) {
2066 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFB7");
2067 }
2068 if (!(_s.rh.recLen == 0x44)) {
2069 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x44");
2070 }
2071 _c = 32;
2072 _s.lfFaceName.resize(_c);
2073 for (int _i=0; _i<_c; ++_i) {
2074 _s.lfFaceName[_i] = in.readuint16();
2075 }
2076 _s.lfCharSet = in.readuint8();
2077 _s.fEmbedSubsetted = in.readbit();
2078 _s.unused = in.readuint7();
2079 _s.rasterFontType = in.readbit();
2080 _s.deviceFontType = in.readbit();
2081 _s.truetypeFontType = in.readbit();
2082 _s.fNoFontSubstitution = in.readbit();
2083 _s.reserved = in.readuint4();
2084 if (!(((quint8)_s.reserved) == 0)) {
2085 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved) == 0");
2086 }
2087 _s.lfPitchAndFamily = in.readuint8();
2088 }
parseFontEmbedDataBlob(LEInputStream & in,FontEmbedDataBlob & _s)2089 void MSO::parseFontEmbedDataBlob(LEInputStream& in, FontEmbedDataBlob& _s) {
2090 _s.streamOffset = in.getPosition();
2091 int _c;
2092 LEInputStream::Mark _m;
2093 parseRecordHeader(in, _s.rh);
2094 if (!(_s.rh.recVer == 0)) {
2095 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2096 }
2097 if (!(_s.rh.recInstance<=3)) {
2098 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<=3");
2099 }
2100 if (!(_s.rh.recType == 0xFB8)) {
2101 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFB8");
2102 }
2103 _c = _s.rh.recLen;
2104 _s.data.resize(_c);
2105 in.readBytes(_s.data);
2106 }
parseKinsokuAtom(LEInputStream & in,KinsokuAtom & _s)2107 void MSO::parseKinsokuAtom(LEInputStream& in, KinsokuAtom& _s) {
2108 _s.streamOffset = in.getPosition();
2109 parseRecordHeader(in, _s.rh);
2110 if (!(_s.rh.recVer == 0x0)) {
2111 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
2112 }
2113 if (!(_s.rh.recInstance == 0x3)) {
2114 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x3");
2115 }
2116 if (!(_s.rh.recType == 0x0FD2)) {
2117 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FD2");
2118 }
2119 if (!(_s.rh.recLen == 4)) {
2120 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
2121 }
2122 _s.level = in.readuint32();
2123 if (!(((quint32)_s.level) == 0 || ((quint32)_s.level) == 1 || ((quint32)_s.level) == 2 || ((quint32)_s.level) == 128)) {
2124 throw IncorrectValueException(in.getPosition(), "((quint32)_s.level) == 0 || ((quint32)_s.level) == 1 || ((quint32)_s.level) == 2 || ((quint32)_s.level) == 128");
2125 }
2126 }
parseKinsokuLeadingAtom(LEInputStream & in,KinsokuLeadingAtom & _s)2127 void MSO::parseKinsokuLeadingAtom(LEInputStream& in, KinsokuLeadingAtom& _s) {
2128 _s.streamOffset = in.getPosition();
2129 int _c;
2130 LEInputStream::Mark _m;
2131 parseRecordHeader(in, _s.rh);
2132 if (!(_s.rh.recVer == 0)) {
2133 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2134 }
2135 if (!(_s.rh.recInstance == 0)) {
2136 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2137 }
2138 if (!(_s.rh.recType == 0xFBA)) {
2139 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
2140 }
2141 if (!(_s.rh.recLen%2==0)) {
2142 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
2143 }
2144 _c = _s.rh.recLen/2;
2145 _s.kinsokuLeading.resize(_c);
2146 for (int _i=0; _i<_c; ++_i) {
2147 _s.kinsokuLeading[_i] = in.readuint16();
2148 }
2149 }
parseKinsokuFollowingAtom(LEInputStream & in,KinsokuFollowingAtom & _s)2150 void MSO::parseKinsokuFollowingAtom(LEInputStream& in, KinsokuFollowingAtom& _s) {
2151 _s.streamOffset = in.getPosition();
2152 int _c;
2153 LEInputStream::Mark _m;
2154 parseRecordHeader(in, _s.rh);
2155 if (!(_s.rh.recVer == 0)) {
2156 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2157 }
2158 if (!(_s.rh.recInstance == 1 )) {
2159 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1 ");
2160 }
2161 if (!(_s.rh.recType == 0xFBA)) {
2162 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
2163 }
2164 if (!(_s.rh.recLen%2==0)) {
2165 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
2166 }
2167 _c = _s.rh.recLen/2;
2168 _s.kinsokuFollowing.resize(_c);
2169 for (int _i=0; _i<_c; ++_i) {
2170 _s.kinsokuFollowing[_i] = in.readuint16();
2171 }
2172 }
parseTextSpecialInfoAtom(LEInputStream & in,TextSpecialInfoAtom & _s)2173 void MSO::parseTextSpecialInfoAtom(LEInputStream& in, TextSpecialInfoAtom& _s) {
2174 _s.streamOffset = in.getPosition();
2175 LEInputStream::Mark _m;
2176 bool _atend;
2177 parseRecordHeader(in, _s.rh);
2178 if (!(_s.rh.recVer == 0x0)) {
2179 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
2180 }
2181 if (!(_s.rh.recInstance == 0x0)) {
2182 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
2183 }
2184 if (!(_s.rh.recType == 0xFAA)) {
2185 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFAA");
2186 }
2187 qint64 _startPos = in.getPosition();
2188 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
2189 _atend = in.getPosition() - _startPos >= _totalSize;
2190 while (!_atend) {
2191 _s.rgSIRun.append(TextSIRun(&_s));
2192 parseTextSIRun(in, _s.rgSIRun.last());
2193 _atend = in.getPosition() - _startPos >= _totalSize;
2194 }
2195 }
parseSmartTags(LEInputStream & in,SmartTags & _s)2196 void MSO::parseSmartTags(LEInputStream& in, SmartTags& _s) {
2197 _s.streamOffset = in.getPosition();
2198 int _c;
2199 LEInputStream::Mark _m;
2200 _s.count = in.readuint32();
2201 _c = _s.count;
2202 _s.rgSmartTagIndex.resize(_c);
2203 for (int _i=0; _i<_c; ++_i) {
2204 _s.rgSmartTagIndex[_i] = in.readuint32();
2205 }
2206 }
parseExOleEmbedAtom(LEInputStream & in,ExOleEmbedAtom & _s)2207 void MSO::parseExOleEmbedAtom(LEInputStream& in, ExOleEmbedAtom& _s) {
2208 _s.streamOffset = in.getPosition();
2209 parseRecordHeader(in, _s.rh);
2210 if (!(_s.rh.recVer == 0x0)) {
2211 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
2212 }
2213 if (!(_s.rh.recInstance == 0x0)) {
2214 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
2215 }
2216 if (!(_s.rh.recType == 0x0FCD)) {
2217 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FCD");
2218 }
2219 if (!(_s.rh.recLen == 0x8)) {
2220 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x8");
2221 }
2222 _s.exColorFollow = in.readuint32();
2223 if (!(((quint32)_s.exColorFollow) == 0 || ((quint32)_s.exColorFollow) == 1 || ((quint32)_s.exColorFollow) == 2)) {
2224 throw IncorrectValueException(in.getPosition(), "((quint32)_s.exColorFollow) == 0 || ((quint32)_s.exColorFollow) == 1 || ((quint32)_s.exColorFollow) == 2");
2225 }
2226 _s.fCantLockServer = in.readuint8();
2227 _s.fNoSizeToServer = in.readuint8();
2228 _s.fIsTable = in.readuint8();
2229 _s.unused = in.readuint8();
2230 }
parsePointStruct(LEInputStream & in,PointStruct & _s)2231 void MSO::parsePointStruct(LEInputStream& in, PointStruct& _s) {
2232 _s.streamOffset = in.getPosition();
2233 _s.x = in.readint32();
2234 _s.y = in.readint32();
2235 }
parseRatioStruct(LEInputStream & in,RatioStruct & _s)2236 void MSO::parseRatioStruct(LEInputStream& in, RatioStruct& _s) {
2237 _s.streamOffset = in.getPosition();
2238 _s.numer = in.readint32();
2239 _s.denom = in.readint32();
2240 if (!(((qint32)_s.denom)!= 0)) {
2241 throw IncorrectValueException(in.getPosition(), "((qint32)_s.denom)!= 0");
2242 }
2243 }
parsePersistDirectoryAtom(LEInputStream & in,PersistDirectoryAtom & _s)2244 void MSO::parsePersistDirectoryAtom(LEInputStream& in, PersistDirectoryAtom& _s) {
2245 _s.streamOffset = in.getPosition();
2246 LEInputStream::Mark _m;
2247 bool _atend;
2248 parseRecordHeader(in, _s.rh);
2249 if (!(_s.rh.recVer == 0)) {
2250 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2251 }
2252 if (!(_s.rh.recInstance == 0)) {
2253 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2254 }
2255 if (!(_s.rh.recType == 0x1772)) {
2256 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1772");
2257 }
2258 qint64 _startPos = in.getPosition();
2259 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
2260 _atend = in.getPosition() - _startPos >= _totalSize;
2261 while (!_atend) {
2262 _s.rgPersistDirEntry.append(PersistDirectoryEntry(&_s));
2263 parsePersistDirectoryEntry(in, _s.rgPersistDirEntry.last());
2264 _atend = in.getPosition() - _startPos >= _totalSize;
2265 }
2266 }
parseUnknownDocumentContainerChild(LEInputStream & in,UnknownDocumentContainerChild & _s)2267 void MSO::parseUnknownDocumentContainerChild(LEInputStream& in, UnknownDocumentContainerChild& _s) {
2268 _s.streamOffset = in.getPosition();
2269 int _c;
2270 LEInputStream::Mark _m;
2271 parseRecordHeader(in, _s.rh);
2272 if (!(_s.rh.recType == 0x416 || _s.rh.recType == 0x41A || _s.rh.recType == 0x101A || _s.rh.recType == 0x1773 || _s.rh.recType == 0x1788 || _s.rh.recType == 0x178c || _s.rh.recType == 0x178d)) {
2273 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x416 || _s.rh.recType == 0x41A || _s.rh.recType == 0x101A || _s.rh.recType == 0x1773 || _s.rh.recType == 0x1788 || _s.rh.recType == 0x178c || _s.rh.recType == 0x178d");
2274 }
2275 _c = _s.rh.recLen;
2276 _s.unknown.resize(_c);
2277 in.readBytes(_s.unknown);
2278 }
parseUnknownOfficeArtClientDataChild(LEInputStream & in,UnknownOfficeArtClientDataChild & _s)2279 void MSO::parseUnknownOfficeArtClientDataChild(LEInputStream& in, UnknownOfficeArtClientDataChild& _s) {
2280 _s.streamOffset = in.getPosition();
2281 int _c;
2282 LEInputStream::Mark _m;
2283 parseRecordHeader(in, _s.rh);
2284 if (!(_s.rh.recVer == 0)) {
2285 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2286 }
2287 if (!(_s.rh.recInstance == 0)) {
2288 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2289 }
2290 if (!(_s.rh.recType == 0xFE8 || _s.rh.recType == 0x1019)) {
2291 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFE8 || _s.rh.recType == 0x1019");
2292 }
2293 _c = _s.rh.recLen;
2294 _s.unknown.resize(_c);
2295 in.readBytes(_s.unknown);
2296 }
parseUnknownSlideContainerChild(LEInputStream & in,UnknownSlideContainerChild & _s)2297 void MSO::parseUnknownSlideContainerChild(LEInputStream& in, UnknownSlideContainerChild& _s) {
2298 _s.streamOffset = in.getPosition();
2299 int _c;
2300 LEInputStream::Mark _m;
2301 parseRecordHeader(in, _s.rh);
2302 if (!(_s.rh.recVer == 0)) {
2303 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2304 }
2305 if (!(_s.rh.recInstance == 0)) {
2306 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2307 }
2308 if (!(_s.rh.recType == 0x101D)) {
2309 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x101D");
2310 }
2311 _c = _s.rh.recLen;
2312 _s.unknown.resize(_c);
2313 in.readBytes(_s.unknown);
2314 }
parseUnknownTextContainerChild(LEInputStream & in,UnknownTextContainerChild & _s)2315 void MSO::parseUnknownTextContainerChild(LEInputStream& in, UnknownTextContainerChild& _s) {
2316 _s.streamOffset = in.getPosition();
2317 int _c;
2318 LEInputStream::Mark _m;
2319 parseRecordHeader(in, _s.rh);
2320 if (!(_s.rh.recVer == 3)) {
2321 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 3");
2322 }
2323 if (!(_s.rh.recInstance == 9)) {
2324 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 9");
2325 }
2326 if (!(_s.rh.recType == 0)) {
2327 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0");
2328 }
2329 _c = _s.rh.recLen;
2330 _s.unknown.resize(_c);
2331 in.readBytes(_s.unknown);
2332 }
parsePersistDirectoryEntry(LEInputStream & in,PersistDirectoryEntry & _s)2333 void MSO::parsePersistDirectoryEntry(LEInputStream& in, PersistDirectoryEntry& _s) {
2334 _s.streamOffset = in.getPosition();
2335 int _c;
2336 LEInputStream::Mark _m;
2337 _s.persistId = in.readuint20();
2338 _s.cPersist = in.readuint12();
2339 _c = _s.cPersist;
2340 _s.rgPersistOffset.resize(_c);
2341 for (int _i=0; _i<_c; ++_i) {
2342 _s.rgPersistOffset[_i] = in.readuint32();
2343 }
2344 }
parsePersistIdRef(LEInputStream & in,PersistIdRef & _s)2345 void MSO::parsePersistIdRef(LEInputStream& in, PersistIdRef& _s) {
2346 _s.streamOffset = in.getPosition();
2347 _s.anon = in.readuint32();
2348 }
parseSchemeListElementColorSchemeAtom(LEInputStream & in,SchemeListElementColorSchemeAtom & _s)2349 void MSO::parseSchemeListElementColorSchemeAtom(LEInputStream& in, SchemeListElementColorSchemeAtom& _s) {
2350 _s.streamOffset = in.getPosition();
2351 int _c;
2352 LEInputStream::Mark _m;
2353 parseRecordHeader(in, _s.rh);
2354 if (!(_s.rh.recVer == 0)) {
2355 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2356 }
2357 if (!(_s.rh.recInstance == 6)) {
2358 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 6");
2359 }
2360 if (!(_s.rh.recType == 0x7F0)) {
2361 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7F0");
2362 }
2363 if (!(_s.rh.recLen == 0x20)) {
2364 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x20");
2365 }
2366 _c = 8;
2367 for (int _i=0; _i<_c; ++_i) {
2368 _s.rgSchemeColor.append(ColorStruct(&_s));
2369 parseColorStruct(in, _s.rgSchemeColor[_i]);
2370 }
2371 }
parseRoundTripOArtTextStyles12Atom(LEInputStream & in,RoundTripOArtTextStyles12Atom & _s)2372 void MSO::parseRoundTripOArtTextStyles12Atom(LEInputStream& in, RoundTripOArtTextStyles12Atom& _s) {
2373 _s.streamOffset = in.getPosition();
2374 int _c;
2375 LEInputStream::Mark _m;
2376 parseRecordHeader(in, _s.rh);
2377 if (!(_s.rh.recVer == 0)) {
2378 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2379 }
2380 if (!(_s.rh.recInstance == 0)) {
2381 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2382 }
2383 if (!(_s.rh.recType == 0x423)) {
2384 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x423");
2385 }
2386 _c = _s.rh.recLen;
2387 _s.todo.resize(_c);
2388 in.readBytes(_s.todo);
2389 }
parseSlideNameAtom(LEInputStream & in,SlideNameAtom & _s)2390 void MSO::parseSlideNameAtom(LEInputStream& in, SlideNameAtom& _s) {
2391 _s.streamOffset = in.getPosition();
2392 int _c;
2393 LEInputStream::Mark _m;
2394 parseRecordHeader(in, _s.rh);
2395 if (!(_s.rh.recVer == 0)) {
2396 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2397 }
2398 if (!(_s.rh.recInstance == 3)) {
2399 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 3");
2400 }
2401 if (!(_s.rh.recType == 0x0FBA)) {
2402 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
2403 }
2404 if (!(_s.rh.recLen%2==0)) {
2405 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
2406 }
2407 _c = _s.rh.recLen/2;
2408 _s.slideName.resize(_c);
2409 for (int _i=0; _i<_c; ++_i) {
2410 _s.slideName[_i] = in.readuint16();
2411 }
2412 }
parseSlideProgTagsContainer(LEInputStream & in,SlideProgTagsContainer & _s)2413 void MSO::parseSlideProgTagsContainer(LEInputStream& in, SlideProgTagsContainer& _s) {
2414 _s.streamOffset = in.getPosition();
2415 LEInputStream::Mark _m;
2416 bool _atend;
2417 parseRecordHeader(in, _s.rh);
2418 if (!(_s.rh.recVer == 0xF)) {
2419 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2420 }
2421 if (!(_s.rh.recInstance == 0)) {
2422 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2423 }
2424 if (!(_s.rh.recType == 0x1388)) {
2425 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1388");
2426 }
2427 qint64 _startPos = in.getPosition();
2428 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
2429 _atend = in.getPosition() - _startPos >= _totalSize;
2430 while (!_atend) {
2431 _s.rgTypeRec.append(SlideProgTagsSubContainerOrAtom(&_s));
2432 parseSlideProgTagsSubContainerOrAtom(in, _s.rgTypeRec.last());
2433 _atend = in.getPosition() - _startPos >= _totalSize;
2434 }
2435 }
parsePP9SlideBinaryTagExtension(LEInputStream & in,PP9SlideBinaryTagExtension & _s)2436 void MSO::parsePP9SlideBinaryTagExtension(LEInputStream& in, PP9SlideBinaryTagExtension& _s) {
2437 _s.streamOffset = in.getPosition();
2438 int _c;
2439 LEInputStream::Mark _m;
2440 bool _atend;
2441 parseRecordHeader(in, _s.rh);
2442 if (!(_s.rh.recVer == 0)) {
2443 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2444 }
2445 if (!(_s.rh.recInstance == 0)) {
2446 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2447 }
2448 if (!(_s.rh.recType == 0xFBA)) {
2449 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
2450 }
2451 if (!(_s.rh.recLen == 0xE)) {
2452 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0xE");
2453 }
2454 _c = 7;
2455 _s.tagName.resize(_c);
2456 for (int _i=0; _i<_c; ++_i) {
2457 _s.tagName[_i] = in.readuint16();
2458 }
2459 parseRecordHeader(in, _s.rhData);
2460 if (!(_s.rhData.recVer == 0)) {
2461 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0");
2462 }
2463 if (!(_s.rhData.recInstance == 0)) {
2464 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0");
2465 }
2466 if (!(_s.rhData.recType == 0x138B)) {
2467 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B");
2468 }
2469 _atend = false;
2470 while (!_atend) {
2471 _m = in.setMark();
2472 try {
2473 _s.rgTextMasterStyleAtom.append(TextMasterStyle9Atom(&_s));
2474 parseTextMasterStyle9Atom(in, _s.rgTextMasterStyleAtom.last());
2475 } catch(IncorrectValueException _e) {
2476 _s.rgTextMasterStyleAtom.removeLast();
2477 _atend = true;
2478 in.rewind(_m);
2479 } catch(EOFException _e) {
2480 _s.rgTextMasterStyleAtom.removeLast();
2481 _atend = true;
2482 in.rewind(_m);
2483 }
2484 }
2485 }
parseComment10Container(LEInputStream & in,Comment10Container & _s)2486 void MSO::parseComment10Container(LEInputStream& in, Comment10Container& _s) {
2487 _s.streamOffset = in.getPosition();
2488 int _c;
2489 LEInputStream::Mark _m;
2490 parseRecordHeader(in, _s.rh);
2491 if (!(_s.rh.recVer == 0xF)) {
2492 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2493 }
2494 if (!(_s.rh.recInstance == 0)) {
2495 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2496 }
2497 if (!(_s.rh.recType == 0x2EE0)) {
2498 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EE0");
2499 }
2500 _c = _s.rh.recLen;
2501 _s.todo.resize(_c);
2502 in.readBytes(_s.todo);
2503 }
parseComment10Atom(LEInputStream & in,Comment10Atom & _s)2504 void MSO::parseComment10Atom(LEInputStream& in, Comment10Atom& _s) {
2505 _s.streamOffset = in.getPosition();
2506 int _c;
2507 LEInputStream::Mark _m;
2508 parseRecordHeader(in, _s.rh);
2509 if (!(_s.rh.recVer == 0)) {
2510 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2511 }
2512 if (!(_s.rh.recInstance == 0)) {
2513 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2514 }
2515 if (!(_s.rh.recType == 0x2EE1)) {
2516 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EE1");
2517 }
2518 if (!(_s.rh.recLen == 0x1C)) {
2519 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x1C");
2520 }
2521 _c = _s.rh.recLen;
2522 _s.todo.resize(_c);
2523 in.readBytes(_s.todo);
2524 }
parseLinkedSlide10Atom(LEInputStream & in,LinkedSlide10Atom & _s)2525 void MSO::parseLinkedSlide10Atom(LEInputStream& in, LinkedSlide10Atom& _s) {
2526 _s.streamOffset = in.getPosition();
2527 parseRecordHeader(in, _s.rh);
2528 if (!(_s.rh.recVer == 0)) {
2529 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2530 }
2531 if (!(_s.rh.recInstance == 0)) {
2532 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2533 }
2534 if (!(_s.rh.recType == 0x2EE7)) {
2535 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EE7");
2536 }
2537 if (!(_s.rh.recLen == 8)) {
2538 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
2539 }
2540 _s.linkedSlideIdRef = in.readuint32();
2541 _s.clinkedShapes = in.readint32();
2542 }
parseLinkedShape10Atom(LEInputStream & in,LinkedShape10Atom & _s)2543 void MSO::parseLinkedShape10Atom(LEInputStream& in, LinkedShape10Atom& _s) {
2544 _s.streamOffset = in.getPosition();
2545 parseRecordHeader(in, _s.rh);
2546 if (!(_s.rh.recVer == 0)) {
2547 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2548 }
2549 if (!(_s.rh.recInstance == 0)) {
2550 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2551 }
2552 if (!(_s.rh.recType == 0x2EE6)) {
2553 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EE6");
2554 }
2555 if (!(_s.rh.recLen == 8)) {
2556 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
2557 }
2558 _s.shapeIdRef = in.readuint32();
2559 _s.linkedShapeIdRef = in.readuint32();
2560 }
parseSlideFlags10Atom(LEInputStream & in,SlideFlags10Atom & _s)2561 void MSO::parseSlideFlags10Atom(LEInputStream& in, SlideFlags10Atom& _s) {
2562 _s.streamOffset = in.getPosition();
2563 parseRecordHeader(in, _s.rh);
2564 if (!(_s.rh.recVer == 0)) {
2565 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2566 }
2567 if (!(_s.rh.recInstance == 0)) {
2568 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2569 }
2570 if (!(_s.rh.recType == 0x2EEA)) {
2571 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EEA");
2572 }
2573 if (!(_s.rh.recLen == 4)) {
2574 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
2575 }
2576 _s.fPreserveMaster = in.readbit();
2577 _s.fOverrideMasterAnimatino = in.readbit();
2578 _s.unuseda = in.readuint14();
2579 _s.unusedb = in.readuint16();
2580 }
parseHashCode10Atom(LEInputStream & in,HashCode10Atom & _s)2581 void MSO::parseHashCode10Atom(LEInputStream& in, HashCode10Atom& _s) {
2582 _s.streamOffset = in.getPosition();
2583 parseRecordHeader(in, _s.rh);
2584 if (!(_s.rh.recVer == 0)) {
2585 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2586 }
2587 if (!(_s.rh.recInstance == 0)) {
2588 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2589 }
2590 if (!(_s.rh.recType == 0x2B00)) {
2591 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2B00");
2592 }
2593 if (!(_s.rh.recLen == 4)) {
2594 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
2595 }
2596 _s.hash = in.readuint32();
2597 }
parseExtTimeNodeContainer(LEInputStream & in,ExtTimeNodeContainer & _s)2598 void MSO::parseExtTimeNodeContainer(LEInputStream& in, ExtTimeNodeContainer& _s) {
2599 _s.streamOffset = in.getPosition();
2600 int _c;
2601 LEInputStream::Mark _m;
2602 parseRecordHeader(in, _s.rh);
2603 if (!(_s.rh.recVer == 0xF)) {
2604 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2605 }
2606 if (!(_s.rh.recInstance == 1)) {
2607 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
2608 }
2609 if (!(_s.rh.recType == 0xF144)) {
2610 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF144");
2611 }
2612 _c = _s.rh.recLen;
2613 _s.todo.resize(_c);
2614 in.readBytes(_s.todo);
2615 }
parseBuildListContainer(LEInputStream & in,BuildListContainer & _s)2616 void MSO::parseBuildListContainer(LEInputStream& in, BuildListContainer& _s) {
2617 _s.streamOffset = in.getPosition();
2618 int _c;
2619 LEInputStream::Mark _m;
2620 parseRecordHeader(in, _s.rh);
2621 if (!(_s.rh.recVer == 0xF)) {
2622 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2623 }
2624 if (!(_s.rh.recInstance == 0)) {
2625 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2626 }
2627 if (!(_s.rh.recType == 0x2B02)) {
2628 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2B02");
2629 }
2630 _c = _s.rh.recLen;
2631 _s.todo.resize(_c);
2632 in.readBytes(_s.todo);
2633 }
parseRoundTripHeaderFooterDefaults12Atom(LEInputStream & in,RoundTripHeaderFooterDefaults12Atom & _s)2634 void MSO::parseRoundTripHeaderFooterDefaults12Atom(LEInputStream& in, RoundTripHeaderFooterDefaults12Atom& _s) {
2635 _s.streamOffset = in.getPosition();
2636 parseRecordHeader(in, _s.rh);
2637 if (!(_s.rh.recVer == 0)) {
2638 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2639 }
2640 if (!(_s.rh.recInstance == 0)) {
2641 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2642 }
2643 if (!(_s.rh.recType == 0x0424)) {
2644 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0424");
2645 }
2646 if (!(_s.rh.recLen == 1)) {
2647 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 1");
2648 }
2649 _s.fIncludeDate = in.readbit();
2650 _s.fIncludeFooter = in.readbit();
2651 _s.fIncludeHeader = in.readbit();
2652 _s.fIncludeSlideNumber = in.readbit();
2653 _s.reserved = in.readuint4();
2654 }
parseTagNameAtom(LEInputStream & in,TagNameAtom & _s)2655 void MSO::parseTagNameAtom(LEInputStream& in, TagNameAtom& _s) {
2656 _s.streamOffset = in.getPosition();
2657 int _c;
2658 LEInputStream::Mark _m;
2659 parseRecordHeader(in, _s.rh);
2660 if (!(_s.rh.recVer == 0)) {
2661 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2662 }
2663 if (!(_s.rh.recInstance == 0)) {
2664 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2665 }
2666 if (!(_s.rh.recType == 0xFBA)) {
2667 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
2668 }
2669 if (!(_s.rh.recLen%2 == 0 )) {
2670 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2 == 0 ");
2671 }
2672 _c = _s.rh.recLen/2;
2673 _s.tagName.resize(_c);
2674 for (int _i=0; _i<_c; ++_i) {
2675 _s.tagName[_i] = in.readuint16();
2676 }
2677 }
parseTagValueAtom(LEInputStream & in,TagValueAtom & _s)2678 void MSO::parseTagValueAtom(LEInputStream& in, TagValueAtom& _s) {
2679 _s.streamOffset = in.getPosition();
2680 int _c;
2681 LEInputStream::Mark _m;
2682 parseRecordHeader(in, _s.rh);
2683 if (!(_s.rh.recVer == 0)) {
2684 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2685 }
2686 if (!(_s.rh.recInstance == 1)) {
2687 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
2688 }
2689 if (!(_s.rh.recType == 0xFBA)) {
2690 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
2691 }
2692 _c = _s.rh.recLen/2;
2693 _s.tagValue.resize(_c);
2694 for (int _i=0; _i<_c; ++_i) {
2695 _s.tagValue[_i] = in.readuint16();
2696 }
2697 }
parseRoundTripMainMasterRecord(LEInputStream & in,RoundTripMainMasterRecord & _s)2698 void MSO::parseRoundTripMainMasterRecord(LEInputStream& in, RoundTripMainMasterRecord& _s) {
2699 _s.streamOffset = in.getPosition();
2700 int _c;
2701 LEInputStream::Mark _m;
2702 parseRecordHeader(in, _s.rh);
2703 if (!(_s.rh.recType == 0x41C || _s.rh.recType == 0x40E || _s.rh.recType == 0x040F || _s.rh.recType == 0x41E || _s.rh.recType == 0x0423 || _s.rh.recType == 0x2B0D || _s.rh.recType == 0x2B0B || _s.rh.recType == 0x041D || _s.rh.recType == 0x2B0C || _s.rh.recType == 0x101D)) {
2704 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x41C || _s.rh.recType == 0x40E || _s.rh.recType == 0x040F || _s.rh.recType == 0x41E || _s.rh.recType == 0x0423 || _s.rh.recType == 0x2B0D || _s.rh.recType == 0x2B0B || _s.rh.recType == 0x041D || _s.rh.recType == 0x2B0C || _s.rh.recType == 0x101D");
2705 }
2706 _c = _s.rh.recLen;
2707 _s.todo.resize(_c);
2708 in.readBytes(_s.todo);
2709 }
parseTemplateNameAtom(LEInputStream & in,TemplateNameAtom & _s)2710 void MSO::parseTemplateNameAtom(LEInputStream& in, TemplateNameAtom& _s) {
2711 _s.streamOffset = in.getPosition();
2712 int _c;
2713 LEInputStream::Mark _m;
2714 parseRecordHeader(in, _s.rh);
2715 if (!(_s.rh.recVer == 0)) {
2716 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2717 }
2718 if (!(_s.rh.recInstance == 2)) {
2719 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 2");
2720 }
2721 if (!(_s.rh.recType == 0x0FBA)) {
2722 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
2723 }
2724 if (!(_s.rh.recLen%2==0)) {
2725 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
2726 }
2727 _c = _s.rh.recLen/2;
2728 _s.templateName.resize(_c);
2729 for (int _i=0; _i<_c; ++_i) {
2730 _s.templateName[_i] = in.readuint16();
2731 }
2732 }
parseRoundTripSlideSyncInfo12Container(LEInputStream & in,RoundTripSlideSyncInfo12Container & _s)2733 void MSO::parseRoundTripSlideSyncInfo12Container(LEInputStream& in, RoundTripSlideSyncInfo12Container& _s) {
2734 _s.streamOffset = in.getPosition();
2735 int _c;
2736 LEInputStream::Mark _m;
2737 parseRecordHeader(in, _s.rh);
2738 if (!(_s.rh.recVer == 0xF)) {
2739 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2740 }
2741 if (!(_s.rh.recInstance == 0)) {
2742 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2743 }
2744 if (!(_s.rh.recType == 0x3714)) {
2745 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3714");
2746 }
2747 _c = _s.rh.recLen;
2748 _s.todo.resize(_c);
2749 in.readBytes(_s.todo);
2750 }
parseSlideFlags(LEInputStream & in,SlideFlags & _s)2751 void MSO::parseSlideFlags(LEInputStream& in, SlideFlags& _s) {
2752 _s.streamOffset = in.getPosition();
2753 _s.fMasterObjects = in.readbit();
2754 _s.fMasterScheme = in.readbit();
2755 _s.fMasterBackground = in.readbit();
2756 _s.unused1 = in.readuint5();
2757 _s.unused2 = in.readuint8();
2758 }
parseNotesRoundTripAtom(LEInputStream & in,NotesRoundTripAtom & _s)2759 void MSO::parseNotesRoundTripAtom(LEInputStream& in, NotesRoundTripAtom& _s) {
2760 _s.streamOffset = in.getPosition();
2761 int _c;
2762 LEInputStream::Mark _m;
2763 parseRecordHeader(in, _s.rh);
2764 if (!(_s.rh.recVer == 0)) {
2765 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2766 }
2767 if (!(_s.rh.recInstance == 0)) {
2768 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2769 }
2770 if (!(_s.rh.recType == 0x40E || _s.rh.recType == 0x40F || _s.rh.recType == 0x427)) {
2771 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x40E || _s.rh.recType == 0x40F || _s.rh.recType == 0x427");
2772 }
2773 _c = _s.rh.recLen;
2774 _s.todo.resize(_c);
2775 in.readBytes(_s.todo);
2776 }
parseHandoutContainer(LEInputStream & in,HandoutContainer & _s)2777 void MSO::parseHandoutContainer(LEInputStream& in, HandoutContainer& _s) {
2778 _s.streamOffset = in.getPosition();
2779 int _c;
2780 LEInputStream::Mark _m;
2781 parseRecordHeader(in, _s.rh);
2782 if (!(_s.rh.recVer == 0xF)) {
2783 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
2784 }
2785 if (!(_s.rh.recInstance == 0)) {
2786 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2787 }
2788 if (!(_s.rh.recType == 0x0FC9)) {
2789 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FC9");
2790 }
2791 _c = _s.rh.recLen;
2792 _s.todo.resize(_c);
2793 in.readBytes(_s.todo);
2794 }
parseExControlStg(LEInputStream & in,ExControlStg & _s)2795 void MSO::parseExControlStg(LEInputStream& in, ExControlStg& _s) {
2796 _s.streamOffset = in.getPosition();
2797 int _c;
2798 LEInputStream::Mark _m;
2799 parseRecordHeader(in, _s.rh);
2800 if (!(_s.rh.recVer == 0)) {
2801 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2802 }
2803 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1)) {
2804 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1");
2805 }
2806 if (!(_s.rh.recType == 0x1011)) {
2807 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1011");
2808 }
2809 _c = _s.rh.recLen;
2810 _s.todo.resize(_c);
2811 in.readBytes(_s.todo);
2812 }
parseExOleObjStg(LEInputStream & in,ExOleObjStg & _s)2813 void MSO::parseExOleObjStg(LEInputStream& in, ExOleObjStg& _s) {
2814 _s.streamOffset = in.getPosition();
2815 int _c;
2816 LEInputStream::Mark _m;
2817 parseRecordHeader(in, _s.rh);
2818 if (!(_s.rh.recVer == 0)) {
2819 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2820 }
2821 if (!(_s.rh.recInstance == 0)) {
2822 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2823 }
2824 if (!(_s.rh.recType == 0x1011)) {
2825 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1011");
2826 }
2827 _c = _s.rh.recLen;
2828 _s.todo.resize(_c);
2829 in.readBytes(_s.todo);
2830 }
parseUserEditAtom(LEInputStream & in,UserEditAtom & _s)2831 void MSO::parseUserEditAtom(LEInputStream& in, UserEditAtom& _s) {
2832 _s.streamOffset = in.getPosition();
2833 LEInputStream::Mark _m;
2834 bool _atend;
2835 parseRecordHeader(in, _s.rh);
2836 if (!(_s.rh.recVer == 0)) {
2837 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2838 }
2839 if (!(_s.rh.recInstance == 0)) {
2840 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2841 }
2842 if (!(_s.rh.recType == 0x0FF5)) {
2843 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FF5");
2844 }
2845 if (!(_s.rh.recLen == 0x1C || _s.rh.recLen == 0x20)) {
2846 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x1C || _s.rh.recLen == 0x20");
2847 }
2848 _s.lastSlideIdRef = in.readuint32();
2849 _s.version = in.readuint16();
2850 _s.minorVersion = in.readuint8();
2851 if (!(((quint8)_s.minorVersion) == 0)) {
2852 throw IncorrectValueException(in.getPosition(), "((quint8)_s.minorVersion) == 0");
2853 }
2854 _s.majorVersion = in.readuint8();
2855 if (!(((quint8)_s.majorVersion) == 3)) {
2856 throw IncorrectValueException(in.getPosition(), "((quint8)_s.majorVersion) == 3");
2857 }
2858 _s.offsetLastEdit = in.readuint32();
2859 _s.offsetPersistDirectory = in.readuint32();
2860 _s.docPersistIdRef = in.readuint32();
2861 if (!(((quint32)_s.docPersistIdRef) == 1)) {
2862 throw IncorrectValueException(in.getPosition(), "((quint32)_s.docPersistIdRef) == 1");
2863 }
2864 _s.persistIdSeed = in.readuint32();
2865 _s.lastView = in.readuint16();
2866 if (!(((quint16)_s.lastView)<=18)) {
2867 throw IncorrectValueException(in.getPosition(), "((quint16)_s.lastView)<=18");
2868 }
2869 _s.unused = in.readuint16();
2870 _s._has_encryptSessionPersistIdRef = _s.rh.recLen==32;
2871 if (_s._has_encryptSessionPersistIdRef) {
2872 _s.encryptSessionPersistIdRef = in.readuint32();
2873 }
2874 _atend = false;
2875 while (!_atend) {
2876 _m = in.setMark();
2877 try {
2878 _s.zeroPadding.append(ZeroByte(&_s));
2879 parseZeroByte(in, _s.zeroPadding.last());
2880 } catch(IncorrectValueException _e) {
2881 _s.zeroPadding.removeLast();
2882 _atend = true;
2883 in.rewind(_m);
2884 } catch(EOFException _e) {
2885 _s.zeroPadding.removeLast();
2886 _atend = true;
2887 in.rewind(_m);
2888 }
2889 }
2890 }
parseVbaProjectStg(LEInputStream & in,VbaProjectStg & _s)2891 void MSO::parseVbaProjectStg(LEInputStream& in, VbaProjectStg& _s) {
2892 _s.streamOffset = in.getPosition();
2893 int _c;
2894 LEInputStream::Mark _m;
2895 parseRecordHeader(in, _s.rh);
2896 if (!(_s.rh.recVer == 0)) {
2897 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2898 }
2899 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1)) {
2900 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1");
2901 }
2902 if (!(_s.rh.recType == 0x1011)) {
2903 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1011");
2904 }
2905 _c = _s.rh.recLen;
2906 _s.todo.resize(_c);
2907 in.readBytes(_s.todo);
2908 }
parseSlideAtom(LEInputStream & in,SlideAtom & _s)2909 void MSO::parseSlideAtom(LEInputStream& in, SlideAtom& _s) {
2910 _s.streamOffset = in.getPosition();
2911 int _c;
2912 LEInputStream::Mark _m;
2913 parseRecordHeader(in, _s.rh);
2914 if (!(_s.rh.recVer == 0x2)) {
2915 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x2");
2916 }
2917 if (!(_s.rh.recInstance == 0x0)) {
2918 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
2919 }
2920 if (!(_s.rh.recType == 0x03EF)) {
2921 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03EF");
2922 }
2923 if (!(_s.rh.recLen == 0x18)) {
2924 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x18");
2925 }
2926 _s.geom = in.readuint32();
2927 _c = 8;
2928 _s.rgPlaceholderTypes.resize(_c);
2929 in.readBytes(_s.rgPlaceholderTypes);
2930 _s.masterIdRef = in.readuint32();
2931 _s.notesIdRef = in.readuint32();
2932 parseSlideFlags(in, _s.slideFlags);
2933 _s.unused = in.readuint16();
2934 }
parseSlideShowSlideInfoAtom(LEInputStream & in,SlideShowSlideInfoAtom & _s)2935 void MSO::parseSlideShowSlideInfoAtom(LEInputStream& in, SlideShowSlideInfoAtom& _s) {
2936 _s.streamOffset = in.getPosition();
2937 int _c;
2938 LEInputStream::Mark _m;
2939 parseRecordHeader(in, _s.rh);
2940 if (!(_s.rh.recVer == 0)) {
2941 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
2942 }
2943 if (!(_s.rh.recInstance == 0)) {
2944 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2945 }
2946 if (!(_s.rh.recType == 0x03F9)) {
2947 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03F9");
2948 }
2949 if (!(_s.rh.recLen == 0x10)) {
2950 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
2951 }
2952 _s.slidetime = in.readuint32();
2953 _s.slideIdRef = in.readuint32();
2954 _s.effectDirection = in.readuint8();
2955 _s.effectType = in.readuint8();
2956 _s.fManualAdvance = in.readbit();
2957 _s.reserved = in.readbit();
2958 _s.fHidden = in.readbit();
2959 _s.reserved2 = in.readbit();
2960 _s.fSound = in.readbit();
2961 _s.reserved3 = in.readbit();
2962 _s.fLoopSound = in.readbit();
2963 _s.reserved4 = in.readbit();
2964 _s.fStopSound = in.readbit();
2965 _s.freserved5 = in.readbit();
2966 _s.fAutoAdvance = in.readbit();
2967 _s.reserved6 = in.readbit();
2968 _s.fCursorVisible = in.readbit();
2969 _s.reserved7 = in.readuint3();
2970 _s.speed = in.readuint8();
2971 _c = 3;
2972 _s.unused.resize(_c);
2973 in.readBytes(_s.unused);
2974 }
parseSlideShowDocInfoAtom(LEInputStream & in,SlideShowDocInfoAtom & _s)2975 void MSO::parseSlideShowDocInfoAtom(LEInputStream& in, SlideShowDocInfoAtom& _s) {
2976 _s.streamOffset = in.getPosition();
2977 int _c;
2978 LEInputStream::Mark _m;
2979 parseRecordHeader(in, _s.rh);
2980 if (!(_s.rh.recVer == 1)) {
2981 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 1");
2982 }
2983 if (!(_s.rh.recInstance == 0)) {
2984 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
2985 }
2986 if (!(_s.rh.recType == 0x0401)) {
2987 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0401");
2988 }
2989 if (!(_s.rh.recLen == 0x50)) {
2990 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x50");
2991 }
2992 parseColorIndexStruct(in, _s.penColor);
2993 _s.restartTime = in.readint32();
2994 _s.startSlide = in.readint16();
2995 if (!(((qint16)_s.startSlide)>=0)) {
2996 throw IncorrectValueException(in.getPosition(), "((qint16)_s.startSlide)>=0");
2997 }
2998 _s.endSlide = in.readint16();
2999 if (!(((qint16)_s.endSlide)>=0)) {
3000 throw IncorrectValueException(in.getPosition(), "((qint16)_s.endSlide)>=0");
3001 }
3002 _c = 64;
3003 _s.namedShow.resize(_c);
3004 in.readBytes(_s.namedShow);
3005 _s.fAutoAdvance = in.readbit();
3006 _s.fWillSkipBuilds = in.readbit();
3007 _s.fUseSlideRange = in.readbit();
3008 _s.fDocUseNamedShow = in.readbit();
3009 _s.fShowBrowseMode = in.readbit();
3010 _s.fKioskMode = in.readbit();
3011 _s.fWillSkipNarration = in.readbit();
3012 _s.fLoopContinuously = in.readbit();
3013 _s.fHideScrollBar = in.readbit();
3014 _s.reserved = in.readuint7();
3015 _s.unused = in.readuint16();
3016 }
parseSlideSchemeColorSchemeAtom(LEInputStream & in,SlideSchemeColorSchemeAtom & _s)3017 void MSO::parseSlideSchemeColorSchemeAtom(LEInputStream& in, SlideSchemeColorSchemeAtom& _s) {
3018 _s.streamOffset = in.getPosition();
3019 int _c;
3020 LEInputStream::Mark _m;
3021 parseRecordHeader(in, _s.rh);
3022 if (!(_s.rh.recVer == 0)) {
3023 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3024 }
3025 if (!(_s.rh.recInstance == 1)) {
3026 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
3027 }
3028 if (!(_s.rh.recType == 0x07F0)) {
3029 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07F0");
3030 }
3031 if (!(_s.rh.recLen == 0x20)) {
3032 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x20");
3033 }
3034 _c = 8;
3035 for (int _i=0; _i<_c; ++_i) {
3036 _s.rgSchemeColor.append(ColorStruct(&_s));
3037 parseColorStruct(in, _s.rgSchemeColor[_i]);
3038 }
3039 }
parseRoundTripSlideRecord(LEInputStream & in,RoundTripSlideRecord & _s)3040 void MSO::parseRoundTripSlideRecord(LEInputStream& in, RoundTripSlideRecord& _s) {
3041 _s.streamOffset = in.getPosition();
3042 int _c;
3043 LEInputStream::Mark _m;
3044 parseRecordHeader(in, _s.rh);
3045 if (!(_s.rh.recType == 0x40E || _s.rh.recType == 0x40F || _s.rh.recType == 0x41D || _s.rh.recType == 0x3714 || _s.rh.recType == 0x2B0D || _s.rh.recType == 0x2B0B || _s.rh.recType == 0x2B0C || _s.rh.recType == 0x422)) {
3046 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x40E || _s.rh.recType == 0x40F || _s.rh.recType == 0x41D || _s.rh.recType == 0x3714 || _s.rh.recType == 0x2B0D || _s.rh.recType == 0x2B0B || _s.rh.recType == 0x2B0C || _s.rh.recType == 0x422");
3047 }
3048 _c = _s.rh.recLen;
3049 _s.todo.resize(_c);
3050 in.readBytes(_s.todo);
3051 }
parseNamedShowsContainer(LEInputStream & in,NamedShowsContainer & _s)3052 void MSO::parseNamedShowsContainer(LEInputStream& in, NamedShowsContainer& _s) {
3053 _s.streamOffset = in.getPosition();
3054 int _c;
3055 LEInputStream::Mark _m;
3056 parseRecordHeader(in, _s.rh);
3057 if (!(_s.rh.recVer == 0xF)) {
3058 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3059 }
3060 if (!(_s.rh.recInstance == 0)) {
3061 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3062 }
3063 if (!(_s.rh.recType == 0x410)) {
3064 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x410");
3065 }
3066 _c = _s.rh.recLen;
3067 _s.todo.resize(_c);
3068 in.readBytes(_s.todo);
3069 }
parseSummaryContainer(LEInputStream & in,SummaryContainer & _s)3070 void MSO::parseSummaryContainer(LEInputStream& in, SummaryContainer& _s) {
3071 _s.streamOffset = in.getPosition();
3072 int _c;
3073 LEInputStream::Mark _m;
3074 parseRecordHeader(in, _s.rh);
3075 if (!(_s.rh.recVer == 0xF)) {
3076 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3077 }
3078 if (!(_s.rh.recInstance == 0)) {
3079 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3080 }
3081 if (!(_s.rh.recType == 0x402)) {
3082 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x402");
3083 }
3084 _c = _s.rh.recLen;
3085 _s.todo.resize(_c);
3086 in.readBytes(_s.todo);
3087 }
parseDocRoutingSlipAtom(LEInputStream & in,DocRoutingSlipAtom & _s)3088 void MSO::parseDocRoutingSlipAtom(LEInputStream& in, DocRoutingSlipAtom& _s) {
3089 _s.streamOffset = in.getPosition();
3090 int _c;
3091 LEInputStream::Mark _m;
3092 parseRecordHeader(in, _s.rh);
3093 if (!(_s.rh.recVer == 0)) {
3094 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3095 }
3096 if (!(_s.rh.recInstance == 0)) {
3097 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3098 }
3099 if (!(_s.rh.recType == 0x406)) {
3100 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x406");
3101 }
3102 _c = _s.rh.recLen;
3103 _s.todo.resize(_c);
3104 in.readBytes(_s.todo);
3105 }
parsePrintOptionsAtom(LEInputStream & in,PrintOptionsAtom & _s)3106 void MSO::parsePrintOptionsAtom(LEInputStream& in, PrintOptionsAtom& _s) {
3107 _s.streamOffset = in.getPosition();
3108 int _c;
3109 LEInputStream::Mark _m;
3110 parseRecordHeader(in, _s.rh);
3111 if (!(_s.rh.recVer == 0)) {
3112 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3113 }
3114 if (!(_s.rh.recInstance == 0)) {
3115 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3116 }
3117 if (!(_s.rh.recType == 0x1770)) {
3118 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1770");
3119 }
3120 if (!(_s.rh.recLen == 5)) {
3121 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 5");
3122 }
3123 _c = _s.rh.recLen;
3124 _s.todo.resize(_c);
3125 in.readBytes(_s.todo);
3126 }
parseRoundTripCustomTableStyles12Atom(LEInputStream & in,RoundTripCustomTableStyles12Atom & _s)3127 void MSO::parseRoundTripCustomTableStyles12Atom(LEInputStream& in, RoundTripCustomTableStyles12Atom& _s) {
3128 _s.streamOffset = in.getPosition();
3129 int _c;
3130 LEInputStream::Mark _m;
3131 parseRecordHeader(in, _s.rh);
3132 if (!(_s.rh.recVer == 0 || _s.rh.recVer == 0xF)) {
3133 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0 || _s.rh.recVer == 0xF");
3134 }
3135 if (!(_s.rh.recInstance == 0)) {
3136 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3137 }
3138 if (!(_s.rh.recType == 0x428)) {
3139 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x428");
3140 }
3141 _c = _s.rh.recLen;
3142 _s.todo.resize(_c);
3143 in.readBytes(_s.todo);
3144 }
parseRoundTripCompositeMasterId12Atom(LEInputStream & in,RoundTripCompositeMasterId12Atom & _s)3145 void MSO::parseRoundTripCompositeMasterId12Atom(LEInputStream& in, RoundTripCompositeMasterId12Atom& _s) {
3146 _s.streamOffset = in.getPosition();
3147 parseRecordHeader(in, _s.rh);
3148 if (!(_s.rh.recVer == 0)) {
3149 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3150 }
3151 if (!(_s.rh.recInstance == 0)) {
3152 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3153 }
3154 if (!(_s.rh.recType == 0x41D)) {
3155 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x41D");
3156 }
3157 if (!(_s.rh.recLen == 4)) {
3158 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
3159 }
3160 _s.compositeMasterId = in.readuint32();
3161 }
parseColorStruct(LEInputStream & in,ColorStruct & _s)3162 void MSO::parseColorStruct(LEInputStream& in, ColorStruct& _s) {
3163 _s.streamOffset = in.getPosition();
3164 _s.red = in.readuint8();
3165 _s.green = in.readuint8();
3166 _s.blue = in.readuint8();
3167 _s.unused = in.readuint8();
3168 }
parseExObjListAtom(LEInputStream & in,ExObjListAtom & _s)3169 void MSO::parseExObjListAtom(LEInputStream& in, ExObjListAtom& _s) {
3170 _s.streamOffset = in.getPosition();
3171 parseRecordHeader(in, _s.rh);
3172 if (!(_s.rh.recVer == 0x0)) {
3173 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3174 }
3175 if (!(_s.rh.recInstance == 0x0)) {
3176 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
3177 }
3178 if (!(_s.rh.recType == 0x040A)) {
3179 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x040A");
3180 }
3181 if (!(_s.rh.recLen == 4)) {
3182 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
3183 }
3184 _s.exObjIdSeed = in.readint32();
3185 if (!(((qint32)_s.exObjIdSeed)>=1)) {
3186 throw IncorrectValueException(in.getPosition(), "((qint32)_s.exObjIdSeed)>=1");
3187 }
3188 }
parseExAviMovieContainer(LEInputStream & in,ExAviMovieContainer & _s)3189 void MSO::parseExAviMovieContainer(LEInputStream& in, ExAviMovieContainer& _s) {
3190 _s.streamOffset = in.getPosition();
3191 int _c;
3192 LEInputStream::Mark _m;
3193 parseOfficeArtRecordHeader(in, _s.rh);
3194 if (!(_s.rh.recVer == 0xF)) {
3195 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3196 }
3197 if (!(_s.rh.recInstance == 0)) {
3198 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3199 }
3200 if (!(_s.rh.recType == 0x1006)) {
3201 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1006");
3202 }
3203 _c = _s.rh.recLen;
3204 _s.todo.resize(_c);
3205 in.readBytes(_s.todo);
3206 }
parseExCDAudioContainer(LEInputStream & in,ExCDAudioContainer & _s)3207 void MSO::parseExCDAudioContainer(LEInputStream& in, ExCDAudioContainer& _s) {
3208 _s.streamOffset = in.getPosition();
3209 int _c;
3210 LEInputStream::Mark _m;
3211 parseOfficeArtRecordHeader(in, _s.rh);
3212 if (!(_s.rh.recVer == 0xF)) {
3213 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3214 }
3215 if (!(_s.rh.recInstance == 0)) {
3216 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3217 }
3218 if (!(_s.rh.recType == 0x100E)) {
3219 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x100E");
3220 }
3221 _c = _s.rh.recLen;
3222 _s.todo.resize(_c);
3223 in.readBytes(_s.todo);
3224 }
parseExControlAtom(LEInputStream & in,ExControlAtom & _s)3225 void MSO::parseExControlAtom(LEInputStream& in, ExControlAtom& _s) {
3226 _s.streamOffset = in.getPosition();
3227 parseOfficeArtRecordHeader(in, _s.rh);
3228 if (!(_s.rh.recVer == 0)) {
3229 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3230 }
3231 if (!(_s.rh.recInstance == 0)) {
3232 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3233 }
3234 if (!(_s.rh.recType == 0xFFB)) {
3235 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFFB");
3236 }
3237 if (!(_s.rh.recLen == 4)) {
3238 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
3239 }
3240 _s.slideIdRef = in.readuint32();
3241 }
parseExHyperlinkAtom(LEInputStream & in,ExHyperlinkAtom & _s)3242 void MSO::parseExHyperlinkAtom(LEInputStream& in, ExHyperlinkAtom& _s) {
3243 _s.streamOffset = in.getPosition();
3244 parseOfficeArtRecordHeader(in, _s.rh);
3245 if (!(_s.rh.recVer == 0)) {
3246 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3247 }
3248 if (!(_s.rh.recInstance == 0)) {
3249 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3250 }
3251 if (!(_s.rh.recType == 0xFD3)) {
3252 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD3");
3253 }
3254 if (!(_s.rh.recLen == 4)) {
3255 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
3256 }
3257 _s.exHyperLinkId = in.readuint32();
3258 }
parseFriendlyNameAtom(LEInputStream & in,FriendlyNameAtom & _s)3259 void MSO::parseFriendlyNameAtom(LEInputStream& in, FriendlyNameAtom& _s) {
3260 _s.streamOffset = in.getPosition();
3261 int _c;
3262 LEInputStream::Mark _m;
3263 parseOfficeArtRecordHeader(in, _s.rh);
3264 if (!(_s.rh.recVer == 0)) {
3265 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3266 }
3267 if (!(_s.rh.recInstance == 0)) {
3268 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3269 }
3270 if (!(_s.rh.recType == 0xFBA)) {
3271 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
3272 }
3273 if (!(_s.rh.recLen%2==0)) {
3274 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
3275 }
3276 _c = _s.rh.recLen/2;
3277 _s.friendlyName.resize(_c);
3278 for (int _i=0; _i<_c; ++_i) {
3279 _s.friendlyName[_i] = in.readuint16();
3280 }
3281 }
parseTargetAtom(LEInputStream & in,TargetAtom & _s)3282 void MSO::parseTargetAtom(LEInputStream& in, TargetAtom& _s) {
3283 _s.streamOffset = in.getPosition();
3284 int _c;
3285 LEInputStream::Mark _m;
3286 parseOfficeArtRecordHeader(in, _s.rh);
3287 if (!(_s.rh.recVer == 0)) {
3288 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3289 }
3290 if (!(_s.rh.recInstance == 1)) {
3291 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1");
3292 }
3293 if (!(_s.rh.recType == 0xFBA)) {
3294 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
3295 }
3296 if (!(_s.rh.recLen%2==0)) {
3297 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
3298 }
3299 _c = _s.rh.recLen/2;
3300 _s.target.resize(_c);
3301 for (int _i=0; _i<_c; ++_i) {
3302 _s.target[_i] = in.readuint16();
3303 }
3304 }
parseLocationAtom(LEInputStream & in,LocationAtom & _s)3305 void MSO::parseLocationAtom(LEInputStream& in, LocationAtom& _s) {
3306 _s.streamOffset = in.getPosition();
3307 int _c;
3308 LEInputStream::Mark _m;
3309 parseOfficeArtRecordHeader(in, _s.rh);
3310 if (!(_s.rh.recVer == 0)) {
3311 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3312 }
3313 if (!(_s.rh.recInstance == 3)) {
3314 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 3");
3315 }
3316 if (!(_s.rh.recType == 0xFBA)) {
3317 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
3318 }
3319 if (!(_s.rh.recLen%2==0)) {
3320 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
3321 }
3322 _c = _s.rh.recLen/2;
3323 _s.location.resize(_c);
3324 for (int _i=0; _i<_c; ++_i) {
3325 _s.location[_i] = in.readuint16();
3326 }
3327 }
parseExMCIMovieContainer(LEInputStream & in,ExMCIMovieContainer & _s)3328 void MSO::parseExMCIMovieContainer(LEInputStream& in, ExMCIMovieContainer& _s) {
3329 _s.streamOffset = in.getPosition();
3330 int _c;
3331 LEInputStream::Mark _m;
3332 parseOfficeArtRecordHeader(in, _s.rh);
3333 if (!(_s.rh.recVer == 0xF)) {
3334 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3335 }
3336 if (!(_s.rh.recInstance == 0)) {
3337 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3338 }
3339 if (!(_s.rh.recType == 0x1007)) {
3340 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1007");
3341 }
3342 _c = _s.rh.recLen;
3343 _s.todo.resize(_c);
3344 in.readBytes(_s.todo);
3345 }
parseExMIDIAudioContainer(LEInputStream & in,ExMIDIAudioContainer & _s)3346 void MSO::parseExMIDIAudioContainer(LEInputStream& in, ExMIDIAudioContainer& _s) {
3347 _s.streamOffset = in.getPosition();
3348 int _c;
3349 LEInputStream::Mark _m;
3350 parseOfficeArtRecordHeader(in, _s.rh);
3351 if (!(_s.rh.recVer == 0xF)) {
3352 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3353 }
3354 if (!(_s.rh.recInstance == 0)) {
3355 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3356 }
3357 if (!(_s.rh.recType == 0x100D)) {
3358 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x100D");
3359 }
3360 _c = _s.rh.recLen;
3361 _s.todo.resize(_c);
3362 in.readBytes(_s.todo);
3363 }
parseExWAVAudioEmbeddedContainer(LEInputStream & in,ExWAVAudioEmbeddedContainer & _s)3364 void MSO::parseExWAVAudioEmbeddedContainer(LEInputStream& in, ExWAVAudioEmbeddedContainer& _s) {
3365 _s.streamOffset = in.getPosition();
3366 int _c;
3367 LEInputStream::Mark _m;
3368 parseOfficeArtRecordHeader(in, _s.rh);
3369 if (!(_s.rh.recVer == 0xF)) {
3370 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3371 }
3372 if (!(_s.rh.recInstance == 0)) {
3373 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3374 }
3375 if (!(_s.rh.recType == 0x100F)) {
3376 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x100F");
3377 }
3378 _c = _s.rh.recLen;
3379 _s.todo.resize(_c);
3380 in.readBytes(_s.todo);
3381 }
parseExWAVAudioLinkContainer(LEInputStream & in,ExWAVAudioLinkContainer & _s)3382 void MSO::parseExWAVAudioLinkContainer(LEInputStream& in, ExWAVAudioLinkContainer& _s) {
3383 _s.streamOffset = in.getPosition();
3384 int _c;
3385 LEInputStream::Mark _m;
3386 parseOfficeArtRecordHeader(in, _s.rh);
3387 if (!(_s.rh.recVer == 0xF)) {
3388 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3389 }
3390 if (!(_s.rh.recInstance == 0)) {
3391 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3392 }
3393 if (!(_s.rh.recType == 0x1010)) {
3394 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1010");
3395 }
3396 _c = _s.rh.recLen;
3397 _s.todo.resize(_c);
3398 in.readBytes(_s.todo);
3399 }
parseUnknownExObjListSubContainerChild(LEInputStream & in,UnknownExObjListSubContainerChild & _s)3400 void MSO::parseUnknownExObjListSubContainerChild(LEInputStream& in, UnknownExObjListSubContainerChild& _s) {
3401 _s.streamOffset = in.getPosition();
3402 int _c;
3403 LEInputStream::Mark _m;
3404 parseOfficeArtRecordHeader(in, _s.rh);
3405 if (!(_s.rh.recVer == 0xF)) {
3406 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3407 }
3408 if (!(_s.rh.recInstance == 0)) {
3409 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3410 }
3411 if (!(_s.rh.recType == 0xFEA)) {
3412 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFEA");
3413 }
3414 _c = _s.rh.recLen;
3415 _s.todo.resize(_c);
3416 in.readBytes(_s.todo);
3417 }
parseExOleLinkAtom(LEInputStream & in,ExOleLinkAtom & _s)3418 void MSO::parseExOleLinkAtom(LEInputStream& in, ExOleLinkAtom& _s) {
3419 _s.streamOffset = in.getPosition();
3420 parseRecordHeader(in, _s.rh);
3421 if (!(_s.rh.recVer == 0x0)) {
3422 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3423 }
3424 if (!(_s.rh.recInstance == 0x0)) {
3425 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
3426 }
3427 if (!(_s.rh.recType == 0x0FD1)) {
3428 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FD1");
3429 }
3430 if (!(_s.rh.recLen == 0xC)) {
3431 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0xC");
3432 }
3433 _s.slideIdRef = in.readuint32();
3434 _s.oleUpdateMode = in.readuint32();
3435 _s.unused = in.readuint32();
3436 }
parseExOleObjAtom(LEInputStream & in,ExOleObjAtom & _s)3437 void MSO::parseExOleObjAtom(LEInputStream& in, ExOleObjAtom& _s) {
3438 _s.streamOffset = in.getPosition();
3439 parseRecordHeader(in, _s.rh);
3440 if (!(_s.rh.recVer == 0x1)) {
3441 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x1");
3442 }
3443 if (!(_s.rh.recInstance == 0x0)) {
3444 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
3445 }
3446 if (!(_s.rh.recType == 0x0FC3)) {
3447 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FC3");
3448 }
3449 if (!(_s.rh.recLen == 0x18)) {
3450 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x18");
3451 }
3452 _s.drawAspect = in.readuint32();
3453 _s.type = in.readuint32();
3454 _s.exObjId = in.readuint32();
3455 _s.subType = in.readuint32();
3456 _s.persistIdRef = in.readuint32();
3457 _s.unused = in.readuint32();
3458 }
parseMenuNameAtom(LEInputStream & in,MenuNameAtom & _s)3459 void MSO::parseMenuNameAtom(LEInputStream& in, MenuNameAtom& _s) {
3460 _s.streamOffset = in.getPosition();
3461 int _c;
3462 LEInputStream::Mark _m;
3463 parseRecordHeader(in, _s.rh);
3464 if (!(_s.rh.recVer == 0x0)) {
3465 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3466 }
3467 if (!(_s.rh.recInstance == 0x1)) {
3468 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x1");
3469 }
3470 if (!(_s.rh.recType == 0x0FBA)) {
3471 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
3472 }
3473 if (!(_s.rh.recLen%2 == 0 )) {
3474 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2 == 0 ");
3475 }
3476 _c = _s.rh.recLen;
3477 _s.menuName.resize(_c);
3478 in.readBytes(_s.menuName);
3479 }
parseProgIDAtom(LEInputStream & in,ProgIDAtom & _s)3480 void MSO::parseProgIDAtom(LEInputStream& in, ProgIDAtom& _s) {
3481 _s.streamOffset = in.getPosition();
3482 int _c;
3483 LEInputStream::Mark _m;
3484 parseRecordHeader(in, _s.rh);
3485 if (!(_s.rh.recVer == 0x0)) {
3486 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3487 }
3488 if (!(_s.rh.recInstance == 0x2)) {
3489 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x2");
3490 }
3491 if (!(_s.rh.recType == 0x0FBA)) {
3492 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
3493 }
3494 if (!(_s.rh.recLen%2 == 0 )) {
3495 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2 == 0 ");
3496 }
3497 _c = _s.rh.recLen;
3498 _s.progId.resize(_c);
3499 in.readBytes(_s.progId);
3500 }
parseClipboardNameAtom(LEInputStream & in,ClipboardNameAtom & _s)3501 void MSO::parseClipboardNameAtom(LEInputStream& in, ClipboardNameAtom& _s) {
3502 _s.streamOffset = in.getPosition();
3503 int _c;
3504 LEInputStream::Mark _m;
3505 parseRecordHeader(in, _s.rh);
3506 if (!(_s.rh.recVer == 0x0)) {
3507 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3508 }
3509 if (!(_s.rh.recInstance == 0x3)) {
3510 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x3");
3511 }
3512 if (!(_s.rh.recType == 0x0FBA)) {
3513 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA");
3514 }
3515 if (!(_s.rh.recLen%2 == 0 )) {
3516 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2 == 0 ");
3517 }
3518 _c = _s.rh.recLen;
3519 _s.clipboardName.resize(_c);
3520 in.readBytes(_s.clipboardName);
3521 }
parseMetafileBlob(LEInputStream & in,MetafileBlob & _s)3522 void MSO::parseMetafileBlob(LEInputStream& in, MetafileBlob& _s) {
3523 _s.streamOffset = in.getPosition();
3524 int _c;
3525 LEInputStream::Mark _m;
3526 parseRecordHeader(in, _s.rh);
3527 if (!(_s.rh.recVer == 0x0)) {
3528 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3529 }
3530 if (!(_s.rh.recInstance == 0x0)) {
3531 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0");
3532 }
3533 if (!(_s.rh.recType == 0x0FC1)) {
3534 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FC1");
3535 }
3536 if (!(_s.rh.recLen>16)) {
3537 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen>16");
3538 }
3539 _s.mm = in.readint16();
3540 _s.xExt = in.readint16();
3541 _s.yExt = in.readint16();
3542 _c = _s.rh.recLen-6;
3543 _s.data.resize(_c);
3544 in.readBytes(_s.data);
3545 }
parseOfficeArtFDGG(LEInputStream & in,OfficeArtFDGG & _s)3546 void MSO::parseOfficeArtFDGG(LEInputStream& in, OfficeArtFDGG& _s) {
3547 _s.streamOffset = in.getPosition();
3548 _s.spidMax = in.readuint32();
3549 if (!(((quint32)_s.spidMax)<67098623)) {
3550 throw IncorrectValueException(in.getPosition(), "((quint32)_s.spidMax)<67098623");
3551 }
3552 _s.cidcl = in.readuint32();
3553 if (!(((quint32)_s.cidcl)<268435455)) {
3554 throw IncorrectValueException(in.getPosition(), "((quint32)_s.cidcl)<268435455");
3555 }
3556 _s.cspSaved = in.readuint32();
3557 _s.cdgSaved = in.readuint32();
3558 }
parseOfficeArtFDG(LEInputStream & in,OfficeArtFDG & _s)3559 void MSO::parseOfficeArtFDG(LEInputStream& in, OfficeArtFDG& _s) {
3560 _s.streamOffset = in.getPosition();
3561 parseOfficeArtRecordHeader(in, _s.rh);
3562 if (!(_s.rh.recVer == 0x0)) {
3563 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
3564 }
3565 if (!(_s.rh.recInstance<=4094)) {
3566 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<=4094");
3567 }
3568 if (!(_s.rh.recType == 0x0F008)) {
3569 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F008");
3570 }
3571 if (!(_s.rh.recLen == 8)) {
3572 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
3573 }
3574 _s.csp = in.readuint32();
3575 _s.spidCur = in.readuint32();
3576 }
parseOfficeArtFRITContainer(LEInputStream & in,OfficeArtFRITContainer & _s)3577 void MSO::parseOfficeArtFRITContainer(LEInputStream& in, OfficeArtFRITContainer& _s) {
3578 _s.streamOffset = in.getPosition();
3579 int _c;
3580 LEInputStream::Mark _m;
3581 parseOfficeArtRecordHeader(in, _s.rh);
3582 if (!(_s.rh.recVer == 0)) {
3583 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3584 }
3585 if (!(_s.rh.recType == 0xF118)) {
3586 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF118");
3587 }
3588 if (!(_s.rh.recLen==4*_s.rh.recInstance)) {
3589 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen==4*_s.rh.recInstance");
3590 }
3591 _c = _s.rh.recInstance;
3592 for (int _i=0; _i<_c; ++_i) {
3593 _s.rgfrit.append(OfficeArtFRIT(&_s));
3594 parseOfficeArtFRIT(in, _s.rgfrit[_i]);
3595 }
3596 }
parseOfficeArtFRIT(LEInputStream & in,OfficeArtFRIT & _s)3597 void MSO::parseOfficeArtFRIT(LEInputStream& in, OfficeArtFRIT& _s) {
3598 _s.streamOffset = in.getPosition();
3599 _s.fridNew = in.readuint16();
3600 _s.fridOld = in.readuint16();
3601 }
parseOfficeArtBStoreContainer(LEInputStream & in,OfficeArtBStoreContainer & _s)3602 void MSO::parseOfficeArtBStoreContainer(LEInputStream& in, OfficeArtBStoreContainer& _s) {
3603 _s.streamOffset = in.getPosition();
3604 LEInputStream::Mark _m;
3605 bool _atend;
3606 parseOfficeArtRecordHeader(in, _s.rh);
3607 if (!(_s.rh.recVer == 0xF)) {
3608 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3609 }
3610 if (!(_s.rh.recType == 0x0F001)) {
3611 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F001");
3612 }
3613 qint64 _startPos = in.getPosition();
3614 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
3615 _atend = in.getPosition() - _startPos >= _totalSize;
3616 while (!_atend) {
3617 _s.rgfb.append(OfficeArtBStoreContainerFileBlock(&_s));
3618 parseOfficeArtBStoreContainerFileBlock(in, _s.rgfb.last());
3619 _atend = in.getPosition() - _startPos >= _totalSize;
3620 }
3621 }
parseOfficeArtSpgrContainer(LEInputStream & in,OfficeArtSpgrContainer & _s)3622 void MSO::parseOfficeArtSpgrContainer(LEInputStream& in, OfficeArtSpgrContainer& _s) {
3623 _s.streamOffset = in.getPosition();
3624 LEInputStream::Mark _m;
3625 bool _atend;
3626 parseOfficeArtRecordHeader(in, _s.rh);
3627 if (!(_s.rh.recVer == 0xF)) {
3628 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3629 }
3630 if (!(_s.rh.recInstance == 0)) {
3631 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3632 }
3633 if (!(_s.rh.recType == 0x0F003)) {
3634 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F003");
3635 }
3636 qint64 _startPos = in.getPosition();
3637 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
3638 _atend = in.getPosition() - _startPos >= _totalSize;
3639 while (!_atend) {
3640 _s.rgfb.append(OfficeArtSpgrContainerFileBlock(&_s));
3641 parseOfficeArtSpgrContainerFileBlock(in, _s.rgfb.last());
3642 _atend = in.getPosition() - _startPos >= _totalSize;
3643 }
3644 }
parseOfficeArtSolverContainer(LEInputStream & in,OfficeArtSolverContainer & _s)3645 void MSO::parseOfficeArtSolverContainer(LEInputStream& in, OfficeArtSolverContainer& _s) {
3646 _s.streamOffset = in.getPosition();
3647 LEInputStream::Mark _m;
3648 bool _atend;
3649 parseOfficeArtRecordHeader(in, _s.rh);
3650 if (!(_s.rh.recVer == 0xF)) {
3651 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
3652 }
3653 if (!(_s.rh.recType == 0xF005)) {
3654 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF005");
3655 }
3656 _atend = false;
3657 while (!_atend) {
3658 _m = in.setMark();
3659 try {
3660 _s.rgfb.append(OfficeArtSolverContainerFileBlock(&_s));
3661 parseOfficeArtSolverContainerFileBlock(in, _s.rgfb.last());
3662 } catch(IncorrectValueException _e) {
3663 _s.rgfb.removeLast();
3664 _atend = true;
3665 in.rewind(_m);
3666 } catch(EOFException _e) {
3667 _s.rgfb.removeLast();
3668 _atend = true;
3669 in.rewind(_m);
3670 }
3671 }
3672 }
parseOfficeArtFConnectorRule(LEInputStream & in,OfficeArtFConnectorRule & _s)3673 void MSO::parseOfficeArtFConnectorRule(LEInputStream& in, OfficeArtFConnectorRule& _s) {
3674 _s.streamOffset = in.getPosition();
3675 parseOfficeArtRecordHeader(in, _s.rh);
3676 if (!(_s.rh.recVer == 1)) {
3677 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 1");
3678 }
3679 if (!(_s.rh.recInstance == 0)) {
3680 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3681 }
3682 if (!(_s.rh.recType == 0xF012)) {
3683 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF012");
3684 }
3685 if (!(_s.rh.recLen == 0x18)) {
3686 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x18");
3687 }
3688 _s.ruid = in.readuint32();
3689 _s.spidA = in.readuint32();
3690 _s.spidB = in.readuint32();
3691 _s.spidC = in.readuint32();
3692 _s.cptiA = in.readuint32();
3693 _s.cptiB = in.readuint32();
3694 }
parseOfficeArtFArcRule(LEInputStream & in,OfficeArtFArcRule & _s)3695 void MSO::parseOfficeArtFArcRule(LEInputStream& in, OfficeArtFArcRule& _s) {
3696 _s.streamOffset = in.getPosition();
3697 parseOfficeArtRecordHeader(in, _s.rh);
3698 if (!(_s.rh.recVer == 0)) {
3699 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3700 }
3701 if (!(_s.rh.recInstance == 0)) {
3702 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3703 }
3704 if (!(_s.rh.recType == 0xF014)) {
3705 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF014");
3706 }
3707 if (!(_s.rh.recLen == 8)) {
3708 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
3709 }
3710 _s.ruid = in.readuint32();
3711 _s.spid = in.readuint32();
3712 }
parseOfficeArtFCalloutRule(LEInputStream & in,OfficeArtFCalloutRule & _s)3713 void MSO::parseOfficeArtFCalloutRule(LEInputStream& in, OfficeArtFCalloutRule& _s) {
3714 _s.streamOffset = in.getPosition();
3715 parseOfficeArtRecordHeader(in, _s.rh);
3716 if (!(_s.rh.recVer == 0)) {
3717 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3718 }
3719 if (!(_s.rh.recInstance == 0)) {
3720 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3721 }
3722 if (!(_s.rh.recType == 0xF017)) {
3723 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF017");
3724 }
3725 if (!(_s.rh.recLen == 8)) {
3726 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
3727 }
3728 _s.ruid = in.readuint32();
3729 _s.spid = in.readuint32();
3730 }
parseOfficeArtFSPGR(LEInputStream & in,OfficeArtFSPGR & _s)3731 void MSO::parseOfficeArtFSPGR(LEInputStream& in, OfficeArtFSPGR& _s) {
3732 _s.streamOffset = in.getPosition();
3733 parseOfficeArtRecordHeader(in, _s.rh);
3734 if (!(_s.rh.recVer == 0x1)) {
3735 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x1");
3736 }
3737 if (!(_s.rh.recInstance == 0)) {
3738 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3739 }
3740 if (!(_s.rh.recType == 0x0F009)) {
3741 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F009");
3742 }
3743 if (!(_s.rh.recLen == 0x10)) {
3744 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
3745 }
3746 _s.xLeft = in.readint32();
3747 _s.yTop = in.readint32();
3748 _s.xRight = in.readint32();
3749 _s.yBottom = in.readint32();
3750 }
parseOfficeArtFSP(LEInputStream & in,OfficeArtFSP & _s)3751 void MSO::parseOfficeArtFSP(LEInputStream& in, OfficeArtFSP& _s) {
3752 _s.streamOffset = in.getPosition();
3753 parseOfficeArtRecordHeader(in, _s.rh);
3754 if (!(_s.rh.recVer == 0x2)) {
3755 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x2");
3756 }
3757 if (!(_s.rh.recInstance<= 202)) {
3758 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<= 202");
3759 }
3760 if (!(_s.rh.recType == 0x0F00A)) {
3761 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F00A");
3762 }
3763 if (!(_s.rh.recLen == 8)) {
3764 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
3765 }
3766 _s.spid = in.readuint32();
3767 _s.fGroup = in.readbit();
3768 _s.fChild = in.readbit();
3769 _s.fPatriarch = in.readbit();
3770 _s.fDeleted = in.readbit();
3771 _s.fOleShape = in.readbit();
3772 _s.fHaveMaster = in.readbit();
3773 _s.fFlipH = in.readbit();
3774 _s.fFlipV = in.readbit();
3775 _s.fConnector = in.readbit();
3776 _s.fHaveAnchor = in.readbit();
3777 _s.fBackground = in.readbit();
3778 _s.fHaveSpt = in.readbit();
3779 _s.unused1 = in.readuint20();
3780 }
parseOfficeArtFOPT(LEInputStream & in,OfficeArtFOPT & _s)3781 void MSO::parseOfficeArtFOPT(LEInputStream& in, OfficeArtFOPT& _s) {
3782 _s.streamOffset = in.getPosition();
3783 int _c;
3784 LEInputStream::Mark _m;
3785 parseOfficeArtRecordHeader(in, _s.rh);
3786 if (!(_s.rh.recVer == 0x3)) {
3787 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x3");
3788 }
3789 if (!(_s.rh.recType == 0x0F00B)) {
3790 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F00B");
3791 }
3792 _c = _s.rh.recInstance;
3793 for (int _i=0; _i<_c; ++_i) {
3794 _s.fopt.append(OfficeArtFOPTEChoice(&_s));
3795 parseOfficeArtFOPTEChoice(in, _s.fopt[_i]);
3796 }
3797 _c = _s.rh.recLen-6*_s.rh.recInstance;
3798 _s.complexData.resize(_c);
3799 in.readBytes(_s.complexData);
3800 }
parseOfficeArtSecondaryFOPT(LEInputStream & in,OfficeArtSecondaryFOPT & _s)3801 void MSO::parseOfficeArtSecondaryFOPT(LEInputStream& in, OfficeArtSecondaryFOPT& _s) {
3802 _s.streamOffset = in.getPosition();
3803 int _c;
3804 LEInputStream::Mark _m;
3805 parseOfficeArtRecordHeader(in, _s.rh);
3806 if (!(_s.rh.recVer == 3)) {
3807 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 3");
3808 }
3809 if (!(_s.rh.recType == 0xF121)) {
3810 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF121");
3811 }
3812 _c = _s.rh.recInstance;
3813 for (int _i=0; _i<_c; ++_i) {
3814 _s.fopt.append(OfficeArtFOPTEChoice(&_s));
3815 parseOfficeArtFOPTEChoice(in, _s.fopt[_i]);
3816 }
3817 _c = _s.rh.recLen-6*_s.rh.recInstance;
3818 _s.complexData.resize(_c);
3819 in.readBytes(_s.complexData);
3820 }
parseOfficeArtTertiaryFOPT(LEInputStream & in,OfficeArtTertiaryFOPT & _s)3821 void MSO::parseOfficeArtTertiaryFOPT(LEInputStream& in, OfficeArtTertiaryFOPT& _s) {
3822 _s.streamOffset = in.getPosition();
3823 int _c;
3824 LEInputStream::Mark _m;
3825 parseOfficeArtRecordHeader(in, _s.rh);
3826 if (!(_s.rh.recVer == 3)) {
3827 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 3");
3828 }
3829 if (!(_s.rh.recType == 0xF122)) {
3830 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF122");
3831 }
3832 _c = _s.rh.recInstance;
3833 for (int _i=0; _i<_c; ++_i) {
3834 _s.fopt.append(OfficeArtFOPTEChoice(&_s));
3835 parseOfficeArtFOPTEChoice(in, _s.fopt[_i]);
3836 }
3837 _c = _s.rh.recLen-6*_s.rh.recInstance;
3838 _s.complexData.resize(_c);
3839 in.readBytes(_s.complexData);
3840 }
parseMSOPATHINFO(LEInputStream & in,MSOPATHINFO & _s)3841 void MSO::parseMSOPATHINFO(LEInputStream& in, MSOPATHINFO& _s) {
3842 _s.streamOffset = in.getPosition();
3843 _s.type = in.readuint3();
3844 _s.segments = in.readuint13();
3845 }
parseFixedPoint(LEInputStream & in,FixedPoint & _s)3846 void MSO::parseFixedPoint(LEInputStream& in, FixedPoint& _s) {
3847 _s.streamOffset = in.getPosition();
3848 _s.fractional = in.readuint16();
3849 _s.integral = in.readint16();
3850 }
parsePVertices_complex(LEInputStream & in,PVertices_complex & _s)3851 void MSO::parsePVertices_complex(LEInputStream& in, PVertices_complex& _s) {
3852 _s.streamOffset = in.getPosition();
3853 int _c;
3854 LEInputStream::Mark _m;
3855 _s.nElems = in.readuint16();
3856 _s.nElemsAlloc = in.readuint16();
3857 _s.cbElem = in.readuint16();
3858 _c = (_s.cbElem==0xFFF0)?(4 * _s.nElems):(_s.cbElem * _s.nElems);
3859 _s.data.resize(_c);
3860 in.readBytes(_s.data);
3861 }
parsePSegmentInfo_complex(LEInputStream & in,PSegmentInfo_complex & _s)3862 void MSO::parsePSegmentInfo_complex(LEInputStream& in, PSegmentInfo_complex& _s) {
3863 _s.streamOffset = in.getPosition();
3864 int _c;
3865 LEInputStream::Mark _m;
3866 _s.nElems = in.readuint16();
3867 _s.nElemsAlloc = in.readuint16();
3868 _s.cbElem = in.readuint16();
3869 _c = (_s.cbElem==0xFFF0)?(4 * _s.nElems):(_s.cbElem * _s.nElems);
3870 _s.data.resize(_c);
3871 in.readBytes(_s.data);
3872 }
parseFillShadeColors_complex(LEInputStream & in,FillShadeColors_complex & _s)3873 void MSO::parseFillShadeColors_complex(LEInputStream& in, FillShadeColors_complex& _s) {
3874 _s.streamOffset = in.getPosition();
3875 int _c;
3876 LEInputStream::Mark _m;
3877 _s.nElems = in.readuint16();
3878 _s.nElemsAlloc = in.readuint16();
3879 _s.cbElem = in.readuint16();
3880 _c = (_s.cbElem==0xFFF0)?(4 * _s.nElems):(_s.cbElem * _s.nElems);
3881 _s.data.resize(_c);
3882 in.readBytes(_s.data);
3883 }
parsePWrapPolygonVertices_complex(LEInputStream & in,PWrapPolygonVertices_complex & _s)3884 void MSO::parsePWrapPolygonVertices_complex(LEInputStream& in, PWrapPolygonVertices_complex& _s) {
3885 _s.streamOffset = in.getPosition();
3886 int _c;
3887 LEInputStream::Mark _m;
3888 _s.nElems = in.readuint16();
3889 _s.nElemsAlloc = in.readuint16();
3890 _s.cbElem = in.readuint16();
3891 _c = (_s.cbElem==0xFFF0)?(4 * _s.nElems):(_s.cbElem * _s.nElems);
3892 _s.data.resize(_c);
3893 in.readBytes(_s.data);
3894 }
parseOfficeArtCOLORREF(LEInputStream & in,OfficeArtCOLORREF & _s)3895 void MSO::parseOfficeArtCOLORREF(LEInputStream& in, OfficeArtCOLORREF& _s) {
3896 _s.streamOffset = in.getPosition();
3897 _s.red = in.readuint8();
3898 _s.green = in.readuint8();
3899 _s.blue = in.readuint8();
3900 _s.fPaletteIndex = in.readbit();
3901 _s.fPaletteRGB = in.readbit();
3902 _s.fSystemRGB = in.readbit();
3903 _s.fSchemeIndex = in.readbit();
3904 _s.fSysIndex = in.readbit();
3905 _s.unused1 = in.readbit();
3906 _s.unused2 = in.readbit();
3907 _s.unused3 = in.readbit();
3908 }
parseOfficeArtChildAnchor(LEInputStream & in,OfficeArtChildAnchor & _s)3909 void MSO::parseOfficeArtChildAnchor(LEInputStream& in, OfficeArtChildAnchor& _s) {
3910 _s.streamOffset = in.getPosition();
3911 parseOfficeArtRecordHeader(in, _s.rh);
3912 if (!(_s.rh.recVer == 0)) {
3913 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3914 }
3915 if (!(_s.rh.recInstance == 0)) {
3916 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3917 }
3918 if (!(_s.rh.recType == 0xF00F)) {
3919 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF00F");
3920 }
3921 if (!(_s.rh.recLen == 0x10)) {
3922 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
3923 }
3924 _s.xLeft = in.readint32();
3925 _s.yTop = in.readint32();
3926 _s.xRight = in.readint32();
3927 _s.yBottom = in.readint32();
3928 }
parseDocOfficeArtClientAnchor(LEInputStream & in,DocOfficeArtClientAnchor & _s)3929 void MSO::parseDocOfficeArtClientAnchor(LEInputStream& in, DocOfficeArtClientAnchor& _s) {
3930 _s.streamOffset = in.getPosition();
3931 parseOfficeArtRecordHeader(in, _s.rh);
3932 if (!(_s.rh.recVer == 0)) {
3933 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3934 }
3935 if (!(_s.rh.recInstance == 0)) {
3936 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3937 }
3938 if (!(_s.rh.recType == 0xF010)) {
3939 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF010");
3940 }
3941 if (!(_s.rh.recLen == 0x4)) {
3942 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x4");
3943 }
3944 _s.clientAnchor = in.readint32();
3945 }
parseXlsOfficeArtClientAnchor(LEInputStream & in,XlsOfficeArtClientAnchor & _s)3946 void MSO::parseXlsOfficeArtClientAnchor(LEInputStream& in, XlsOfficeArtClientAnchor& _s) {
3947 _s.streamOffset = in.getPosition();
3948 parseOfficeArtRecordHeader(in, _s.rh);
3949 if (!(_s.rh.recVer == 0)) {
3950 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
3951 }
3952 if (!(_s.rh.recInstance == 0)) {
3953 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
3954 }
3955 if (!(_s.rh.recType == 0xF010)) {
3956 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF010");
3957 }
3958 if (!(_s.rh.recLen == 0x8 || _s.rh.recLen == 0x12)) {
3959 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x8 || _s.rh.recLen == 0x12");
3960 }
3961 _s.fMove = in.readbit();
3962 _s.fSize = in.readbit();
3963 _s.unused = in.readuint14();
3964 _s._has_width = _s.rh.recLen==0x8;
3965 if (_s._has_width) {
3966 _s.width = in.readint32();
3967 }
3968 _s._has_height = _s.rh.recLen==0x8;
3969 if (_s._has_height) {
3970 _s.height = in.readint32();
3971 }
3972 _s._has_colL = _s.rh.recLen==0x12;
3973 if (_s._has_colL) {
3974 _s.colL = in.readuint16();
3975 }
3976 _s._has_dxL = _s.rh.recLen==0x12;
3977 if (_s._has_dxL) {
3978 _s.dxL = in.readint16();
3979 }
3980 _s._has_rwT = _s.rh.recLen==0x12;
3981 if (_s._has_rwT) {
3982 _s.rwT = in.readuint16();
3983 }
3984 _s._has_dyT = _s.rh.recLen==0x12;
3985 if (_s._has_dyT) {
3986 _s.dyT = in.readint16();
3987 }
3988 _s._has_colR = _s.rh.recLen==0x12;
3989 if (_s._has_colR) {
3990 _s.colR = in.readuint16();
3991 }
3992 _s._has_dxR = _s.rh.recLen==0x12;
3993 if (_s._has_dxR) {
3994 _s.dxR = in.readint16();
3995 }
3996 _s._has_rwB = _s.rh.recLen==0x12;
3997 if (_s._has_rwB) {
3998 _s.rwB = in.readuint16();
3999 }
4000 _s._has_dyB = _s.rh.recLen==0x12;
4001 if (_s._has_dyB) {
4002 _s.dyB = in.readint16();
4003 }
4004 }
parseOfficeArtFPSPL(LEInputStream & in,OfficeArtFPSPL & _s)4005 void MSO::parseOfficeArtFPSPL(LEInputStream& in, OfficeArtFPSPL& _s) {
4006 _s.streamOffset = in.getPosition();
4007 parseOfficeArtRecordHeader(in, _s.rh);
4008 if (!(_s.rh.recVer == 0)) {
4009 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4010 }
4011 if (!(_s.rh.recInstance == 0)) {
4012 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4013 }
4014 if (!(_s.rh.recType == 0xF11D)) {
4015 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF11D");
4016 }
4017 if (!(_s.rh.recLen == 4)) {
4018 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
4019 }
4020 _s.spid = in.readuint30();
4021 _s.reserved1 = in.readbit();
4022 _s.fLast = in.readbit();
4023 }
parseRectStruct(LEInputStream & in,RectStruct & _s)4024 void MSO::parseRectStruct(LEInputStream& in, RectStruct& _s) {
4025 _s.streamOffset = in.getPosition();
4026 _s.top = in.readint32();
4027 _s.left = in.readint32();
4028 _s.right = in.readint32();
4029 _s.bottom = in.readint32();
4030 }
parseSmallRectStruct(LEInputStream & in,SmallRectStruct & _s)4031 void MSO::parseSmallRectStruct(LEInputStream& in, SmallRectStruct& _s) {
4032 _s.streamOffset = in.getPosition();
4033 _s.top = in.readint16();
4034 _s.left = in.readint16();
4035 _s.right = in.readint16();
4036 _s.bottom = in.readint16();
4037 }
parseDocOfficeArtClientData(LEInputStream & in,DocOfficeArtClientData & _s)4038 void MSO::parseDocOfficeArtClientData(LEInputStream& in, DocOfficeArtClientData& _s) {
4039 _s.streamOffset = in.getPosition();
4040 parseOfficeArtRecordHeader(in, _s.rh);
4041 if (!(_s.rh.recVer == 0)) {
4042 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4043 }
4044 if (!(_s.rh.recInstance == 0)) {
4045 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4046 }
4047 if (!(_s.rh.recType == 0xF011)) {
4048 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF011");
4049 }
4050 if (!(_s.rh.recLen == 4)) {
4051 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
4052 }
4053 _s.clientData = in.readuint32();
4054 }
parseXlsOfficeArtClientData(LEInputStream & in,XlsOfficeArtClientData & _s)4055 void MSO::parseXlsOfficeArtClientData(LEInputStream& in, XlsOfficeArtClientData& _s) {
4056 _s.streamOffset = in.getPosition();
4057 parseOfficeArtRecordHeader(in, _s.rh);
4058 if (!(_s.rh.recVer == 0)) {
4059 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4060 }
4061 if (!(_s.rh.recInstance == 0)) {
4062 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4063 }
4064 if (!(_s.rh.recType == 0xF011)) {
4065 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF011");
4066 }
4067 if (!(_s.rh.recLen == 0)) {
4068 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0");
4069 }
4070 }
parseShapeFlagsAtom(LEInputStream & in,ShapeFlagsAtom & _s)4071 void MSO::parseShapeFlagsAtom(LEInputStream& in, ShapeFlagsAtom& _s) {
4072 _s.streamOffset = in.getPosition();
4073 int _c;
4074 LEInputStream::Mark _m;
4075 parseOfficeArtRecordHeader(in, _s.rh);
4076 if (!(_s.rh.recVer == 0)) {
4077 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4078 }
4079 if (!(_s.rh.recInstance == 0)) {
4080 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4081 }
4082 if (!(_s.rh.recType == 0xBDB)) {
4083 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xBDB");
4084 }
4085 if (!(_s.rh.recLen == 1)) {
4086 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 1");
4087 }
4088 _c = _s.rh.recLen;
4089 _s.todo.resize(_c);
4090 in.readBytes(_s.todo);
4091 }
parseShapeFlags10Atom(LEInputStream & in,ShapeFlags10Atom & _s)4092 void MSO::parseShapeFlags10Atom(LEInputStream& in, ShapeFlags10Atom& _s) {
4093 _s.streamOffset = in.getPosition();
4094 int _c;
4095 LEInputStream::Mark _m;
4096 parseOfficeArtRecordHeader(in, _s.rh);
4097 if (!(_s.rh.recVer == 0)) {
4098 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4099 }
4100 if (!(_s.rh.recInstance == 0)) {
4101 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4102 }
4103 if (!(_s.rh.recType == 0xBDC)) {
4104 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xBDC");
4105 }
4106 if (!(_s.rh.recLen == 1)) {
4107 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 1");
4108 }
4109 _c = _s.rh.recLen;
4110 _s.todo.resize(_c);
4111 in.readBytes(_s.todo);
4112 }
parseExObjRefAtom(LEInputStream & in,ExObjRefAtom & _s)4113 void MSO::parseExObjRefAtom(LEInputStream& in, ExObjRefAtom& _s) {
4114 _s.streamOffset = in.getPosition();
4115 parseOfficeArtRecordHeader(in, _s.rh);
4116 if (!(_s.rh.recVer == 0)) {
4117 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4118 }
4119 if (!(_s.rh.recInstance == 0)) {
4120 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4121 }
4122 if (!(_s.rh.recType == 0xBC1)) {
4123 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xBC1");
4124 }
4125 if (!(_s.rh.recLen == 4)) {
4126 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
4127 }
4128 _s.exObjIdRef = in.readuint32();
4129 }
parseAnimationInfoAtom(LEInputStream & in,AnimationInfoAtom & _s)4130 void MSO::parseAnimationInfoAtom(LEInputStream& in, AnimationInfoAtom& _s) {
4131 _s.streamOffset = in.getPosition();
4132 int _c;
4133 LEInputStream::Mark _m;
4134 parseOfficeArtRecordHeader(in, _s.rh);
4135 if (!(_s.rh.recVer == 0x1)) {
4136 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x1");
4137 }
4138 if (!(_s.rh.recInstance == 0)) {
4139 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4140 }
4141 if (!(_s.rh.recType == 0xFF1)) {
4142 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF1");
4143 }
4144 if (!(_s.rh.recLen == 0x1C)) {
4145 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x1C");
4146 }
4147 _c = 0x1C;
4148 _s.todo.resize(_c);
4149 in.readBytes(_s.todo);
4150 }
parseSoundContainer(LEInputStream & in,SoundContainer & _s)4151 void MSO::parseSoundContainer(LEInputStream& in, SoundContainer& _s) {
4152 _s.streamOffset = in.getPosition();
4153 int _c;
4154 LEInputStream::Mark _m;
4155 parseOfficeArtRecordHeader(in, _s.rh);
4156 if (!(_s.rh.recVer == 0xF)) {
4157 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
4158 }
4159 if (!(_s.rh.recInstance == 0)) {
4160 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4161 }
4162 if (!(_s.rh.recType == 0x7E6)) {
4163 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7E6");
4164 }
4165 _c = _s.rh.recLen;
4166 _s.todo.resize(_c);
4167 in.readBytes(_s.todo);
4168 }
parseInteractiveInfoAtom(LEInputStream & in,InteractiveInfoAtom & _s)4169 void MSO::parseInteractiveInfoAtom(LEInputStream& in, InteractiveInfoAtom& _s) {
4170 _s.streamOffset = in.getPosition();
4171 int _c;
4172 LEInputStream::Mark _m;
4173 parseRecordHeader(in, _s.rh);
4174 if (!(_s.rh.recVer == 0)) {
4175 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4176 }
4177 if (!(_s.rh.recInstance == 0)) {
4178 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4179 }
4180 if (!(_s.rh.recType == 0xFF2 || _s.rh.recType == 0xFF3)) {
4181 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF2 || _s.rh.recType == 0xFF3");
4182 }
4183 if (!(_s.rh.recLen == 0x10)) {
4184 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
4185 }
4186 _s.soundIdRef = in.readuint32();
4187 _s.exHyperlinkIdRef = in.readuint32();
4188 _s.action = in.readuint8();
4189 if (!(((quint8)_s.action)<8)) {
4190 throw IncorrectValueException(in.getPosition(), "((quint8)_s.action)<8");
4191 }
4192 _s.oleVerb = in.readuint8();
4193 if (!(((quint8)_s.oleVerb)<3)) {
4194 throw IncorrectValueException(in.getPosition(), "((quint8)_s.oleVerb)<3");
4195 }
4196 _s.jump = in.readuint8();
4197 if (!(((quint8)_s.jump)<7)) {
4198 throw IncorrectValueException(in.getPosition(), "((quint8)_s.jump)<7");
4199 }
4200 _s.fAnimated = in.readbit();
4201 _s.fStopSound = in.readbit();
4202 _s.fCustomSoundReturn = in.readbit();
4203 _s.fVisited = in.readbit();
4204 _s.reserved = in.readuint4();
4205 _s.hyperlinkType = in.readuint8();
4206 _c = 3;
4207 _s.unused.resize(_c);
4208 in.readBytes(_s.unused);
4209 }
parseMacroNameAtom(LEInputStream & in,MacroNameAtom & _s)4210 void MSO::parseMacroNameAtom(LEInputStream& in, MacroNameAtom& _s) {
4211 _s.streamOffset = in.getPosition();
4212 int _c;
4213 LEInputStream::Mark _m;
4214 parseRecordHeader(in, _s.rh);
4215 if (!(_s.rh.recVer == 0)) {
4216 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4217 }
4218 if (!(_s.rh.recInstance == 2)) {
4219 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 2");
4220 }
4221 if (!(_s.rh.recType == 0xFBA)) {
4222 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
4223 }
4224 if (!(_s.rh.recLen%2==0)) {
4225 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0");
4226 }
4227 _c = _s.rh.recLen;
4228 _s.macroName.resize(_c);
4229 in.readBytes(_s.macroName);
4230 }
parsePlaceholderAtom(LEInputStream & in,PlaceholderAtom & _s)4231 void MSO::parsePlaceholderAtom(LEInputStream& in, PlaceholderAtom& _s) {
4232 _s.streamOffset = in.getPosition();
4233 parseOfficeArtRecordHeader(in, _s.rh);
4234 if (!(_s.rh.recVer == 0)) {
4235 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4236 }
4237 if (!(_s.rh.recInstance == 0)) {
4238 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4239 }
4240 if (!(_s.rh.recType == 0xBC3)) {
4241 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xBC3");
4242 }
4243 if (!(_s.rh.recLen == 8)) {
4244 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8");
4245 }
4246 _s.position = in.readint32();
4247 _s.placementId = in.readuint8();
4248 _s.size = in.readuint8();
4249 _s.unused = in.readuint16();
4250 }
parseRecolorInfoAtom(LEInputStream & in,RecolorInfoAtom & _s)4251 void MSO::parseRecolorInfoAtom(LEInputStream& in, RecolorInfoAtom& _s) {
4252 _s.streamOffset = in.getPosition();
4253 int _c;
4254 LEInputStream::Mark _m;
4255 parseOfficeArtRecordHeader(in, _s.rh);
4256 if (!(_s.rh.recVer == 0)) {
4257 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4258 }
4259 if (!(_s.rh.recInstance == 0)) {
4260 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4261 }
4262 if (!(_s.rh.recType == 0xFE7)) {
4263 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFE7");
4264 }
4265 _c = _s.rh.recLen;
4266 _s.todo.resize(_c);
4267 in.readBytes(_s.todo);
4268 }
parseOutlineTextRefAtom(LEInputStream & in,OutlineTextRefAtom & _s)4269 void MSO::parseOutlineTextRefAtom(LEInputStream& in, OutlineTextRefAtom& _s) {
4270 _s.streamOffset = in.getPosition();
4271 parseOfficeArtRecordHeader(in, _s.rh);
4272 if (!(_s.rh.recVer == 0)) {
4273 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4274 }
4275 if (!(_s.rh.recInstance == 0)) {
4276 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4277 }
4278 if (!(_s.rh.recType == 0xF9E)) {
4279 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF9E");
4280 }
4281 if (!(_s.rh.recLen == 4)) {
4282 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
4283 }
4284 _s.index = in.readint32();
4285 if (!(((qint32)_s.index)>=0)) {
4286 throw IncorrectValueException(in.getPosition(), "((qint32)_s.index)>=0");
4287 }
4288 }
parseShapeProgsTagContainer(LEInputStream & in,ShapeProgsTagContainer & _s)4289 void MSO::parseShapeProgsTagContainer(LEInputStream& in, ShapeProgsTagContainer& _s) {
4290 _s.streamOffset = in.getPosition();
4291 LEInputStream::Mark _m;
4292 bool _atend;
4293 parseOfficeArtRecordHeader(in, _s.rh);
4294 if (!(_s.rh.recVer == 0xF)) {
4295 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF");
4296 }
4297 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1 || _s.rh.recInstance == 2)) {
4298 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1 || _s.rh.recInstance == 2");
4299 }
4300 if (!(_s.rh.recType == 0x1388)) {
4301 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1388");
4302 }
4303 _atend = false;
4304 while (!_atend) {
4305 _m = in.setMark();
4306 try {
4307 _s.rgChildRec.append(ShapeProgTagsSubContainerOrAtom(&_s));
4308 parseShapeProgTagsSubContainerOrAtom(in, _s.rgChildRec.last());
4309 } catch(IncorrectValueException _e) {
4310 _s.rgChildRec.removeLast();
4311 _atend = true;
4312 in.rewind(_m);
4313 } catch(EOFException _e) {
4314 _s.rgChildRec.removeLast();
4315 _atend = true;
4316 in.rewind(_m);
4317 }
4318 }
4319 }
parsePP9ShapeBinaryTagExtension(LEInputStream & in,PP9ShapeBinaryTagExtension & _s)4320 void MSO::parsePP9ShapeBinaryTagExtension(LEInputStream& in, PP9ShapeBinaryTagExtension& _s) {
4321 _s.streamOffset = in.getPosition();
4322 int _c;
4323 LEInputStream::Mark _m;
4324 parseOfficeArtRecordHeader(in, _s.rh);
4325 if (!(_s.rh.recVer == 0)) {
4326 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4327 }
4328 if (!(_s.rh.recInstance == 0)) {
4329 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4330 }
4331 if (!(_s.rh.recType == 0xFBA)) {
4332 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
4333 }
4334 if (!(_s.rh.recLen == 0xE)) {
4335 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0xE");
4336 }
4337 _c = 7;
4338 _s.tagName.resize(_c);
4339 for (int _i=0; _i<_c; ++_i) {
4340 _s.tagName[_i] = in.readuint16();
4341 }
4342 parseRecordHeader(in, _s.rhData);
4343 if (!(_s.rhData.recVer == 0)) {
4344 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0");
4345 }
4346 if (!(_s.rhData.recInstance == 0)) {
4347 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0");
4348 }
4349 if (!(_s.rhData.recType == 0x138B)) {
4350 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B");
4351 }
4352 parseStyleTextProp9Atom(in, _s.styleTextProp9Atom);
4353 }
parsePP10ShapeBinaryTagExtension(LEInputStream & in,PP10ShapeBinaryTagExtension & _s)4354 void MSO::parsePP10ShapeBinaryTagExtension(LEInputStream& in, PP10ShapeBinaryTagExtension& _s) {
4355 _s.streamOffset = in.getPosition();
4356 int _c;
4357 LEInputStream::Mark _m;
4358 parseOfficeArtRecordHeader(in, _s.rh);
4359 if (!(_s.rh.recVer == 0)) {
4360 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4361 }
4362 if (!(_s.rh.recInstance == 0)) {
4363 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4364 }
4365 if (!(_s.rh.recType == 0xFBA)) {
4366 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
4367 }
4368 if (!(_s.rh.recLen == 0x10)) {
4369 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
4370 }
4371 _c = 8;
4372 _s.tagName.resize(_c);
4373 for (int _i=0; _i<_c; ++_i) {
4374 _s.tagName[_i] = in.readuint16();
4375 }
4376 parseRecordHeader(in, _s.rhData);
4377 if (!(_s.rhData.recVer == 0)) {
4378 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0");
4379 }
4380 if (!(_s.rhData.recInstance == 0)) {
4381 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0");
4382 }
4383 if (!(_s.rhData.recType == 0x138B)) {
4384 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B");
4385 }
4386 _c = _s.rhData.recLen;
4387 _s.todo.resize(_c);
4388 in.readBytes(_s.todo);
4389 }
parsePP11ShapeBinaryTagExtension(LEInputStream & in,PP11ShapeBinaryTagExtension & _s)4390 void MSO::parsePP11ShapeBinaryTagExtension(LEInputStream& in, PP11ShapeBinaryTagExtension& _s) {
4391 _s.streamOffset = in.getPosition();
4392 int _c;
4393 LEInputStream::Mark _m;
4394 parseOfficeArtRecordHeader(in, _s.rh);
4395 if (!(_s.rh.recVer == 0)) {
4396 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4397 }
4398 if (!(_s.rh.recInstance == 0)) {
4399 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4400 }
4401 if (!(_s.rh.recType == 0xFBA)) {
4402 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA");
4403 }
4404 if (!(_s.rh.recLen == 0x10)) {
4405 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
4406 }
4407 _c = 8;
4408 _s.tagName.resize(_c);
4409 for (int _i=0; _i<_c; ++_i) {
4410 _s.tagName[_i] = in.readuint16();
4411 }
4412 parseRecordHeader(in, _s.rhData);
4413 if (!(_s.rhData.recVer == 0)) {
4414 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0");
4415 }
4416 if (!(_s.rhData.recInstance == 0)) {
4417 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0");
4418 }
4419 if (!(_s.rhData.recType == 0x138B)) {
4420 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B");
4421 }
4422 _c = _s.rhData.recLen;
4423 _s.todo.resize(_c);
4424 in.readBytes(_s.todo);
4425 }
parseRoundTripNewPlaceHolderId12Atom(LEInputStream & in,RoundTripNewPlaceHolderId12Atom & _s)4426 void MSO::parseRoundTripNewPlaceHolderId12Atom(LEInputStream& in, RoundTripNewPlaceHolderId12Atom& _s) {
4427 _s.streamOffset = in.getPosition();
4428 parseOfficeArtRecordHeader(in, _s.rh);
4429 if (!(_s.rh.recVer == 0)) {
4430 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4431 }
4432 if (!(_s.rh.recInstance == 0)) {
4433 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4434 }
4435 if (!(_s.rh.recType == 0xBDD)) {
4436 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xBDD");
4437 }
4438 if (!(_s.rh.recLen == 1)) {
4439 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 1");
4440 }
4441 _s.newPlaceHolderId = in.readuint8();
4442 }
parseRoundTripShapeId12Atom(LEInputStream & in,RoundTripShapeId12Atom & _s)4443 void MSO::parseRoundTripShapeId12Atom(LEInputStream& in, RoundTripShapeId12Atom& _s) {
4444 _s.streamOffset = in.getPosition();
4445 parseOfficeArtRecordHeader(in, _s.rh);
4446 if (!(_s.rh.recVer == 0)) {
4447 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4448 }
4449 if (!(_s.rh.recInstance == 0)) {
4450 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4451 }
4452 if (!(_s.rh.recType == 0x41F)) {
4453 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x41F");
4454 }
4455 if (!(_s.rh.recLen == 4)) {
4456 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4");
4457 }
4458 _s.shapeId = in.readuint32();
4459 }
parseRoundTripHFPlaceholder12Atom(LEInputStream & in,RoundTripHFPlaceholder12Atom & _s)4460 void MSO::parseRoundTripHFPlaceholder12Atom(LEInputStream& in, RoundTripHFPlaceholder12Atom& _s) {
4461 _s.streamOffset = in.getPosition();
4462 parseOfficeArtRecordHeader(in, _s.rh);
4463 if (!(_s.rh.recVer == 0)) {
4464 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4465 }
4466 if (!(_s.rh.recInstance == 0)) {
4467 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4468 }
4469 if (!(_s.rh.recType == 0x420)) {
4470 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x420");
4471 }
4472 if (!(_s.rh.recLen == 1)) {
4473 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 1");
4474 }
4475 _s.placeHolderId = in.readuint8();
4476 }
parseRoundTripShapeCheckSumForCustomLayouts12Atom(LEInputStream & in,RoundTripShapeCheckSumForCustomLayouts12Atom & _s)4477 void MSO::parseRoundTripShapeCheckSumForCustomLayouts12Atom(LEInputStream& in, RoundTripShapeCheckSumForCustomLayouts12Atom& _s) {
4478 _s.streamOffset = in.getPosition();
4479 int _c;
4480 LEInputStream::Mark _m;
4481 parseOfficeArtRecordHeader(in, _s.rh);
4482 if (!(_s.rh.recVer == 0)) {
4483 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4484 }
4485 if (!(_s.rh.recInstance == 0)) {
4486 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4487 }
4488 if (!(_s.rh.recType == 0x426)) {
4489 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x426");
4490 }
4491 if (!(_s.rh.recLen == 8 || _s.rh.recLen == 40)) {
4492 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8 || _s.rh.recLen == 40");
4493 }
4494 _s.shapeCheckSum = in.readuint32();
4495 _s.textCheckSum = in.readuint32();
4496 _c = _s.rh.recLen-8;
4497 _s.unknown.resize(_c);
4498 in.readBytes(_s.unknown);
4499 }
parseXlsOfficeArtClientTextBox(LEInputStream & in,XlsOfficeArtClientTextBox & _s)4500 void MSO::parseXlsOfficeArtClientTextBox(LEInputStream& in, XlsOfficeArtClientTextBox& _s) {
4501 _s.streamOffset = in.getPosition();
4502 parseOfficeArtRecordHeader(in, _s.rh);
4503 if (!(_s.rh.recVer == 0)) {
4504 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0");
4505 }
4506 if (!(_s.rh.recInstance == 0)) {
4507 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4508 }
4509 if (!(_s.rh.recType == 0xF00D)) {
4510 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF00D");
4511 }
4512 if (!(_s.rh.recLen == 0)) {
4513 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0");
4514 }
4515 }
parseDocOfficeArtClientTextBox(LEInputStream & in,DocOfficeArtClientTextBox & _s)4516 void MSO::parseDocOfficeArtClientTextBox(LEInputStream& in, DocOfficeArtClientTextBox& _s) {
4517 _s.streamOffset = in.getPosition();
4518 parseOfficeArtRecordHeader(in, _s.rh);
4519 if (!(_s.rh.recVer == 0 || _s.rh.recVer == 0xF)) {
4520 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0 || _s.rh.recVer == 0xF");
4521 }
4522 if (!(_s.rh.recInstance == 0)) {
4523 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4524 }
4525 if (!(_s.rh.recType == 0xF00D)) {
4526 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF00D");
4527 }
4528 if (!(_s.rh.recLen == 0x4)) {
4529 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x4");
4530 }
4531 _s.clientTextBox = in.readuint32();
4532 }
parsePptOfficeArtClientTextBox(LEInputStream & in,PptOfficeArtClientTextBox & _s)4533 void MSO::parsePptOfficeArtClientTextBox(LEInputStream& in, PptOfficeArtClientTextBox& _s) {
4534 _s.streamOffset = in.getPosition();
4535 LEInputStream::Mark _m;
4536 bool _atend;
4537 parseOfficeArtRecordHeader(in, _s.rh);
4538 if (!(_s.rh.recVer == 0 || _s.rh.recVer == 0xF)) {
4539 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0 || _s.rh.recVer == 0xF");
4540 }
4541 if (!(_s.rh.recInstance == 0)) {
4542 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0");
4543 }
4544 if (!(_s.rh.recType == 0xF00D)) {
4545 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF00D");
4546 }
4547 if (!(_s.rh.recLen!=4)) {
4548 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen!=4");
4549 }
4550 qint64 _startPos = in.getPosition();
4551 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos));
4552 _atend = in.getPosition() - _startPos >= _totalSize;
4553 while (!_atend) {
4554 _s.rgChildRec.append(TextClientDataSubContainerOrAtom(&_s));
4555 parseTextClientDataSubContainerOrAtom(in, _s.rgChildRec.last());
4556 _atend = in.getPosition() - _startPos >= _totalSize;
4557 }
4558 }
parseOfficeArtIDCL(LEInputStream & in,OfficeArtIDCL & _s)4559 void MSO::parseOfficeArtIDCL(LEInputStream& in, OfficeArtIDCL& _s) {
4560 _s.streamOffset = in.getPosition();
4561 _s.dgid = in.readuint32();
4562 _s.cspidCur = in.readuint32();
4563 }
parseOfficeArtFOPTEOPID(LEInputStream & in,OfficeArtFOPTEOPID & _s)4564 void MSO::parseOfficeArtFOPTEOPID(LEInputStream& in, OfficeArtFOPTEOPID& _s) {
4565 _s.streamOffset = in.getPosition();
4566 _s.opid = in.readuint14();
4567 _s.fBid = in.readbit();
4568 _s.fComplex = in.readbit();
4569 }
parseOfficeArtColorMRUContainer(LEInputStream & in,OfficeArtColorMRUContainer & _s)4570 void MSO::parseOfficeArtColorMRUContainer(LEInputStream& in, OfficeArtColorMRUContainer& _s) {
4571 _s.streamOffset = in.getPosition();
4572 int _c;
4573 LEInputStream::Mark _m;
4574 parseOfficeArtRecordHeader(in, _s.rh);
4575 if (!(_s.rh.recVer == 0x0)) {
4576 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
4577 }
4578 if (!(_s.rh.recType == 0xF11A)) {
4579 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF11A");
4580 }
4581 if (!(_s.rh.recLen==4*_s.rh.recInstance)) {
4582 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen==4*_s.rh.recInstance");
4583 }
4584 _c = _s.rh.recInstance;
4585 for (int _i=0; _i<_c; ++_i) {
4586 _s.rgmsocr.append(MSOCR(&_s));
4587 parseMSOCR(in, _s.rgmsocr[_i]);
4588 }
4589 }
parseMSOCR(LEInputStream & in,MSOCR & _s)4590 void MSO::parseMSOCR(LEInputStream& in, MSOCR& _s) {
4591 _s.streamOffset = in.getPosition();
4592 _s.red = in.readuint8();
4593 _s.green = in.readuint8();
4594 _s.blue = in.readuint8();
4595 _s.unused1 = in.readuint3();
4596 _s.fSchemeIndex = in.readbit();
4597 _s.unused2 = in.readuint4();
4598 }
parseOfficeArtSplitMenuColorContainer(LEInputStream & in,OfficeArtSplitMenuColorContainer & _s)4599 void MSO::parseOfficeArtSplitMenuColorContainer(LEInputStream& in, OfficeArtSplitMenuColorContainer& _s) {
4600 _s.streamOffset = in.getPosition();
4601 int _c;
4602 LEInputStream::Mark _m;
4603 parseOfficeArtRecordHeader(in, _s.rh);
4604 if (!(_s.rh.recVer == 0x0)) {
4605 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0");
4606 }
4607 if (!(_s.rh.recInstance == 0x4)) {
4608 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x4");
4609 }
4610 if (!(_s.rh.recType == 0xF11E)) {
4611 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF11E");
4612 }
4613 if (!(_s.rh.recLen == 0x10)) {
4614 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10");
4615 }
4616 _c = 4;
4617 for (int _i=0; _i<_c; ++_i) {
4618 _s.smca.append(MSOCR(&_s));
4619 parseMSOCR(in, _s.smca[_i]);
4620 }
4621 }
parsetodo(LEInputStream & in,todo & _s)4622 void MSO::parsetodo(LEInputStream& in, todo& _s) {
4623 _s.streamOffset = in.getPosition();
4624 int _c;
4625 LEInputStream::Mark _m;
4626 parseRecordHeader(in, _s.rh);
4627 _c = _s.rh.recLen;
4628 _s.anon.resize(_c);
4629 in.readBytes(_s.anon);
4630 }
parseFibBase(LEInputStream & in,FibBase & _s)4631 void MSO::parseFibBase(LEInputStream& in, FibBase& _s) {
4632 _s.streamOffset = in.getPosition();
4633 _s.wIdent = in.readuint16();
4634 _s.nFib = in.readuint16();
4635 if (!(((quint16)_s.nFib) == 0x65 || ((quint16)_s.nFib) == 0x67 || ((quint16)_s.nFib) == 0x68 || ((quint16)_s.nFib) == 0xC0 || ((quint16)_s.nFib) == 0xC1 || ((quint16)_s.nFib) == 0xC2 || ((quint16)_s.nFib) == 0x101 || ((quint16)_s.nFib) == 0x10B || ((quint16)_s.nFib) == 0x10C || ((quint16)_s.nFib) == 0x112)) {
4636 throw IncorrectValueException(in.getPosition(), "((quint16)_s.nFib) == 0x65 || ((quint16)_s.nFib) == 0x67 || ((quint16)_s.nFib) == 0x68 || ((quint16)_s.nFib) == 0xC0 || ((quint16)_s.nFib) == 0xC1 || ((quint16)_s.nFib) == 0xC2 || ((quint16)_s.nFib) == 0x101 || ((quint16)_s.nFib) == 0x10B || ((quint16)_s.nFib) == 0x10C || ((quint16)_s.nFib) == 0x112");
4637 }
4638 _s.unused = in.readuint16();
4639 _s.lid = in.readuint16();
4640 _s.pnNext = in.readuint16();
4641 _s.fDot = in.readbit();
4642 _s.fGlsy = in.readbit();
4643 _s.fComplex = in.readbit();
4644 _s.fHasPic = in.readbit();
4645 _s.cQuickSaves = in.readuint4();
4646 _s.fEncrypted = in.readbit();
4647 _s.fWhichTblStm = in.readbit();
4648 _s.fReadOnlyRecommended = in.readbit();
4649 _s.fWriteReservation = in.readbit();
4650 _s.fExtChar = in.readbit();
4651 _s.fLoadOverride = in.readbit();
4652 _s.fFarEast = in.readbit();
4653 _s.fObfuscated = in.readbit();
4654 _s.nFibBack = in.readuint16();
4655 _s.IKey = in.readuint32();
4656 _s.envr = in.readuint8();
4657 _s.fMac = in.readbit();
4658 _s.fEmptySpecial = in.readbit();
4659 _s.fLoadOverridePage = in.readbit();
4660 _s.reserved1 = in.readbit();
4661 _s.reserved2 = in.readbit();
4662 _s.fSpare0 = in.readuint3();
4663 _s.reserved3 = in.readuint16();
4664 _s.reserved4 = in.readuint16();
4665 _s.reserved5 = in.readuint32();
4666 _s.reserved6 = in.readuint32();
4667 }
parseFibRgW97(LEInputStream & in,FibRgW97 & _s)4668 void MSO::parseFibRgW97(LEInputStream& in, FibRgW97& _s) {
4669 _s.streamOffset = in.getPosition();
4670 _s.reserved1 = in.readuint16();
4671 _s.reserved2 = in.readuint16();
4672 _s.reserved3 = in.readuint16();
4673 _s.reserved4 = in.readuint16();
4674 _s.reserved5 = in.readuint16();
4675 _s.reserved6 = in.readuint16();
4676 _s.reserved7 = in.readuint16();
4677 _s.reserved8 = in.readuint16();
4678 _s.reserved9 = in.readuint16();
4679 _s.reserved10 = in.readuint16();
4680 _s.reserved11 = in.readuint16();
4681 _s.reserved12 = in.readuint16();
4682 _s.reserved13 = in.readuint16();
4683 _s.lidFE = in.readuint16();
4684 }
parseFibRgLw97(LEInputStream & in,FibRgLw97 & _s)4685 void MSO::parseFibRgLw97(LEInputStream& in, FibRgLw97& _s) {
4686 _s.streamOffset = in.getPosition();
4687 _s.cbMac = in.readuint32();
4688 _s.reserved1 = in.readuint32();
4689 _s.reserved2 = in.readuint32();
4690 _s.ccpText = in.readint32();
4691 if (!(((qint32)_s.ccpText)>=0)) {
4692 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpText)>=0");
4693 }
4694 _s.ccpFtn = in.readint32();
4695 if (!(((qint32)_s.ccpFtn)>=0)) {
4696 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpFtn)>=0");
4697 }
4698 _s.ccpHdd = in.readint32();
4699 if (!(((qint32)_s.ccpHdd)>=0)) {
4700 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpHdd)>=0");
4701 }
4702 _s.reserved3 = in.readuint32();
4703 if (!(((quint32)_s.reserved3) == 0)) {
4704 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved3) == 0");
4705 }
4706 _s.ccpAtn = in.readint32();
4707 if (!(((qint32)_s.ccpAtn)>=0)) {
4708 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpAtn)>=0");
4709 }
4710 _s.ccpEdn = in.readint32();
4711 if (!(((qint32)_s.ccpEdn)>=0)) {
4712 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpEdn)>=0");
4713 }
4714 _s.ccpTxbx = in.readint32();
4715 if (!(((qint32)_s.ccpTxbx)>=0)) {
4716 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpTxbx)>=0");
4717 }
4718 _s.ccpHdrTxbx = in.readint32();
4719 if (!(((qint32)_s.ccpHdrTxbx)>=0)) {
4720 throw IncorrectValueException(in.getPosition(), "((qint32)_s.ccpHdrTxbx)>=0");
4721 }
4722 _s.reserved4 = in.readuint32();
4723 _s.reserved5 = in.readuint32();
4724 _s.reserved6 = in.readuint32();
4725 _s.reserved7 = in.readuint32();
4726 _s.reserved8 = in.readuint32();
4727 _s.reserved9 = in.readuint32();
4728 _s.reserved10 = in.readuint32();
4729 _s.reserved11 = in.readuint32();
4730 _s.reserved12 = in.readuint32();
4731 _s.reserved13 = in.readuint32();
4732 if (!(((quint32)_s.reserved13) == 0)) {
4733 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved13) == 0");
4734 }
4735 _s.reserved14 = in.readuint32();
4736 if (!(((quint32)_s.reserved14) == 0)) {
4737 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved14) == 0");
4738 }
4739 }
parseFibRgFcLcb97(LEInputStream & in,FibRgFcLcb97 & _s)4740 void MSO::parseFibRgFcLcb97(LEInputStream& in, FibRgFcLcb97& _s) {
4741 _s.streamOffset = in.getPosition();
4742 _s.fcStshfOrig = in.readuint32();
4743 _s.lcbStshfOrig = in.readuint32();
4744 _s.fcStshf = in.readuint32();
4745 _s.lcbStshf = in.readuint32();
4746 _s.fcPlcffndRef = in.readuint32();
4747 _s.lcbPlcffndRef = in.readuint32();
4748 _s.fcPlcffndTxt = in.readuint32();
4749 _s.lcbPlcffndTxt = in.readuint32();
4750 _s.fcPlcfandRef = in.readuint32();
4751 _s.lcbPlcfandRef = in.readuint32();
4752 _s.fcPlcfandTxt = in.readuint32();
4753 _s.lcbPlcfandTxt = in.readuint32();
4754 _s.fcPlcfSed = in.readuint32();
4755 _s.lcbPlcfSed = in.readuint32();
4756 _s.fcPlcPad = in.readuint32();
4757 _s.lcbPlcPad = in.readuint32();
4758 _s.fcPlcfPhe = in.readuint32();
4759 _s.lcbPlcfPhe = in.readuint32();
4760 _s.fcSttbfGlsy = in.readuint32();
4761 _s.lcbSttbfGlsy = in.readuint32();
4762 _s.fcPlcfGlsy = in.readuint32();
4763 _s.lcbPlcfGlsy = in.readuint32();
4764 _s.fcPlcfHdd = in.readuint32();
4765 _s.lcbPlcfHdd = in.readuint32();
4766 _s.fcPlcfBteChpx = in.readuint32();
4767 _s.lcbPlcfBteChpx = in.readuint32();
4768 _s.fcPlcfBtePapx = in.readuint32();
4769 _s.lcbPlcfBtePapx = in.readuint32();
4770 _s.fcPlcfSea = in.readuint32();
4771 _s.lcbPlcfSea = in.readuint32();
4772 _s.fcSttbfFfn = in.readuint32();
4773 _s.lcbSttbfFfn = in.readuint32();
4774 _s.fcPlcfFldMom = in.readuint32();
4775 _s.lcbPlcfFldMom = in.readuint32();
4776 _s.fcPlcfFldHdr = in.readuint32();
4777 _s.lcbPlcfFldHdr = in.readuint32();
4778 _s.fcPlcfFldFtn = in.readuint32();
4779 _s.lcbPlcfFldFtn = in.readuint32();
4780 _s.fcPlcfFldAtn = in.readuint32();
4781 _s.lcbPlcfFldAtn = in.readuint32();
4782 _s.fcPlcfFldMcr = in.readuint32();
4783 _s.lcbPlcfFldMcr = in.readuint32();
4784 _s.fcSttbfBkmk = in.readuint32();
4785 _s.lcbSttbfBkmk = in.readuint32();
4786 _s.fcPlcfBkf = in.readuint32();
4787 _s.lcbPlcfBkf = in.readuint32();
4788 _s.fcPlcfBkl = in.readuint32();
4789 _s.lcbPlcfBkl = in.readuint32();
4790 _s.fcCmds = in.readuint32();
4791 _s.lcbCmds = in.readuint32();
4792 _s.fcUnused1 = in.readuint32();
4793 _s.lcbUnused1 = in.readuint32();
4794 _s.fcSttbfMcr = in.readuint32();
4795 _s.lcbSttbfMcr = in.readuint32();
4796 _s.fcPrDrvr = in.readuint32();
4797 _s.lcbPrDrvr = in.readuint32();
4798 _s.fcPrEnvPort = in.readuint32();
4799 _s.lcbPrEnvPort = in.readuint32();
4800 _s.fcPrEnvLand = in.readuint32();
4801 _s.lcbPrEnvLand = in.readuint32();
4802 _s.fcWss = in.readuint32();
4803 _s.lcbWss = in.readuint32();
4804 _s.fcDop = in.readuint32();
4805 _s.lcbDop = in.readuint32();
4806 _s.fcSttbfAssoc = in.readuint32();
4807 _s.lcbSttbfAssoc = in.readuint32();
4808 _s.fcClx = in.readuint32();
4809 _s.lcbClx = in.readuint32();
4810 _s.fcPlcfPgdFtn = in.readuint32();
4811 _s.lcbPlcfPgdFtn = in.readuint32();
4812 _s.fcAutosaveSource = in.readuint32();
4813 _s.lcbAutosaveSource = in.readuint32();
4814 _s.fcGrpXstAtnOwners = in.readuint32();
4815 _s.lcbGrpXstAtnOwners = in.readuint32();
4816 _s.fcSttbfAtnBkmk = in.readuint32();
4817 _s.lcbSttbfAtnBkmk = in.readuint32();
4818 _s.fcUnused2 = in.readuint32();
4819 _s.lcbUnused2 = in.readuint32();
4820 _s.fcUnused3 = in.readuint32();
4821 _s.lcbUnused3 = in.readuint32();
4822 _s.fcPlcSpaMom = in.readuint32();
4823 _s.lcbPlcSpaMom = in.readuint32();
4824 _s.fcPlcSpaHdr = in.readuint32();
4825 _s.lcbPlcSpaHdr = in.readuint32();
4826 _s.fcPlcfAtnBkf = in.readuint32();
4827 _s.lcbPlcfAtnBkf = in.readuint32();
4828 _s.fcPlcfAtnBkl = in.readuint32();
4829 _s.lcbPlcfAtnBkl = in.readuint32();
4830 _s.fcPms = in.readuint32();
4831 _s.lcbPms = in.readuint32();
4832 _s.fcFormFldSttbs = in.readuint32();
4833 _s.lcbFormFldSttbs = in.readuint32();
4834 _s.fcPlcfendRef = in.readuint32();
4835 _s.lcbPlcfendRef = in.readuint32();
4836 _s.fcPlcfendTxt = in.readuint32();
4837 _s.lcbPlcfendTxt = in.readuint32();
4838 _s.fcPlcfFldEdn = in.readuint32();
4839 _s.lcbPlcfFldEdn = in.readuint32();
4840 _s.fcUnused4 = in.readuint32();
4841 _s.lcbUnused4 = in.readuint32();
4842 _s.fcDggInfo = in.readuint32();
4843 _s.lcbDggInfo = in.readuint32();
4844 _s.fcSttbfRMark = in.readuint32();
4845 _s.lcbSttbfRMark = in.readuint32();
4846 _s.fcSttbfCaption = in.readuint32();
4847 _s.lcbSttbfCaption = in.readuint32();
4848 _s.fcSttbfAutoCaption = in.readuint32();
4849 _s.lcbSttbfAutoCaption = in.readuint32();
4850 _s.fcPlcfWkb = in.readuint32();
4851 _s.lcbPlcfWkb = in.readuint32();
4852 _s.fcPlcfSpl = in.readuint32();
4853 _s.lcbPlcfSpl = in.readuint32();
4854 _s.fcPlcftxbxTxt = in.readuint32();
4855 _s.lcbPlcftxbxTxt = in.readuint32();
4856 _s.fcPlcfFldTxbx = in.readuint32();
4857 _s.lcbPlcfFldTxbx = in.readuint32();
4858 _s.fcPlcfHdrtxbxTxt = in.readuint32();
4859 _s.lcbPlcfHdrtxbxTxt = in.readuint32();
4860 _s.fcPlcffldHdrTxbx = in.readuint32();
4861 _s.lcbPlcffldHdrTxbx = in.readuint32();
4862 _s.fcStwUser = in.readuint32();
4863 _s.lcbStwUser = in.readuint32();
4864 _s.fcSttbTtmbd = in.readuint32();
4865 _s.lcbSttbTtmbd = in.readuint32();
4866 _s.fcCookieData = in.readuint32();
4867 _s.lcbCookieData = in.readuint32();
4868 _s.fcPgdMotherOldOld = in.readuint32();
4869 _s.lcbPgdMotherOldOld = in.readuint32();
4870 _s.fcBkdMotherOldOld = in.readuint32();
4871 _s.lcbBkdMotherOldOld = in.readuint32();
4872 _s.fcPgdFtnOldOld = in.readuint32();
4873 _s.lcbPgdFtnOldOld = in.readuint32();
4874 _s.fcBkdFtnOldOld = in.readuint32();
4875 _s.lcbBkdFtnOldOld = in.readuint32();
4876 _s.fcPgdEdnOldOld = in.readuint32();
4877 _s.lcbPgdEdnOldOld = in.readuint32();
4878 _s.fcBkdEdnOldOld = in.readuint32();
4879 _s.lcbBkdEdnOldOld = in.readuint32();
4880 _s.fcSttbfIntlFld = in.readuint32();
4881 _s.lcbSttbfIntlFld = in.readuint32();
4882 _s.fcRouteSlip = in.readuint32();
4883 _s.lcbRouteSlip = in.readuint32();
4884 _s.fcSttbSavedBy = in.readuint32();
4885 _s.lcbSttbSavedBy = in.readuint32();
4886 _s.fcSttbFnm = in.readuint32();
4887 _s.lcbSttbFnm = in.readuint32();
4888 _s.fcPlfLst = in.readuint32();
4889 _s.lcbPlfLst = in.readuint32();
4890 _s.fcPlfLfo = in.readuint32();
4891 _s.lcbPlfLfo = in.readuint32();
4892 _s.fcPlcfTxbxBkd = in.readuint32();
4893 _s.lcbPlcfTxbxBkd = in.readuint32();
4894 _s.fcPlcfTxbxHdrBkd = in.readuint32();
4895 _s.lcbPlcfTxbxHdrBkd = in.readuint32();
4896 _s.fcDocUndoWord9 = in.readuint32();
4897 _s.lcbDocUndoWord9 = in.readuint32();
4898 _s.fcRgbUse = in.readuint32();
4899 _s.lcbRgbUse = in.readuint32();
4900 _s.fcUsp = in.readuint32();
4901 _s.lcbUsp = in.readuint32();
4902 _s.fcUskf = in.readuint32();
4903 _s.lcbUskf = in.readuint32();
4904 _s.fcPlcupcRgbUse = in.readuint32();
4905 _s.lcbPlcupcRgbUse = in.readuint32();
4906 _s.fcPlcupcUsp = in.readuint32();
4907 _s.lcbPlcupcUsp = in.readuint32();
4908 _s.fcSttbGlsyStyle = in.readuint32();
4909 _s.lcbSttbGlsyStyle = in.readuint32();
4910 _s.fcPlgosl = in.readuint32();
4911 _s.lcbPlgosl = in.readuint32();
4912 _s.fcPlcocx = in.readuint32();
4913 _s.lcbPlcocx = in.readuint32();
4914 _s.fcPlcfBteLvc = in.readuint32();
4915 _s.lcbPlcfBteLvc = in.readuint32();
4916 _s.dwLowDateTime = in.readuint32();
4917 _s.dwHighDateTime = in.readuint32();
4918 _s.fcPlcfLvcPre10 = in.readuint32();
4919 _s.lcbPlcfLvcPre10 = in.readuint32();
4920 _s.fcPlcfAsumy = in.readuint32();
4921 _s.lcbPlcfAsumy = in.readuint32();
4922 _s.fcPlcfGram = in.readuint32();
4923 _s.lcbPlcfGram = in.readuint32();
4924 _s.fcSttbListNames = in.readuint32();
4925 _s.lcbSttbListNames = in.readuint32();
4926 _s.fcSttbfUssr = in.readuint32();
4927 _s.lcbSttbfUssr = in.readuint32();
4928 }
parseFibRgFcLcb2000(LEInputStream & in,FibRgFcLcb2000 & _s)4929 void MSO::parseFibRgFcLcb2000(LEInputStream& in, FibRgFcLcb2000& _s) {
4930 _s.streamOffset = in.getPosition();
4931 _s.fcPlcfTch = in.readuint32();
4932 _s.lcbPlcfTch = in.readuint32();
4933 _s.fcRmdThreading = in.readuint32();
4934 _s.lcbRmdThreading = in.readuint32();
4935 _s.fcMid = in.readuint32();
4936 _s.lcbMid = in.readuint32();
4937 _s.fcSttbRgtplc = in.readuint32();
4938 _s.lcbSttbRgtplc = in.readuint32();
4939 _s.fcMsoEnvelope = in.readuint32();
4940 _s.lcbMsoEnvelope = in.readuint32();
4941 _s.fcPlcfLad = in.readuint32();
4942 _s.lcbPlcfLad = in.readuint32();
4943 _s.fcRgDofr = in.readuint32();
4944 _s.lcbRgDofr = in.readuint32();
4945 _s.fcPlcosl = in.readuint32();
4946 _s.lcbPlcosl = in.readuint32();
4947 _s.fcPlcfCookieOld = in.readuint32();
4948 _s.lcbPlcfCookieOld = in.readuint32();
4949 _s.fcPgdMotherOld = in.readuint32();
4950 _s.lcbPgdMotherOld = in.readuint32();
4951 _s.fcBkdMotherOld = in.readuint32();
4952 _s.lcbBkdMotherOld = in.readuint32();
4953 _s.fcPgdFtnOld = in.readuint32();
4954 _s.lcbPgdFtnOld = in.readuint32();
4955 _s.fcBkdFtnOld = in.readuint32();
4956 _s.lcbBkdFtnOld = in.readuint32();
4957 _s.fcPgdEdnOld = in.readuint32();
4958 _s.lcbPgdEdnOld = in.readuint32();
4959 _s.fcBkdEdnOld = in.readuint32();
4960 _s.lcbBkdEdnOld = in.readuint32();
4961 }
parseFibRgFcLcb2002(LEInputStream & in,FibRgFcLcb2002 & _s)4962 void MSO::parseFibRgFcLcb2002(LEInputStream& in, FibRgFcLcb2002& _s) {
4963 _s.streamOffset = in.getPosition();
4964 _s.fcUnused1 = in.readuint32();
4965 _s.lcbUnused1 = in.readuint32();
4966 _s.fcPlcfPgp = in.readuint32();
4967 _s.lcbPlcfPgp = in.readuint32();
4968 _s.fcPlcfuim = in.readuint32();
4969 _s.lcbPlcfuim = in.readuint32();
4970 _s.fcPlfguidUim = in.readuint32();
4971 _s.lcbPlfguidUim = in.readuint32();
4972 _s.fcAtrdExtra = in.readuint32();
4973 _s.lcbAtrdExtra = in.readuint32();
4974 _s.fcPlrsid = in.readuint32();
4975 _s.lcbPlrsid = in.readuint32();
4976 _s.fcSttbfBkmkFactoid = in.readuint32();
4977 _s.lcbSttbfBkmkFactoid = in.readuint32();
4978 _s.fcPlcfBkfFactoid = in.readuint32();
4979 _s.lcbPlcfBkfFactoid = in.readuint32();
4980 _s.fcPlcfcookie = in.readuint32();
4981 _s.lcbPlcfcookie = in.readuint32();
4982 _s.fcPlcfBklFactoid = in.readuint32();
4983 _s.lcbPlcfBklFactoid = in.readuint32();
4984 _s.fcFactoidData = in.readuint32();
4985 _s.lcbFactoidData = in.readuint32();
4986 _s.fcDocUndo = in.readuint32();
4987 _s.lcbDocUndo = in.readuint32();
4988 _s.fcSttbfBkmkFcc = in.readuint32();
4989 _s.lcbSttbfBkmkFcc = in.readuint32();
4990 _s.fcPlcfBkfFcc = in.readuint32();
4991 _s.lcbPlcfBkfFcc = in.readuint32();
4992 _s.fcPlcfBklFcc = in.readuint32();
4993 _s.lcbPlcfBklFcc = in.readuint32();
4994 _s.fcSttbfbkmkBPRepairs = in.readuint32();
4995 _s.lcbSttbfbkmkBPRepairs = in.readuint32();
4996 _s.fcPlcfbkfBPRepairs = in.readuint32();
4997 _s.lcbPlcfbkfBPRepairs = in.readuint32();
4998 _s.fcPlcfbklBPRepairs = in.readuint32();
4999 _s.lcbPlcfbklBPRepairs = in.readuint32();
5000 _s.fcPmsNew = in.readuint32();
5001 _s.lcbPmsNew = in.readuint32();
5002 _s.fcODSO = in.readuint32();
5003 _s.lcbODSO = in.readuint32();
5004 _s.fcPlcfpmiOldXP = in.readuint32();
5005 _s.lcbPlcfpmiOldXP = in.readuint32();
5006 _s.fcPlcfpmiNewXP = in.readuint32();
5007 _s.lcbPlcfpmiNewXP = in.readuint32();
5008 _s.fcPlcfpmiMixedXP = in.readuint32();
5009 _s.lcbPlcfpmiMixedXP = in.readuint32();
5010 _s.fcUnused2 = in.readuint32();
5011 _s.lcbUnused2 = in.readuint32();
5012 _s.fcPlcffactoid = in.readuint32();
5013 _s.lcbPlcffactoid = in.readuint32();
5014 }
parseLPStshi(LEInputStream & in,LPStshi & _s)5015 void MSO::parseLPStshi(LEInputStream& in, LPStshi& _s) {
5016 _s.streamOffset = in.getPosition();
5017 int _c;
5018 LEInputStream::Mark _m;
5019 _s.cbSthi = in.readuint16();
5020 _c = _s.cbSthi;
5021 _s.stshi.resize(_c);
5022 in.readBytes(_s.stshi);
5023 }
parseLPStd(LEInputStream & in,LPStd & _s)5024 void MSO::parseLPStd(LEInputStream& in, LPStd& _s) {
5025 _s.streamOffset = in.getPosition();
5026 int _c;
5027 LEInputStream::Mark _m;
5028 _s.cbStd = in.readuint16();
5029 _c = _s.cbStd;
5030 _s.std.resize(_c);
5031 in.readBytes(_s.std);
5032 _s._has_padding = _s.cbStd%2==1;
5033 if (_s._has_padding) {
5034 _s.padding = in.readuint8();
5035 }
5036 }
parsePlcfSed(LEInputStream & in,PlcfSed & _s)5037 void MSO::parsePlcfSed(LEInputStream& in, PlcfSed& _s) {
5038 _s.streamOffset = in.getPosition();
5039 int _c;
5040 LEInputStream::Mark _m;
5041 _c = 2;
5042 _s.aCP.resize(_c);
5043 for (int _i=0; _i<_c; ++_i) {
5044 _s.aCP[_i] = in.readuint32();
5045 }
5046 _c = 1;
5047 for (int _i=0; _i<_c; ++_i) {
5048 _s.aSed.append(Sed(&_s));
5049 parseSed(in, _s.aSed[_i]);
5050 }
5051 }
parseSed(LEInputStream & in,Sed & _s)5052 void MSO::parseSed(LEInputStream& in, Sed& _s) {
5053 _s.streamOffset = in.getPosition();
5054 _s.fn = in.readuint16();
5055 _s.fcSepx = in.readint32();
5056 _s.fnMpr = in.readuint16();
5057 _s.fcMpr = in.readuint32();
5058 }
parsePlcfhdd(LEInputStream & in,Plcfhdd & _s)5059 void MSO::parsePlcfhdd(LEInputStream& in, Plcfhdd& _s) {
5060 _s.streamOffset = in.getPosition();
5061 int _c;
5062 LEInputStream::Mark _m;
5063 _c = 13;
5064 _s.aCP.resize(_c);
5065 for (int _i=0; _i<_c; ++_i) {
5066 _s.aCP[_i] = in.readuint32();
5067 }
5068 }
parsePlcBteChpx(LEInputStream & in,PlcBteChpx & _s)5069 void MSO::parsePlcBteChpx(LEInputStream& in, PlcBteChpx& _s) {
5070 _s.streamOffset = in.getPosition();
5071 int _c;
5072 LEInputStream::Mark _m;
5073 _c = 2;
5074 _s.aCP.resize(_c);
5075 for (int _i=0; _i<_c; ++_i) {
5076 _s.aCP[_i] = in.readuint32();
5077 }
5078 _c = 1;
5079 _s.aPnBteChpx.resize(_c);
5080 for (int _i=0; _i<_c; ++_i) {
5081 _s.aPnBteChpx[_i] = in.readuint32();
5082 }
5083 }
parsePlcfBtePapx(LEInputStream & in,PlcfBtePapx & _s)5084 void MSO::parsePlcfBtePapx(LEInputStream& in, PlcfBtePapx& _s) {
5085 _s.streamOffset = in.getPosition();
5086 int _c;
5087 LEInputStream::Mark _m;
5088 _c = 2;
5089 _s.aCP.resize(_c);
5090 for (int _i=0; _i<_c; ++_i) {
5091 _s.aCP[_i] = in.readuint32();
5092 }
5093 _c = 1;
5094 _s.aPnBteChpx.resize(_c);
5095 for (int _i=0; _i<_c; ++_i) {
5096 _s.aPnBteChpx[_i] = in.readuint32();
5097 }
5098 }
parseTcg(LEInputStream & in,Tcg & _s)5099 void MSO::parseTcg(LEInputStream& in, Tcg& _s) {
5100 _s.streamOffset = in.getPosition();
5101 int _c;
5102 LEInputStream::Mark _m;
5103 _s.nTcgVer = in.readuint8();
5104 if (!(((quint8)_s.nTcgVer) == 0)) {
5105 throw IncorrectValueException(in.getPosition(), "((quint8)_s.nTcgVer) == 0");
5106 }
5107 _c = 11;
5108 _s.todo.resize(_c);
5109 in.readBytes(_s.todo);
5110 }
parsePrcData(LEInputStream & in,PrcData & _s)5111 void MSO::parsePrcData(LEInputStream& in, PrcData& _s) {
5112 _s.streamOffset = in.getPosition();
5113 int _c;
5114 LEInputStream::Mark _m;
5115 _s.cbGrpprl = in.readint16();
5116 if (!(((qint16)_s.cbGrpprl)>=0)) {
5117 throw IncorrectValueException(in.getPosition(), "((qint16)_s.cbGrpprl)>=0");
5118 }
5119 if (!(((qint16)_s.cbGrpprl)<=16290)) {
5120 throw IncorrectValueException(in.getPosition(), "((qint16)_s.cbGrpprl)<=16290");
5121 }
5122 if (!(((qint16)_s.cbGrpprl)%2==0)) {
5123 throw IncorrectValueException(in.getPosition(), "((qint16)_s.cbGrpprl)%2==0");
5124 }
5125 _c = _s.cbGrpprl/2;
5126 for (int _i=0; _i<_c; ++_i) {
5127 _s.GrpPrl.append(Sprm(&_s));
5128 parseSprm(in, _s.GrpPrl[_i]);
5129 }
5130 }
parseSprm(LEInputStream & in,Sprm & _s)5131 void MSO::parseSprm(LEInputStream& in, Sprm& _s) {
5132 _s.streamOffset = in.getPosition();
5133 _s.ispmd = in.readuint9();
5134 _s.fSpec = in.readbit();
5135 _s.sgc = in.readuint3();
5136 _s.spra = in.readuint3();
5137 }
parsePcdt(LEInputStream & in,Pcdt & _s)5138 void MSO::parsePcdt(LEInputStream& in, Pcdt& _s) {
5139 _s.streamOffset = in.getPosition();
5140 int _c;
5141 LEInputStream::Mark _m;
5142 _s.clxt = in.readuint8();
5143 if (!(((quint8)_s.clxt) == 2)) {
5144 throw IncorrectValueException(in.getPosition(), "((quint8)_s.clxt) == 2");
5145 }
5146 _s.lcb = in.readuint32();
5147 _c = _s.lcb/8;
5148 for (int _i=0; _i<_c; ++_i) {
5149 _s.PlcPcd.append(Pcd(&_s));
5150 parsePcd(in, _s.PlcPcd[_i]);
5151 }
5152 }
parseFCompressed(LEInputStream & in,FCompressed & _s)5153 void MSO::parseFCompressed(LEInputStream& in, FCompressed& _s) {
5154 _s.streamOffset = in.getPosition();
5155 _s.fc = in.readuint30();
5156 _s.fCompressed = in.readbit();
5157 _s.r1 = in.readbit();
5158 }
parsePrm0(LEInputStream & in,Prm0 & _s)5159 void MSO::parsePrm0(LEInputStream& in, Prm0& _s) {
5160 _s.streamOffset = in.getPosition();
5161 _s.fComplex = in.readbit();
5162 if (!(((bool)_s.fComplex) == false)) {
5163 throw IncorrectValueException(in.getPosition(), "((bool)_s.fComplex) == false");
5164 }
5165 _s.isprm = in.readuint7();
5166 _s.val = in.readuint8();
5167 }
parsePrm1(LEInputStream & in,Prm1 & _s)5168 void MSO::parsePrm1(LEInputStream& in, Prm1& _s) {
5169 _s.streamOffset = in.getPosition();
5170 _s.fComplex = in.readbit();
5171 if (!(((bool)_s.fComplex) == true)) {
5172 throw IncorrectValueException(in.getPosition(), "((bool)_s.fComplex) == true");
5173 }
5174 _s.igrpprl = in.readuint15();
5175 }
parseSttbfFfn(LEInputStream & in,SttbfFfn & _s)5176 void MSO::parseSttbfFfn(LEInputStream& in, SttbfFfn& _s) {
5177 _s.streamOffset = in.getPosition();
5178 int _c;
5179 LEInputStream::Mark _m;
5180 _s.cData = in.readuint16();
5181 _s.cbExtra = in.readuint16();
5182 if (!(((quint16)_s.cbExtra) == 0)) {
5183 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cbExtra) == 0");
5184 }
5185 _c = _s.cData;
5186 for (int _i=0; _i<_c; ++_i) {
5187 _s.data.append(SttbfFfnEntry(&_s));
5188 parseSttbfFfnEntry(in, _s.data[_i]);
5189 }
5190 }
parseSttbfFfnEntry(LEInputStream & in,SttbfFfnEntry & _s)5191 void MSO::parseSttbfFfnEntry(LEInputStream& in, SttbfFfnEntry& _s) {
5192 _s.streamOffset = in.getPosition();
5193 int _c;
5194 LEInputStream::Mark _m;
5195 _s.cchData = in.readuint8();
5196 _c = _s.cchData;
5197 _s.Data.resize(_c);
5198 in.readBytes(_s.Data);
5199 }
parseCodePageString(LEInputStream & in,CodePageString & _s)5200 void MSO::parseCodePageString(LEInputStream& in, CodePageString& _s) {
5201 _s.streamOffset = in.getPosition();
5202 int _c;
5203 LEInputStream::Mark _m;
5204 _s.size = in.readuint32();
5205 _c = 4*(_s.size/4)+((_s.size%4!=0)?4:0);
5206 _s.characters.resize(_c);
5207 in.readBytes(_s.characters);
5208 }
parseFILETIME(LEInputStream & in,FILETIME & _s)5209 void MSO::parseFILETIME(LEInputStream& in, FILETIME& _s) {
5210 _s.streamOffset = in.getPosition();
5211 _s.dwLowDateTime = in.readuint32();
5212 _s.dwHighDateTime = in.readuint32();
5213 }
parseClipboardData(LEInputStream & in,ClipboardData & _s)5214 void MSO::parseClipboardData(LEInputStream& in, ClipboardData& _s) {
5215 _s.streamOffset = in.getPosition();
5216 int _c;
5217 LEInputStream::Mark _m;
5218 _s.size = in.readuint32();
5219 _s.format = in.readuint32();
5220 _c = 4*(_s.size/4)+((_s.size%4!=0)?4:0)-4;
5221 _s.data.resize(_c);
5222 in.readBytes(_s.data);
5223 }
parsePropertyIdentifierAndOffset(LEInputStream & in,PropertyIdentifierAndOffset & _s)5224 void MSO::parsePropertyIdentifierAndOffset(LEInputStream& in, PropertyIdentifierAndOffset& _s) {
5225 _s.streamOffset = in.getPosition();
5226 _s.propertyIdentifier = in.readuint32();
5227 _s.offset = in.readuint32();
5228 }
parseTypedPropertyValue(LEInputStream & in,TypedPropertyValue & _s)5229 void MSO::parseTypedPropertyValue(LEInputStream& in, TypedPropertyValue& _s) {
5230 _s.streamOffset = in.getPosition();
5231 _s.type = in.readuint16();
5232 _s.padding = in.readuint16();
5233 _s._has_vt_I2 = _s.type==2;
5234 if (_s._has_vt_I2) {
5235 _s.vt_I2 = in.readuint16();
5236 }
5237 _s._has_paddingI2 = _s.type==2;
5238 if (_s._has_paddingI2) {
5239 _s.paddingI2 = in.readuint16();
5240 }
5241 _s._has_vg_ERROR = _s.type==10;
5242 if (_s._has_vg_ERROR) {
5243 _s.vg_ERROR = in.readuint32();
5244 }
5245 if (_s.type==30) {
5246 _s.vt_lpstr = QSharedPointer<CodePageString>(new CodePageString(&_s));
5247 parseCodePageString(in, *_s.vt_lpstr.data());
5248 }
5249 if (_s.type==64) {
5250 _s.vg_FILETIME = QSharedPointer<FILETIME>(new FILETIME(&_s));
5251 parseFILETIME(in, *_s.vg_FILETIME.data());
5252 }
5253 if (_s.type==71) {
5254 _s.vg_CF = QSharedPointer<ClipboardData>(new ClipboardData(&_s));
5255 parseClipboardData(in, *_s.vg_CF.data());
5256 }
5257 }
parsePropertySet(LEInputStream & in,PropertySet & _s)5258