File indexing completed on 2024-05-12 16:28:51
0001 /* This code was generated by msoscheme (http://gitorious.org/msoscheme) */ 0002 /* version aca4fd06f1ad330ecadf05b9e862d7c91338f051 */ 0003 #include "simpleParser.h" 0004 using namespace MSO; 0005 #include "leinputstream.h" 0006 void MSO::parseRecordHeader(LEInputStream& in, RecordHeader& _s) { 0007 _s.streamOffset = in.getPosition(); 0008 _s.recVer = in.readuint4(); 0009 _s.recInstance = in.readuint12(); 0010 _s.recType = in.readuint16(); 0011 _s.recLen = in.readuint32(); 0012 } 0013 void MSO::parseCurrentUserAtom(LEInputStream& in, CurrentUserAtom& _s) { 0014 _s.streamOffset = in.getPosition(); 0015 int _c; 0016 LEInputStream::Mark _m; 0017 parseRecordHeader(in, _s.rh); 0018 if (!(_s.rh.recVer == 0)) { 0019 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0020 } 0021 if (!(_s.rh.recInstance == 0)) { 0022 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0023 } 0024 if (!(_s.rh.recType == 0x0FF6)) { 0025 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FF6"); 0026 } 0027 _s.size = in.readuint32(); 0028 if (!(((quint32)_s.size) == 0x14)) { 0029 throw IncorrectValueException(in.getPosition(), "((quint32)_s.size) == 0x14"); 0030 } 0031 _s.headerToken = in.readuint32(); 0032 if (!(((quint32)_s.headerToken) == 0xE391C05F || ((quint32)_s.headerToken) == 0xF3D1C4DF)) { 0033 throw IncorrectValueException(in.getPosition(), "((quint32)_s.headerToken) == 0xE391C05F || ((quint32)_s.headerToken) == 0xF3D1C4DF"); 0034 } 0035 _s.offsetToCurrentEdit = in.readuint32(); 0036 _s.lenUserName = in.readuint16(); 0037 if (!(((quint16)_s.lenUserName)<=255)) { 0038 throw IncorrectValueException(in.getPosition(), "((quint16)_s.lenUserName)<=255"); 0039 } 0040 _s.docFileVersion = in.readuint16(); 0041 if (!(((quint16)_s.docFileVersion) == 0x03F4)) { 0042 throw IncorrectValueException(in.getPosition(), "((quint16)_s.docFileVersion) == 0x03F4"); 0043 } 0044 _s.majorVersion = in.readuint8(); 0045 if (!(((quint8)_s.majorVersion) == 0x03)) { 0046 throw IncorrectValueException(in.getPosition(), "((quint8)_s.majorVersion) == 0x03"); 0047 } 0048 _s.minorVersion = in.readuint8(); 0049 if (!(((quint8)_s.minorVersion) == 0x00)) { 0050 throw IncorrectValueException(in.getPosition(), "((quint8)_s.minorVersion) == 0x00"); 0051 } 0052 _s.unused = in.readuint16(); 0053 _c = _s.lenUserName; 0054 _s.ansiUserName.resize(_c); 0055 in.readBytes(_s.ansiUserName); 0056 _s.relVersion = in.readuint32(); 0057 if (!(((quint32)_s.relVersion) == 0x8 || ((quint32)_s.relVersion) == 0x9)) { 0058 throw IncorrectValueException(in.getPosition(), "((quint32)_s.relVersion) == 0x8 || ((quint32)_s.relVersion) == 0x9"); 0059 } 0060 _s._has_unicodeUserName = _s.rh.recLen>3*_s.lenUserName+0x18; 0061 if (_s._has_unicodeUserName) { 0062 _c = _s.lenUserName; 0063 _s.unicodeUserName.resize(_c); 0064 for (int _i=0; _i<_c; ++_i) { 0065 _s.unicodeUserName[_i] = in.readuint16(); 0066 } 0067 } 0068 _s._has_unknown = _s.rh.recLen-0x18-3*_s.lenUserName>0; 0069 if (_s._has_unknown) { 0070 _c = _s.rh.recLen-0x18-3*_s.lenUserName; 0071 _s.unknown.resize(_c); 0072 in.readBytes(_s.unknown); 0073 } 0074 } 0075 void MSO::parseTODOS(LEInputStream& in, TODOS& _s) { 0076 _s.streamOffset = in.getPosition(); 0077 LEInputStream::Mark _m; 0078 bool _atend; 0079 _atend = false; 0080 while (!_atend) { 0081 _m = in.setMark(); 0082 try { 0083 _s.anon.append(Byte(&_s)); 0084 parseByte(in, _s.anon.last()); 0085 } catch(IncorrectValueException _e) { 0086 _s.anon.removeLast(); 0087 _atend = true; 0088 in.rewind(_m); 0089 } catch(EOFException _e) { 0090 _s.anon.removeLast(); 0091 _atend = true; 0092 in.rewind(_m); 0093 } 0094 } 0095 } 0096 void MSO::parseByte(LEInputStream& in, Byte& _s) { 0097 _s.streamOffset = in.getPosition(); 0098 _s.b = in.readuint8(); 0099 } 0100 void MSO::parseZeroByte(LEInputStream& in, ZeroByte& _s) { 0101 _s.streamOffset = in.getPosition(); 0102 _s.b = in.readuint8(); 0103 if (!(((quint8)_s.b) == 0)) { 0104 throw IncorrectValueException(in.getPosition(), "((quint8)_s.b) == 0"); 0105 } 0106 } 0107 void MSO::parseCurrentUserStream(LEInputStream& in, CurrentUserStream& _s) { 0108 _s.streamOffset = in.getPosition(); 0109 LEInputStream::Mark _m; 0110 bool _atend; 0111 parseCurrentUserAtom(in, _s.anon1); 0112 _atend = false; 0113 while (!_atend) { 0114 _m = in.setMark(); 0115 try { 0116 _s.trailing.append(Byte(&_s)); 0117 parseByte(in, _s.trailing.last()); 0118 } catch(IncorrectValueException _e) { 0119 _s.trailing.removeLast(); 0120 _atend = true; 0121 in.rewind(_m); 0122 } catch(EOFException _e) { 0123 _s.trailing.removeLast(); 0124 _atend = true; 0125 in.rewind(_m); 0126 } 0127 } 0128 } 0129 void MSO::parseOfficeArtBStoreDelay(LEInputStream& in, OfficeArtBStoreDelay& _s) { 0130 _s.streamOffset = in.getPosition(); 0131 LEInputStream::Mark _m; 0132 bool _atend; 0133 _atend = false; 0134 while (!_atend) { 0135 _m = in.setMark(); 0136 try { 0137 _s.rgfb.append(OfficeArtBStoreContainerFileBlock(&_s)); 0138 parseOfficeArtBStoreContainerFileBlock(in, _s.rgfb.last()); 0139 } catch(IncorrectValueException _e) { 0140 _s.rgfb.removeLast(); 0141 _atend = true; 0142 in.rewind(_m); 0143 } catch(EOFException _e) { 0144 _s.rgfb.removeLast(); 0145 _atend = true; 0146 in.rewind(_m); 0147 } 0148 } 0149 } 0150 void MSO::parseOfficeArtRecordHeader(LEInputStream& in, OfficeArtRecordHeader& _s) { 0151 _s.streamOffset = in.getPosition(); 0152 _s.recVer = in.readuint4(); 0153 _s.recInstance = in.readuint12(); 0154 _s.recType = in.readuint16(); 0155 _s.recLen = in.readuint32(); 0156 } 0157 void MSO::parseOfficeArtBlipJPEG(LEInputStream& in, OfficeArtBlipJPEG& _s) { 0158 _s.streamOffset = in.getPosition(); 0159 int _c; 0160 LEInputStream::Mark _m; 0161 parseOfficeArtRecordHeader(in, _s.rh); 0162 if (!(_s.rh.recVer == 0)) { 0163 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0164 } 0165 if (!(_s.rh.recInstance == 0x46A || _s.rh.recInstance == 0x46B || _s.rh.recInstance == 0x6E2 || _s.rh.recInstance == 0x6E3)) { 0166 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x46A || _s.rh.recInstance == 0x46B || _s.rh.recInstance == 0x6E2 || _s.rh.recInstance == 0x6E3"); 0167 } 0168 if (!(_s.rh.recType == 0xF01D)) { 0169 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01D"); 0170 } 0171 _c = 16; 0172 _s.rgbUid1.resize(_c); 0173 in.readBytes(_s.rgbUid1); 0174 _s._has_rgbUid2 = _s.rh.recInstance == 0x46B || _s.rh.recInstance == 0x6E3; 0175 if (_s._has_rgbUid2) { 0176 _c = 16; 0177 _s.rgbUid2.resize(_c); 0178 in.readBytes(_s.rgbUid2); 0179 } 0180 _s.tag = in.readuint8(); 0181 _c = _s.rh.recLen-((_s.rh.recInstance == 0x46A || _s.rh.recInstance == 0x6E2)?17:33); 0182 _s.BLIPFileData.resize(_c); 0183 in.readBytes(_s.BLIPFileData); 0184 } 0185 void MSO::parseOfficeArtBlipPNG(LEInputStream& in, OfficeArtBlipPNG& _s) { 0186 _s.streamOffset = in.getPosition(); 0187 int _c; 0188 LEInputStream::Mark _m; 0189 parseOfficeArtRecordHeader(in, _s.rh); 0190 if (!(_s.rh.recVer == 0)) { 0191 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0192 } 0193 if (!(_s.rh.recInstance == 0x6E0 || _s.rh.recInstance == 0x6E1)) { 0194 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x6E0 || _s.rh.recInstance == 0x6E1"); 0195 } 0196 if (!(_s.rh.recType == 0xF01E)) { 0197 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01E"); 0198 } 0199 _c = 16; 0200 _s.rgbUid1.resize(_c); 0201 in.readBytes(_s.rgbUid1); 0202 _s._has_rgbUid2 = _s.rh.recInstance == 0x6E1; 0203 if (_s._has_rgbUid2) { 0204 _c = 16; 0205 _s.rgbUid2.resize(_c); 0206 in.readBytes(_s.rgbUid2); 0207 } 0208 _s.tag = in.readuint8(); 0209 _c = _s.rh.recLen-((_s.rh.recInstance==0x6E0)?17:33); 0210 _s.BLIPFileData.resize(_c); 0211 in.readBytes(_s.BLIPFileData); 0212 } 0213 void MSO::parseOfficeArtBlipDIB(LEInputStream& in, OfficeArtBlipDIB& _s) { 0214 _s.streamOffset = in.getPosition(); 0215 int _c; 0216 LEInputStream::Mark _m; 0217 parseOfficeArtRecordHeader(in, _s.rh); 0218 if (!(_s.rh.recVer == 0)) { 0219 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0220 } 0221 if (!(_s.rh.recInstance == 0x7A8 || _s.rh.recInstance == 0x7A9)) { 0222 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x7A8 || _s.rh.recInstance == 0x7A9"); 0223 } 0224 if (!(_s.rh.recType == 0xF01F)) { 0225 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01F"); 0226 } 0227 _c = 16; 0228 _s.rgbUid1.resize(_c); 0229 in.readBytes(_s.rgbUid1); 0230 _s._has_rgbUid2 = _s.rh.recInstance == 0x7A9; 0231 if (_s._has_rgbUid2) { 0232 _c = 16; 0233 _s.rgbUid2.resize(_c); 0234 in.readBytes(_s.rgbUid2); 0235 } 0236 _s.tag = in.readuint8(); 0237 _c = _s.rh.recLen-((_s.rh.recInstance==0x7A8)?17:33); 0238 _s.BLIPFileData.resize(_c); 0239 in.readBytes(_s.BLIPFileData); 0240 } 0241 void MSO::parseOfficeArtBlipTIFF(LEInputStream& in, OfficeArtBlipTIFF& _s) { 0242 _s.streamOffset = in.getPosition(); 0243 int _c; 0244 LEInputStream::Mark _m; 0245 parseOfficeArtRecordHeader(in, _s.rh); 0246 if (!(_s.rh.recVer == 0)) { 0247 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0248 } 0249 if (!(_s.rh.recInstance == 0x6E4 || _s.rh.recInstance == 0x6E5)) { 0250 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x6E4 || _s.rh.recInstance == 0x6E5"); 0251 } 0252 if (!(_s.rh.recType == 0xF020)) { 0253 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF020"); 0254 } 0255 _c = 16; 0256 _s.rgbUid1.resize(_c); 0257 in.readBytes(_s.rgbUid1); 0258 _s._has_rgbUid2 = _s.rh.recInstance == 0x6E5; 0259 if (_s._has_rgbUid2) { 0260 _c = 16; 0261 _s.rgbUid2.resize(_c); 0262 in.readBytes(_s.rgbUid2); 0263 } 0264 _s.tag = in.readuint8(); 0265 _c = _s.rh.recLen-((_s.rh.recInstance==0x6E4)?17:33); 0266 _s.BLIPFileData.resize(_c); 0267 in.readBytes(_s.BLIPFileData); 0268 } 0269 void MSO::parseRECT(LEInputStream& in, RECT& _s) { 0270 _s.streamOffset = in.getPosition(); 0271 _s.left = in.readint32(); 0272 _s.top = in.readint32(); 0273 _s.right = in.readint32(); 0274 _s.bottom = in.readint32(); 0275 } 0276 void MSO::parsePOINT(LEInputStream& in, POINT& _s) { 0277 _s.streamOffset = in.getPosition(); 0278 _s.x = in.readint32(); 0279 _s.y = in.readint32(); 0280 } 0281 void MSO::parsePowerPointStructs(LEInputStream& in, PowerPointStructs& _s) { 0282 _s.streamOffset = in.getPosition(); 0283 LEInputStream::Mark _m; 0284 bool _atend; 0285 _atend = false; 0286 while (!_atend) { 0287 _m = in.setMark(); 0288 try { 0289 _s.anon.append(PowerPointStruct(&_s)); 0290 parsePowerPointStruct(in, _s.anon.last()); 0291 } catch(IncorrectValueException _e) { 0292 _s.anon.removeLast(); 0293 _atend = true; 0294 in.rewind(_m); 0295 } catch(EOFException _e) { 0296 _s.anon.removeLast(); 0297 _atend = true; 0298 in.rewind(_m); 0299 } 0300 } 0301 } 0302 void MSO::parseSoundCollectionAtom(LEInputStream& in, SoundCollectionAtom& _s) { 0303 _s.streamOffset = in.getPosition(); 0304 parseRecordHeader(in, _s.rh); 0305 if (!(_s.rh.recVer == 0)) { 0306 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0307 } 0308 if (!(_s.rh.recInstance == 0)) { 0309 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0310 } 0311 if (!(_s.rh.recType == 0x7e5)) { 0312 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7e5"); 0313 } 0314 if (!(_s.rh.recLen == 4)) { 0315 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4"); 0316 } 0317 _s.soundIdSeed = in.readuint32(); 0318 } 0319 void MSO::parseHeadersFootersAtom(LEInputStream& in, HeadersFootersAtom& _s) { 0320 _s.streamOffset = in.getPosition(); 0321 parseRecordHeader(in, _s.rh); 0322 if (!(_s.rh.recVer == 0)) { 0323 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0324 } 0325 if (!(_s.rh.recInstance == 0)) { 0326 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0327 } 0328 if (!(_s.rh.recType == 0xFDA)) { 0329 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFDA"); 0330 } 0331 if (!(_s.rh.recLen == 4)) { 0332 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4"); 0333 } 0334 _s.formatId = in.readint16(); 0335 if (!(((qint16)_s.formatId)>=0)) { 0336 throw IncorrectValueException(in.getPosition(), "((qint16)_s.formatId)>=0"); 0337 } 0338 if (!(((qint16)_s.formatId)<=13)) { 0339 throw IncorrectValueException(in.getPosition(), "((qint16)_s.formatId)<=13"); 0340 } 0341 _s.fHasDate = in.readbit(); 0342 _s.fHasTodayDate = in.readbit(); 0343 _s.fHasUserDate = in.readbit(); 0344 _s.fHasSlideNumber = in.readbit(); 0345 _s.fHasHeader = in.readbit(); 0346 _s.fHasFooter = in.readbit(); 0347 _s.reserved1 = in.readuint2(); 0348 _s.reserved2 = in.readuint8(); 0349 } 0350 void MSO::parseUserDateAtom(LEInputStream& in, UserDateAtom& _s) { 0351 _s.streamOffset = in.getPosition(); 0352 int _c; 0353 LEInputStream::Mark _m; 0354 parseRecordHeader(in, _s.rh); 0355 if (!(_s.rh.recVer == 0)) { 0356 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0357 } 0358 if (!(_s.rh.recInstance == 0)) { 0359 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0360 } 0361 if (!(_s.rh.recType == 0xFBA)) { 0362 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA"); 0363 } 0364 if (!(_s.rh.recLen%2==0)) { 0365 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0"); 0366 } 0367 if (!(_s.rh.recLen<=510)) { 0368 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen<=510"); 0369 } 0370 _c = _s.rh.recLen/2; 0371 _s.userDate.resize(_c); 0372 for (int _i=0; _i<_c; ++_i) { 0373 _s.userDate[_i] = in.readuint16(); 0374 } 0375 } 0376 void MSO::parseHeaderAtom(LEInputStream& in, HeaderAtom& _s) { 0377 _s.streamOffset = in.getPosition(); 0378 int _c; 0379 LEInputStream::Mark _m; 0380 parseRecordHeader(in, _s.rh); 0381 if (!(_s.rh.recVer == 0)) { 0382 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0383 } 0384 if (!(_s.rh.recInstance == 1)) { 0385 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1"); 0386 } 0387 if (!(_s.rh.recType == 0xFBA)) { 0388 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA"); 0389 } 0390 if (!(_s.rh.recLen%2==0)) { 0391 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0"); 0392 } 0393 _c = _s.rh.recLen/2; 0394 _s.header.resize(_c); 0395 for (int _i=0; _i<_c; ++_i) { 0396 _s.header[_i] = in.readuint16(); 0397 } 0398 } 0399 void MSO::parseFooterAtom(LEInputStream& in, FooterAtom& _s) { 0400 _s.streamOffset = in.getPosition(); 0401 int _c; 0402 LEInputStream::Mark _m; 0403 parseRecordHeader(in, _s.rh); 0404 if (!(_s.rh.recVer == 0)) { 0405 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0406 } 0407 if (!(_s.rh.recInstance == 2)) { 0408 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 2"); 0409 } 0410 if (!(_s.rh.recType == 0xFBA)) { 0411 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA"); 0412 } 0413 if (!(_s.rh.recLen%2==0)) { 0414 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen%2==0"); 0415 } 0416 _c = _s.rh.recLen/2; 0417 _s.footer.resize(_c); 0418 for (int _i=0; _i<_c; ++_i) { 0419 _s.footer[_i] = in.readuint16(); 0420 } 0421 } 0422 void MSO::parsePerSlideHeadersFootersContainer(LEInputStream& in, PerSlideHeadersFootersContainer& _s) { 0423 _s.streamOffset = in.getPosition(); 0424 LEInputStream::Mark _m; 0425 bool _possiblyPresent; 0426 parseRecordHeader(in, _s.rh); 0427 if (!(_s.rh.recVer == 0xF)) { 0428 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0429 } 0430 if (!(_s.rh.recInstance == 0)) { 0431 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0432 } 0433 if (!(_s.rh.recType == 0xFD9)) { 0434 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD9"); 0435 } 0436 parseHeadersFootersAtom(in, _s.hfAtom); 0437 _m = in.setMark(); 0438 try { 0439 RecordHeader _optionCheck(&_s); 0440 parseRecordHeader(in, _optionCheck); 0441 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0)&&(_optionCheck.recLen<=510); 0442 } catch(EOFException _e) { 0443 _possiblyPresent = false; 0444 } 0445 in.rewind(_m); 0446 _m = in.setMark(); 0447 if (_possiblyPresent) { 0448 try { 0449 _s.userDateAtom = QSharedPointer<UserDateAtom>(new UserDateAtom(&_s)); 0450 parseUserDateAtom(in, *_s.userDateAtom.data()); 0451 } catch(IncorrectValueException _e) { 0452 _s.userDateAtom.clear(); 0453 in.rewind(_m); 0454 } catch(EOFException _e) { 0455 _s.userDateAtom.clear(); 0456 in.rewind(_m); 0457 } 0458 } 0459 _m = in.setMark(); 0460 try { 0461 RecordHeader _optionCheck(&_s); 0462 parseRecordHeader(in, _optionCheck); 0463 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 0464 } catch(EOFException _e) { 0465 _possiblyPresent = false; 0466 } 0467 in.rewind(_m); 0468 _m = in.setMark(); 0469 if (_possiblyPresent) { 0470 try { 0471 _s.headerAtom = QSharedPointer<HeaderAtom>(new HeaderAtom(&_s)); 0472 parseHeaderAtom(in, *_s.headerAtom.data()); 0473 } catch(IncorrectValueException _e) { 0474 _s.headerAtom.clear(); 0475 in.rewind(_m); 0476 } catch(EOFException _e) { 0477 _s.headerAtom.clear(); 0478 in.rewind(_m); 0479 } 0480 } 0481 _m = in.setMark(); 0482 try { 0483 RecordHeader _optionCheck(&_s); 0484 parseRecordHeader(in, _optionCheck); 0485 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 2)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 0486 } catch(EOFException _e) { 0487 _possiblyPresent = false; 0488 } 0489 in.rewind(_m); 0490 _m = in.setMark(); 0491 if (_possiblyPresent) { 0492 try { 0493 _s.footerAtom = QSharedPointer<FooterAtom>(new FooterAtom(&_s)); 0494 parseFooterAtom(in, *_s.footerAtom.data()); 0495 } catch(IncorrectValueException _e) { 0496 _s.footerAtom.clear(); 0497 in.rewind(_m); 0498 } catch(EOFException _e) { 0499 _s.footerAtom.clear(); 0500 in.rewind(_m); 0501 } 0502 } 0503 _m = in.setMark(); 0504 try { 0505 RecordHeader _optionCheck(&_s); 0506 parseRecordHeader(in, _optionCheck); 0507 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0)&&(_optionCheck.recLen<=510); 0508 } catch(EOFException _e) { 0509 _possiblyPresent = false; 0510 } 0511 in.rewind(_m); 0512 _m = in.setMark(); 0513 if (_possiblyPresent) { 0514 try { 0515 _s.userDateAtom2 = QSharedPointer<UserDateAtom>(new UserDateAtom(&_s)); 0516 parseUserDateAtom(in, *_s.userDateAtom2.data()); 0517 } catch(IncorrectValueException _e) { 0518 _s.userDateAtom2.clear(); 0519 in.rewind(_m); 0520 } catch(EOFException _e) { 0521 _s.userDateAtom2.clear(); 0522 in.rewind(_m); 0523 } 0524 } 0525 } 0526 void MSO::parseEndDocumentAtom(LEInputStream& in, EndDocumentAtom& _s) { 0527 _s.streamOffset = in.getPosition(); 0528 parseRecordHeader(in, _s.rh); 0529 if (!(_s.rh.recVer == 0)) { 0530 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0531 } 0532 if (!(_s.rh.recInstance == 0)) { 0533 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0534 } 0535 if (!(_s.rh.recType == 0x3EA)) { 0536 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3EA"); 0537 } 0538 if (!(_s.rh.recLen == 0)) { 0539 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0"); 0540 } 0541 } 0542 void MSO::parseDocInfoListContainer(LEInputStream& in, DocInfoListContainer& _s) { 0543 _s.streamOffset = in.getPosition(); 0544 LEInputStream::Mark _m; 0545 bool _atend; 0546 parseRecordHeader(in, _s.rh); 0547 if (!(_s.rh.recVer == 0xF)) { 0548 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0549 } 0550 if (!(_s.rh.recInstance == 0)) { 0551 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0552 } 0553 if (!(_s.rh.recType == 0x7D0)) { 0554 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7D0"); 0555 } 0556 _atend = false; 0557 while (!_atend) { 0558 _m = in.setMark(); 0559 try { 0560 _s.rgChildRec.append(DocInfoListSubContainerOrAtom(&_s)); 0561 parseDocInfoListSubContainerOrAtom(in, _s.rgChildRec.last()); 0562 } catch(IncorrectValueException _e) { 0563 _s.rgChildRec.removeLast(); 0564 _atend = true; 0565 in.rewind(_m); 0566 } catch(EOFException _e) { 0567 _s.rgChildRec.removeLast(); 0568 _atend = true; 0569 in.rewind(_m); 0570 } 0571 } 0572 } 0573 void MSO::parseSlideViewInfoAtom(LEInputStream& in, SlideViewInfoAtom& _s) { 0574 _s.streamOffset = in.getPosition(); 0575 parseRecordHeader(in, _s.rh); 0576 if (!(_s.rh.recVer == 0)) { 0577 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0578 } 0579 if (!(_s.rh.recInstance == 0)) { 0580 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0581 } 0582 if (!(_s.rh.recType == 0x3FE)) { 0583 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FE"); 0584 } 0585 if (!(_s.rh.recLen == 3)) { 0586 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 3"); 0587 } 0588 _s.unused1 = in.readuint8(); 0589 _s.fSnapToGrid = in.readuint8(); 0590 _s.fSnapToShape = in.readuint8(); 0591 } 0592 void MSO::parseGuideAtom(LEInputStream& in, GuideAtom& _s) { 0593 _s.streamOffset = in.getPosition(); 0594 parseRecordHeader(in, _s.rh); 0595 if (!(_s.rh.recVer == 0)) { 0596 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0597 } 0598 if (!(_s.rh.recInstance == 7)) { 0599 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 7"); 0600 } 0601 if (!(_s.rh.recType == 0x3FB)) { 0602 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FB"); 0603 } 0604 if (!(_s.rh.recLen == 8)) { 0605 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8"); 0606 } 0607 _s.type = in.readuint32(); 0608 if (!(((quint32)_s.type) == 0 || ((quint32)_s.type) == 1)) { 0609 throw IncorrectValueException(in.getPosition(), "((quint32)_s.type) == 0 || ((quint32)_s.type) == 1"); 0610 } 0611 _s.pos = in.readint32(); 0612 if (!(((qint32)_s.pos)>=-15840)) { 0613 throw IncorrectValueException(in.getPosition(), "((qint32)_s.pos)>=-15840"); 0614 } 0615 if (!(((qint32)_s.pos)<=32255)) { 0616 throw IncorrectValueException(in.getPosition(), "((qint32)_s.pos)<=32255"); 0617 } 0618 } 0619 void MSO::parseDocProgTagsContainer(LEInputStream& in, DocProgTagsContainer& _s) { 0620 _s.streamOffset = in.getPosition(); 0621 LEInputStream::Mark _m; 0622 bool _atend; 0623 parseRecordHeader(in, _s.rh); 0624 if (!(_s.rh.recVer == 0xF)) { 0625 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0626 } 0627 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1)) { 0628 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1"); 0629 } 0630 if (!(_s.rh.recType == 0x1388)) { 0631 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1388"); 0632 } 0633 qint64 _startPos = in.getPosition(); 0634 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos)); 0635 _atend = in.getPosition() - _startPos >= _totalSize; 0636 while (!_atend) { 0637 _s.rgChildRec.append(DocProgTagsSubContainerOrAtom(&_s)); 0638 parseDocProgTagsSubContainerOrAtom(in, _s.rgChildRec.last()); 0639 _atend = in.getPosition() - _startPos >= _totalSize; 0640 } 0641 } 0642 void MSO::parseTextAutoNumberScheme(LEInputStream& in, TextAutoNumberScheme& _s) { 0643 _s.streamOffset = in.getPosition(); 0644 _s.scheme = in.readuint16(); 0645 if (!(((quint16)_s.scheme)<=40)) { 0646 throw IncorrectValueException(in.getPosition(), "((quint16)_s.scheme)<=40"); 0647 } 0648 _s.startNum = in.readuint16(); 0649 if (!(((quint16)_s.startNum)>=1)) { 0650 throw IncorrectValueException(in.getPosition(), "((quint16)_s.startNum)>=1"); 0651 } 0652 } 0653 void MSO::parseBlipCollection9Container(LEInputStream& in, BlipCollection9Container& _s) { 0654 _s.streamOffset = in.getPosition(); 0655 LEInputStream::Mark _m; 0656 bool _atend; 0657 parseRecordHeader(in, _s.rh); 0658 if (!(_s.rh.recVer == 0xF)) { 0659 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0660 } 0661 if (!(_s.rh.recInstance == 0x0)) { 0662 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 0663 } 0664 if (!(_s.rh.recType == 0x07F8)) { 0665 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07F8"); 0666 } 0667 qint64 _startPos = in.getPosition(); 0668 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos)); 0669 _atend = in.getPosition() - _startPos >= _totalSize; 0670 while (!_atend) { 0671 _s.rgBlipEntityAtom.append(BlipEntityAtom(&_s)); 0672 parseBlipEntityAtom(in, _s.rgBlipEntityAtom.last()); 0673 _atend = in.getPosition() - _startPos >= _totalSize; 0674 } 0675 } 0676 void MSO::parseKinsoku9Atom(LEInputStream& in, Kinsoku9Atom& _s) { 0677 _s.streamOffset = in.getPosition(); 0678 parseRecordHeader(in, _s.rh); 0679 if (!(_s.rh.recVer == 0x0)) { 0680 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 0681 } 0682 if (!(_s.rh.recInstance == 0x3)) { 0683 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x3"); 0684 } 0685 if (!(_s.rh.recType == 0x0FD2)) { 0686 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FD2"); 0687 } 0688 if (!(_s.rh.recLen == 0x0004)) { 0689 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x0004"); 0690 } 0691 _s.korLevel = in.readuint2(); 0692 if (!(((quint8)_s.korLevel) == 0x0 || ((quint8)_s.korLevel) == 0x2)) { 0693 throw IncorrectValueException(in.getPosition(), "((quint8)_s.korLevel) == 0x0 || ((quint8)_s.korLevel) == 0x2"); 0694 } 0695 _s.scLevel = in.readuint2(); 0696 if (!(((quint8)_s.scLevel) == 0x0 || ((quint8)_s.scLevel) == 0x2)) { 0697 throw IncorrectValueException(in.getPosition(), "((quint8)_s.scLevel) == 0x0 || ((quint8)_s.scLevel) == 0x2"); 0698 } 0699 _s.tcLevel = in.readuint2(); 0700 if (!(((quint8)_s.tcLevel) == 0x0 || ((quint8)_s.tcLevel) == 0x2)) { 0701 throw IncorrectValueException(in.getPosition(), "((quint8)_s.tcLevel) == 0x0 || ((quint8)_s.tcLevel) == 0x2"); 0702 } 0703 _s.jpnLevel = in.readuint2(); 0704 if (!(((quint8)_s.jpnLevel) == 0x0 || ((quint8)_s.jpnLevel) == 0x1 || ((quint8)_s.jpnLevel) == 0x2)) { 0705 throw IncorrectValueException(in.getPosition(), "((quint8)_s.jpnLevel) == 0x0 || ((quint8)_s.jpnLevel) == 0x1 || ((quint8)_s.jpnLevel) == 0x2"); 0706 } 0707 _s.reserveda = in.readuint4(); 0708 if (!(((quint8)_s.reserveda) == 0)) { 0709 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserveda) == 0"); 0710 } 0711 _s.reservedb = in.readuint20(); 0712 if (!(((quint32)_s.reservedb) == 0)) { 0713 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reservedb) == 0"); 0714 } 0715 } 0716 void MSO::parseExHyperlink9Container(LEInputStream& in, ExHyperlink9Container& _s) { 0717 _s.streamOffset = in.getPosition(); 0718 int _c; 0719 LEInputStream::Mark _m; 0720 parseRecordHeader(in, _s.rh); 0721 if (!(_s.rh.recVer == 0xF)) { 0722 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0723 } 0724 if (!(_s.rh.recInstance == 0)) { 0725 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0726 } 0727 if (!(_s.rh.recType == 0xFE4)) { 0728 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFE4"); 0729 } 0730 _c = _s.rh.recLen; 0731 _s.todo.resize(_c); 0732 in.readBytes(_s.todo); 0733 } 0734 void MSO::parsePresAdvisorFlags9Atom(LEInputStream& in, PresAdvisorFlags9Atom& _s) { 0735 _s.streamOffset = in.getPosition(); 0736 parseRecordHeader(in, _s.rh); 0737 if (!(_s.rh.recVer == 0x0)) { 0738 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 0739 } 0740 if (!(_s.rh.recInstance == 0)) { 0741 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0742 } 0743 if (!(_s.rh.recType == 0x177A)) { 0744 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177A"); 0745 } 0746 if (!(_s.rh.recLen == 0x4)) { 0747 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x4"); 0748 } 0749 _s.fDisableCaseStyleTitleRule = in.readbit(); 0750 _s.fDisableCaseStyleBodyRule = in.readbit(); 0751 _s.fDisableEndPunctuationTitleRule = in.readbit(); 0752 _s.fDisableEndPunctuationBodyRule = in.readbit(); 0753 _s.fDisableTooManyBulletsRule = in.readbit(); 0754 _s.fDisableFontSizeTitleRule = in.readbit(); 0755 _s.fDisableFontSizeBodyRule = in.readbit(); 0756 _s.fDisableNumberOfLinesTitleRule = in.readbit(); 0757 _s.fDisableNumberOfLinesBodyRule = in.readbit(); 0758 _s.fDisableTooManyFontsRule = in.readbit(); 0759 _s.fDisablePrintTip = in.readbit(); 0760 _s.reserveda = in.readuint5(); 0761 if (!(((quint8)_s.reserveda) == 0)) { 0762 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserveda) == 0"); 0763 } 0764 _s.reservedb = in.readuint16(); 0765 if (!(((quint16)_s.reservedb) == 0)) { 0766 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reservedb) == 0"); 0767 } 0768 } 0769 void MSO::parseEnvelopeData9Atom(LEInputStream& in, EnvelopeData9Atom& _s) { 0770 _s.streamOffset = in.getPosition(); 0771 int _c; 0772 LEInputStream::Mark _m; 0773 parseRecordHeader(in, _s.rh); 0774 if (!(_s.rh.recVer == 0x0)) { 0775 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 0776 } 0777 if (!(_s.rh.recInstance == 0)) { 0778 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0779 } 0780 if (!(_s.rh.recType == 0x1785)) { 0781 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1785"); 0782 } 0783 _c = _s.rh.recLen; 0784 _s.todo.resize(_c); 0785 in.readBytes(_s.todo); 0786 } 0787 void MSO::parseEnvelopeFlags9Atom(LEInputStream& in, EnvelopeFlags9Atom& _s) { 0788 _s.streamOffset = in.getPosition(); 0789 parseRecordHeader(in, _s.rh); 0790 if (!(_s.rh.recVer == 0x0)) { 0791 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 0792 } 0793 if (!(_s.rh.recInstance == 0)) { 0794 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0795 } 0796 if (!(_s.rh.recType == 0x1784)) { 0797 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1784"); 0798 } 0799 if (!(_s.rh.recLen == 4)) { 0800 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 4"); 0801 } 0802 _s.fHasEnvelope = in.readbit(); 0803 _s.fEnvelopeVisible = in.readbit(); 0804 _s.reserved1 = in.readuint2(); 0805 if (!(((quint8)_s.reserved1) == 0)) { 0806 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved1) == 0"); 0807 } 0808 _s.fEnvelopeDirty = in.readbit(); 0809 _s.reserved2a = in.readuint3(); 0810 if (!(((quint8)_s.reserved2a) == 0)) { 0811 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2a) == 0"); 0812 } 0813 _s.reserved2b = in.readuint8(); 0814 if (!(((quint8)_s.reserved2b) == 0)) { 0815 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2b) == 0"); 0816 } 0817 _s.reserved2c = in.readuint16(); 0818 if (!(((quint16)_s.reserved2c) == 0)) { 0819 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reserved2c) == 0"); 0820 } 0821 } 0822 void MSO::parseHTMLDocInfo9Atom(LEInputStream& in, HTMLDocInfo9Atom& _s) { 0823 _s.streamOffset = in.getPosition(); 0824 parseRecordHeader(in, _s.rh); 0825 if (!(_s.rh.recVer == 0x0)) { 0826 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 0827 } 0828 if (!(_s.rh.recInstance == 0)) { 0829 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0830 } 0831 if (!(_s.rh.recType == 0x177B)) { 0832 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177B"); 0833 } 0834 if (!(_s.rh.recLen == 0x10)) { 0835 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10"); 0836 } 0837 _s.unused1 = in.readuint32(); 0838 _s.encoding = in.readuint32(); 0839 _s.frameColorType = in.readuint16(); 0840 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)) { 0841 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"); 0842 } 0843 _s.screenSize = in.readuint8(); 0844 _s.unused2 = in.readuint8(); 0845 _s.outputType = in.readuint8(); 0846 _s.fShowFrame = in.readbit(); 0847 _s.fResizeGraphics = in.readbit(); 0848 _s.fOrganizeInFolder = in.readbit(); 0849 _s.fUseLongFileNames = in.readbit(); 0850 _s.fRelyOnVML = in.readbit(); 0851 _s.fAllowPNG = in.readbit(); 0852 _s.fShowSlideAnimation = in.readbit(); 0853 _s.reserved1 = in.readbit(); 0854 if (!(((bool)_s.reserved1) == false)) { 0855 throw IncorrectValueException(in.getPosition(), "((bool)_s.reserved1) == false"); 0856 } 0857 _s.unused3 = in.readuint16(); 0858 } 0859 void MSO::parseHTMLPublishInfo9Container(LEInputStream& in, HTMLPublishInfo9Container& _s) { 0860 _s.streamOffset = in.getPosition(); 0861 int _c; 0862 LEInputStream::Mark _m; 0863 parseRecordHeader(in, _s.rh); 0864 if (!(_s.rh.recVer == 0xF)) { 0865 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0866 } 0867 if (!(_s.rh.recInstance == 0x0)) { 0868 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 0869 } 0870 if (!(_s.rh.recType == 0x177D)) { 0871 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177D"); 0872 } 0873 _c = _s.rh.recLen; 0874 _s.todo.resize(_c); 0875 in.readBytes(_s.todo); 0876 } 0877 void MSO::parseBroadcastDocInfo9Container(LEInputStream& in, BroadcastDocInfo9Container& _s) { 0878 _s.streamOffset = in.getPosition(); 0879 int _c; 0880 LEInputStream::Mark _m; 0881 parseRecordHeader(in, _s.rh); 0882 if (!(_s.rh.recVer == 0xF)) { 0883 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0884 } 0885 if (!(_s.rh.recInstance == 0)) { 0886 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0887 } 0888 if (!(_s.rh.recType == 0x177E)) { 0889 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x177E"); 0890 } 0891 _c = _s.rh.recLen; 0892 _s.todo.resize(_c); 0893 in.readBytes(_s.todo); 0894 } 0895 void MSO::parseOutlineTextProps9Container(LEInputStream& in, OutlineTextProps9Container& _s) { 0896 _s.streamOffset = in.getPosition(); 0897 LEInputStream::Mark _m; 0898 bool _atend; 0899 parseRecordHeader(in, _s.rh); 0900 if (!(_s.rh.recVer == 0xF)) { 0901 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0902 } 0903 if (!(_s.rh.recInstance == 0)) { 0904 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0905 } 0906 if (!(_s.rh.recType == 0x0FAE)) { 0907 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FAE"); 0908 } 0909 _atend = false; 0910 while (!_atend) { 0911 _m = in.setMark(); 0912 try { 0913 _s.rgOutlineTextProps9Entry.append(OutlineTextProps9Entry(&_s)); 0914 parseOutlineTextProps9Entry(in, _s.rgOutlineTextProps9Entry.last()); 0915 } catch(IncorrectValueException _e) { 0916 _s.rgOutlineTextProps9Entry.removeLast(); 0917 _atend = true; 0918 in.rewind(_m); 0919 } catch(EOFException _e) { 0920 _s.rgOutlineTextProps9Entry.removeLast(); 0921 _atend = true; 0922 in.rewind(_m); 0923 } 0924 } 0925 } 0926 void MSO::parseOutlineTextPropsHeaderExAtom(LEInputStream& in, OutlineTextPropsHeaderExAtom& _s) { 0927 _s.streamOffset = in.getPosition(); 0928 parseRecordHeader(in, _s.rh); 0929 if (!(_s.rh.recVer == 0)) { 0930 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0931 } 0932 if (!(_s.rh.recInstance<=5)) { 0933 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<=5"); 0934 } 0935 if (!(_s.rh.recType == 0xFAF)) { 0936 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFAF"); 0937 } 0938 _s.slideIdRef = in.readuint32(); 0939 _s.txType = in.readuint32(); 0940 } 0941 void MSO::parseStyleTextProp9Atom(LEInputStream& in, StyleTextProp9Atom& _s) { 0942 _s.streamOffset = in.getPosition(); 0943 LEInputStream::Mark _m; 0944 bool _atend; 0945 parseRecordHeader(in, _s.rh); 0946 if (!(_s.rh.recVer == 0)) { 0947 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 0948 } 0949 if (!(_s.rh.recInstance == 0)) { 0950 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 0951 } 0952 if (!(_s.rh.recType == 0xFAC)) { 0953 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFAC"); 0954 } 0955 qint64 _startPos = in.getPosition(); 0956 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos)); 0957 _atend = in.getPosition() - _startPos >= _totalSize; 0958 while (!_atend) { 0959 _s.rgStyleTextProp9.append(StyleTextProp9(&_s)); 0960 parseStyleTextProp9(in, _s.rgStyleTextProp9.last()); 0961 _atend = in.getPosition() - _startPos >= _totalSize; 0962 } 0963 } 0964 void MSO::parseFontCollection10Container(LEInputStream& in, FontCollection10Container& _s) { 0965 _s.streamOffset = in.getPosition(); 0966 LEInputStream::Mark _m; 0967 bool _atend; 0968 parseRecordHeader(in, _s.rh); 0969 if (!(_s.rh.recVer == 0xF)) { 0970 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 0971 } 0972 if (!(_s.rh.recInstance == 0x0)) { 0973 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 0974 } 0975 if (!(_s.rh.recType == 0x07D6)) { 0976 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07D6"); 0977 } 0978 qint64 _startPos = in.getPosition(); 0979 int _totalSize = qMin(_s.rh.recLen, quint32(in.getSize() - _startPos)); 0980 _atend = in.getPosition() - _startPos >= _totalSize; 0981 while (!_atend) { 0982 _s.rgFontCollectionEntry.append(FontCollectionEntry(&_s)); 0983 parseFontCollectionEntry(in, _s.rgFontCollectionEntry.last()); 0984 _atend = in.getPosition() - _startPos >= _totalSize; 0985 } 0986 } 0987 void MSO::parseGridSpacing10Atom(LEInputStream& in, GridSpacing10Atom& _s) { 0988 _s.streamOffset = in.getPosition(); 0989 parseRecordHeader(in, _s.rh); 0990 if (!(_s.rh.recVer == 0x0)) { 0991 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 0992 } 0993 if (!(_s.rh.recInstance == 0x0)) { 0994 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 0995 } 0996 if (!(_s.rh.recType == 0x040D)) { 0997 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x040D"); 0998 } 0999 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 1871 void MSO::parseTextRange(LEInputStream& in, TextRange& _s) { 1872 _s.streamOffset = in.getPosition(); 1873 _s.begin = in.readint32(); 1874 _s.end = in.readint32(); 1875 } 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 } 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 } 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 } 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 } 1931 void MSO::parseTabStop(LEInputStream& in, TabStop& _s) { 1932 _s.streamOffset = in.getPosition(); 1933 _s.position = in.readint16(); 1934 _s.type = in.readuint16(); 1935 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 2231 void MSO::parsePointStruct(LEInputStream& in, PointStruct& _s) { 2232 _s.streamOffset = in.getPosition(); 2233 _s.x = in.readint32(); 2234 _s.y = in.readint32(); 2235 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 2345 void MSO::parsePersistIdRef(LEInputStream& in, PersistIdRef& _s) { 2346 _s.streamOffset = in.getPosition(); 2347 _s.anon = in.readuint32(); 2348 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 3597 void MSO::parseOfficeArtFRIT(LEInputStream& in, OfficeArtFRIT& _s) { 3598 _s.streamOffset = in.getPosition(); 3599 _s.fridNew = in.readuint16(); 3600 _s.fridOld = in.readuint16(); 3601 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 3841 void MSO::parseMSOPATHINFO(LEInputStream& in, MSOPATHINFO& _s) { 3842 _s.streamOffset = in.getPosition(); 3843 _s.type = in.readuint3(); 3844 _s.segments = in.readuint13(); 3845 } 3846 void MSO::parseFixedPoint(LEInputStream& in, FixedPoint& _s) { 3847 _s.streamOffset = in.getPosition(); 3848 _s.fractional = in.readuint16(); 3849 _s.integral = in.readint16(); 3850 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 4559 void MSO::parseOfficeArtIDCL(LEInputStream& in, OfficeArtIDCL& _s) { 4560 _s.streamOffset = in.getPosition(); 4561 _s.dgid = in.readuint32(); 4562 _s.cspidCur = in.readuint32(); 4563 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 5209 void MSO::parseFILETIME(LEInputStream& in, FILETIME& _s) { 5210 _s.streamOffset = in.getPosition(); 5211 _s.dwLowDateTime = in.readuint32(); 5212 _s.dwHighDateTime = in.readuint32(); 5213 } 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 } 5224 void MSO::parsePropertyIdentifierAndOffset(LEInputStream& in, PropertyIdentifierAndOffset& _s) { 5225 _s.streamOffset = in.getPosition(); 5226 _s.propertyIdentifier = in.readuint32(); 5227 _s.offset = in.readuint32(); 5228 } 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 } 5258 void MSO::parsePropertySet(LEInputStream& in, PropertySet& _s) { 5259 _s.streamOffset = in.getPosition(); 5260 int _c; 5261 LEInputStream::Mark _m; 5262 _s.size = in.readuint32(); 5263 _s.numProperties = in.readuint32(); 5264 _c = _s.numProperties; 5265 for (int _i=0; _i<_c; ++_i) { 5266 _s.propertyIdentifierAndOffset.append(PropertyIdentifierAndOffset(&_s)); 5267 parsePropertyIdentifierAndOffset(in, _s.propertyIdentifierAndOffset[_i]); 5268 } 5269 _c = _s.numProperties; 5270 for (int _i=0; _i<_c; ++_i) { 5271 _s.property.append(TypedPropertyValue(&_s)); 5272 parseTypedPropertyValue(in, _s.property[_i]); 5273 } 5274 } 5275 void MSO::parsePropertySetStream(LEInputStream& in, PropertySetStream& _s) { 5276 _s.streamOffset = in.getPosition(); 5277 int _c; 5278 LEInputStream::Mark _m; 5279 bool _atend; 5280 _s.byteOrder = in.readuint16(); 5281 if (!(((quint16)_s.byteOrder) == 0xFFFE)) { 5282 throw IncorrectValueException(in.getPosition(), "((quint16)_s.byteOrder) == 0xFFFE"); 5283 } 5284 _s.version = in.readuint16(); 5285 _s.systemIdentifier = in.readuint32(); 5286 _c = 16; 5287 _s.clsID.resize(_c); 5288 in.readBytes(_s.clsID); 5289 _s.numPropertySets = in.readuint32(); 5290 if (!(((quint32)_s.numPropertySets) == 1 || ((quint32)_s.numPropertySets) == 2)) { 5291 throw IncorrectValueException(in.getPosition(), "((quint32)_s.numPropertySets) == 1 || ((quint32)_s.numPropertySets) == 2"); 5292 } 5293 _c = 16; 5294 _s.fmtID0.resize(_c); 5295 in.readBytes(_s.fmtID0); 5296 _s.offset0 = in.readuint32(); 5297 _s._has_fmtID1 = _s.numPropertySets==2; 5298 if (_s._has_fmtID1) { 5299 _c = 16; 5300 _s.fmtID1.resize(_c); 5301 in.readBytes(_s.fmtID1); 5302 } 5303 _s._has_offset1 = _s.numPropertySets==2; 5304 if (_s._has_offset1) { 5305 _s.offset1 = in.readuint32(); 5306 } 5307 parsePropertySet(in, _s.propertySet1); 5308 if (_s.numPropertySets==2) { 5309 _s.propertySet2 = QSharedPointer<PropertySet>(new PropertySet(&_s)); 5310 parsePropertySet(in, *_s.propertySet2.data()); 5311 } 5312 _atend = false; 5313 while (!_atend) { 5314 _m = in.setMark(); 5315 try { 5316 _s.padding.append(Byte(&_s)); 5317 parseByte(in, _s.padding.last()); 5318 } catch(IncorrectValueException _e) { 5319 _s.padding.removeLast(); 5320 _atend = true; 5321 in.rewind(_m); 5322 } catch(EOFException _e) { 5323 _s.padding.removeLast(); 5324 _atend = true; 5325 in.rewind(_m); 5326 } 5327 } 5328 } 5329 void MSO::parseSummaryInformationPropertySetStream(LEInputStream& in, SummaryInformationPropertySetStream& _s) { 5330 _s.streamOffset = in.getPosition(); 5331 parsePropertySetStream(in, _s.propertySet); 5332 if (!(_s.propertySet.version == 0)) { 5333 throw IncorrectValueException(in.getPosition(), "_s.propertySet.version == 0"); 5334 } 5335 } 5336 void MSO::parseDocumentSummaryInformationPropertySetStream(LEInputStream& in, DocumentSummaryInformationPropertySetStream& _s) { 5337 _s.streamOffset = in.getPosition(); 5338 parsePropertySetStream(in, _s.propertySet); 5339 if (!(_s.propertySet.version == 0)) { 5340 throw IncorrectValueException(in.getPosition(), "_s.propertySet.version == 0"); 5341 } 5342 } 5343 void MSO::parsePicturesStream(LEInputStream& in, PicturesStream& _s) { 5344 _s.streamOffset = in.getPosition(); 5345 LEInputStream::Mark _m; 5346 bool _atend; 5347 parseOfficeArtBStoreDelay(in, _s.anon1); 5348 _atend = false; 5349 while (!_atend) { 5350 _m = in.setMark(); 5351 try { 5352 _s.trailing.append(Byte(&_s)); 5353 parseByte(in, _s.trailing.last()); 5354 } catch(IncorrectValueException _e) { 5355 _s.trailing.removeLast(); 5356 _atend = true; 5357 in.rewind(_m); 5358 } catch(EOFException _e) { 5359 _s.trailing.removeLast(); 5360 _atend = true; 5361 in.rewind(_m); 5362 } 5363 } 5364 } 5365 void MSO::parseOfficeArtMetafileHeader(LEInputStream& in, OfficeArtMetafileHeader& _s) { 5366 _s.streamOffset = in.getPosition(); 5367 _s.cbSize = in.readuint32(); 5368 parseRECT(in, _s.rcBounds); 5369 parsePOINT(in, _s.ptSize); 5370 _s.cbsave = in.readuint32(); 5371 _s.compression = in.readuint8(); 5372 _s.filter = in.readuint8(); 5373 } 5374 void MSO::parseSoundCollectionContainer(LEInputStream& in, SoundCollectionContainer& _s) { 5375 _s.streamOffset = in.getPosition(); 5376 LEInputStream::Mark _m; 5377 bool _atend; 5378 parseRecordHeader(in, _s.rh); 5379 if (!(_s.rh.recVer == 0xF)) { 5380 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 5381 } 5382 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 5)) { 5383 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 5"); 5384 } 5385 if (!(_s.rh.recType == 0x7E4)) { 5386 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x7E4"); 5387 } 5388 parseSoundCollectionAtom(in, _s.soundCollectionAtom); 5389 qint64 _startPos = in.getPosition(); 5390 int _totalSize = qMin(_s.rh.recLen-12, quint32(in.getSize() - _startPos)); 5391 _atend = in.getPosition() - _startPos >= _totalSize; 5392 while (!_atend) { 5393 _s.rgSoundContainer.append(SoundContainer(&_s)); 5394 parseSoundContainer(in, _s.rgSoundContainer.last()); 5395 _atend = in.getPosition() - _startPos >= _totalSize; 5396 } 5397 } 5398 void MSO::parseSlideHeadersFootersContainer(LEInputStream& in, SlideHeadersFootersContainer& _s) { 5399 _s.streamOffset = in.getPosition(); 5400 LEInputStream::Mark _m; 5401 bool _possiblyPresent; 5402 parseRecordHeader(in, _s.rh); 5403 if (!(_s.rh.recVer == 0xF)) { 5404 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 5405 } 5406 if (!(_s.rh.recInstance == 3)) { 5407 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 3"); 5408 } 5409 if (!(_s.rh.recType == 0xFD9)) { 5410 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD9"); 5411 } 5412 parseHeadersFootersAtom(in, _s.hfAtom); 5413 _m = in.setMark(); 5414 try { 5415 RecordHeader _optionCheck(&_s); 5416 parseRecordHeader(in, _optionCheck); 5417 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0)&&(_optionCheck.recLen<=510); 5418 } catch(EOFException _e) { 5419 _possiblyPresent = false; 5420 } 5421 in.rewind(_m); 5422 _m = in.setMark(); 5423 if (_possiblyPresent) { 5424 try { 5425 _s.userDateAtom = QSharedPointer<UserDateAtom>(new UserDateAtom(&_s)); 5426 parseUserDateAtom(in, *_s.userDateAtom.data()); 5427 } catch(IncorrectValueException _e) { 5428 _s.userDateAtom.clear(); 5429 in.rewind(_m); 5430 } catch(EOFException _e) { 5431 _s.userDateAtom.clear(); 5432 in.rewind(_m); 5433 } 5434 } 5435 _m = in.setMark(); 5436 try { 5437 RecordHeader _optionCheck(&_s); 5438 parseRecordHeader(in, _optionCheck); 5439 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 2)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 5440 } catch(EOFException _e) { 5441 _possiblyPresent = false; 5442 } 5443 in.rewind(_m); 5444 _m = in.setMark(); 5445 if (_possiblyPresent) { 5446 try { 5447 _s.footerAtom = QSharedPointer<FooterAtom>(new FooterAtom(&_s)); 5448 parseFooterAtom(in, *_s.footerAtom.data()); 5449 } catch(IncorrectValueException _e) { 5450 _s.footerAtom.clear(); 5451 in.rewind(_m); 5452 } catch(EOFException _e) { 5453 _s.footerAtom.clear(); 5454 in.rewind(_m); 5455 } 5456 } 5457 } 5458 void MSO::parseNotesHeadersFootersContainer(LEInputStream& in, NotesHeadersFootersContainer& _s) { 5459 _s.streamOffset = in.getPosition(); 5460 LEInputStream::Mark _m; 5461 bool _possiblyPresent; 5462 parseRecordHeader(in, _s.rh); 5463 if (!(_s.rh.recVer == 0xF)) { 5464 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 5465 } 5466 if (!(_s.rh.recInstance == 4)) { 5467 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 4"); 5468 } 5469 if (!(_s.rh.recType == 0xFD9)) { 5470 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD9"); 5471 } 5472 parseHeadersFootersAtom(in, _s.hfAtom); 5473 _m = in.setMark(); 5474 try { 5475 RecordHeader _optionCheck(&_s); 5476 parseRecordHeader(in, _optionCheck); 5477 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0)&&(_optionCheck.recLen<=510); 5478 } catch(EOFException _e) { 5479 _possiblyPresent = false; 5480 } 5481 in.rewind(_m); 5482 _m = in.setMark(); 5483 if (_possiblyPresent) { 5484 try { 5485 _s.userDateAtom = QSharedPointer<UserDateAtom>(new UserDateAtom(&_s)); 5486 parseUserDateAtom(in, *_s.userDateAtom.data()); 5487 } catch(IncorrectValueException _e) { 5488 _s.userDateAtom.clear(); 5489 in.rewind(_m); 5490 } catch(EOFException _e) { 5491 _s.userDateAtom.clear(); 5492 in.rewind(_m); 5493 } 5494 } 5495 _m = in.setMark(); 5496 try { 5497 RecordHeader _optionCheck(&_s); 5498 parseRecordHeader(in, _optionCheck); 5499 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 5500 } catch(EOFException _e) { 5501 _possiblyPresent = false; 5502 } 5503 in.rewind(_m); 5504 _m = in.setMark(); 5505 if (_possiblyPresent) { 5506 try { 5507 _s.headerAtom = QSharedPointer<HeaderAtom>(new HeaderAtom(&_s)); 5508 parseHeaderAtom(in, *_s.headerAtom.data()); 5509 } catch(IncorrectValueException _e) { 5510 _s.headerAtom.clear(); 5511 in.rewind(_m); 5512 } catch(EOFException _e) { 5513 _s.headerAtom.clear(); 5514 in.rewind(_m); 5515 } 5516 } 5517 _m = in.setMark(); 5518 try { 5519 RecordHeader _optionCheck(&_s); 5520 parseRecordHeader(in, _optionCheck); 5521 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 2)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 5522 } catch(EOFException _e) { 5523 _possiblyPresent = false; 5524 } 5525 in.rewind(_m); 5526 _m = in.setMark(); 5527 if (_possiblyPresent) { 5528 try { 5529 _s.footerAtom = QSharedPointer<FooterAtom>(new FooterAtom(&_s)); 5530 parseFooterAtom(in, *_s.footerAtom.data()); 5531 } catch(IncorrectValueException _e) { 5532 _s.footerAtom.clear(); 5533 in.rewind(_m); 5534 } catch(EOFException _e) { 5535 _s.footerAtom.clear(); 5536 in.rewind(_m); 5537 } 5538 } 5539 } 5540 void MSO::parseScalingStruct(LEInputStream& in, ScalingStruct& _s) { 5541 _s.streamOffset = in.getPosition(); 5542 parseRatioStruct(in, _s.x); 5543 parseRatioStruct(in, _s.y); 5544 } 5545 void MSO::parseTextPFException9(LEInputStream& in, TextPFException9& _s) { 5546 _s.streamOffset = in.getPosition(); 5547 parsePFMasks(in, _s.masks); 5548 if (!(_s.masks.hasBullet == false)) { 5549 throw IncorrectValueException(in.getPosition(), "_s.masks.hasBullet == false"); 5550 } 5551 if (!(_s.masks.bulletHasFont == false)) { 5552 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletHasFont == false"); 5553 } 5554 if (!(_s.masks.bulletHasColor == false)) { 5555 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletHasColor == false"); 5556 } 5557 if (!(_s.masks.bulletHasSize == false)) { 5558 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletHasSize == false"); 5559 } 5560 if (!(_s.masks.bulletFont == false)) { 5561 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletFont == false"); 5562 } 5563 if (!(_s.masks.bulletColor == false)) { 5564 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletColor == false"); 5565 } 5566 if (!(_s.masks.bulletSize == false)) { 5567 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletSize == false"); 5568 } 5569 if (!(_s.masks.bulletChar == false)) { 5570 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletChar == false"); 5571 } 5572 if (!(_s.masks.leftMargin == false)) { 5573 throw IncorrectValueException(in.getPosition(), "_s.masks.leftMargin == false"); 5574 } 5575 if (!(_s.masks.indent == false)) { 5576 throw IncorrectValueException(in.getPosition(), "_s.masks.indent == false"); 5577 } 5578 if (!(_s.masks.align == false)) { 5579 throw IncorrectValueException(in.getPosition(), "_s.masks.align == false"); 5580 } 5581 if (!(_s.masks.lineSpacing == false)) { 5582 throw IncorrectValueException(in.getPosition(), "_s.masks.lineSpacing == false"); 5583 } 5584 if (!(_s.masks.spaceBefore == false)) { 5585 throw IncorrectValueException(in.getPosition(), "_s.masks.spaceBefore == false"); 5586 } 5587 if (!(_s.masks.spaceAfter == false)) { 5588 throw IncorrectValueException(in.getPosition(), "_s.masks.spaceAfter == false"); 5589 } 5590 if (!(_s.masks.defaultTabSize == false)) { 5591 throw IncorrectValueException(in.getPosition(), "_s.masks.defaultTabSize == false"); 5592 } 5593 if (!(_s.masks.fontAlign == false)) { 5594 throw IncorrectValueException(in.getPosition(), "_s.masks.fontAlign == false"); 5595 } 5596 if (!(_s.masks.charWrap == false)) { 5597 throw IncorrectValueException(in.getPosition(), "_s.masks.charWrap == false"); 5598 } 5599 if (!(_s.masks.wordWrap == false)) { 5600 throw IncorrectValueException(in.getPosition(), "_s.masks.wordWrap == false"); 5601 } 5602 if (!(_s.masks.overflow == false)) { 5603 throw IncorrectValueException(in.getPosition(), "_s.masks.overflow == false"); 5604 } 5605 if (!(_s.masks.tabStops == false)) { 5606 throw IncorrectValueException(in.getPosition(), "_s.masks.tabStops == false"); 5607 } 5608 if (!(_s.masks.textDirection == false)) { 5609 throw IncorrectValueException(in.getPosition(), "_s.masks.textDirection == false"); 5610 } 5611 _s._has_bulletBlipRef = _s.masks.bulletBlip; 5612 if (_s._has_bulletBlipRef) { 5613 _s.bulletBlipRef = in.readuint16(); 5614 } 5615 _s._has_fBulletHasAutoNumber = _s.masks.bulletHasScheme; 5616 if (_s._has_fBulletHasAutoNumber) { 5617 _s.fBulletHasAutoNumber = in.readuint16(); 5618 if (!(((quint16)_s.fBulletHasAutoNumber) == 0 || ((quint16)_s.fBulletHasAutoNumber) == 1)) { 5619 throw IncorrectValueException(in.getPosition(), "((quint16)_s.fBulletHasAutoNumber) == 0 || ((quint16)_s.fBulletHasAutoNumber) == 1"); 5620 } 5621 } 5622 if (_s.masks.bulletScheme) { 5623 _s.bulletAutoNumberScheme = QSharedPointer<TextAutoNumberScheme>(new TextAutoNumberScheme(&_s)); 5624 parseTextAutoNumberScheme(in, *_s.bulletAutoNumberScheme.data()); 5625 } 5626 } 5627 void MSO::parseTextCFException9(LEInputStream& in, TextCFException9& _s) { 5628 _s.streamOffset = in.getPosition(); 5629 parseCFMasks(in, _s.masks); 5630 if (!(_s.masks.bold == false)) { 5631 throw IncorrectValueException(in.getPosition(), "_s.masks.bold == false"); 5632 } 5633 if (!(_s.masks.italic == false)) { 5634 throw IncorrectValueException(in.getPosition(), "_s.masks.italic == false"); 5635 } 5636 if (!(_s.masks.underline == false)) { 5637 throw IncorrectValueException(in.getPosition(), "_s.masks.underline == false"); 5638 } 5639 if (!(_s.masks.shadow == false)) { 5640 throw IncorrectValueException(in.getPosition(), "_s.masks.shadow == false"); 5641 } 5642 if (!(_s.masks.fehint == false)) { 5643 throw IncorrectValueException(in.getPosition(), "_s.masks.fehint == false"); 5644 } 5645 if (!(_s.masks.kumi == false)) { 5646 throw IncorrectValueException(in.getPosition(), "_s.masks.kumi == false"); 5647 } 5648 if (!(_s.masks.emboss == false)) { 5649 throw IncorrectValueException(in.getPosition(), "_s.masks.emboss == false"); 5650 } 5651 if (!(_s.masks.reserved == 0)) { 5652 throw IncorrectValueException(in.getPosition(), "_s.masks.reserved == 0"); 5653 } 5654 if (!(_s.masks.typeface == false)) { 5655 throw IncorrectValueException(in.getPosition(), "_s.masks.typeface == false"); 5656 } 5657 if (!(_s.masks.size == false)) { 5658 throw IncorrectValueException(in.getPosition(), "_s.masks.size == false"); 5659 } 5660 if (!(_s.masks.color == false)) { 5661 throw IncorrectValueException(in.getPosition(), "_s.masks.color == false"); 5662 } 5663 if (!(_s.masks.position == false)) { 5664 throw IncorrectValueException(in.getPosition(), "_s.masks.position == false"); 5665 } 5666 if (!(_s.masks.oldEATypeface == false)) { 5667 throw IncorrectValueException(in.getPosition(), "_s.masks.oldEATypeface == false"); 5668 } 5669 if (!(_s.masks.ansiTypeface == false)) { 5670 throw IncorrectValueException(in.getPosition(), "_s.masks.ansiTypeface == false"); 5671 } 5672 if (!(_s.masks.symbolTypeface == false)) { 5673 throw IncorrectValueException(in.getPosition(), "_s.masks.symbolTypeface == false"); 5674 } 5675 if (!(_s.masks.newEATypeface == false)) { 5676 throw IncorrectValueException(in.getPosition(), "_s.masks.newEATypeface == false"); 5677 } 5678 if (!(_s.masks.csTypeface == false)) { 5679 throw IncorrectValueException(in.getPosition(), "_s.masks.csTypeface == false"); 5680 } 5681 if (!(_s.masks.pp11ext == false)) { 5682 throw IncorrectValueException(in.getPosition(), "_s.masks.pp11ext == false"); 5683 } 5684 _s._has_pp10runid = _s.masks.pp10ext; 5685 if (_s._has_pp10runid) { 5686 _s.pp10runid = in.readuint4(); 5687 } 5688 _s._has_unuseda = _s.masks.pp10ext; 5689 if (_s._has_unuseda) { 5690 _s.unuseda = in.readuint20(); 5691 } 5692 _s._has_unusedb = _s.masks.pp10ext; 5693 if (_s._has_unusedb) { 5694 _s.unusedb = in.readuint8(); 5695 } 5696 } 5697 void MSO::parseTextDefaults9Atom(LEInputStream& in, TextDefaults9Atom& _s) { 5698 _s.streamOffset = in.getPosition(); 5699 parseRecordHeader(in, _s.rh); 5700 if (!(_s.rh.recVer == 0x0)) { 5701 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 5702 } 5703 if (!(_s.rh.recInstance == 0x00)) { 5704 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x00"); 5705 } 5706 if (!(_s.rh.recType == 0x0FB0)) { 5707 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FB0"); 5708 } 5709 parseTextCFException9(in, _s.cf9); 5710 parseTextPFException9(in, _s.pf9); 5711 } 5712 void MSO::parseKinsoku9Container(LEInputStream& in, Kinsoku9Container& _s) { 5713 _s.streamOffset = in.getPosition(); 5714 LEInputStream::Mark _m; 5715 bool _possiblyPresent; 5716 parseRecordHeader(in, _s.rh); 5717 if (!(_s.rh.recVer == 0xF)) { 5718 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 5719 } 5720 if (!(_s.rh.recInstance == 0x2)) { 5721 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x2"); 5722 } 5723 if (!(_s.rh.recType == 0x0FC8)) { 5724 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FC8"); 5725 } 5726 parseKinsoku9Atom(in, _s.kinsoku9Atom); 5727 _m = in.setMark(); 5728 try { 5729 RecordHeader _optionCheck(&_s); 5730 parseRecordHeader(in, _optionCheck); 5731 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 5732 } catch(EOFException _e) { 5733 _possiblyPresent = false; 5734 } 5735 in.rewind(_m); 5736 _m = in.setMark(); 5737 if (_possiblyPresent) { 5738 try { 5739 _s.kinsokuLeadingAtom = QSharedPointer<KinsokuLeadingAtom>(new KinsokuLeadingAtom(&_s)); 5740 parseKinsokuLeadingAtom(in, *_s.kinsokuLeadingAtom.data()); 5741 } catch(IncorrectValueException _e) { 5742 _s.kinsokuLeadingAtom.clear(); 5743 in.rewind(_m); 5744 } catch(EOFException _e) { 5745 _s.kinsokuLeadingAtom.clear(); 5746 in.rewind(_m); 5747 } 5748 } 5749 _m = in.setMark(); 5750 try { 5751 RecordHeader _optionCheck(&_s); 5752 parseRecordHeader(in, _optionCheck); 5753 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 1 )&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 5754 } catch(EOFException _e) { 5755 _possiblyPresent = false; 5756 } 5757 in.rewind(_m); 5758 _m = in.setMark(); 5759 if (_possiblyPresent) { 5760 try { 5761 _s.kinsokuFollowingAtom = QSharedPointer<KinsokuFollowingAtom>(new KinsokuFollowingAtom(&_s)); 5762 parseKinsokuFollowingAtom(in, *_s.kinsokuFollowingAtom.data()); 5763 } catch(IncorrectValueException _e) { 5764 _s.kinsokuFollowingAtom.clear(); 5765 in.rewind(_m); 5766 } catch(EOFException _e) { 5767 _s.kinsokuFollowingAtom.clear(); 5768 in.rewind(_m); 5769 } 5770 } 5771 } 5772 void MSO::parseOutlineTextProps9Entry(LEInputStream& in, OutlineTextProps9Entry& _s) { 5773 _s.streamOffset = in.getPosition(); 5774 parseOutlineTextPropsHeaderExAtom(in, _s.outlineTextHeaderAtom); 5775 parseStyleTextProp9Atom(in, _s.styleTextProp9Atom); 5776 } 5777 void MSO::parseTextCFException10(LEInputStream& in, TextCFException10& _s) { 5778 _s.streamOffset = in.getPosition(); 5779 parseCFMasks(in, _s.masks); 5780 if (!(_s.masks.bold == false)) { 5781 throw IncorrectValueException(in.getPosition(), "_s.masks.bold == false"); 5782 } 5783 if (!(_s.masks.italic == false)) { 5784 throw IncorrectValueException(in.getPosition(), "_s.masks.italic == false"); 5785 } 5786 if (!(_s.masks.underline == false)) { 5787 throw IncorrectValueException(in.getPosition(), "_s.masks.underline == false"); 5788 } 5789 if (!(_s.masks.shadow == false)) { 5790 throw IncorrectValueException(in.getPosition(), "_s.masks.shadow == false"); 5791 } 5792 if (!(_s.masks.fehint == false)) { 5793 throw IncorrectValueException(in.getPosition(), "_s.masks.fehint == false"); 5794 } 5795 if (!(_s.masks.kumi == false)) { 5796 throw IncorrectValueException(in.getPosition(), "_s.masks.kumi == false"); 5797 } 5798 if (!(_s.masks.emboss == false)) { 5799 throw IncorrectValueException(in.getPosition(), "_s.masks.emboss == false"); 5800 } 5801 if (!(_s.masks.reserved == 0)) { 5802 throw IncorrectValueException(in.getPosition(), "_s.masks.reserved == 0"); 5803 } 5804 if (!(_s.masks.typeface == false)) { 5805 throw IncorrectValueException(in.getPosition(), "_s.masks.typeface == false"); 5806 } 5807 if (!(_s.masks.size == false)) { 5808 throw IncorrectValueException(in.getPosition(), "_s.masks.size == false"); 5809 } 5810 if (!(_s.masks.color == false)) { 5811 throw IncorrectValueException(in.getPosition(), "_s.masks.color == false"); 5812 } 5813 if (!(_s.masks.position == false)) { 5814 throw IncorrectValueException(in.getPosition(), "_s.masks.position == false"); 5815 } 5816 if (!(_s.masks.pp10ext == false)) { 5817 throw IncorrectValueException(in.getPosition(), "_s.masks.pp10ext == false"); 5818 } 5819 if (!(_s.masks.oldEATypeface == false)) { 5820 throw IncorrectValueException(in.getPosition(), "_s.masks.oldEATypeface == false"); 5821 } 5822 if (!(_s.masks.ansiTypeface == false)) { 5823 throw IncorrectValueException(in.getPosition(), "_s.masks.ansiTypeface == false"); 5824 } 5825 if (!(_s.masks.symbolTypeface == false)) { 5826 throw IncorrectValueException(in.getPosition(), "_s.masks.symbolTypeface == false"); 5827 } 5828 _s._has_newEAFontRef = _s.masks.newEATypeface; 5829 if (_s._has_newEAFontRef) { 5830 _s.newEAFontRef = in.readuint16(); 5831 } 5832 _s._has_csFontRef = _s.masks.csTypeface; 5833 if (_s._has_csFontRef) { 5834 _s.csFontRef = in.readuint16(); 5835 } 5836 _s._has_pp11ext = _s.masks.pp11ext; 5837 if (_s._has_pp11ext) { 5838 _s.pp11ext = in.readuint32(); 5839 } 5840 } 5841 void MSO::parseTextDefaults10Atom(LEInputStream& in, TextDefaults10Atom& _s) { 5842 _s.streamOffset = in.getPosition(); 5843 parseRecordHeader(in, _s.rh); 5844 if (!(_s.rh.recVer == 0x0)) { 5845 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 5846 } 5847 if (!(_s.rh.recInstance == 0x0)) { 5848 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 5849 } 5850 if (!(_s.rh.recType == 0x0FB4)) { 5851 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FB4"); 5852 } 5853 parseTextCFException10(in, _s.cf10); 5854 } 5855 void MSO::parseCommentIndex10Container(LEInputStream& in, CommentIndex10Container& _s) { 5856 _s.streamOffset = in.getPosition(); 5857 LEInputStream::Mark _m; 5858 bool _possiblyPresent; 5859 parseRecordHeader(in, _s.rh); 5860 if (!(_s.rh.recVer == 0xF)) { 5861 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 5862 } 5863 if (!(_s.rh.recInstance == 0x0)) { 5864 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 5865 } 5866 if (!(_s.rh.recType == 0x2EE4)) { 5867 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EE4"); 5868 } 5869 _m = in.setMark(); 5870 try { 5871 RecordHeader _optionCheck(&_s); 5872 parseRecordHeader(in, _optionCheck); 5873 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen<=104)&&(_optionCheck.recLen%2==0); 5874 } catch(EOFException _e) { 5875 _possiblyPresent = false; 5876 } 5877 in.rewind(_m); 5878 _m = in.setMark(); 5879 if (_possiblyPresent) { 5880 try { 5881 _s.authorNameAtom = QSharedPointer<AuthorNameAtom>(new AuthorNameAtom(&_s)); 5882 parseAuthorNameAtom(in, *_s.authorNameAtom.data()); 5883 } catch(IncorrectValueException _e) { 5884 _s.authorNameAtom.clear(); 5885 in.rewind(_m); 5886 } catch(EOFException _e) { 5887 _s.authorNameAtom.clear(); 5888 in.rewind(_m); 5889 } 5890 } 5891 _m = in.setMark(); 5892 try { 5893 RecordHeader _optionCheck(&_s); 5894 parseRecordHeader(in, _optionCheck); 5895 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x2EE5)&&(_optionCheck.recLen == 0x08); 5896 } catch(EOFException _e) { 5897 _possiblyPresent = false; 5898 } 5899 in.rewind(_m); 5900 _m = in.setMark(); 5901 if (_possiblyPresent) { 5902 try { 5903 _s.authorIndexAtom = QSharedPointer<CommentIndex10Atom>(new CommentIndex10Atom(&_s)); 5904 parseCommentIndex10Atom(in, *_s.authorIndexAtom.data()); 5905 } catch(IncorrectValueException _e) { 5906 _s.authorIndexAtom.clear(); 5907 in.rewind(_m); 5908 } catch(EOFException _e) { 5909 _s.authorIndexAtom.clear(); 5910 in.rewind(_m); 5911 } 5912 } 5913 } 5914 void MSO::parseOutlineTextProps10Entry(LEInputStream& in, OutlineTextProps10Entry& _s) { 5915 _s.streamOffset = in.getPosition(); 5916 parseOutlineTextPropsHeaderExAtom(in, _s.outlineTextHeaderAtom); 5917 parseStyleTextProp10Atom(in, _s.styleTextProp10Atom); 5918 } 5919 void MSO::parsePP11DocBinaryTagExtension(LEInputStream& in, PP11DocBinaryTagExtension& _s) { 5920 _s.streamOffset = in.getPosition(); 5921 int _c; 5922 LEInputStream::Mark _m; 5923 parseRecordHeader(in, _s.rh); 5924 if (!(_s.rh.recVer == 0x0)) { 5925 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 5926 } 5927 if (!(_s.rh.recInstance == 0)) { 5928 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 5929 } 5930 if (!(_s.rh.recType == 0x0FBA)) { 5931 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA"); 5932 } 5933 if (!(_s.rh.recLen == 0x10)) { 5934 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10"); 5935 } 5936 _c = 16; 5937 _s.tagName.resize(_c); 5938 in.readBytes(_s.tagName); 5939 parseRecordHeader(in, _s.rhData); 5940 if (!(_s.rhData.recVer == 0x0)) { 5941 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0x0"); 5942 } 5943 if (!(_s.rhData.recInstance == 0)) { 5944 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0"); 5945 } 5946 if (!(_s.rhData.recType == 0x138B)) { 5947 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B"); 5948 } 5949 parseSmartTagStore11Container(in, _s.smartTagStore11); 5950 parseOutlineTextProps11Container(in, _s.outlineTextProps); 5951 } 5952 void MSO::parseUnknownBinaryTag(LEInputStream& in, UnknownBinaryTag& _s) { 5953 _s.streamOffset = in.getPosition(); 5954 parseTagNameAtom(in, _s.tagNameAtom); 5955 parseBinaryTagDataBlob(in, _s.tagData); 5956 } 5957 void MSO::parseNoZoomViewInfoAtom(LEInputStream& in, NoZoomViewInfoAtom& _s) { 5958 _s.streamOffset = in.getPosition(); 5959 int _c; 5960 LEInputStream::Mark _m; 5961 parseRecordHeader(in, _s.rh); 5962 if (!(_s.rh.recVer == 0)) { 5963 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 5964 } 5965 if (!(_s.rh.recInstance == 0)) { 5966 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 5967 } 5968 if (!(_s.rh.recType == 0x3FD)) { 5969 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FD"); 5970 } 5971 if (!(_s.rh.recLen == 0x34)) { 5972 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x34"); 5973 } 5974 parseScalingStruct(in, _s.curScale); 5975 _c = 24; 5976 _s.unused1.resize(_c); 5977 in.readBytes(_s.unused1); 5978 parsePointStruct(in, _s.origin); 5979 _s.unused2 = in.readuint8(); 5980 _s.fDraftMode = in.readuint8(); 5981 _s.unused3 = in.readuint16(); 5982 } 5983 void MSO::parseVBAInfoContainer(LEInputStream& in, VBAInfoContainer& _s) { 5984 _s.streamOffset = in.getPosition(); 5985 parseRecordHeader(in, _s.rh); 5986 if (!(_s.rh.recVer == 0xF)) { 5987 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 5988 } 5989 if (!(_s.rh.recInstance == 1)) { 5990 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1"); 5991 } 5992 if (!(_s.rh.recType == 0x3FF)) { 5993 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FF"); 5994 } 5995 if (!(_s.rh.recLen == 0x14)) { 5996 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x14"); 5997 } 5998 parseVBAInfoAtom(in, _s.vbaInfoAtom); 5999 } 6000 void MSO::parseNormalViewSetInfoAtom(LEInputStream& in, NormalViewSetInfoAtom& _s) { 6001 _s.streamOffset = in.getPosition(); 6002 parseRecordHeader(in, _s.rh); 6003 if (!(_s.rh.recVer == 0)) { 6004 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 6005 } 6006 if (!(_s.rh.recInstance == 0)) { 6007 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6008 } 6009 if (!(_s.rh.recType == 0x415)) { 6010 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x415"); 6011 } 6012 if (!(_s.rh.recLen == 0x14)) { 6013 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x14"); 6014 } 6015 parseRatioStruct(in, _s.leftPortion); 6016 parseRatioStruct(in, _s.topPortion); 6017 _s.vertBarState = in.readuint8(); 6018 _s.horizBarState = in.readuint8(); 6019 _s.fPreferSingleSet = in.readuint8(); 6020 if (!(((quint8)_s.fPreferSingleSet) == 0 || ((quint8)_s.fPreferSingleSet) == 1)) { 6021 throw IncorrectValueException(in.getPosition(), "((quint8)_s.fPreferSingleSet) == 0 || ((quint8)_s.fPreferSingleSet) == 1"); 6022 } 6023 _s.fHideThumbnails = in.readbit(); 6024 _s.fBarSnapped = in.readbit(); 6025 _s.reserved = in.readuint6(); 6026 if (!(((quint8)_s.reserved) == 0)) { 6027 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved) == 0"); 6028 } 6029 } 6030 void MSO::parseTextContainerMeta(LEInputStream& in, TextContainerMeta& _s) { 6031 _s.streamOffset = in.getPosition(); 6032 LEInputStream::Mark _m; 6033 _m = in.setMark(); 6034 RecordHeader _choice(&_s); 6035 parseRecordHeader(in, _choice); 6036 in.rewind(_m); 6037 qint64 startPos = in.getPosition(); 6038 if (startPos == in.getPosition() && ((_choice.recType == 0xFD8)&&(_choice.recLen == 4))) { 6039 _s.meta = TextContainerMeta::choice242357012(new SlideNumberMCAtom(&_s)); 6040 parseSlideNumberMCAtom(in, *(SlideNumberMCAtom*)_s.meta.data()); 6041 } 6042 if (startPos == in.getPosition() && ((_choice.recType == 0xFF7)&&(_choice.recLen == 8))) { 6043 _s.meta = TextContainerMeta::choice242357012(new DateTimeMCAtom(&_s)); 6044 parseDateTimeMCAtom(in, *(DateTimeMCAtom*)_s.meta.data()); 6045 } 6046 if (startPos == in.getPosition() && ((_choice.recType == 0xFF8)&&(_choice.recLen == 4))) { 6047 _s.meta = TextContainerMeta::choice242357012(new GenericDateMCAtom(&_s)); 6048 parseGenericDateMCAtom(in, *(GenericDateMCAtom*)_s.meta.data()); 6049 } 6050 if (startPos == in.getPosition() && ((_choice.recType == 0xFF9)&&(_choice.recLen == 4))) { 6051 _s.meta = TextContainerMeta::choice242357012(new HeaderMCAtom(&_s)); 6052 parseHeaderMCAtom(in, *(HeaderMCAtom*)_s.meta.data()); 6053 } 6054 if (startPos == in.getPosition() && ((_choice.recType == 0xFFA)&&(_choice.recLen == 4))) { 6055 _s.meta = TextContainerMeta::choice242357012(new FooterMCAtom(&_s)); 6056 parseFooterMCAtom(in, *(FooterMCAtom*)_s.meta.data()); 6057 } 6058 if (startPos == in.getPosition()) { 6059 _s.meta = TextContainerMeta::choice242357012(new RTFDateTimeMCAtom(&_s)); 6060 parseRTFDateTimeMCAtom(in, *(RTFDateTimeMCAtom*)_s.meta.data()); 6061 } 6062 } 6063 void MSO::parseSlidePersistAtom(LEInputStream& in, SlidePersistAtom& _s) { 6064 _s.streamOffset = in.getPosition(); 6065 parseRecordHeader(in, _s.rh); 6066 if (!(_s.rh.recVer == 0)) { 6067 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 6068 } 6069 if (!(_s.rh.recInstance == 0)) { 6070 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6071 } 6072 if (!(_s.rh.recType == 0x3F3)) { 6073 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3F3"); 6074 } 6075 if (!(_s.rh.recLen == 0x14)) { 6076 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x14"); 6077 } 6078 _s.persistIdRef = in.readuint32(); 6079 _s.reserved1 = in.readbit(); 6080 if (!(((bool)_s.reserved1) == false)) { 6081 throw IncorrectValueException(in.getPosition(), "((bool)_s.reserved1) == false"); 6082 } 6083 _s.fShouldCollapse = in.readbit(); 6084 _s.fNonOutlineData = in.readbit(); 6085 _s.reserved2 = in.readuint5(); 6086 if (!(((quint8)_s.reserved2) == 0)) { 6087 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved2) == 0"); 6088 } 6089 _s.reserved3 = in.readuint8(); 6090 if (!(((quint8)_s.reserved3) == 0)) { 6091 throw IncorrectValueException(in.getPosition(), "((quint8)_s.reserved3) == 0"); 6092 } 6093 _s.reserved4 = in.readuint16(); 6094 if (!(((quint16)_s.reserved4) == 0)) { 6095 throw IncorrectValueException(in.getPosition(), "((quint16)_s.reserved4) == 0"); 6096 } 6097 _s.cTexts = in.readint32(); 6098 if (!(((qint32)_s.cTexts)>=0)) { 6099 throw IncorrectValueException(in.getPosition(), "((qint32)_s.cTexts)>=0"); 6100 } 6101 if (!(((qint32)_s.cTexts)<=8)) { 6102 throw IncorrectValueException(in.getPosition(), "((qint32)_s.cTexts)<=8"); 6103 } 6104 parseSlideId(in, _s.slideId); 6105 _s.reserved5 = in.readuint32(); 6106 if (!(((quint32)_s.reserved5) == 0)) { 6107 throw IncorrectValueException(in.getPosition(), "((quint32)_s.reserved5) == 0"); 6108 } 6109 } 6110 void MSO::parseTextRuler(LEInputStream& in, TextRuler& _s) { 6111 _s.streamOffset = in.getPosition(); 6112 _s.fDefaultTabSize = in.readbit(); 6113 _s.fCLevels = in.readbit(); 6114 _s.fTabStops = in.readbit(); 6115 _s.fLeftMargin1 = in.readbit(); 6116 _s.fLeftMargin2 = in.readbit(); 6117 _s.fLeftMargin3 = in.readbit(); 6118 _s.fLeftMargin4 = in.readbit(); 6119 _s.fLeftMargin5 = in.readbit(); 6120 _s.fIndent1 = in.readbit(); 6121 _s.fIndent2 = in.readbit(); 6122 _s.fIndent3 = in.readbit(); 6123 _s.fIndent4 = in.readbit(); 6124 _s.fIndent5 = in.readbit(); 6125 _s.reserved1 = in.readuint3(); 6126 _s.reserved2 = in.readuint16(); 6127 _s._has_cLevels = _s.fCLevels; 6128 if (_s._has_cLevels) { 6129 _s.cLevels = in.readint16(); 6130 } 6131 _s._has_defaultTabSize = _s.fDefaultTabSize; 6132 if (_s._has_defaultTabSize) { 6133 _s.defaultTabSize = in.readuint16(); 6134 } 6135 if (_s.fTabStops) { 6136 _s.tabs = QSharedPointer<TabStops>(new TabStops(&_s)); 6137 parseTabStops(in, *_s.tabs.data()); 6138 } 6139 _s._has_leftMargin1 = _s.fLeftMargin1; 6140 if (_s._has_leftMargin1) { 6141 _s.leftMargin1 = in.readuint16(); 6142 } 6143 _s._has_indent1 = _s.fIndent1; 6144 if (_s._has_indent1) { 6145 _s.indent1 = in.readuint16(); 6146 } 6147 _s._has_leftMargin2 = _s.fLeftMargin2; 6148 if (_s._has_leftMargin2) { 6149 _s.leftMargin2 = in.readuint16(); 6150 } 6151 _s._has_indent2 = _s.fIndent2; 6152 if (_s._has_indent2) { 6153 _s.indent2 = in.readuint16(); 6154 } 6155 _s._has_leftMargin3 = _s.fLeftMargin3; 6156 if (_s._has_leftMargin3) { 6157 _s.leftMargin3 = in.readuint16(); 6158 } 6159 _s._has_indent3 = _s.fIndent3; 6160 if (_s._has_indent3) { 6161 _s.indent3 = in.readuint16(); 6162 } 6163 _s._has_leftMargin4 = _s.fLeftMargin4; 6164 if (_s._has_leftMargin4) { 6165 _s.leftMargin4 = in.readuint16(); 6166 } 6167 _s._has_indent4 = _s.fIndent4; 6168 if (_s._has_indent4) { 6169 _s.indent4 = in.readuint16(); 6170 } 6171 _s._has_leftMargin5 = _s.fLeftMargin5; 6172 if (_s._has_leftMargin5) { 6173 _s.leftMargin5 = in.readuint16(); 6174 } 6175 _s._has_indent5 = _s.fIndent5; 6176 if (_s._has_indent5) { 6177 _s.indent5 = in.readuint16(); 6178 } 6179 } 6180 void MSO::parseTextPFException(LEInputStream& in, TextPFException& _s) { 6181 _s.streamOffset = in.getPosition(); 6182 parsePFMasks(in, _s.masks); 6183 if (!(_s.masks.bulletBlip == false)) { 6184 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletBlip == false"); 6185 } 6186 if (!(_s.masks.bulletHasScheme == false)) { 6187 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletHasScheme == false"); 6188 } 6189 if (!(_s.masks.bulletScheme == false)) { 6190 throw IncorrectValueException(in.getPosition(), "_s.masks.bulletScheme == false"); 6191 } 6192 if (_s.masks.hasBullet||_s.masks.bulletHasFont||_s.masks.bulletHasColor||_s.masks.bulletHasSize) { 6193 _s.bulletFlags = QSharedPointer<BulletFlags>(new BulletFlags(&_s)); 6194 parseBulletFlags(in, *_s.bulletFlags.data()); 6195 } 6196 _s._has_bulletChar = _s.masks.bulletChar; 6197 if (_s._has_bulletChar) { 6198 _s.bulletChar = in.readint16(); 6199 } 6200 _s._has_bulletFontRef = _s.masks.bulletFont; 6201 if (_s._has_bulletFontRef) { 6202 _s.bulletFontRef = in.readuint16(); 6203 } 6204 _s._has_bulletSize = _s.masks.bulletSize; 6205 if (_s._has_bulletSize) { 6206 _s.bulletSize = in.readint16(); 6207 } 6208 if (_s.masks.bulletColor) { 6209 _s.bulletColor = QSharedPointer<ColorIndexStruct>(new ColorIndexStruct(&_s)); 6210 parseColorIndexStruct(in, *_s.bulletColor.data()); 6211 } 6212 _s._has_textAlignment = _s.masks.align; 6213 if (_s._has_textAlignment) { 6214 _s.textAlignment = in.readuint16(); 6215 } 6216 _s._has_lineSpacing = _s.masks.lineSpacing; 6217 if (_s._has_lineSpacing) { 6218 _s.lineSpacing = in.readint16(); 6219 } 6220 _s._has_spaceBefore = _s.masks.spaceBefore; 6221 if (_s._has_spaceBefore) { 6222 _s.spaceBefore = in.readint16(); 6223 } 6224 _s._has_spaceAfter = _s.masks.spaceAfter; 6225 if (_s._has_spaceAfter) { 6226 _s.spaceAfter = in.readint16(); 6227 } 6228 _s._has_leftMargin = _s.masks.leftMargin; 6229 if (_s._has_leftMargin) { 6230 _s.leftMargin = in.readuint16(); 6231 } 6232 _s._has_indent = _s.masks.indent; 6233 if (_s._has_indent) { 6234 _s.indent = in.readuint16(); 6235 } 6236 _s._has_defaultTabSize = _s.masks.defaultTabSize; 6237 if (_s._has_defaultTabSize) { 6238 _s.defaultTabSize = in.readuint16(); 6239 } 6240 if (_s.masks.tabStops) { 6241 _s.tabStops = QSharedPointer<TabStops>(new TabStops(&_s)); 6242 parseTabStops(in, *_s.tabStops.data()); 6243 } 6244 _s._has_fontAlign = _s.masks.fontAlign; 6245 if (_s._has_fontAlign) { 6246 _s.fontAlign = in.readuint16(); 6247 } 6248 if (_s.masks.charWrap||_s.masks.wordWrap||_s.masks.overflow) { 6249 _s.wrapFlags = QSharedPointer<PFWrapFlags>(new PFWrapFlags(&_s)); 6250 parsePFWrapFlags(in, *_s.wrapFlags.data()); 6251 } 6252 _s._has_textDirection = _s.masks.textDirection; 6253 if (_s._has_textDirection) { 6254 _s.textDirection = in.readuint16(); 6255 } 6256 } 6257 void MSO::parseTextCFException(LEInputStream& in, TextCFException& _s) { 6258 _s.streamOffset = in.getPosition(); 6259 parseCFMasks(in, _s.masks); 6260 if (!(_s.masks.pp10ext == false)) { 6261 throw IncorrectValueException(in.getPosition(), "_s.masks.pp10ext == false"); 6262 } 6263 if (!(_s.masks.newEATypeface == false)) { 6264 throw IncorrectValueException(in.getPosition(), "_s.masks.newEATypeface == false"); 6265 } 6266 if (!(_s.masks.csTypeface == false)) { 6267 throw IncorrectValueException(in.getPosition(), "_s.masks.csTypeface == false"); 6268 } 6269 if (!(_s.masks.pp11ext == false)) { 6270 throw IncorrectValueException(in.getPosition(), "_s.masks.pp11ext == false"); 6271 } 6272 if (_s.masks.bold || _s.masks.italic || _s.masks.underline || _s.masks.shadow || _s.masks.fehint || _s.masks.kumi || _s.masks.emboss || _s.masks.fHasStyle != 0) { 6273 _s.fontStyle = QSharedPointer<CFStyle>(new CFStyle(&_s)); 6274 parseCFStyle(in, *_s.fontStyle.data()); 6275 } 6276 _s._has_fontRef = _s.masks.typeface; 6277 if (_s._has_fontRef) { 6278 _s.fontRef = in.readuint16(); 6279 } 6280 _s._has_oldEAFontRef = _s.masks.oldEATypeface; 6281 if (_s._has_oldEAFontRef) { 6282 _s.oldEAFontRef = in.readuint16(); 6283 } 6284 _s._has_ansiFontRef = _s.masks.ansiTypeface; 6285 if (_s._has_ansiFontRef) { 6286 _s.ansiFontRef = in.readuint16(); 6287 } 6288 _s._has_symbolFontRef = _s.masks.symbolTypeface; 6289 if (_s._has_symbolFontRef) { 6290 _s.symbolFontRef = in.readuint16(); 6291 } 6292 _s._has_fontSize = _s.masks.size; 6293 if (_s._has_fontSize) { 6294 _s.fontSize = in.readuint16(); 6295 if (!(((quint16)_s.fontSize)>=1)) { 6296 throw IncorrectValueException(in.getPosition(), "((quint16)_s.fontSize)>=1"); 6297 } 6298 if (!(((quint16)_s.fontSize)<=4000)) { 6299 throw IncorrectValueException(in.getPosition(), "((quint16)_s.fontSize)<=4000"); 6300 } 6301 } 6302 if (_s.masks.color) { 6303 _s.color = QSharedPointer<ColorIndexStruct>(new ColorIndexStruct(&_s)); 6304 parseColorIndexStruct(in, *_s.color.data()); 6305 } 6306 _s._has_position = _s.masks.position; 6307 if (_s._has_position) { 6308 _s.position = in.readint16(); 6309 if (!(((qint16)_s.position)>=-100)) { 6310 throw IncorrectValueException(in.getPosition(), "((qint16)_s.position)>=-100"); 6311 } 6312 if (!(((qint16)_s.position)<=100)) { 6313 throw IncorrectValueException(in.getPosition(), "((qint16)_s.position)<=100"); 6314 } 6315 } 6316 } 6317 void MSO::parseFontCollectionEntry(LEInputStream& in, FontCollectionEntry& _s) { 6318 _s.streamOffset = in.getPosition(); 6319 LEInputStream::Mark _m; 6320 bool _possiblyPresent; 6321 parseFontEntityAtom(in, _s.fontEntityAtom); 6322 _m = in.setMark(); 6323 try { 6324 RecordHeader _optionCheck(&_s); 6325 parseRecordHeader(in, _optionCheck); 6326 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance<=3)&&(_optionCheck.recType == 0xFB8); 6327 } catch(EOFException _e) { 6328 _possiblyPresent = false; 6329 } 6330 in.rewind(_m); 6331 _m = in.setMark(); 6332 if (_possiblyPresent) { 6333 try { 6334 _s.fontEmbedData1 = QSharedPointer<FontEmbedDataBlob>(new FontEmbedDataBlob(&_s)); 6335 parseFontEmbedDataBlob(in, *_s.fontEmbedData1.data()); 6336 } catch(IncorrectValueException _e) { 6337 _s.fontEmbedData1.clear(); 6338 in.rewind(_m); 6339 } catch(EOFException _e) { 6340 _s.fontEmbedData1.clear(); 6341 in.rewind(_m); 6342 } 6343 } 6344 _m = in.setMark(); 6345 try { 6346 RecordHeader _optionCheck(&_s); 6347 parseRecordHeader(in, _optionCheck); 6348 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance<=3)&&(_optionCheck.recType == 0xFB8); 6349 } catch(EOFException _e) { 6350 _possiblyPresent = false; 6351 } 6352 in.rewind(_m); 6353 _m = in.setMark(); 6354 if (_possiblyPresent) { 6355 try { 6356 _s.fontEmbedData2 = QSharedPointer<FontEmbedDataBlob>(new FontEmbedDataBlob(&_s)); 6357 parseFontEmbedDataBlob(in, *_s.fontEmbedData2.data()); 6358 } catch(IncorrectValueException _e) { 6359 _s.fontEmbedData2.clear(); 6360 in.rewind(_m); 6361 } catch(EOFException _e) { 6362 _s.fontEmbedData2.clear(); 6363 in.rewind(_m); 6364 } 6365 } 6366 _m = in.setMark(); 6367 try { 6368 RecordHeader _optionCheck(&_s); 6369 parseRecordHeader(in, _optionCheck); 6370 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance<=3)&&(_optionCheck.recType == 0xFB8); 6371 } catch(EOFException _e) { 6372 _possiblyPresent = false; 6373 } 6374 in.rewind(_m); 6375 _m = in.setMark(); 6376 if (_possiblyPresent) { 6377 try { 6378 _s.fontEmbedData3 = QSharedPointer<FontEmbedDataBlob>(new FontEmbedDataBlob(&_s)); 6379 parseFontEmbedDataBlob(in, *_s.fontEmbedData3.data()); 6380 } catch(IncorrectValueException _e) { 6381 _s.fontEmbedData3.clear(); 6382 in.rewind(_m); 6383 } catch(EOFException _e) { 6384 _s.fontEmbedData3.clear(); 6385 in.rewind(_m); 6386 } 6387 } 6388 _m = in.setMark(); 6389 try { 6390 RecordHeader _optionCheck(&_s); 6391 parseRecordHeader(in, _optionCheck); 6392 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance<=3)&&(_optionCheck.recType == 0xFB8); 6393 } catch(EOFException _e) { 6394 _possiblyPresent = false; 6395 } 6396 in.rewind(_m); 6397 _m = in.setMark(); 6398 if (_possiblyPresent) { 6399 try { 6400 _s.fontEmbedData4 = QSharedPointer<FontEmbedDataBlob>(new FontEmbedDataBlob(&_s)); 6401 parseFontEmbedDataBlob(in, *_s.fontEmbedData4.data()); 6402 } catch(IncorrectValueException _e) { 6403 _s.fontEmbedData4.clear(); 6404 in.rewind(_m); 6405 } catch(EOFException _e) { 6406 _s.fontEmbedData4.clear(); 6407 in.rewind(_m); 6408 } 6409 } 6410 } 6411 void MSO::parseKinsokuContainer(LEInputStream& in, KinsokuContainer& _s) { 6412 _s.streamOffset = in.getPosition(); 6413 parseRecordHeader(in, _s.rh); 6414 if (!(_s.rh.recVer == 0xF)) { 6415 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6416 } 6417 if (!(_s.rh.recInstance == 0x2)) { 6418 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x2"); 6419 } 6420 if (!(_s.rh.recType == 0x0FC8)) { 6421 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FC8"); 6422 } 6423 parseKinsokuAtom(in, _s.kinsokuAtom); 6424 if (_s.kinsokuAtom.level==2) { 6425 _s.kinsokuLeadingAtom = QSharedPointer<KinsokuLeadingAtom>(new KinsokuLeadingAtom(&_s)); 6426 parseKinsokuLeadingAtom(in, *_s.kinsokuLeadingAtom.data()); 6427 } 6428 if (_s.kinsokuAtom.level==2) { 6429 _s.kinsokuFollowingAtom = QSharedPointer<KinsokuFollowingAtom>(new KinsokuFollowingAtom(&_s)); 6430 parseKinsokuFollowingAtom(in, *_s.kinsokuFollowingAtom.data()); 6431 } 6432 } 6433 void MSO::parseTextSIException(LEInputStream& in, TextSIException& _s) { 6434 _s.streamOffset = in.getPosition(); 6435 _s.spell = in.readbit(); 6436 _s.lang = in.readbit(); 6437 _s.altLang = in.readbit(); 6438 _s.unused1 = in.readbit(); 6439 _s.unused2 = in.readbit(); 6440 _s.fPp10ext = in.readbit(); 6441 _s.fBidi = in.readbit(); 6442 _s.unused3 = in.readbit(); 6443 _s.reserved1 = in.readbit(); 6444 _s.smartTag = in.readbit(); 6445 _s.reserved2a = in.readuint2(); 6446 _s.reserved2b = in.readuint20(); 6447 _s._has_spellInfo = _s.spell; 6448 if (_s._has_spellInfo) { 6449 _s.spellInfo = in.readuint16(); 6450 } 6451 _s._has_lid = _s.lang; 6452 if (_s._has_lid) { 6453 _s.lid = in.readuint16(); 6454 } 6455 _s._has_altLid = _s.altLang; 6456 if (_s._has_altLid) { 6457 _s.altLid = in.readuint16(); 6458 } 6459 _s._has_bidi = _s.fBidi; 6460 if (_s._has_bidi) { 6461 _s.bidi = in.readint16(); 6462 if (!(((qint16)_s.bidi) == 0 || ((qint16)_s.bidi) == 1)) { 6463 throw IncorrectValueException(in.getPosition(), "((qint16)_s.bidi) == 0 || ((qint16)_s.bidi) == 1"); 6464 } 6465 } 6466 _s._has_pp10runid = _s.fPp10ext; 6467 if (_s._has_pp10runid) { 6468 _s.pp10runid = in.readuint4(); 6469 } 6470 _s._has_reserved3a = _s.fPp10ext; 6471 if (_s._has_reserved3a) { 6472 _s.reserved3a = in.readuint4(); 6473 } 6474 _s._has_reserved3b = _s.fPp10ext; 6475 if (_s._has_reserved3b) { 6476 _s.reserved3b = in.readuint16(); 6477 } 6478 _s._has_reserved3bc = _s.fPp10ext; 6479 if (_s._has_reserved3bc) { 6480 _s.reserved3bc = in.readuint7(); 6481 } 6482 _s._has_grammarError = _s.fPp10ext; 6483 if (_s._has_grammarError) { 6484 _s.grammarError = in.readbit(); 6485 } 6486 if (_s.smartTag) { 6487 _s.smartTags = QSharedPointer<SmartTags>(new SmartTags(&_s)); 6488 parseSmartTags(in, *_s.smartTags.data()); 6489 } 6490 } 6491 void MSO::parseTextMasterStyleLevel(LEInputStream& in, TextMasterStyleLevel& _s) { 6492 _s.streamOffset = in.getPosition(); 6493 parseTextPFException(in, _s.pf); 6494 parseTextCFException(in, _s.cf); 6495 } 6496 void MSO::parseDocumentAtom(LEInputStream& in, DocumentAtom& _s) { 6497 _s.streamOffset = in.getPosition(); 6498 parseRecordHeader(in, _s.rh); 6499 if (!(_s.rh.recVer == 1)) { 6500 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 1"); 6501 } 6502 if (!(_s.rh.recInstance == 0x0)) { 6503 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 6504 } 6505 if (!(_s.rh.recType == 0x03E9)) { 6506 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03E9"); 6507 } 6508 if (!(_s.rh.recLen == 0x28)) { 6509 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x28"); 6510 } 6511 parsePointStruct(in, _s.slideSize); 6512 parsePointStruct(in, _s.notesSize); 6513 parseRatioStruct(in, _s.serverZoom); 6514 if (!(_s.serverZoom.numer*_s.serverZoom.denom > 0)) { 6515 throw IncorrectValueException(in.getPosition(), "_s.serverZoom.numer*_s.serverZoom.denom > 0"); 6516 } 6517 _s.notesMasterPersistIdRef = in.readuint32(); 6518 _s.handoutMasterPersistIdRef = in.readuint32(); 6519 _s.firstSlideNumber = in.readuint16(); 6520 if (!(((quint16)_s.firstSlideNumber)<10000)) { 6521 throw IncorrectValueException(in.getPosition(), "((quint16)_s.firstSlideNumber)<10000"); 6522 } 6523 _s.slideSizeType = in.readuint16(); 6524 if (!(((quint16)_s.slideSizeType) == 0 || ((quint16)_s.slideSizeType) == 1 || ((quint16)_s.slideSizeType) == 2 || ((quint16)_s.slideSizeType) == 3 || ((quint16)_s.slideSizeType) == 4 || ((quint16)_s.slideSizeType) == 5 || ((quint16)_s.slideSizeType) == 6)) { 6525 throw IncorrectValueException(in.getPosition(), "((quint16)_s.slideSizeType) == 0 || ((quint16)_s.slideSizeType) == 1 || ((quint16)_s.slideSizeType) == 2 || ((quint16)_s.slideSizeType) == 3 || ((quint16)_s.slideSizeType) == 4 || ((quint16)_s.slideSizeType) == 5 || ((quint16)_s.slideSizeType) == 6"); 6526 } 6527 _s.fSaveWithFonts = in.readuint8(); 6528 _s.fOmitTitlePlace = in.readuint8(); 6529 _s.fRightToLeft = in.readuint8(); 6530 _s.fShowComments = in.readuint8(); 6531 } 6532 void MSO::parseSlideTime10Atom(LEInputStream& in, SlideTime10Atom& _s) { 6533 _s.streamOffset = in.getPosition(); 6534 parseRecordHeader(in, _s.rh); 6535 if (!(_s.rh.recVer == 0)) { 6536 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 6537 } 6538 if (!(_s.rh.recInstance == 0)) { 6539 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6540 } 6541 if (!(_s.rh.recType == 0x2EEB)) { 6542 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x2EEB"); 6543 } 6544 if (!(_s.rh.recLen == 8)) { 6545 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 8"); 6546 } 6547 parseFILETIME(in, _s.fileTime); 6548 } 6549 void MSO::parsePP12SlideBinaryTagExtension(LEInputStream& in, PP12SlideBinaryTagExtension& _s) { 6550 _s.streamOffset = in.getPosition(); 6551 int _c; 6552 LEInputStream::Mark _m; 6553 parseRecordHeader(in, _s.rh); 6554 if (!(_s.rh.recVer == 0)) { 6555 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 6556 } 6557 if (!(_s.rh.recInstance == 0)) { 6558 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6559 } 6560 if (!(_s.rh.recType == 0xFBA)) { 6561 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA"); 6562 } 6563 if (!(_s.rh.recLen == 0x10)) { 6564 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10"); 6565 } 6566 _c = 8; 6567 _s.tagName.resize(_c); 6568 for (int _i=0; _i<_c; ++_i) { 6569 _s.tagName[_i] = in.readuint16(); 6570 } 6571 parseRecordHeader(in, _s.rhData); 6572 if (!(_s.rhData.recVer == 0)) { 6573 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0"); 6574 } 6575 if (!(_s.rhData.recInstance == 0)) { 6576 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0"); 6577 } 6578 if (!(_s.rhData.recType == 0x138B)) { 6579 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B"); 6580 } 6581 if (_s.rhData.recLen > 8) { 6582 _s.roundTripHeaderFooterDefaultsAtom = QSharedPointer<RoundTripHeaderFooterDefaults12Atom>(new RoundTripHeaderFooterDefaults12Atom(&_s)); 6583 parseRoundTripHeaderFooterDefaults12Atom(in, *_s.roundTripHeaderFooterDefaultsAtom.data()); 6584 } 6585 } 6586 void MSO::parseProgStringTagContainer(LEInputStream& in, ProgStringTagContainer& _s) { 6587 _s.streamOffset = in.getPosition(); 6588 LEInputStream::Mark _m; 6589 bool _possiblyPresent; 6590 parseRecordHeader(in, _s.rh); 6591 if (!(_s.rh.recVer == 0xF)) { 6592 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6593 } 6594 if (!(_s.rh.recInstance == 0)) { 6595 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6596 } 6597 if (!(_s.rh.recType == 0x1389)) { 6598 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1389"); 6599 } 6600 parseTagNameAtom(in, _s.tagNameAtom); 6601 _m = in.setMark(); 6602 try { 6603 RecordHeader _optionCheck(&_s); 6604 parseRecordHeader(in, _optionCheck); 6605 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xFBA); 6606 } catch(EOFException _e) { 6607 _possiblyPresent = false; 6608 } 6609 in.rewind(_m); 6610 _m = in.setMark(); 6611 if (_possiblyPresent) { 6612 try { 6613 _s.tagValueAtom = QSharedPointer<TagValueAtom>(new TagValueAtom(&_s)); 6614 parseTagValueAtom(in, *_s.tagValueAtom.data()); 6615 } catch(IncorrectValueException _e) { 6616 _s.tagValueAtom.clear(); 6617 in.rewind(_m); 6618 } catch(EOFException _e) { 6619 _s.tagValueAtom.clear(); 6620 in.rewind(_m); 6621 } 6622 } 6623 } 6624 void MSO::parseNotesAtom(LEInputStream& in, NotesAtom& _s) { 6625 _s.streamOffset = in.getPosition(); 6626 parseRecordHeader(in, _s.rh); 6627 if (!(_s.rh.recVer == 1)) { 6628 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 1"); 6629 } 6630 if (!(_s.rh.recInstance == 0)) { 6631 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6632 } 6633 if (!(_s.rh.recType == 0x3F1)) { 6634 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3F1"); 6635 } 6636 if (!(_s.rh.recLen == 0x8)) { 6637 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x8"); 6638 } 6639 _s.slideIdRef = in.readuint32(); 6640 parseSlideFlags(in, _s.slideFlags); 6641 _s.unused = in.readuint16(); 6642 } 6643 void MSO::parseExObjListContainer(LEInputStream& in, ExObjListContainer& _s) { 6644 _s.streamOffset = in.getPosition(); 6645 LEInputStream::Mark _m; 6646 bool _atend; 6647 parseRecordHeader(in, _s.rh); 6648 if (!(_s.rh.recVer == 0xF)) { 6649 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6650 } 6651 if (!(_s.rh.recInstance == 0x0)) { 6652 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 6653 } 6654 if (!(_s.rh.recType == 0x0409)) { 6655 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0409"); 6656 } 6657 if (!(_s.rh.recLen>=12)) { 6658 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen>=12"); 6659 } 6660 parseExObjListAtom(in, _s.exObjListAtom); 6661 qint64 _startPos = in.getPosition(); 6662 int _totalSize = qMin(_s.rh.recLen-12, quint32(in.getSize() - _startPos)); 6663 _atend = in.getPosition() - _startPos >= _totalSize; 6664 while (!_atend) { 6665 _s.rgChildRec.append(ExObjListSubContainer(&_s)); 6666 parseExObjListSubContainer(in, _s.rgChildRec.last()); 6667 _atend = in.getPosition() - _startPos >= _totalSize; 6668 } 6669 } 6670 void MSO::parseExControlContainer(LEInputStream& in, ExControlContainer& _s) { 6671 _s.streamOffset = in.getPosition(); 6672 LEInputStream::Mark _m; 6673 bool _possiblyPresent; 6674 parseOfficeArtRecordHeader(in, _s.rh); 6675 if (!(_s.rh.recVer == 0xF)) { 6676 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6677 } 6678 if (!(_s.rh.recInstance == 0)) { 6679 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6680 } 6681 if (!(_s.rh.recType == 0xFEE)) { 6682 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFEE"); 6683 } 6684 parseExControlAtom(in, _s.exControlAtom); 6685 parseExOleObjAtom(in, _s.exOleObjAtom); 6686 _m = in.setMark(); 6687 try { 6688 RecordHeader _optionCheck(&_s); 6689 parseRecordHeader(in, _optionCheck); 6690 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x1)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6691 } catch(EOFException _e) { 6692 _possiblyPresent = false; 6693 } 6694 in.rewind(_m); 6695 _m = in.setMark(); 6696 if (_possiblyPresent) { 6697 try { 6698 _s.menuNameAtom = QSharedPointer<MenuNameAtom>(new MenuNameAtom(&_s)); 6699 parseMenuNameAtom(in, *_s.menuNameAtom.data()); 6700 } catch(IncorrectValueException _e) { 6701 _s.menuNameAtom.clear(); 6702 in.rewind(_m); 6703 } catch(EOFException _e) { 6704 _s.menuNameAtom.clear(); 6705 in.rewind(_m); 6706 } 6707 } 6708 _m = in.setMark(); 6709 try { 6710 RecordHeader _optionCheck(&_s); 6711 parseRecordHeader(in, _optionCheck); 6712 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x2)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6713 } catch(EOFException _e) { 6714 _possiblyPresent = false; 6715 } 6716 in.rewind(_m); 6717 _m = in.setMark(); 6718 if (_possiblyPresent) { 6719 try { 6720 _s.progIdAtom = QSharedPointer<ProgIDAtom>(new ProgIDAtom(&_s)); 6721 parseProgIDAtom(in, *_s.progIdAtom.data()); 6722 } catch(IncorrectValueException _e) { 6723 _s.progIdAtom.clear(); 6724 in.rewind(_m); 6725 } catch(EOFException _e) { 6726 _s.progIdAtom.clear(); 6727 in.rewind(_m); 6728 } 6729 } 6730 _m = in.setMark(); 6731 try { 6732 RecordHeader _optionCheck(&_s); 6733 parseRecordHeader(in, _optionCheck); 6734 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x3)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6735 } catch(EOFException _e) { 6736 _possiblyPresent = false; 6737 } 6738 in.rewind(_m); 6739 _m = in.setMark(); 6740 if (_possiblyPresent) { 6741 try { 6742 _s.clipboardNameAtom = QSharedPointer<ClipboardNameAtom>(new ClipboardNameAtom(&_s)); 6743 parseClipboardNameAtom(in, *_s.clipboardNameAtom.data()); 6744 } catch(IncorrectValueException _e) { 6745 _s.clipboardNameAtom.clear(); 6746 in.rewind(_m); 6747 } catch(EOFException _e) { 6748 _s.clipboardNameAtom.clear(); 6749 in.rewind(_m); 6750 } 6751 } 6752 _m = in.setMark(); 6753 try { 6754 RecordHeader _optionCheck(&_s); 6755 parseRecordHeader(in, _optionCheck); 6756 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FC1)&&(_optionCheck.recLen>16); 6757 } catch(EOFException _e) { 6758 _possiblyPresent = false; 6759 } 6760 in.rewind(_m); 6761 _m = in.setMark(); 6762 if (_possiblyPresent) { 6763 try { 6764 _s.metafile = QSharedPointer<MetafileBlob>(new MetafileBlob(&_s)); 6765 parseMetafileBlob(in, *_s.metafile.data()); 6766 } catch(IncorrectValueException _e) { 6767 _s.metafile.clear(); 6768 in.rewind(_m); 6769 } catch(EOFException _e) { 6770 _s.metafile.clear(); 6771 in.rewind(_m); 6772 } 6773 } 6774 } 6775 void MSO::parseExHyperlinkContainer(LEInputStream& in, ExHyperlinkContainer& _s) { 6776 _s.streamOffset = in.getPosition(); 6777 LEInputStream::Mark _m; 6778 bool _possiblyPresent; 6779 parseOfficeArtRecordHeader(in, _s.rh); 6780 if (!(_s.rh.recVer == 0xF)) { 6781 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6782 } 6783 if (!(_s.rh.recInstance == 0)) { 6784 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 6785 } 6786 if (!(_s.rh.recType == 0xFD7)) { 6787 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFD7"); 6788 } 6789 parseExHyperlinkAtom(in, _s.exHyperlinkAtom); 6790 _m = in.setMark(); 6791 try { 6792 OfficeArtRecordHeader _optionCheck(&_s); 6793 parseOfficeArtRecordHeader(in, _optionCheck); 6794 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 6795 } catch(EOFException _e) { 6796 _possiblyPresent = false; 6797 } 6798 in.rewind(_m); 6799 _m = in.setMark(); 6800 if (_possiblyPresent) { 6801 try { 6802 _s.friendlyNameAtom = QSharedPointer<FriendlyNameAtom>(new FriendlyNameAtom(&_s)); 6803 parseFriendlyNameAtom(in, *_s.friendlyNameAtom.data()); 6804 } catch(IncorrectValueException _e) { 6805 _s.friendlyNameAtom.clear(); 6806 in.rewind(_m); 6807 } catch(EOFException _e) { 6808 _s.friendlyNameAtom.clear(); 6809 in.rewind(_m); 6810 } 6811 } 6812 _m = in.setMark(); 6813 try { 6814 OfficeArtRecordHeader _optionCheck(&_s); 6815 parseOfficeArtRecordHeader(in, _optionCheck); 6816 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 6817 } catch(EOFException _e) { 6818 _possiblyPresent = false; 6819 } 6820 in.rewind(_m); 6821 _m = in.setMark(); 6822 if (_possiblyPresent) { 6823 try { 6824 _s.targetAtom = QSharedPointer<TargetAtom>(new TargetAtom(&_s)); 6825 parseTargetAtom(in, *_s.targetAtom.data()); 6826 } catch(IncorrectValueException _e) { 6827 _s.targetAtom.clear(); 6828 in.rewind(_m); 6829 } catch(EOFException _e) { 6830 _s.targetAtom.clear(); 6831 in.rewind(_m); 6832 } 6833 } 6834 _m = in.setMark(); 6835 try { 6836 OfficeArtRecordHeader _optionCheck(&_s); 6837 parseOfficeArtRecordHeader(in, _optionCheck); 6838 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 3)&&(_optionCheck.recType == 0xFBA)&&(_optionCheck.recLen%2==0); 6839 } catch(EOFException _e) { 6840 _possiblyPresent = false; 6841 } 6842 in.rewind(_m); 6843 _m = in.setMark(); 6844 if (_possiblyPresent) { 6845 try { 6846 _s.locationAtom = QSharedPointer<LocationAtom>(new LocationAtom(&_s)); 6847 parseLocationAtom(in, *_s.locationAtom.data()); 6848 } catch(IncorrectValueException _e) { 6849 _s.locationAtom.clear(); 6850 in.rewind(_m); 6851 } catch(EOFException _e) { 6852 _s.locationAtom.clear(); 6853 in.rewind(_m); 6854 } 6855 } 6856 } 6857 void MSO::parseExOleLinkContainer(LEInputStream& in, ExOleLinkContainer& _s) { 6858 _s.streamOffset = in.getPosition(); 6859 LEInputStream::Mark _m; 6860 bool _possiblyPresent; 6861 parseRecordHeader(in, _s.rh); 6862 if (!(_s.rh.recVer == 0xF)) { 6863 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6864 } 6865 if (!(_s.rh.recInstance == 0x0)) { 6866 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 6867 } 6868 if (!(_s.rh.recType == 0x0FCE)) { 6869 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FCE"); 6870 } 6871 parseExOleLinkAtom(in, _s.exOleLinkAtom); 6872 parseExOleObjAtom(in, _s.exOleObjAtom); 6873 _m = in.setMark(); 6874 try { 6875 RecordHeader _optionCheck(&_s); 6876 parseRecordHeader(in, _optionCheck); 6877 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x1)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6878 } catch(EOFException _e) { 6879 _possiblyPresent = false; 6880 } 6881 in.rewind(_m); 6882 _m = in.setMark(); 6883 if (_possiblyPresent) { 6884 try { 6885 _s.menuNameAtom = QSharedPointer<MenuNameAtom>(new MenuNameAtom(&_s)); 6886 parseMenuNameAtom(in, *_s.menuNameAtom.data()); 6887 } catch(IncorrectValueException _e) { 6888 _s.menuNameAtom.clear(); 6889 in.rewind(_m); 6890 } catch(EOFException _e) { 6891 _s.menuNameAtom.clear(); 6892 in.rewind(_m); 6893 } 6894 } 6895 _m = in.setMark(); 6896 try { 6897 RecordHeader _optionCheck(&_s); 6898 parseRecordHeader(in, _optionCheck); 6899 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x2)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6900 } catch(EOFException _e) { 6901 _possiblyPresent = false; 6902 } 6903 in.rewind(_m); 6904 _m = in.setMark(); 6905 if (_possiblyPresent) { 6906 try { 6907 _s.progIdAtom = QSharedPointer<ProgIDAtom>(new ProgIDAtom(&_s)); 6908 parseProgIDAtom(in, *_s.progIdAtom.data()); 6909 } catch(IncorrectValueException _e) { 6910 _s.progIdAtom.clear(); 6911 in.rewind(_m); 6912 } catch(EOFException _e) { 6913 _s.progIdAtom.clear(); 6914 in.rewind(_m); 6915 } 6916 } 6917 _m = in.setMark(); 6918 try { 6919 RecordHeader _optionCheck(&_s); 6920 parseRecordHeader(in, _optionCheck); 6921 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x3)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6922 } catch(EOFException _e) { 6923 _possiblyPresent = false; 6924 } 6925 in.rewind(_m); 6926 _m = in.setMark(); 6927 if (_possiblyPresent) { 6928 try { 6929 _s.clipboardNameAtom = QSharedPointer<ClipboardNameAtom>(new ClipboardNameAtom(&_s)); 6930 parseClipboardNameAtom(in, *_s.clipboardNameAtom.data()); 6931 } catch(IncorrectValueException _e) { 6932 _s.clipboardNameAtom.clear(); 6933 in.rewind(_m); 6934 } catch(EOFException _e) { 6935 _s.clipboardNameAtom.clear(); 6936 in.rewind(_m); 6937 } 6938 } 6939 _m = in.setMark(); 6940 try { 6941 RecordHeader _optionCheck(&_s); 6942 parseRecordHeader(in, _optionCheck); 6943 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FC1)&&(_optionCheck.recLen>16); 6944 } catch(EOFException _e) { 6945 _possiblyPresent = false; 6946 } 6947 in.rewind(_m); 6948 _m = in.setMark(); 6949 if (_possiblyPresent) { 6950 try { 6951 _s.metafile = QSharedPointer<MetafileBlob>(new MetafileBlob(&_s)); 6952 parseMetafileBlob(in, *_s.metafile.data()); 6953 } catch(IncorrectValueException _e) { 6954 _s.metafile.clear(); 6955 in.rewind(_m); 6956 } catch(EOFException _e) { 6957 _s.metafile.clear(); 6958 in.rewind(_m); 6959 } 6960 } 6961 } 6962 void MSO::parseExOleEmbedContainer(LEInputStream& in, ExOleEmbedContainer& _s) { 6963 _s.streamOffset = in.getPosition(); 6964 LEInputStream::Mark _m; 6965 bool _possiblyPresent; 6966 parseRecordHeader(in, _s.rh); 6967 if (!(_s.rh.recVer == 0xF)) { 6968 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 6969 } 6970 if (!(_s.rh.recInstance == 0x0)) { 6971 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 6972 } 6973 if (!(_s.rh.recType == 0x0FCC)) { 6974 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FCC"); 6975 } 6976 parseExOleEmbedAtom(in, _s.exOleEmbedAtom); 6977 parseExOleObjAtom(in, _s.exOleObjAtom); 6978 _m = in.setMark(); 6979 try { 6980 RecordHeader _optionCheck(&_s); 6981 parseRecordHeader(in, _optionCheck); 6982 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x1)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 6983 } catch(EOFException _e) { 6984 _possiblyPresent = false; 6985 } 6986 in.rewind(_m); 6987 _m = in.setMark(); 6988 if (_possiblyPresent) { 6989 try { 6990 _s.menuNameAtom = QSharedPointer<MenuNameAtom>(new MenuNameAtom(&_s)); 6991 parseMenuNameAtom(in, *_s.menuNameAtom.data()); 6992 } catch(IncorrectValueException _e) { 6993 _s.menuNameAtom.clear(); 6994 in.rewind(_m); 6995 } catch(EOFException _e) { 6996 _s.menuNameAtom.clear(); 6997 in.rewind(_m); 6998 } 6999 } 7000 _m = in.setMark(); 7001 try { 7002 RecordHeader _optionCheck(&_s); 7003 parseRecordHeader(in, _optionCheck); 7004 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x2)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 7005 } catch(EOFException _e) { 7006 _possiblyPresent = false; 7007 } 7008 in.rewind(_m); 7009 _m = in.setMark(); 7010 if (_possiblyPresent) { 7011 try { 7012 _s.progIdAtom = QSharedPointer<ProgIDAtom>(new ProgIDAtom(&_s)); 7013 parseProgIDAtom(in, *_s.progIdAtom.data()); 7014 } catch(IncorrectValueException _e) { 7015 _s.progIdAtom.clear(); 7016 in.rewind(_m); 7017 } catch(EOFException _e) { 7018 _s.progIdAtom.clear(); 7019 in.rewind(_m); 7020 } 7021 } 7022 _m = in.setMark(); 7023 try { 7024 RecordHeader _optionCheck(&_s); 7025 parseRecordHeader(in, _optionCheck); 7026 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x3)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2 == 0 ); 7027 } catch(EOFException _e) { 7028 _possiblyPresent = false; 7029 } 7030 in.rewind(_m); 7031 _m = in.setMark(); 7032 if (_possiblyPresent) { 7033 try { 7034 _s.clipboardNameAtom = QSharedPointer<ClipboardNameAtom>(new ClipboardNameAtom(&_s)); 7035 parseClipboardNameAtom(in, *_s.clipboardNameAtom.data()); 7036 } catch(IncorrectValueException _e) { 7037 _s.clipboardNameAtom.clear(); 7038 in.rewind(_m); 7039 } catch(EOFException _e) { 7040 _s.clipboardNameAtom.clear(); 7041 in.rewind(_m); 7042 } 7043 } 7044 _m = in.setMark(); 7045 try { 7046 RecordHeader _optionCheck(&_s); 7047 parseRecordHeader(in, _optionCheck); 7048 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FC1)&&(_optionCheck.recLen>16); 7049 } catch(EOFException _e) { 7050 _possiblyPresent = false; 7051 } 7052 in.rewind(_m); 7053 _m = in.setMark(); 7054 if (_possiblyPresent) { 7055 try { 7056 _s.metafile = QSharedPointer<MetafileBlob>(new MetafileBlob(&_s)); 7057 parseMetafileBlob(in, *_s.metafile.data()); 7058 } catch(IncorrectValueException _e) { 7059 _s.metafile.clear(); 7060 in.rewind(_m); 7061 } catch(EOFException _e) { 7062 _s.metafile.clear(); 7063 in.rewind(_m); 7064 } 7065 } 7066 } 7067 void MSO::parseOfficeArtFDGGBlock(LEInputStream& in, OfficeArtFDGGBlock& _s) { 7068 _s.streamOffset = in.getPosition(); 7069 int _c; 7070 LEInputStream::Mark _m; 7071 parseOfficeArtRecordHeader(in, _s.rh); 7072 if (!(_s.rh.recVer == 0x0)) { 7073 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 7074 } 7075 if (!(_s.rh.recInstance == 0x0)) { 7076 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 7077 } 7078 if (!(_s.rh.recType == 0x0F006)) { 7079 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F006"); 7080 } 7081 parseOfficeArtFDGG(in, _s.head); 7082 _c = _s.head.cidcl-1; 7083 for (int _i=0; _i<_c; ++_i) { 7084 _s.Rgidcl.append(OfficeArtIDCL(&_s)); 7085 parseOfficeArtIDCL(in, _s.Rgidcl[_i]); 7086 } 7087 } 7088 void MSO::parseOfficeArtSolverContainerFileBlock(LEInputStream& in, OfficeArtSolverContainerFileBlock& _s) { 7089 _s.streamOffset = in.getPosition(); 7090 LEInputStream::Mark _m; 7091 _m = in.setMark(); 7092 OfficeArtRecordHeader _choice(&_s); 7093 parseOfficeArtRecordHeader(in, _choice); 7094 in.rewind(_m); 7095 qint64 startPos = in.getPosition(); 7096 if (startPos == in.getPosition() && ((_choice.recVer == 1)&&(_choice.recType == 0xF012)&&(_choice.recLen == 0x18))) { 7097 _s.anon = OfficeArtSolverContainerFileBlock::choice3062460075(new OfficeArtFConnectorRule(&_s)); 7098 parseOfficeArtFConnectorRule(in, *(OfficeArtFConnectorRule*)_s.anon.data()); 7099 } 7100 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recType == 0xF014)&&(_choice.recLen == 8))) { 7101 _s.anon = OfficeArtSolverContainerFileBlock::choice3062460075(new OfficeArtFArcRule(&_s)); 7102 parseOfficeArtFArcRule(in, *(OfficeArtFArcRule*)_s.anon.data()); 7103 } 7104 if (startPos == in.getPosition()) { 7105 _s.anon = OfficeArtSolverContainerFileBlock::choice3062460075(new OfficeArtFCalloutRule(&_s)); 7106 parseOfficeArtFCalloutRule(in, *(OfficeArtFCalloutRule*)_s.anon.data()); 7107 } 7108 } 7109 void MSO::parseRotation(LEInputStream& in, Rotation& _s) { 7110 _s.streamOffset = in.getPosition(); 7111 parseOfficeArtFOPTEOPID(in, _s.opid); 7112 if (!(_s.opid.opid == 0x0004)) { 7113 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0004"); 7114 } 7115 if (!(_s.opid.fBid == false)) { 7116 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7117 } 7118 if (!(_s.opid.fComplex == false)) { 7119 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7120 } 7121 parseFixedPoint(in, _s.rotation); 7122 } 7123 void MSO::parseProtectionBooleanProperties(LEInputStream& in, ProtectionBooleanProperties& _s) { 7124 _s.streamOffset = in.getPosition(); 7125 parseOfficeArtFOPTEOPID(in, _s.opid); 7126 if (!(_s.opid.opid == 0x007F)) { 7127 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x007F"); 7128 } 7129 if (!(_s.opid.fBid == false)) { 7130 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7131 } 7132 if (!(_s.opid.fComplex == false)) { 7133 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7134 } 7135 _s.fLockAgainstGrouping = in.readbit(); 7136 _s.fLockAdjustHandles = in.readbit(); 7137 _s.fLockText = in.readbit(); 7138 _s.fLockVertices = in.readbit(); 7139 _s.fLockCropping = in.readbit(); 7140 _s.fLockAgainstSelect = in.readbit(); 7141 _s.fLockPosition = in.readbit(); 7142 _s.fLockAspectRatio = in.readbit(); 7143 _s.fLockRotation = in.readbit(); 7144 _s.fLockAgainstUngrouping = in.readbit(); 7145 _s.unused6 = in.readuint6(); 7146 _s.fUsefLockAgainstGrouping = in.readbit(); 7147 _s.fUseLockAdjustHandles = in.readbit(); 7148 _s.fUseLockText = in.readbit(); 7149 _s.fUsefLockVertices = in.readbit(); 7150 _s.fUsefLockCropping = in.readbit(); 7151 _s.fUsefLockAgainstSelect = in.readbit(); 7152 _s.fUsefLockPosition = in.readbit(); 7153 _s.fUsefLockAspectRatio = in.readbit(); 7154 _s.fUsefLockRotation = in.readbit(); 7155 _s.fUsefLockAgainstUngrouping = in.readbit(); 7156 _s.unused2 = in.readuint6(); 7157 } 7158 void MSO::parseITxid(LEInputStream& in, ITxid& _s) { 7159 _s.streamOffset = in.getPosition(); 7160 parseOfficeArtFOPTEOPID(in, _s.opid); 7161 if (!(_s.opid.opid == 0x0080)) { 7162 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0080"); 7163 } 7164 if (!(_s.opid.fBid == false)) { 7165 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7166 } 7167 if (!(_s.opid.fComplex == false)) { 7168 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7169 } 7170 _s.iTxid = in.readint32(); 7171 } 7172 void MSO::parseDxTextLeft(LEInputStream& in, DxTextLeft& _s) { 7173 _s.streamOffset = in.getPosition(); 7174 parseOfficeArtFOPTEOPID(in, _s.opid); 7175 if (!(_s.opid.opid == 0x0081)) { 7176 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0081"); 7177 } 7178 if (!(_s.opid.fBid == false)) { 7179 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7180 } 7181 if (!(_s.opid.fComplex == false)) { 7182 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7183 } 7184 _s.dxTextLeft = in.readint32(); 7185 } 7186 void MSO::parseDyTextTop(LEInputStream& in, DyTextTop& _s) { 7187 _s.streamOffset = in.getPosition(); 7188 parseOfficeArtFOPTEOPID(in, _s.opid); 7189 if (!(_s.opid.opid == 0x0082)) { 7190 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0082"); 7191 } 7192 if (!(_s.opid.fBid == false)) { 7193 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7194 } 7195 if (!(_s.opid.fComplex == false)) { 7196 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7197 } 7198 _s.dyTextTop = in.readint32(); 7199 } 7200 void MSO::parseDxTextRight(LEInputStream& in, DxTextRight& _s) { 7201 _s.streamOffset = in.getPosition(); 7202 parseOfficeArtFOPTEOPID(in, _s.opid); 7203 if (!(_s.opid.opid == 0x0083)) { 7204 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0083"); 7205 } 7206 if (!(_s.opid.fBid == false)) { 7207 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7208 } 7209 if (!(_s.opid.fComplex == false)) { 7210 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7211 } 7212 _s.dxTextRight = in.readint32(); 7213 } 7214 void MSO::parseDyTextBottom(LEInputStream& in, DyTextBottom& _s) { 7215 _s.streamOffset = in.getPosition(); 7216 parseOfficeArtFOPTEOPID(in, _s.opid); 7217 if (!(_s.opid.opid == 0x0084)) { 7218 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0084"); 7219 } 7220 if (!(_s.opid.fBid == false)) { 7221 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7222 } 7223 if (!(_s.opid.fComplex == false)) { 7224 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7225 } 7226 _s.dyTextBottom = in.readint32(); 7227 } 7228 void MSO::parseWrapText(LEInputStream& in, WrapText& _s) { 7229 _s.streamOffset = in.getPosition(); 7230 parseOfficeArtFOPTEOPID(in, _s.opid); 7231 if (!(_s.opid.opid == 0x0085)) { 7232 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0085"); 7233 } 7234 if (!(_s.opid.fBid == false)) { 7235 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7236 } 7237 if (!(_s.opid.fComplex == false)) { 7238 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7239 } 7240 _s.wrapText = in.readuint32(); 7241 if (!(((quint32)_s.wrapText)<5)) { 7242 throw IncorrectValueException(in.getPosition(), "((quint32)_s.wrapText)<5"); 7243 } 7244 } 7245 void MSO::parseAnchorText(LEInputStream& in, AnchorText& _s) { 7246 _s.streamOffset = in.getPosition(); 7247 parseOfficeArtFOPTEOPID(in, _s.opid); 7248 if (!(_s.opid.opid == 0x0087)) { 7249 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0087"); 7250 } 7251 if (!(_s.opid.fBid == false)) { 7252 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7253 } 7254 if (!(_s.opid.fComplex == false)) { 7255 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7256 } 7257 _s.anchorText = in.readuint32(); 7258 if (!(((quint32)_s.anchorText)<=9)) { 7259 throw IncorrectValueException(in.getPosition(), "((quint32)_s.anchorText)<=9"); 7260 } 7261 } 7262 void MSO::parseTxflTextFlow(LEInputStream& in, TxflTextFlow& _s) { 7263 _s.streamOffset = in.getPosition(); 7264 parseOfficeArtFOPTEOPID(in, _s.opid); 7265 if (!(_s.opid.opid == 0x0088)) { 7266 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0088"); 7267 } 7268 if (!(_s.opid.fBid == false)) { 7269 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7270 } 7271 if (!(_s.opid.fComplex == false)) { 7272 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7273 } 7274 _s.txflTextFlow = in.readuint32(); 7275 if (!(((quint32)_s.txflTextFlow)<=5)) { 7276 throw IncorrectValueException(in.getPosition(), "((quint32)_s.txflTextFlow)<=5"); 7277 } 7278 } 7279 void MSO::parseCdirFont(LEInputStream& in, CdirFont& _s) { 7280 _s.streamOffset = in.getPosition(); 7281 parseOfficeArtFOPTEOPID(in, _s.opid); 7282 if (!(_s.opid.opid == 0x0089)) { 7283 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0089"); 7284 } 7285 if (!(_s.opid.fBid == false)) { 7286 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7287 } 7288 if (!(_s.opid.fComplex == false)) { 7289 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7290 } 7291 _s.cdirFont = in.readuint32(); 7292 if (!(((quint32)_s.cdirFont)<=3)) { 7293 throw IncorrectValueException(in.getPosition(), "((quint32)_s.cdirFont)<=3"); 7294 } 7295 } 7296 void MSO::parseHspNext(LEInputStream& in, HspNext& _s) { 7297 _s.streamOffset = in.getPosition(); 7298 parseOfficeArtFOPTEOPID(in, _s.opid); 7299 if (!(_s.opid.opid == 0x008A)) { 7300 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x008A"); 7301 } 7302 if (!(_s.opid.fBid == false)) { 7303 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7304 } 7305 if (!(_s.opid.fComplex == false)) { 7306 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7307 } 7308 _s.hspNext = in.readuint32(); 7309 } 7310 void MSO::parseTxdir(LEInputStream& in, Txdir& _s) { 7311 _s.streamOffset = in.getPosition(); 7312 parseOfficeArtFOPTEOPID(in, _s.opid); 7313 if (!(_s.opid.opid == 0x008B)) { 7314 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x008B"); 7315 } 7316 if (!(_s.opid.fBid == false)) { 7317 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7318 } 7319 if (!(_s.opid.fComplex == false)) { 7320 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7321 } 7322 _s.txdir = in.readuint32(); 7323 if (!(((quint32)_s.txdir)<=2)) { 7324 throw IncorrectValueException(in.getPosition(), "((quint32)_s.txdir)<=2"); 7325 } 7326 } 7327 void MSO::parseTextBooleanProperties(LEInputStream& in, TextBooleanProperties& _s) { 7328 _s.streamOffset = in.getPosition(); 7329 parseOfficeArtFOPTEOPID(in, _s.opid); 7330 if (!(_s.opid.opid == 0x00BF)) { 7331 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x00BF"); 7332 } 7333 if (!(_s.opid.fBid == false)) { 7334 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7335 } 7336 if (!(_s.opid.fComplex == false)) { 7337 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7338 } 7339 _s.unused1 = in.readbit(); 7340 _s.fFitShapeToText = in.readbit(); 7341 _s.unused2 = in.readbit(); 7342 _s.fAutoTextMargin = in.readbit(); 7343 _s.fSelectText = in.readbit(); 7344 _s.unused3a = in.readuint3(); 7345 _s.unused3b = in.readuint8(); 7346 _s.unused4 = in.readbit(); 7347 _s.fUsefFitShapeToText = in.readbit(); 7348 _s.unused5 = in.readbit(); 7349 _s.fUsefAutoTextMargin = in.readbit(); 7350 _s.fUsefSelectText = in.readbit(); 7351 _s.unused6a = in.readuint3(); 7352 _s.unused6b = in.readuint8(); 7353 } 7354 void MSO::parseCropFromTop(LEInputStream& in, CropFromTop& _s) { 7355 _s.streamOffset = in.getPosition(); 7356 parseOfficeArtFOPTEOPID(in, _s.opid); 7357 if (!(_s.opid.opid == 0x0100)) { 7358 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0100"); 7359 } 7360 if (!(_s.opid.fBid == false)) { 7361 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7362 } 7363 if (!(_s.opid.fComplex == false)) { 7364 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7365 } 7366 parseFixedPoint(in, _s.cropFromTop); 7367 } 7368 void MSO::parseCropFromBottom(LEInputStream& in, CropFromBottom& _s) { 7369 _s.streamOffset = in.getPosition(); 7370 parseOfficeArtFOPTEOPID(in, _s.opid); 7371 if (!(_s.opid.opid == 0x0101)) { 7372 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0101"); 7373 } 7374 if (!(_s.opid.fBid == false)) { 7375 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7376 } 7377 if (!(_s.opid.fComplex == false)) { 7378 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7379 } 7380 parseFixedPoint(in, _s.cropFromBottom); 7381 } 7382 void MSO::parseCropFromLeft(LEInputStream& in, CropFromLeft& _s) { 7383 _s.streamOffset = in.getPosition(); 7384 parseOfficeArtFOPTEOPID(in, _s.opid); 7385 if (!(_s.opid.opid == 0x0102)) { 7386 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0102"); 7387 } 7388 if (!(_s.opid.fBid == false)) { 7389 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7390 } 7391 if (!(_s.opid.fComplex == false)) { 7392 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7393 } 7394 parseFixedPoint(in, _s.cropFromLeft); 7395 } 7396 void MSO::parseCropFromRight(LEInputStream& in, CropFromRight& _s) { 7397 _s.streamOffset = in.getPosition(); 7398 parseOfficeArtFOPTEOPID(in, _s.opid); 7399 if (!(_s.opid.opid == 0x0103)) { 7400 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0103"); 7401 } 7402 if (!(_s.opid.fBid == false)) { 7403 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7404 } 7405 if (!(_s.opid.fComplex == false)) { 7406 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7407 } 7408 parseFixedPoint(in, _s.cropFromRight); 7409 } 7410 void MSO::parsePib(LEInputStream& in, Pib& _s) { 7411 _s.streamOffset = in.getPosition(); 7412 parseOfficeArtFOPTEOPID(in, _s.opid); 7413 if (!(_s.opid.opid == 0x0104)) { 7414 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0104"); 7415 } 7416 _s.pib = in.readuint32(); 7417 } 7418 void MSO::parsePibName(LEInputStream& in, PibName& _s) { 7419 _s.streamOffset = in.getPosition(); 7420 parseOfficeArtFOPTEOPID(in, _s.opid); 7421 if (!(_s.opid.opid == 0x0105)) { 7422 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0105"); 7423 } 7424 _s.pibName = in.readuint32(); 7425 } 7426 void MSO::parsePibFlags(LEInputStream& in, PibFlags& _s) { 7427 _s.streamOffset = in.getPosition(); 7428 parseOfficeArtFOPTEOPID(in, _s.opid); 7429 if (!(_s.opid.opid == 0x0106)) { 7430 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0106"); 7431 } 7432 if (!(_s.opid.fBid == false)) { 7433 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7434 } 7435 if (!(_s.opid.fComplex == false)) { 7436 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7437 } 7438 _s.pibFlags = in.readuint32(); 7439 } 7440 void MSO::parsePictureTransparent(LEInputStream& in, PictureTransparent& _s) { 7441 _s.streamOffset = in.getPosition(); 7442 parseOfficeArtFOPTEOPID(in, _s.opid); 7443 if (!(_s.opid.opid == 0x0107)) { 7444 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0107"); 7445 } 7446 if (!(_s.opid.fBid == false)) { 7447 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7448 } 7449 if (!(_s.opid.fComplex == false)) { 7450 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7451 } 7452 parseOfficeArtCOLORREF(in, _s.pictureTransparent); 7453 } 7454 void MSO::parsePictureContrast(LEInputStream& in, PictureContrast& _s) { 7455 _s.streamOffset = in.getPosition(); 7456 parseOfficeArtFOPTEOPID(in, _s.opid); 7457 if (!(_s.opid.opid == 0x0108)) { 7458 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0108"); 7459 } 7460 if (!(_s.opid.fBid == false)) { 7461 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7462 } 7463 if (!(_s.opid.fComplex == false)) { 7464 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7465 } 7466 _s.pictureContrast = in.readint32(); 7467 } 7468 void MSO::parsePictureBrightness(LEInputStream& in, PictureBrightness& _s) { 7469 _s.streamOffset = in.getPosition(); 7470 parseOfficeArtFOPTEOPID(in, _s.opid); 7471 if (!(_s.opid.opid == 0x0109)) { 7472 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0109"); 7473 } 7474 if (!(_s.opid.fBid == false)) { 7475 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7476 } 7477 if (!(_s.opid.fComplex == false)) { 7478 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7479 } 7480 _s.pictureBrightness = in.readint32(); 7481 } 7482 void MSO::parseBlipBooleanProperties(LEInputStream& in, BlipBooleanProperties& _s) { 7483 _s.streamOffset = in.getPosition(); 7484 parseOfficeArtFOPTEOPID(in, _s.opid); 7485 if (!(_s.opid.opid == 0x013F)) { 7486 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x013F"); 7487 } 7488 if (!(_s.opid.fBid == false)) { 7489 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7490 } 7491 if (!(_s.opid.fComplex == false)) { 7492 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7493 } 7494 _s.fPictureActive = in.readbit(); 7495 _s.fPictureBiLevel = in.readbit(); 7496 _s.fPictureGray = in.readbit(); 7497 _s.fNoHitTestPicture = in.readbit(); 7498 _s.fLooping = in.readbit(); 7499 _s.fRewind = in.readbit(); 7500 _s.fPicturePreserveGrays = in.readbit(); 7501 _s.unused1a = in.readbit(); 7502 _s.unused1b = in.readuint8(); 7503 _s.fUsefPictureActive = in.readbit(); 7504 _s.fUsefPictureBiLevel = in.readbit(); 7505 _s.fUsefPictureGray = in.readbit(); 7506 _s.fUsefNoHitTestPicture = in.readbit(); 7507 _s.fUsefLooping = in.readbit(); 7508 _s.fUsefRewind = in.readbit(); 7509 _s.fUsefPicturePreserveGrays = in.readbit(); 7510 _s.unused2a = in.readbit(); 7511 _s.unused2b = in.readuint8(); 7512 } 7513 void MSO::parseGeoLeft(LEInputStream& in, GeoLeft& _s) { 7514 _s.streamOffset = in.getPosition(); 7515 parseOfficeArtFOPTEOPID(in, _s.opid); 7516 if (!(_s.opid.opid == 0x0140)) { 7517 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0140"); 7518 } 7519 if (!(_s.opid.fBid == false)) { 7520 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7521 } 7522 if (!(_s.opid.fComplex == false)) { 7523 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7524 } 7525 _s.geoLeft = in.readint32(); 7526 } 7527 void MSO::parseGeoTop(LEInputStream& in, GeoTop& _s) { 7528 _s.streamOffset = in.getPosition(); 7529 parseOfficeArtFOPTEOPID(in, _s.opid); 7530 if (!(_s.opid.opid == 0x0141)) { 7531 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0141"); 7532 } 7533 if (!(_s.opid.fBid == false)) { 7534 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7535 } 7536 if (!(_s.opid.fComplex == false)) { 7537 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7538 } 7539 _s.geoTop = in.readint32(); 7540 } 7541 void MSO::parseGeoRight(LEInputStream& in, GeoRight& _s) { 7542 _s.streamOffset = in.getPosition(); 7543 parseOfficeArtFOPTEOPID(in, _s.opid); 7544 if (!(_s.opid.opid == 0x0142)) { 7545 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0142"); 7546 } 7547 if (!(_s.opid.fBid == false)) { 7548 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7549 } 7550 if (!(_s.opid.fComplex == false)) { 7551 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7552 } 7553 _s.geoRight = in.readint32(); 7554 } 7555 void MSO::parseGeoBottom(LEInputStream& in, GeoBottom& _s) { 7556 _s.streamOffset = in.getPosition(); 7557 parseOfficeArtFOPTEOPID(in, _s.opid); 7558 if (!(_s.opid.opid == 0x0143)) { 7559 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0143"); 7560 } 7561 if (!(_s.opid.fBid == false)) { 7562 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7563 } 7564 if (!(_s.opid.fComplex == false)) { 7565 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7566 } 7567 _s.geoBottom = in.readint32(); 7568 } 7569 void MSO::parseShapePath(LEInputStream& in, ShapePath& _s) { 7570 _s.streamOffset = in.getPosition(); 7571 parseOfficeArtFOPTEOPID(in, _s.opid); 7572 if (!(_s.opid.opid == 0x0144)) { 7573 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0144"); 7574 } 7575 if (!(_s.opid.fBid == false)) { 7576 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7577 } 7578 if (!(_s.opid.fComplex == false)) { 7579 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7580 } 7581 _s.shapePath = in.readuint32(); 7582 if (!(((quint32)_s.shapePath)<=4)) { 7583 throw IncorrectValueException(in.getPosition(), "((quint32)_s.shapePath)<=4"); 7584 } 7585 } 7586 void MSO::parsePVertices(LEInputStream& in, PVertices& _s) { 7587 _s.streamOffset = in.getPosition(); 7588 parseOfficeArtFOPTEOPID(in, _s.opid); 7589 if (!(_s.opid.opid == 0x0145)) { 7590 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0145"); 7591 } 7592 _s.pVertices = in.readuint32(); 7593 } 7594 void MSO::parsePSegmentInfo(LEInputStream& in, PSegmentInfo& _s) { 7595 _s.streamOffset = in.getPosition(); 7596 parseOfficeArtFOPTEOPID(in, _s.opid); 7597 if (!(_s.opid.opid == 0x0146)) { 7598 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0146"); 7599 } 7600 _s.pSegmentInfo = in.readuint32(); 7601 } 7602 void MSO::parseAdjustValue(LEInputStream& in, AdjustValue& _s) { 7603 _s.streamOffset = in.getPosition(); 7604 parseOfficeArtFOPTEOPID(in, _s.opid); 7605 if (!(_s.opid.opid == 0x0147)) { 7606 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0147"); 7607 } 7608 if (!(_s.opid.fBid == false)) { 7609 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7610 } 7611 if (!(_s.opid.fComplex == false)) { 7612 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7613 } 7614 _s.adjustvalue = in.readint32(); 7615 } 7616 void MSO::parseAdjust2Value(LEInputStream& in, Adjust2Value& _s) { 7617 _s.streamOffset = in.getPosition(); 7618 parseOfficeArtFOPTEOPID(in, _s.opid); 7619 if (!(_s.opid.opid == 0x0148)) { 7620 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0148"); 7621 } 7622 if (!(_s.opid.fBid == false)) { 7623 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7624 } 7625 if (!(_s.opid.fComplex == false)) { 7626 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7627 } 7628 _s.adjust2value = in.readint32(); 7629 } 7630 void MSO::parseAdjust3Value(LEInputStream& in, Adjust3Value& _s) { 7631 _s.streamOffset = in.getPosition(); 7632 parseOfficeArtFOPTEOPID(in, _s.opid); 7633 if (!(_s.opid.opid == 0x0149)) { 7634 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0149"); 7635 } 7636 if (!(_s.opid.fBid == false)) { 7637 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7638 } 7639 if (!(_s.opid.fComplex == false)) { 7640 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7641 } 7642 _s.adjust3value = in.readint32(); 7643 } 7644 void MSO::parseAdjust4Value(LEInputStream& in, Adjust4Value& _s) { 7645 _s.streamOffset = in.getPosition(); 7646 parseOfficeArtFOPTEOPID(in, _s.opid); 7647 if (!(_s.opid.opid == 0x014A)) { 7648 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x014A"); 7649 } 7650 if (!(_s.opid.fBid == false)) { 7651 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7652 } 7653 if (!(_s.opid.fComplex == false)) { 7654 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7655 } 7656 _s.adjust4value = in.readint32(); 7657 } 7658 void MSO::parseAdjust5Value(LEInputStream& in, Adjust5Value& _s) { 7659 _s.streamOffset = in.getPosition(); 7660 parseOfficeArtFOPTEOPID(in, _s.opid); 7661 if (!(_s.opid.opid == 0x014B)) { 7662 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x014B"); 7663 } 7664 if (!(_s.opid.fBid == false)) { 7665 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7666 } 7667 if (!(_s.opid.fComplex == false)) { 7668 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7669 } 7670 _s.adjust5value = in.readint32(); 7671 } 7672 void MSO::parseAdjust6Value(LEInputStream& in, Adjust6Value& _s) { 7673 _s.streamOffset = in.getPosition(); 7674 parseOfficeArtFOPTEOPID(in, _s.opid); 7675 if (!(_s.opid.opid == 0x014C)) { 7676 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x014C"); 7677 } 7678 if (!(_s.opid.fBid == false)) { 7679 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7680 } 7681 if (!(_s.opid.fComplex == false)) { 7682 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7683 } 7684 _s.adjust6value = in.readint32(); 7685 } 7686 void MSO::parseAdjust7Value(LEInputStream& in, Adjust7Value& _s) { 7687 _s.streamOffset = in.getPosition(); 7688 parseOfficeArtFOPTEOPID(in, _s.opid); 7689 if (!(_s.opid.opid == 0x014D)) { 7690 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x014D"); 7691 } 7692 if (!(_s.opid.fBid == false)) { 7693 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7694 } 7695 if (!(_s.opid.fComplex == false)) { 7696 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7697 } 7698 _s.adjust7value = in.readint32(); 7699 } 7700 void MSO::parseAdjust8Value(LEInputStream& in, Adjust8Value& _s) { 7701 _s.streamOffset = in.getPosition(); 7702 parseOfficeArtFOPTEOPID(in, _s.opid); 7703 if (!(_s.opid.opid == 0x014E)) { 7704 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x014E"); 7705 } 7706 if (!(_s.opid.fBid == false)) { 7707 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7708 } 7709 if (!(_s.opid.fComplex == false)) { 7710 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7711 } 7712 _s.adjust8value = in.readint32(); 7713 } 7714 void MSO::parseGeometryBooleanProperties(LEInputStream& in, GeometryBooleanProperties& _s) { 7715 _s.streamOffset = in.getPosition(); 7716 parseOfficeArtFOPTEOPID(in, _s.opid); 7717 if (!(_s.opid.opid == 0x017F)) { 7718 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x017F"); 7719 } 7720 if (!(_s.opid.fBid == false)) { 7721 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7722 } 7723 if (!(_s.opid.fComplex == false)) { 7724 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7725 } 7726 _s.fFillOk = in.readbit(); 7727 _s.fFillShadeShapeOK = in.readbit(); 7728 _s.fGtextOK = in.readbit(); 7729 _s.fLineOK = in.readbit(); 7730 _s.f3DOK = in.readbit(); 7731 _s.fShadowOK = in.readbit(); 7732 _s.unuseda = in.readbit(); 7733 _s.unusedb = in.readbit(); 7734 _s.unused2 = in.readuint8(); 7735 _s.fUsefFillOK = in.readbit(); 7736 _s.fUsefFillShadeShapeOK = in.readbit(); 7737 _s.fUsefGtextOK = in.readbit(); 7738 _s.fUsefLineOK = in.readbit(); 7739 _s.fUsef3DOK = in.readbit(); 7740 _s.fUsefShadowOK = in.readbit(); 7741 _s.unused3a = in.readbit(); 7742 _s.unused3b = in.readbit(); 7743 _s.unused4 = in.readuint8(); 7744 } 7745 void MSO::parseFillType(LEInputStream& in, FillType& _s) { 7746 _s.streamOffset = in.getPosition(); 7747 parseOfficeArtFOPTEOPID(in, _s.opid); 7748 if (!(_s.opid.opid == 0x0180)) { 7749 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0180"); 7750 } 7751 if (!(_s.opid.fBid == false)) { 7752 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7753 } 7754 if (!(_s.opid.fComplex == false)) { 7755 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7756 } 7757 _s.fillType = in.readuint32(); 7758 if (!(((quint32)_s.fillType)<=9)) { 7759 throw IncorrectValueException(in.getPosition(), "((quint32)_s.fillType)<=9"); 7760 } 7761 } 7762 void MSO::parseFillColor(LEInputStream& in, FillColor& _s) { 7763 _s.streamOffset = in.getPosition(); 7764 parseOfficeArtFOPTEOPID(in, _s.opid); 7765 if (!(_s.opid.opid == 0x0181)) { 7766 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0181"); 7767 } 7768 if (!(_s.opid.fBid == false)) { 7769 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7770 } 7771 if (!(_s.opid.fComplex == false)) { 7772 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7773 } 7774 parseOfficeArtCOLORREF(in, _s.fillColor); 7775 } 7776 void MSO::parseFillOpacity(LEInputStream& in, FillOpacity& _s) { 7777 _s.streamOffset = in.getPosition(); 7778 parseOfficeArtFOPTEOPID(in, _s.opid); 7779 if (!(_s.opid.opid == 0x0182)) { 7780 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0182"); 7781 } 7782 if (!(_s.opid.fBid == false)) { 7783 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7784 } 7785 if (!(_s.opid.fComplex == false)) { 7786 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7787 } 7788 parseFixedPoint(in, _s.fillOpacity); 7789 } 7790 void MSO::parseFillBackColor(LEInputStream& in, FillBackColor& _s) { 7791 _s.streamOffset = in.getPosition(); 7792 parseOfficeArtFOPTEOPID(in, _s.opid); 7793 if (!(_s.opid.opid == 0x0183)) { 7794 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0183"); 7795 } 7796 if (!(_s.opid.fBid == false)) { 7797 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7798 } 7799 if (!(_s.opid.fComplex == false)) { 7800 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7801 } 7802 parseOfficeArtCOLORREF(in, _s.fillBackColor); 7803 } 7804 void MSO::parseFillBackOpacity(LEInputStream& in, FillBackOpacity& _s) { 7805 _s.streamOffset = in.getPosition(); 7806 parseOfficeArtFOPTEOPID(in, _s.opid); 7807 if (!(_s.opid.opid == 0x0184)) { 7808 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0184"); 7809 } 7810 if (!(_s.opid.fBid == false)) { 7811 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7812 } 7813 if (!(_s.opid.fComplex == false)) { 7814 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7815 } 7816 parseFixedPoint(in, _s.fillBackOpacity); 7817 } 7818 void MSO::parseFillCrMod(LEInputStream& in, FillCrMod& _s) { 7819 _s.streamOffset = in.getPosition(); 7820 parseOfficeArtFOPTEOPID(in, _s.opid); 7821 if (!(_s.opid.opid == 0x0185)) { 7822 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0185"); 7823 } 7824 if (!(_s.opid.fBid == false)) { 7825 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7826 } 7827 if (!(_s.opid.fComplex == false)) { 7828 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7829 } 7830 parseOfficeArtCOLORREF(in, _s.fillCrMod); 7831 } 7832 void MSO::parseFillBlip(LEInputStream& in, FillBlip& _s) { 7833 _s.streamOffset = in.getPosition(); 7834 parseOfficeArtFOPTEOPID(in, _s.opid); 7835 if (!(_s.opid.opid == 0x0186)) { 7836 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0186"); 7837 } 7838 _s.fillBlip = in.readuint32(); 7839 } 7840 void MSO::parseFillBlipName(LEInputStream& in, FillBlipName& _s) { 7841 _s.streamOffset = in.getPosition(); 7842 parseOfficeArtFOPTEOPID(in, _s.opid); 7843 if (!(_s.opid.opid == 0x0187)) { 7844 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0187"); 7845 } 7846 _s.fillBlipName = in.readuint32(); 7847 } 7848 void MSO::parseFillBlipFlags(LEInputStream& in, FillBlipFlags& _s) { 7849 _s.streamOffset = in.getPosition(); 7850 parseOfficeArtFOPTEOPID(in, _s.opid); 7851 if (!(_s.opid.opid == 0x0188)) { 7852 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0188"); 7853 } 7854 if (!(_s.opid.fBid == false)) { 7855 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7856 } 7857 if (!(_s.opid.fComplex == false)) { 7858 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7859 } 7860 _s.fillBlipFlags = in.readuint32(); 7861 } 7862 void MSO::parseFillWidth(LEInputStream& in, FillWidth& _s) { 7863 _s.streamOffset = in.getPosition(); 7864 parseOfficeArtFOPTEOPID(in, _s.opid); 7865 if (!(_s.opid.opid == 0x0189)) { 7866 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0189"); 7867 } 7868 if (!(_s.opid.fBid == false)) { 7869 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7870 } 7871 if (!(_s.opid.fComplex == false)) { 7872 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7873 } 7874 _s.fillWidth = in.readint32(); 7875 } 7876 void MSO::parseFillHeight(LEInputStream& in, FillHeight& _s) { 7877 _s.streamOffset = in.getPosition(); 7878 parseOfficeArtFOPTEOPID(in, _s.opid); 7879 if (!(_s.opid.opid == 0x018A)) { 7880 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x018A"); 7881 } 7882 if (!(_s.opid.fBid == false)) { 7883 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7884 } 7885 if (!(_s.opid.fComplex == false)) { 7886 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7887 } 7888 _s.fillHeight = in.readint32(); 7889 } 7890 void MSO::parseFillAngle(LEInputStream& in, FillAngle& _s) { 7891 _s.streamOffset = in.getPosition(); 7892 parseOfficeArtFOPTEOPID(in, _s.opid); 7893 if (!(_s.opid.opid == 0x018B)) { 7894 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x018B"); 7895 } 7896 if (!(_s.opid.fBid == false)) { 7897 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7898 } 7899 if (!(_s.opid.fComplex == false)) { 7900 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7901 } 7902 parseFixedPoint(in, _s.fillAngle); 7903 } 7904 void MSO::parseFillFocus(LEInputStream& in, FillFocus& _s) { 7905 _s.streamOffset = in.getPosition(); 7906 parseOfficeArtFOPTEOPID(in, _s.opid); 7907 if (!(_s.opid.opid == 0x018C)) { 7908 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x018C"); 7909 } 7910 if (!(_s.opid.fBid == false)) { 7911 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7912 } 7913 if (!(_s.opid.fComplex == false)) { 7914 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7915 } 7916 _s.fillFocus = in.readint32(); 7917 } 7918 void MSO::parseFillToLeft(LEInputStream& in, FillToLeft& _s) { 7919 _s.streamOffset = in.getPosition(); 7920 parseOfficeArtFOPTEOPID(in, _s.opid); 7921 if (!(_s.opid.opid == 0x018D)) { 7922 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x018D"); 7923 } 7924 if (!(_s.opid.fBid == false)) { 7925 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7926 } 7927 if (!(_s.opid.fComplex == false)) { 7928 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7929 } 7930 parseFixedPoint(in, _s.fillToLeft); 7931 } 7932 void MSO::parseFillToTop(LEInputStream& in, FillToTop& _s) { 7933 _s.streamOffset = in.getPosition(); 7934 parseOfficeArtFOPTEOPID(in, _s.opid); 7935 if (!(_s.opid.opid == 0x018E)) { 7936 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x018E"); 7937 } 7938 if (!(_s.opid.fBid == false)) { 7939 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7940 } 7941 if (!(_s.opid.fComplex == false)) { 7942 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7943 } 7944 parseFixedPoint(in, _s.fillToTop); 7945 } 7946 void MSO::parseFillToRight(LEInputStream& in, FillToRight& _s) { 7947 _s.streamOffset = in.getPosition(); 7948 parseOfficeArtFOPTEOPID(in, _s.opid); 7949 if (!(_s.opid.opid == 0x018F)) { 7950 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x018F"); 7951 } 7952 if (!(_s.opid.fBid == false)) { 7953 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7954 } 7955 if (!(_s.opid.fComplex == false)) { 7956 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7957 } 7958 parseFixedPoint(in, _s.fillToRight); 7959 } 7960 void MSO::parseFillToBottom(LEInputStream& in, FillToBottom& _s) { 7961 _s.streamOffset = in.getPosition(); 7962 parseOfficeArtFOPTEOPID(in, _s.opid); 7963 if (!(_s.opid.opid == 0x0190)) { 7964 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0190"); 7965 } 7966 if (!(_s.opid.fBid == false)) { 7967 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7968 } 7969 if (!(_s.opid.fComplex == false)) { 7970 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7971 } 7972 parseFixedPoint(in, _s.fillToBottom); 7973 } 7974 void MSO::parseFillRectLeft(LEInputStream& in, FillRectLeft& _s) { 7975 _s.streamOffset = in.getPosition(); 7976 parseOfficeArtFOPTEOPID(in, _s.opid); 7977 if (!(_s.opid.opid == 0x0191)) { 7978 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0191"); 7979 } 7980 if (!(_s.opid.fBid == false)) { 7981 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7982 } 7983 if (!(_s.opid.fComplex == false)) { 7984 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7985 } 7986 _s.fillRectLeft = in.readint32(); 7987 } 7988 void MSO::parseFillRectTop(LEInputStream& in, FillRectTop& _s) { 7989 _s.streamOffset = in.getPosition(); 7990 parseOfficeArtFOPTEOPID(in, _s.opid); 7991 if (!(_s.opid.opid == 0x0192)) { 7992 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0192"); 7993 } 7994 if (!(_s.opid.fBid == false)) { 7995 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 7996 } 7997 if (!(_s.opid.fComplex == false)) { 7998 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 7999 } 8000 _s.fillRectTop = in.readint32(); 8001 } 8002 void MSO::parseFillRectRight(LEInputStream& in, FillRectRight& _s) { 8003 _s.streamOffset = in.getPosition(); 8004 parseOfficeArtFOPTEOPID(in, _s.opid); 8005 if (!(_s.opid.opid == 0x0193)) { 8006 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0193"); 8007 } 8008 if (!(_s.opid.fBid == false)) { 8009 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8010 } 8011 if (!(_s.opid.fComplex == false)) { 8012 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8013 } 8014 _s.fillRectRight = in.readint32(); 8015 } 8016 void MSO::parseFillRectBottom(LEInputStream& in, FillRectBottom& _s) { 8017 _s.streamOffset = in.getPosition(); 8018 parseOfficeArtFOPTEOPID(in, _s.opid); 8019 if (!(_s.opid.opid == 0x0194)) { 8020 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0194"); 8021 } 8022 if (!(_s.opid.fBid == false)) { 8023 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8024 } 8025 if (!(_s.opid.fComplex == false)) { 8026 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8027 } 8028 _s.fillRectBottom = in.readint32(); 8029 } 8030 void MSO::parseFillDztype(LEInputStream& in, FillDztype& _s) { 8031 _s.streamOffset = in.getPosition(); 8032 parseOfficeArtFOPTEOPID(in, _s.opid); 8033 if (!(_s.opid.opid == 0x0195)) { 8034 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0195"); 8035 } 8036 if (!(_s.opid.fBid == false)) { 8037 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8038 } 8039 if (!(_s.opid.fComplex == false)) { 8040 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8041 } 8042 _s.fillDztype = in.readint32(); 8043 } 8044 void MSO::parseFillShadePreset(LEInputStream& in, FillShadePreset& _s) { 8045 _s.streamOffset = in.getPosition(); 8046 parseOfficeArtFOPTEOPID(in, _s.opid); 8047 if (!(_s.opid.opid == 0x0196)) { 8048 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0196"); 8049 } 8050 if (!(_s.opid.fBid == false)) { 8051 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8052 } 8053 if (!(_s.opid.fComplex == false)) { 8054 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8055 } 8056 _s.fillShadePreset = in.readint32(); 8057 } 8058 void MSO::parseFillShadeColors(LEInputStream& in, FillShadeColors& _s) { 8059 _s.streamOffset = in.getPosition(); 8060 parseOfficeArtFOPTEOPID(in, _s.opid); 8061 if (!(_s.opid.opid == 0x0197)) { 8062 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0197"); 8063 } 8064 _s.fillShadeColors = in.readuint32(); 8065 } 8066 void MSO::parseFillOriginX(LEInputStream& in, FillOriginX& _s) { 8067 _s.streamOffset = in.getPosition(); 8068 parseOfficeArtFOPTEOPID(in, _s.opid); 8069 if (!(_s.opid.opid == 0x0198)) { 8070 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0198"); 8071 } 8072 if (!(_s.opid.fBid == false)) { 8073 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8074 } 8075 if (!(_s.opid.fComplex == false)) { 8076 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8077 } 8078 parseFixedPoint(in, _s.fillOriginX); 8079 } 8080 void MSO::parseFillOriginY(LEInputStream& in, FillOriginY& _s) { 8081 _s.streamOffset = in.getPosition(); 8082 parseOfficeArtFOPTEOPID(in, _s.opid); 8083 if (!(_s.opid.opid == 0x0199)) { 8084 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0199"); 8085 } 8086 if (!(_s.opid.fBid == false)) { 8087 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8088 } 8089 if (!(_s.opid.fComplex == false)) { 8090 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8091 } 8092 parseFixedPoint(in, _s.fillOriginY); 8093 } 8094 void MSO::parseFillShapeOriginX(LEInputStream& in, FillShapeOriginX& _s) { 8095 _s.streamOffset = in.getPosition(); 8096 parseOfficeArtFOPTEOPID(in, _s.opid); 8097 if (!(_s.opid.opid == 0x019A)) { 8098 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x019A"); 8099 } 8100 if (!(_s.opid.fBid == false)) { 8101 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8102 } 8103 if (!(_s.opid.fComplex == false)) { 8104 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8105 } 8106 parseFixedPoint(in, _s.fillShapeOriginX); 8107 } 8108 void MSO::parseFillShapeOriginY(LEInputStream& in, FillShapeOriginY& _s) { 8109 _s.streamOffset = in.getPosition(); 8110 parseOfficeArtFOPTEOPID(in, _s.opid); 8111 if (!(_s.opid.opid == 0x019B)) { 8112 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x019B"); 8113 } 8114 if (!(_s.opid.fBid == false)) { 8115 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8116 } 8117 if (!(_s.opid.fComplex == false)) { 8118 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8119 } 8120 parseFixedPoint(in, _s.fillShapeOriginY); 8121 } 8122 void MSO::parseFillColorExt(LEInputStream& in, FillColorExt& _s) { 8123 _s.streamOffset = in.getPosition(); 8124 parseOfficeArtFOPTEOPID(in, _s.opid); 8125 if (!(_s.opid.opid == 0x019E)) { 8126 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x019E"); 8127 } 8128 if (!(_s.opid.fBid == false)) { 8129 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8130 } 8131 if (!(_s.opid.fComplex == false)) { 8132 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8133 } 8134 parseOfficeArtCOLORREF(in, _s.fillColorExt); 8135 } 8136 void MSO::parseFillBackColorExt(LEInputStream& in, FillBackColorExt& _s) { 8137 _s.streamOffset = in.getPosition(); 8138 parseOfficeArtFOPTEOPID(in, _s.opid); 8139 if (!(_s.opid.opid == 0x01A2)) { 8140 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01A2"); 8141 } 8142 if (!(_s.opid.fBid == false)) { 8143 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8144 } 8145 if (!(_s.opid.fComplex == false)) { 8146 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8147 } 8148 parseOfficeArtCOLORREF(in, _s.fillBackColorExt); 8149 } 8150 void MSO::parseFillStyleBooleanProperties(LEInputStream& in, FillStyleBooleanProperties& _s) { 8151 _s.streamOffset = in.getPosition(); 8152 parseOfficeArtFOPTEOPID(in, _s.opid); 8153 if (!(_s.opid.opid == 0x01BF)) { 8154 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01BF"); 8155 } 8156 if (!(_s.opid.fBid == false)) { 8157 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8158 } 8159 if (!(_s.opid.fComplex == false)) { 8160 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8161 } 8162 _s.fNoFillHitTest = in.readbit(); 8163 _s.fillUseRect = in.readbit(); 8164 _s.fillShape = in.readbit(); 8165 _s.fHitTestFill = in.readbit(); 8166 _s.fFilled = in.readbit(); 8167 _s.fUseShapeAnchor = in.readbit(); 8168 _s.fRecolorFillAsPicture = in.readbit(); 8169 _s.unused1a = in.readbit(); 8170 _s.unused1b = in.readuint8(); 8171 _s.fUseNoFillHitTest = in.readbit(); 8172 _s.fUseFillUseRect = in.readbit(); 8173 _s.fUseFillShape = in.readbit(); 8174 _s.fUseHitTestFill = in.readbit(); 8175 _s.fUseFilled = in.readbit(); 8176 _s.fUseUseShapeAnchor = in.readbit(); 8177 _s.fUsefRecolorFillAsPicture = in.readbit(); 8178 _s.unused2a = in.readbit(); 8179 _s.unused2b = in.readuint8(); 8180 } 8181 void MSO::parseLineColor(LEInputStream& in, LineColor& _s) { 8182 _s.streamOffset = in.getPosition(); 8183 parseOfficeArtFOPTEOPID(in, _s.opid); 8184 if (!(_s.opid.opid == 0x01C0)) { 8185 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01C0"); 8186 } 8187 if (!(_s.opid.fBid == false)) { 8188 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8189 } 8190 if (!(_s.opid.fComplex == false)) { 8191 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8192 } 8193 parseOfficeArtCOLORREF(in, _s.lineColor); 8194 } 8195 void MSO::parseLineOpacity(LEInputStream& in, LineOpacity& _s) { 8196 _s.streamOffset = in.getPosition(); 8197 parseOfficeArtFOPTEOPID(in, _s.opid); 8198 if (!(_s.opid.opid == 0x01C1)) { 8199 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01C1"); 8200 } 8201 if (!(_s.opid.fBid == false)) { 8202 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8203 } 8204 if (!(_s.opid.fComplex == false)) { 8205 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8206 } 8207 _s.lineOpacity = in.readint32(); 8208 if (!(((qint32)_s.lineOpacity)>=0)) { 8209 throw IncorrectValueException(in.getPosition(), "((qint32)_s.lineOpacity)>=0"); 8210 } 8211 if (!(((qint32)_s.lineOpacity)<=65536)) { 8212 throw IncorrectValueException(in.getPosition(), "((qint32)_s.lineOpacity)<=65536"); 8213 } 8214 } 8215 void MSO::parseLineBackColor(LEInputStream& in, LineBackColor& _s) { 8216 _s.streamOffset = in.getPosition(); 8217 parseOfficeArtFOPTEOPID(in, _s.opid); 8218 if (!(_s.opid.opid == 0x01C2)) { 8219 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01C2"); 8220 } 8221 parseOfficeArtCOLORREF(in, _s.lineBackColor); 8222 } 8223 void MSO::parseLineFillBlip(LEInputStream& in, LineFillBlip& _s) { 8224 _s.streamOffset = in.getPosition(); 8225 parseOfficeArtFOPTEOPID(in, _s.opid); 8226 if (!(_s.opid.opid == 0x01C5)) { 8227 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01C5"); 8228 } 8229 _s.lineFillBlip = in.readuint32(); 8230 } 8231 void MSO::parseLineWidth(LEInputStream& in, LineWidth& _s) { 8232 _s.streamOffset = in.getPosition(); 8233 parseOfficeArtFOPTEOPID(in, _s.opid); 8234 if (!(_s.opid.opid == 0x01CB)) { 8235 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01CB"); 8236 } 8237 if (!(_s.opid.fBid == false)) { 8238 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8239 } 8240 if (!(_s.opid.fComplex == false)) { 8241 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8242 } 8243 _s.lineWidth = in.readuint32(); 8244 } 8245 void MSO::parseLineStyle(LEInputStream& in, LineStyle& _s) { 8246 _s.streamOffset = in.getPosition(); 8247 parseOfficeArtFOPTEOPID(in, _s.opid); 8248 if (!(_s.opid.opid == 0x01CD)) { 8249 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01CD"); 8250 } 8251 if (!(_s.opid.fBid == false)) { 8252 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8253 } 8254 if (!(_s.opid.fComplex == false)) { 8255 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8256 } 8257 _s.lineStyle = in.readuint32(); 8258 } 8259 void MSO::parseLineDashing(LEInputStream& in, LineDashing& _s) { 8260 _s.streamOffset = in.getPosition(); 8261 parseOfficeArtFOPTEOPID(in, _s.opid); 8262 if (!(_s.opid.opid == 0x01CE)) { 8263 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01CE"); 8264 } 8265 if (!(_s.opid.fBid == false)) { 8266 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8267 } 8268 if (!(_s.opid.fComplex == false)) { 8269 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8270 } 8271 _s.lineDashing = in.readuint32(); 8272 } 8273 void MSO::parseLineStartArrowhead(LEInputStream& in, LineStartArrowhead& _s) { 8274 _s.streamOffset = in.getPosition(); 8275 parseOfficeArtFOPTEOPID(in, _s.opid); 8276 if (!(_s.opid.opid == 0x01D0)) { 8277 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D0"); 8278 } 8279 if (!(_s.opid.fBid == false)) { 8280 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8281 } 8282 if (!(_s.opid.fComplex == false)) { 8283 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8284 } 8285 _s.lineStartArrowhead = in.readuint32(); 8286 if (!(((quint32)_s.lineStartArrowhead)<=8)) { 8287 throw IncorrectValueException(in.getPosition(), "((quint32)_s.lineStartArrowhead)<=8"); 8288 } 8289 } 8290 void MSO::parseLineEndArrowhead(LEInputStream& in, LineEndArrowhead& _s) { 8291 _s.streamOffset = in.getPosition(); 8292 parseOfficeArtFOPTEOPID(in, _s.opid); 8293 if (!(_s.opid.opid == 0x01D1)) { 8294 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D1"); 8295 } 8296 if (!(_s.opid.fBid == false)) { 8297 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8298 } 8299 if (!(_s.opid.fComplex == false)) { 8300 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8301 } 8302 _s.lineEndArrowhead = in.readuint32(); 8303 if (!(((quint32)_s.lineEndArrowhead)<=8)) { 8304 throw IncorrectValueException(in.getPosition(), "((quint32)_s.lineEndArrowhead)<=8"); 8305 } 8306 } 8307 void MSO::parseLineStartArrowWidth(LEInputStream& in, LineStartArrowWidth& _s) { 8308 _s.streamOffset = in.getPosition(); 8309 parseOfficeArtFOPTEOPID(in, _s.opid); 8310 if (!(_s.opid.opid == 0x01D2)) { 8311 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D2"); 8312 } 8313 if (!(_s.opid.fBid == false)) { 8314 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8315 } 8316 if (!(_s.opid.fComplex == false)) { 8317 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8318 } 8319 _s.lineStartArrowWidth = in.readuint32(); 8320 } 8321 void MSO::parseLineStartArrowLength(LEInputStream& in, LineStartArrowLength& _s) { 8322 _s.streamOffset = in.getPosition(); 8323 parseOfficeArtFOPTEOPID(in, _s.opid); 8324 if (!(_s.opid.opid == 0x01D3)) { 8325 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D3"); 8326 } 8327 if (!(_s.opid.fBid == false)) { 8328 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8329 } 8330 if (!(_s.opid.fComplex == false)) { 8331 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8332 } 8333 _s.lineStartArrowLength = in.readuint32(); 8334 } 8335 void MSO::parseLineEndArrowWidth(LEInputStream& in, LineEndArrowWidth& _s) { 8336 _s.streamOffset = in.getPosition(); 8337 parseOfficeArtFOPTEOPID(in, _s.opid); 8338 if (!(_s.opid.opid == 0x01D4)) { 8339 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D4"); 8340 } 8341 if (!(_s.opid.fBid == false)) { 8342 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8343 } 8344 if (!(_s.opid.fComplex == false)) { 8345 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8346 } 8347 _s.lineEndArrowWidth = in.readuint32(); 8348 } 8349 void MSO::parseLineEndArrowLength(LEInputStream& in, LineEndArrowLength& _s) { 8350 _s.streamOffset = in.getPosition(); 8351 parseOfficeArtFOPTEOPID(in, _s.opid); 8352 if (!(_s.opid.opid == 0x01D5)) { 8353 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D5"); 8354 } 8355 if (!(_s.opid.fBid == false)) { 8356 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8357 } 8358 if (!(_s.opid.fComplex == false)) { 8359 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8360 } 8361 _s.lineEndArrowLength = in.readuint32(); 8362 } 8363 void MSO::parseLineJoinStyle(LEInputStream& in, LineJoinStyle& _s) { 8364 _s.streamOffset = in.getPosition(); 8365 parseOfficeArtFOPTEOPID(in, _s.opid); 8366 if (!(_s.opid.opid == 0x01D6)) { 8367 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D6"); 8368 } 8369 if (!(_s.opid.fBid == false)) { 8370 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8371 } 8372 if (!(_s.opid.fComplex == false)) { 8373 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8374 } 8375 _s.lineJoinStyle = in.readuint32(); 8376 if (!(((quint32)_s.lineJoinStyle)<=2)) { 8377 throw IncorrectValueException(in.getPosition(), "((quint32)_s.lineJoinStyle)<=2"); 8378 } 8379 } 8380 void MSO::parseLineEndCapStyle(LEInputStream& in, LineEndCapStyle& _s) { 8381 _s.streamOffset = in.getPosition(); 8382 parseOfficeArtFOPTEOPID(in, _s.opid); 8383 if (!(_s.opid.opid == 0x01D7)) { 8384 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01D7"); 8385 } 8386 if (!(_s.opid.fBid == false)) { 8387 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8388 } 8389 if (!(_s.opid.fComplex == false)) { 8390 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8391 } 8392 _s.lineEndCapStyle = in.readuint32(); 8393 if (!(((quint32)_s.lineEndCapStyle)<=3)) { 8394 throw IncorrectValueException(in.getPosition(), "((quint32)_s.lineEndCapStyle)<=3"); 8395 } 8396 } 8397 void MSO::parseLineStyleBooleanProperties(LEInputStream& in, LineStyleBooleanProperties& _s) { 8398 _s.streamOffset = in.getPosition(); 8399 parseOfficeArtFOPTEOPID(in, _s.opid); 8400 if (!(_s.opid.opid == 0x01FF)) { 8401 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x01FF"); 8402 } 8403 if (!(_s.opid.fBid == false)) { 8404 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8405 } 8406 if (!(_s.opid.fComplex == false)) { 8407 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8408 } 8409 _s.fNoLineDrawDash = in.readbit(); 8410 _s.fLineFillShape = in.readbit(); 8411 _s.fHitTestLine = in.readbit(); 8412 _s.fLine = in.readbit(); 8413 _s.fArrowHeadsOK = in.readbit(); 8414 _s.fInsetPenOK = in.readbit(); 8415 _s.fInsetPen = in.readbit(); 8416 _s.reserved1 = in.readbit(); 8417 _s.reserved2 = in.readbit(); 8418 _s.fLineOpaqueBackColor = in.readbit(); 8419 _s.unused1 = in.readuint6(); 8420 _s.fUseNoLineDrawDash = in.readbit(); 8421 _s.fUseLineFillShape = in.readbit(); 8422 _s.fUseHitTestLine = in.readbit(); 8423 _s.fUsefLine = in.readbit(); 8424 _s.fUsefArrowHeadsOK = in.readbit(); 8425 _s.fUseInsetPenOK = in.readbit(); 8426 _s.fUseInsetPen = in.readbit(); 8427 _s.unused2 = in.readbit(); 8428 _s.unused3 = in.readbit(); 8429 _s.fUsefLineOpaqueBackColor = in.readbit(); 8430 _s.unused4 = in.readuint6(); 8431 } 8432 void MSO::parseShadowType(LEInputStream& in, ShadowType& _s) { 8433 _s.streamOffset = in.getPosition(); 8434 parseOfficeArtFOPTEOPID(in, _s.opid); 8435 if (!(_s.opid.opid == 0x0200)) { 8436 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0200"); 8437 } 8438 if (!(_s.opid.fBid == false)) { 8439 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8440 } 8441 if (!(_s.opid.fComplex == false)) { 8442 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8443 } 8444 _s.shadowType = in.readuint32(); 8445 } 8446 void MSO::parseShadowColor(LEInputStream& in, ShadowColor& _s) { 8447 _s.streamOffset = in.getPosition(); 8448 parseOfficeArtFOPTEOPID(in, _s.opid); 8449 if (!(_s.opid.opid == 0x0201)) { 8450 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0201"); 8451 } 8452 if (!(_s.opid.fBid == false)) { 8453 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8454 } 8455 if (!(_s.opid.fComplex == false)) { 8456 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8457 } 8458 parseOfficeArtCOLORREF(in, _s.shadowColor); 8459 } 8460 void MSO::parseShadowOpacity(LEInputStream& in, ShadowOpacity& _s) { 8461 _s.streamOffset = in.getPosition(); 8462 parseOfficeArtFOPTEOPID(in, _s.opid); 8463 if (!(_s.opid.opid == 0x0204)) { 8464 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0204"); 8465 } 8466 if (!(_s.opid.fBid == false)) { 8467 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8468 } 8469 if (!(_s.opid.fComplex == false)) { 8470 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8471 } 8472 parseFixedPoint(in, _s.shadowOpacity); 8473 } 8474 void MSO::parseShadowOffsetX(LEInputStream& in, ShadowOffsetX& _s) { 8475 _s.streamOffset = in.getPosition(); 8476 parseOfficeArtFOPTEOPID(in, _s.opid); 8477 if (!(_s.opid.opid == 0x0205)) { 8478 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0205"); 8479 } 8480 if (!(_s.opid.fBid == false)) { 8481 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8482 } 8483 if (!(_s.opid.fComplex == false)) { 8484 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8485 } 8486 _s.shadowOffsetX = in.readint32(); 8487 } 8488 void MSO::parseShadowOffsetY(LEInputStream& in, ShadowOffsetY& _s) { 8489 _s.streamOffset = in.getPosition(); 8490 parseOfficeArtFOPTEOPID(in, _s.opid); 8491 if (!(_s.opid.opid == 0x0206)) { 8492 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0206"); 8493 } 8494 if (!(_s.opid.fBid == false)) { 8495 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8496 } 8497 if (!(_s.opid.fComplex == false)) { 8498 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8499 } 8500 _s.shadowOffsetY = in.readint32(); 8501 } 8502 void MSO::parseShadowStyleBooleanProperties(LEInputStream& in, ShadowStyleBooleanProperties& _s) { 8503 _s.streamOffset = in.getPosition(); 8504 parseOfficeArtFOPTEOPID(in, _s.opid); 8505 if (!(_s.opid.opid == 0x023F)) { 8506 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x023F"); 8507 } 8508 if (!(_s.opid.fBid == false)) { 8509 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8510 } 8511 if (!(_s.opid.fComplex == false)) { 8512 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8513 } 8514 _s.fShadowObscured = in.readbit(); 8515 _s.fShadow = in.readbit(); 8516 _s.unused1 = in.readuint14(); 8517 _s.fUsefShadowObscured = in.readbit(); 8518 _s.fUsefShadow = in.readbit(); 8519 _s.unused2 = in.readuint14(); 8520 } 8521 void MSO::parseHspMaster(LEInputStream& in, HspMaster& _s) { 8522 _s.streamOffset = in.getPosition(); 8523 parseOfficeArtFOPTEOPID(in, _s.opid); 8524 if (!(_s.opid.opid == 0x0301)) { 8525 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0301"); 8526 } 8527 if (!(_s.opid.fBid == false)) { 8528 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8529 } 8530 if (!(_s.opid.fComplex == false)) { 8531 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8532 } 8533 _s.hspMaster = in.readuint32(); 8534 } 8535 void MSO::parseCxstyle(LEInputStream& in, Cxstyle& _s) { 8536 _s.streamOffset = in.getPosition(); 8537 parseOfficeArtFOPTEOPID(in, _s.opid); 8538 if (!(_s.opid.opid == 0x0303)) { 8539 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0303"); 8540 } 8541 if (!(_s.opid.fBid == false)) { 8542 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8543 } 8544 if (!(_s.opid.fComplex == false)) { 8545 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8546 } 8547 _s.cxstyle = in.readuint32(); 8548 if (!(((quint32)_s.cxstyle)<=4)) { 8549 throw IncorrectValueException(in.getPosition(), "((quint32)_s.cxstyle)<=4"); 8550 } 8551 } 8552 void MSO::parseBWMode(LEInputStream& in, BWMode& _s) { 8553 _s.streamOffset = in.getPosition(); 8554 parseOfficeArtFOPTEOPID(in, _s.opid); 8555 if (!(_s.opid.opid == 0x0304)) { 8556 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0304"); 8557 } 8558 if (!(_s.opid.fBid == false)) { 8559 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8560 } 8561 if (!(_s.opid.fComplex == false)) { 8562 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8563 } 8564 _s.bWMode = in.readuint32(); 8565 if (!(((quint32)_s.bWMode)<=10)) { 8566 throw IncorrectValueException(in.getPosition(), "((quint32)_s.bWMode)<=10"); 8567 } 8568 } 8569 void MSO::parseShapeBooleanProperties(LEInputStream& in, ShapeBooleanProperties& _s) { 8570 _s.streamOffset = in.getPosition(); 8571 parseOfficeArtFOPTEOPID(in, _s.opid); 8572 if (!(_s.opid.opid == 0x033F)) { 8573 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x033F"); 8574 } 8575 if (!(_s.opid.fBid == false)) { 8576 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8577 } 8578 if (!(_s.opid.fComplex == false)) { 8579 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8580 } 8581 _s.fBackground = in.readbit(); 8582 _s.reserved1 = in.readbit(); 8583 _s.fInitiator = in.readbit(); 8584 _s.fLockShapeType = in.readbit(); 8585 _s.fPreferRelativeResize = in.readbit(); 8586 _s.fOleIcon = in.readbit(); 8587 _s.fFlipVOverride = in.readbit(); 8588 _s.fFlipHOverride = in.readbit(); 8589 _s.fPolicyBarcode = in.readbit(); 8590 _s.fPolicyLabel = in.readbit(); 8591 _s.unused1 = in.readbit(); 8592 _s.unused2 = in.readbit(); 8593 _s.unused3 = in.readuint4(); 8594 _s.fUsefBackground = in.readbit(); 8595 _s.unused4 = in.readbit(); 8596 _s.fUsefInitiator = in.readbit(); 8597 _s.fUsefLockShapeType = in.readbit(); 8598 _s.fusePreferrelativeResize = in.readbit(); 8599 _s.fUsefOleIcon = in.readbit(); 8600 _s.fUsefFlipVOverride = in.readbit(); 8601 _s.fUsefFlipHOverride = in.readbit(); 8602 _s.fUsefPolicyBarcode = in.readbit(); 8603 _s.fUsefPolicyLabel = in.readbit(); 8604 _s.unused5 = in.readbit(); 8605 _s.unused6 = in.readbit(); 8606 _s.unused7 = in.readuint4(); 8607 } 8608 void MSO::parseDxyCalloutGap(LEInputStream& in, DxyCalloutGap& _s) { 8609 _s.streamOffset = in.getPosition(); 8610 parseOfficeArtFOPTEOPID(in, _s.opid); 8611 if (!(_s.opid.opid == 0x0341)) { 8612 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0341"); 8613 } 8614 if (!(_s.opid.fBid == false)) { 8615 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8616 } 8617 if (!(_s.opid.fComplex == false)) { 8618 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8619 } 8620 _s.dxyCalloutGap = in.readuint32(); 8621 } 8622 void MSO::parseSpcoa(LEInputStream& in, Spcoa& _s) { 8623 _s.streamOffset = in.getPosition(); 8624 parseOfficeArtFOPTEOPID(in, _s.opid); 8625 if (!(_s.opid.opid == 0x0342)) { 8626 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0342"); 8627 } 8628 if (!(_s.opid.fBid == false)) { 8629 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8630 } 8631 if (!(_s.opid.fComplex == false)) { 8632 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8633 } 8634 _s.spcoa = in.readuint32(); 8635 } 8636 void MSO::parseSpcod(LEInputStream& in, Spcod& _s) { 8637 _s.streamOffset = in.getPosition(); 8638 parseOfficeArtFOPTEOPID(in, _s.opid); 8639 if (!(_s.opid.opid == 0x0343)) { 8640 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0343"); 8641 } 8642 if (!(_s.opid.fBid == false)) { 8643 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8644 } 8645 if (!(_s.opid.fComplex == false)) { 8646 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8647 } 8648 _s.spcod = in.readuint32(); 8649 } 8650 void MSO::parseDxyCalloutDropSpecified(LEInputStream& in, DxyCalloutDropSpecified& _s) { 8651 _s.streamOffset = in.getPosition(); 8652 parseOfficeArtFOPTEOPID(in, _s.opid); 8653 if (!(_s.opid.opid == 0x0344)) { 8654 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0344"); 8655 } 8656 if (!(_s.opid.fBid == false)) { 8657 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8658 } 8659 if (!(_s.opid.fComplex == false)) { 8660 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8661 } 8662 _s.dxyCalloutDropSpecified = in.readuint32(); 8663 } 8664 void MSO::parseDxyCalloutLengthSpecified(LEInputStream& in, DxyCalloutLengthSpecified& _s) { 8665 _s.streamOffset = in.getPosition(); 8666 parseOfficeArtFOPTEOPID(in, _s.opid); 8667 if (!(_s.opid.opid == 0x0345)) { 8668 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0345"); 8669 } 8670 if (!(_s.opid.fBid == false)) { 8671 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8672 } 8673 if (!(_s.opid.fComplex == false)) { 8674 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8675 } 8676 _s.dxyCalloutLengthSpecified = in.readuint32(); 8677 } 8678 void MSO::parseCalloutBooleanProperties(LEInputStream& in, CalloutBooleanProperties& _s) { 8679 _s.streamOffset = in.getPosition(); 8680 parseOfficeArtFOPTEOPID(in, _s.opid); 8681 if (!(_s.opid.opid == 0x037F)) { 8682 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x037F"); 8683 } 8684 if (!(_s.opid.fBid == false)) { 8685 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8686 } 8687 if (!(_s.opid.fComplex == false)) { 8688 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8689 } 8690 _s.fCalloutLengthSpecified = in.readbit(); 8691 _s.fCalloutDropAuto = in.readbit(); 8692 _s.fCalloutMinusY = in.readbit(); 8693 _s.fCalloutMinusX = in.readbit(); 8694 _s.fCalloutTextBorder = in.readbit(); 8695 _s.fCalloutAccentBar = in.readbit(); 8696 _s.fCallout = in.readbit(); 8697 _s.unused1a = in.readbit(); 8698 _s.unused1b = in.readuint8(); 8699 _s.fUsefCalloutLengthSpecified = in.readbit(); 8700 _s.fUsefCalloutDropAuto = in.readbit(); 8701 _s.fUsefCalloutMinusY = in.readbit(); 8702 _s.fUsefCalloutMinusX = in.readbit(); 8703 _s.fUsefCalloutTextBorder = in.readbit(); 8704 _s.fUsefCalloutAccentBar = in.readbit(); 8705 _s.fUsefCallout = in.readbit(); 8706 _s.unused2a = in.readbit(); 8707 _s.unused2b = in.readuint8(); 8708 } 8709 void MSO::parsePWrapPolygonVertices(LEInputStream& in, PWrapPolygonVertices& _s) { 8710 _s.streamOffset = in.getPosition(); 8711 parseOfficeArtFOPTEOPID(in, _s.opid); 8712 if (!(_s.opid.opid == 0x0383)) { 8713 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0383"); 8714 } 8715 _s.pWrapPolygonVertices = in.readuint32(); 8716 } 8717 void MSO::parseDxWrapDistLeft(LEInputStream& in, DxWrapDistLeft& _s) { 8718 _s.streamOffset = in.getPosition(); 8719 parseOfficeArtFOPTEOPID(in, _s.opid); 8720 if (!(_s.opid.opid == 0x0384)) { 8721 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0384"); 8722 } 8723 if (!(_s.opid.fBid == false)) { 8724 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8725 } 8726 if (!(_s.opid.fComplex == false)) { 8727 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8728 } 8729 _s.dxWrapDistLeft = in.readint32(); 8730 } 8731 void MSO::parseDyWrapDistTop(LEInputStream& in, DyWrapDistTop& _s) { 8732 _s.streamOffset = in.getPosition(); 8733 parseOfficeArtFOPTEOPID(in, _s.opid); 8734 if (!(_s.opid.opid == 0x0385)) { 8735 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0385"); 8736 } 8737 if (!(_s.opid.fBid == false)) { 8738 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8739 } 8740 if (!(_s.opid.fComplex == false)) { 8741 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8742 } 8743 _s.dyWrapDistTop = in.readint32(); 8744 } 8745 void MSO::parseDxWrapDistRight(LEInputStream& in, DxWrapDistRight& _s) { 8746 _s.streamOffset = in.getPosition(); 8747 parseOfficeArtFOPTEOPID(in, _s.opid); 8748 if (!(_s.opid.opid == 0x0386)) { 8749 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0386"); 8750 } 8751 if (!(_s.opid.fBid == false)) { 8752 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8753 } 8754 if (!(_s.opid.fComplex == false)) { 8755 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8756 } 8757 _s.dxWrapDistRight = in.readint32(); 8758 } 8759 void MSO::parseDyWrapDistBottom(LEInputStream& in, DyWrapDistBottom& _s) { 8760 _s.streamOffset = in.getPosition(); 8761 parseOfficeArtFOPTEOPID(in, _s.opid); 8762 if (!(_s.opid.opid == 0x0387)) { 8763 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0387"); 8764 } 8765 if (!(_s.opid.fBid == false)) { 8766 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8767 } 8768 if (!(_s.opid.fComplex == false)) { 8769 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8770 } 8771 _s.dyWrapDistBottom = in.readint32(); 8772 } 8773 void MSO::parseLidRegroup(LEInputStream& in, LidRegroup& _s) { 8774 _s.streamOffset = in.getPosition(); 8775 parseOfficeArtFOPTEOPID(in, _s.opid); 8776 if (!(_s.opid.opid == 0x0388)) { 8777 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0388"); 8778 } 8779 if (!(_s.opid.fBid == false)) { 8780 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8781 } 8782 if (!(_s.opid.fComplex == false)) { 8783 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8784 } 8785 _s.lidRegroup = in.readuint32(); 8786 } 8787 void MSO::parsePosH(LEInputStream& in, PosH& _s) { 8788 _s.streamOffset = in.getPosition(); 8789 parseOfficeArtFOPTEOPID(in, _s.opid); 8790 if (!(_s.opid.opid == 0x038F)) { 8791 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x038F"); 8792 } 8793 if (!(_s.opid.fBid == false)) { 8794 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8795 } 8796 if (!(_s.opid.fComplex == false)) { 8797 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8798 } 8799 _s.posH = in.readuint32(); 8800 } 8801 void MSO::parsePosRelH(LEInputStream& in, PosRelH& _s) { 8802 _s.streamOffset = in.getPosition(); 8803 parseOfficeArtFOPTEOPID(in, _s.opid); 8804 if (!(_s.opid.opid == 0x0390)) { 8805 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0390"); 8806 } 8807 if (!(_s.opid.fBid == false)) { 8808 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8809 } 8810 if (!(_s.opid.fComplex == false)) { 8811 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8812 } 8813 _s.posRelH = in.readuint32(); 8814 } 8815 void MSO::parsePosV(LEInputStream& in, PosV& _s) { 8816 _s.streamOffset = in.getPosition(); 8817 parseOfficeArtFOPTEOPID(in, _s.opid); 8818 if (!(_s.opid.opid == 0x0391)) { 8819 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0391"); 8820 } 8821 if (!(_s.opid.fBid == false)) { 8822 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8823 } 8824 if (!(_s.opid.fComplex == false)) { 8825 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8826 } 8827 _s.posV = in.readuint32(); 8828 } 8829 void MSO::parsePosRelV(LEInputStream& in, PosRelV& _s) { 8830 _s.streamOffset = in.getPosition(); 8831 parseOfficeArtFOPTEOPID(in, _s.opid); 8832 if (!(_s.opid.opid == 0x0392)) { 8833 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0392"); 8834 } 8835 if (!(_s.opid.fBid == false)) { 8836 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8837 } 8838 if (!(_s.opid.fComplex == false)) { 8839 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8840 } 8841 _s.posRelV = in.readuint32(); 8842 } 8843 void MSO::parsePctHR(LEInputStream& in, PctHR& _s) { 8844 _s.streamOffset = in.getPosition(); 8845 parseOfficeArtFOPTEOPID(in, _s.opid); 8846 if (!(_s.opid.opid == 0x0393)) { 8847 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0393"); 8848 } 8849 if (!(_s.opid.fBid == false)) { 8850 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8851 } 8852 if (!(_s.opid.fComplex == false)) { 8853 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8854 } 8855 _s.pctHR = in.readuint32(); 8856 } 8857 void MSO::parseAlignHR(LEInputStream& in, AlignHR& _s) { 8858 _s.streamOffset = in.getPosition(); 8859 parseOfficeArtFOPTEOPID(in, _s.opid); 8860 if (!(_s.opid.opid == 0x0394)) { 8861 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0394"); 8862 } 8863 if (!(_s.opid.fBid == false)) { 8864 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8865 } 8866 if (!(_s.opid.fComplex == false)) { 8867 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8868 } 8869 _s.alignHR = in.readuint32(); 8870 } 8871 void MSO::parseDxHeightHR(LEInputStream& in, DxHeightHR& _s) { 8872 _s.streamOffset = in.getPosition(); 8873 parseOfficeArtFOPTEOPID(in, _s.opid); 8874 if (!(_s.opid.opid == 0x0395)) { 8875 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0395"); 8876 } 8877 if (!(_s.opid.fBid == false)) { 8878 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8879 } 8880 if (!(_s.opid.fComplex == false)) { 8881 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8882 } 8883 _s.dxHeightHR = in.readint32(); 8884 } 8885 void MSO::parseDxWidthHR(LEInputStream& in, DxWidthHR& _s) { 8886 _s.streamOffset = in.getPosition(); 8887 parseOfficeArtFOPTEOPID(in, _s.opid); 8888 if (!(_s.opid.opid == 0x0396)) { 8889 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0396"); 8890 } 8891 if (!(_s.opid.fBid == false)) { 8892 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8893 } 8894 if (!(_s.opid.fComplex == false)) { 8895 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8896 } 8897 _s.dxWidthHR = in.readint32(); 8898 } 8899 void MSO::parseBorderTopColor(LEInputStream& in, BorderTopColor& _s) { 8900 _s.streamOffset = in.getPosition(); 8901 parseOfficeArtFOPTEOPID(in, _s.opid); 8902 if (!(_s.opid.opid == 0x039b)) { 8903 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x039b"); 8904 } 8905 if (!(_s.opid.fBid == false)) { 8906 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8907 } 8908 if (!(_s.opid.fComplex == false)) { 8909 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8910 } 8911 parseOfficeArtCOLORREF(in, _s.borderTopColor); 8912 } 8913 void MSO::parseBorderLeftColor(LEInputStream& in, BorderLeftColor& _s) { 8914 _s.streamOffset = in.getPosition(); 8915 parseOfficeArtFOPTEOPID(in, _s.opid); 8916 if (!(_s.opid.opid == 0x039c)) { 8917 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x039c"); 8918 } 8919 if (!(_s.opid.fBid == false)) { 8920 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8921 } 8922 if (!(_s.opid.fComplex == false)) { 8923 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8924 } 8925 parseOfficeArtCOLORREF(in, _s.borderLeftColor); 8926 } 8927 void MSO::parseBorderBottomColor(LEInputStream& in, BorderBottomColor& _s) { 8928 _s.streamOffset = in.getPosition(); 8929 parseOfficeArtFOPTEOPID(in, _s.opid); 8930 if (!(_s.opid.opid == 0x039d)) { 8931 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x039d"); 8932 } 8933 if (!(_s.opid.fBid == false)) { 8934 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8935 } 8936 if (!(_s.opid.fComplex == false)) { 8937 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8938 } 8939 parseOfficeArtCOLORREF(in, _s.borderBottomColor); 8940 } 8941 void MSO::parseBorderRightColor(LEInputStream& in, BorderRightColor& _s) { 8942 _s.streamOffset = in.getPosition(); 8943 parseOfficeArtFOPTEOPID(in, _s.opid); 8944 if (!(_s.opid.opid == 0x039e)) { 8945 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x039e"); 8946 } 8947 if (!(_s.opid.fBid == false)) { 8948 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8949 } 8950 if (!(_s.opid.fComplex == false)) { 8951 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8952 } 8953 parseOfficeArtCOLORREF(in, _s.borderRightColor); 8954 } 8955 void MSO::parseGroupShapeBooleanProperties(LEInputStream& in, GroupShapeBooleanProperties& _s) { 8956 _s.streamOffset = in.getPosition(); 8957 parseOfficeArtFOPTEOPID(in, _s.opid); 8958 if (!(_s.opid.opid == 0x03bf)) { 8959 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x03bf"); 8960 } 8961 if (!(_s.opid.fBid == false)) { 8962 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 8963 } 8964 if (!(_s.opid.fComplex == false)) { 8965 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 8966 } 8967 _s.fPrint = in.readbit(); 8968 _s.fHidden = in.readbit(); 8969 _s.fOneD = in.readbit(); 8970 _s.fIsButton = in.readbit(); 8971 _s.fOnDblClickNotify = in.readbit(); 8972 _s.fBehindDocument = in.readbit(); 8973 _s.fEditedWrap = in.readbit(); 8974 _s.fScriptAnchor = in.readbit(); 8975 _s.fReallyHidden = in.readbit(); 8976 _s.fAllowOverlap = in.readbit(); 8977 _s.fUserDrawn = in.readbit(); 8978 _s.fHorizRule = in.readbit(); 8979 _s.fNoshadeHR = in.readbit(); 8980 _s.fStandardHR = in.readbit(); 8981 _s.fIsBullet = in.readbit(); 8982 _s.fLayoutInCell = in.readbit(); 8983 _s.fUsefPrint = in.readbit(); 8984 _s.fUsefHidden = in.readbit(); 8985 _s.fUsefOneD = in.readbit(); 8986 _s.fUsefIsButton = in.readbit(); 8987 _s.fUsefOnDblClickNotify = in.readbit(); 8988 _s.fUsefBehindDocument = in.readbit(); 8989 _s.fUsefEditedWrap = in.readbit(); 8990 _s.fUsefScriptAnchor = in.readbit(); 8991 _s.fUsefReallyHidden = in.readbit(); 8992 _s.fUsefAllowOverlap = in.readbit(); 8993 _s.fUsefUserDrawn = in.readbit(); 8994 _s.fUsefHorizRule = in.readbit(); 8995 _s.fUsefNoshadeHR = in.readbit(); 8996 _s.fUsefStandardHR = in.readbit(); 8997 _s.fUsefIsBullet = in.readbit(); 8998 _s.fUsefLayoutInCell = in.readbit(); 8999 } 9000 void MSO::parseWzFillId(LEInputStream& in, WzFillId& _s) { 9001 _s.streamOffset = in.getPosition(); 9002 parseOfficeArtFOPTEOPID(in, _s.opid); 9003 if (!(_s.opid.opid == 0x0403)) { 9004 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x0403"); 9005 } 9006 _s.wzFillId = in.readint32(); 9007 } 9008 void MSO::parseDiagramBooleanProperties(LEInputStream& in, DiagramBooleanProperties& _s) { 9009 _s.streamOffset = in.getPosition(); 9010 parseOfficeArtFOPTEOPID(in, _s.opid); 9011 if (!(_s.opid.opid == 0x053F)) { 9012 throw IncorrectValueException(in.getPosition(), "_s.opid.opid == 0x053F"); 9013 } 9014 if (!(_s.opid.fBid == false)) { 9015 throw IncorrectValueException(in.getPosition(), "_s.opid.fBid == false"); 9016 } 9017 if (!(_s.opid.fComplex == false)) { 9018 throw IncorrectValueException(in.getPosition(), "_s.opid.fComplex == false"); 9019 } 9020 _s.fPseudoInline = in.readbit(); 9021 _s.fDoLayout = in.readbit(); 9022 _s.fReverse = in.readbit(); 9023 _s.fDoFormat = in.readbit(); 9024 _s.unused1 = in.readbit(); 9025 _s.unused2 = in.readbit(); 9026 _s.unused3a = in.readuint2(); 9027 _s.unused3b = in.readuint8(); 9028 _s.fUsefPseudoInline = in.readbit(); 9029 _s.fUsefDoLayout = in.readbit(); 9030 _s.fUsefReverse = in.readbit(); 9031 _s.fUsefDoFormat = in.readbit(); 9032 _s.unused4 = in.readbit(); 9033 _s.unused5 = in.readbit(); 9034 _s.unused6a = in.readuint2(); 9035 _s.unused6b = in.readuint8(); 9036 } 9037 void MSO::parsePptOfficeArtClientAnchor(LEInputStream& in, PptOfficeArtClientAnchor& _s) { 9038 _s.streamOffset = in.getPosition(); 9039 parseOfficeArtRecordHeader(in, _s.rh); 9040 if (!(_s.rh.recVer == 0)) { 9041 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 9042 } 9043 if (!(_s.rh.recInstance == 0)) { 9044 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9045 } 9046 if (!(_s.rh.recType == 0xF010)) { 9047 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF010"); 9048 } 9049 if (!(_s.rh.recLen == 0x8 || _s.rh.recLen == 0x10)) { 9050 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x8 || _s.rh.recLen == 0x10"); 9051 } 9052 if (_s.rh.recLen==0x8) { 9053 _s.rect1 = QSharedPointer<SmallRectStruct>(new SmallRectStruct(&_s)); 9054 parseSmallRectStruct(in, *_s.rect1.data()); 9055 } 9056 if (_s.rh.recLen==0x10) { 9057 _s.rect2 = QSharedPointer<RectStruct>(new RectStruct(&_s)); 9058 parseRectStruct(in, *_s.rect2.data()); 9059 } 9060 } 9061 void MSO::parseAnimationInfoContainer(LEInputStream& in, AnimationInfoContainer& _s) { 9062 _s.streamOffset = in.getPosition(); 9063 LEInputStream::Mark _m; 9064 bool _possiblyPresent; 9065 parseOfficeArtRecordHeader(in, _s.rh); 9066 if (!(_s.rh.recVer == 0xF)) { 9067 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 9068 } 9069 if (!(_s.rh.recInstance == 0)) { 9070 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9071 } 9072 if (!(_s.rh.recType == 0x1014)) { 9073 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x1014"); 9074 } 9075 parseAnimationInfoAtom(in, _s.animationAtom); 9076 _m = in.setMark(); 9077 try { 9078 OfficeArtRecordHeader _optionCheck(&_s); 9079 parseOfficeArtRecordHeader(in, _optionCheck); 9080 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x7E6); 9081 } catch(EOFException _e) { 9082 _possiblyPresent = false; 9083 } 9084 in.rewind(_m); 9085 _m = in.setMark(); 9086 if (_possiblyPresent) { 9087 try { 9088 _s.animationSound = QSharedPointer<SoundContainer>(new SoundContainer(&_s)); 9089 parseSoundContainer(in, *_s.animationSound.data()); 9090 } catch(IncorrectValueException _e) { 9091 _s.animationSound.clear(); 9092 in.rewind(_m); 9093 } catch(EOFException _e) { 9094 _s.animationSound.clear(); 9095 in.rewind(_m); 9096 } 9097 } 9098 } 9099 void MSO::parseMouseClickInteractiveInfoContainer(LEInputStream& in, MouseClickInteractiveInfoContainer& _s) { 9100 _s.streamOffset = in.getPosition(); 9101 parseRecordHeader(in, _s.rh); 9102 if (!(_s.rh.recVer == 0xF)) { 9103 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 9104 } 9105 if (!(_s.rh.recInstance == 0)) { 9106 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9107 } 9108 if (!(_s.rh.recType == 0xFF2)) { 9109 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF2"); 9110 } 9111 parseInteractiveInfoAtom(in, _s.interactiveInfoAtom); 9112 if (_s.rh.recLen>24) { 9113 _s.macroNameAtom = QSharedPointer<MacroNameAtom>(new MacroNameAtom(&_s)); 9114 parseMacroNameAtom(in, *_s.macroNameAtom.data()); 9115 } 9116 } 9117 void MSO::parseMouseOverInteractiveInfoContainer(LEInputStream& in, MouseOverInteractiveInfoContainer& _s) { 9118 _s.streamOffset = in.getPosition(); 9119 parseRecordHeader(in, _s.rh); 9120 if (!(_s.rh.recVer == 0xF)) { 9121 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 9122 } 9123 if (!(_s.rh.recInstance == 1)) { 9124 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1"); 9125 } 9126 if (!(_s.rh.recType == 0xFF2)) { 9127 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFF2"); 9128 } 9129 parseInteractiveInfoAtom(in, _s.interactiveInfoAtom); 9130 if (_s.rh.recLen>24) { 9131 _s.macroNameAtom = QSharedPointer<MacroNameAtom>(new MacroNameAtom(&_s)); 9132 parseMacroNameAtom(in, *_s.macroNameAtom.data()); 9133 } 9134 } 9135 void MSO::parseShapeClientRoundtripDataSubcontainerOrAtom(LEInputStream& in, ShapeClientRoundtripDataSubcontainerOrAtom& _s) { 9136 _s.streamOffset = in.getPosition(); 9137 LEInputStream::Mark _m; 9138 _m = in.setMark(); 9139 OfficeArtRecordHeader _choice(&_s); 9140 parseOfficeArtRecordHeader(in, _choice); 9141 in.rewind(_m); 9142 qint64 startPos = in.getPosition(); 9143 if (startPos == in.getPosition() && ((_choice.recVer == 0xF)&&(_choice.recInstance == 0 || _choice.recInstance == 1 || _choice.recInstance == 2)&&(_choice.recType == 0x1388))) { 9144 _s.anon = ShapeClientRoundtripDataSubcontainerOrAtom::choice3146562028(new ShapeProgsTagContainer(&_s)); 9145 parseShapeProgsTagContainer(in, *(ShapeProgsTagContainer*)_s.anon.data()); 9146 } 9147 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recInstance == 0)&&(_choice.recType == 0xBDD)&&(_choice.recLen == 1))) { 9148 _s.anon = ShapeClientRoundtripDataSubcontainerOrAtom::choice3146562028(new RoundTripNewPlaceHolderId12Atom(&_s)); 9149 parseRoundTripNewPlaceHolderId12Atom(in, *(RoundTripNewPlaceHolderId12Atom*)_s.anon.data()); 9150 } 9151 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recInstance == 0)&&(_choice.recType == 0x41F)&&(_choice.recLen == 4))) { 9152 _s.anon = ShapeClientRoundtripDataSubcontainerOrAtom::choice3146562028(new RoundTripShapeId12Atom(&_s)); 9153 parseRoundTripShapeId12Atom(in, *(RoundTripShapeId12Atom*)_s.anon.data()); 9154 } 9155 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recInstance == 0)&&(_choice.recType == 0x420)&&(_choice.recLen == 1))) { 9156 _s.anon = ShapeClientRoundtripDataSubcontainerOrAtom::choice3146562028(new RoundTripHFPlaceholder12Atom(&_s)); 9157 parseRoundTripHFPlaceholder12Atom(in, *(RoundTripHFPlaceholder12Atom*)_s.anon.data()); 9158 } 9159 if (startPos == in.getPosition()) { 9160 _s.anon = ShapeClientRoundtripDataSubcontainerOrAtom::choice3146562028(new RoundTripShapeCheckSumForCustomLayouts12Atom(&_s)); 9161 parseRoundTripShapeCheckSumForCustomLayouts12Atom(in, *(RoundTripShapeCheckSumForCustomLayouts12Atom*)_s.anon.data()); 9162 } 9163 } 9164 void MSO::parseShapeProgBinaryTagSubContainerOrAtom(LEInputStream& in, ShapeProgBinaryTagSubContainerOrAtom& _s) { 9165 _s.streamOffset = in.getPosition(); 9166 LEInputStream::Mark _m; 9167 _m = in.setMark(); 9168 try { 9169 _s.anon = ShapeProgBinaryTagSubContainerOrAtom::choice2754406405(new PP9ShapeBinaryTagExtension(&_s)); 9170 parsePP9ShapeBinaryTagExtension(in, *(PP9ShapeBinaryTagExtension*)_s.anon.data()); 9171 } catch (IncorrectValueException _x) { 9172 _s.anon.clear(); 9173 in.rewind(_m); 9174 try { 9175 _s.anon = ShapeProgBinaryTagSubContainerOrAtom::choice2754406405(new PP10ShapeBinaryTagExtension(&_s)); 9176 parsePP10ShapeBinaryTagExtension(in, *(PP10ShapeBinaryTagExtension*)_s.anon.data()); 9177 } catch (IncorrectValueException _xx) { 9178 _s.anon.clear(); 9179 in.rewind(_m); 9180 try { 9181 _s.anon = ShapeProgBinaryTagSubContainerOrAtom::choice2754406405(new PP11ShapeBinaryTagExtension(&_s)); 9182 parsePP11ShapeBinaryTagExtension(in, *(PP11ShapeBinaryTagExtension*)_s.anon.data()); 9183 } catch (IncorrectValueException _xxx) { 9184 _s.anon.clear(); 9185 in.rewind(_m); 9186 _s.anon = ShapeProgBinaryTagSubContainerOrAtom::choice2754406405(new UnknownBinaryTag(&_s)); 9187 parseUnknownBinaryTag(in, *(UnknownBinaryTag*)_s.anon.data()); 9188 }}} 9189 } 9190 void MSO::parseOfficeArtClientTextBox(LEInputStream& in, OfficeArtClientTextBox& _s) { 9191 _s.streamOffset = in.getPosition(); 9192 LEInputStream::Mark _m; 9193 _m = in.setMark(); 9194 OfficeArtRecordHeader _choice(&_s); 9195 parseOfficeArtRecordHeader(in, _choice); 9196 in.rewind(_m); 9197 qint64 startPos = in.getPosition(); 9198 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recLen == 0))) { 9199 _s.anon = OfficeArtClientTextBox::choice2757443956(new XlsOfficeArtClientTextBox(&_s)); 9200 parseXlsOfficeArtClientTextBox(in, *(XlsOfficeArtClientTextBox*)_s.anon.data()); 9201 } 9202 if (startPos == in.getPosition() && ((_choice.recVer == 0 || _choice.recVer == 0xF)&&(_choice.recLen == 0x4))) { 9203 _s.anon = OfficeArtClientTextBox::choice2757443956(new DocOfficeArtClientTextBox(&_s)); 9204 parseDocOfficeArtClientTextBox(in, *(DocOfficeArtClientTextBox*)_s.anon.data()); 9205 } 9206 if (startPos == in.getPosition()) { 9207 _s.anon = OfficeArtClientTextBox::choice2757443956(new PptOfficeArtClientTextBox(&_s)); 9208 parsePptOfficeArtClientTextBox(in, *(PptOfficeArtClientTextBox*)_s.anon.data()); 9209 } 9210 } 9211 void MSO::parseTextRulerAtom(LEInputStream& in, TextRulerAtom& _s) { 9212 _s.streamOffset = in.getPosition(); 9213 parseRecordHeader(in, _s.rh); 9214 if (!(_s.rh.recVer == 0)) { 9215 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 9216 } 9217 if (!(_s.rh.recInstance == 0)) { 9218 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9219 } 9220 if (!(_s.rh.recType == 0xFA6)) { 9221 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFA6"); 9222 } 9223 parseTextRuler(in, _s.textRuler); 9224 } 9225 void MSO::parseOfficeArtFOPTE(LEInputStream& in, OfficeArtFOPTE& _s) { 9226 _s.streamOffset = in.getPosition(); 9227 parseOfficeArtFOPTEOPID(in, _s.opid); 9228 _s.op = in.readint32(); 9229 } 9230 void MSO::parseFib(LEInputStream& in, Fib& _s) { 9231 _s.streamOffset = in.getPosition(); 9232 int _c; 9233 LEInputStream::Mark _m; 9234 parseFibBase(in, _s.base); 9235 _s.csw = in.readuint16(); 9236 if (!(((quint16)_s.csw) == 14)) { 9237 throw IncorrectValueException(in.getPosition(), "((quint16)_s.csw) == 14"); 9238 } 9239 parseFibRgW97(in, _s.fibRgW); 9240 _s.cslw = in.readuint16(); 9241 if (!(((quint16)_s.cslw) == 22)) { 9242 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cslw) == 22"); 9243 } 9244 parseFibRgLw97(in, _s.fibRgLw); 9245 _s.cbRgFcLcb = in.readuint16(); 9246 if (!(((quint16)_s.cbRgFcLcb) == 0x5D || ((quint16)_s.cbRgFcLcb) == 0x6C || ((quint16)_s.cbRgFcLcb) == 0x88 || ((quint16)_s.cbRgFcLcb) == 0xA4 || ((quint16)_s.cbRgFcLcb) == 0xB7)) { 9247 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cbRgFcLcb) == 0x5D || ((quint16)_s.cbRgFcLcb) == 0x6C || ((quint16)_s.cbRgFcLcb) == 0x88 || ((quint16)_s.cbRgFcLcb) == 0xA4 || ((quint16)_s.cbRgFcLcb) == 0xB7"); 9248 } 9249 parseFibRgFcLcb97(in, _s.fibRgFcLcbBlob); 9250 if (_s.cbRgFcLcb>=0x6C) { 9251 _s.fibRgFcLcbBlob2 = QSharedPointer<FibRgFcLcb2000>(new FibRgFcLcb2000(&_s)); 9252 parseFibRgFcLcb2000(in, *_s.fibRgFcLcbBlob2.data()); 9253 } 9254 if (_s.cbRgFcLcb>=0x88) { 9255 _s.fibRgFcLcbBlob3 = QSharedPointer<FibRgFcLcb2002>(new FibRgFcLcb2002(&_s)); 9256 parseFibRgFcLcb2002(in, *_s.fibRgFcLcbBlob3.data()); 9257 } 9258 _s.cswNew = in.readuint16(); 9259 if (!(((quint16)_s.cswNew) == 0 || ((quint16)_s.cswNew) == 2 || ((quint16)_s.cswNew) == 5)) { 9260 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cswNew) == 0 || ((quint16)_s.cswNew) == 2 || ((quint16)_s.cswNew) == 5"); 9261 } 9262 _c = 2*_s.cswNew; 9263 _s.fibRgCswNew.resize(_c); 9264 in.readBytes(_s.fibRgCswNew); 9265 _c = _s.fibRgLw.cbMac-156-8*_s.cbRgFcLcb-2*_s.cswNew; 9266 _s.trail.resize(_c); 9267 in.readBytes(_s.trail); 9268 } 9269 void MSO::parseSTSH(LEInputStream& in, STSH& _s) { 9270 _s.streamOffset = in.getPosition(); 9271 int _c; 9272 LEInputStream::Mark _m; 9273 parseLPStshi(in, _s.lpstshi); 9274 _c = 20; 9275 for (int _i=0; _i<_c; ++_i) { 9276 _s.rglpstd.append(LPStd(&_s)); 9277 parseLPStd(in, _s.rglpstd[_i]); 9278 } 9279 } 9280 void MSO::parseClx(LEInputStream& in, Clx& _s) { 9281 _s.streamOffset = in.getPosition(); 9282 LEInputStream::Mark _m; 9283 bool _atend; 9284 _atend = false; 9285 while (!_atend) { 9286 _m = in.setMark(); 9287 try { 9288 _s.RgPrc.append(Pcr(&_s)); 9289 parsePcr(in, _s.RgPrc.last()); 9290 } catch(IncorrectValueException _e) { 9291 _s.RgPrc.removeLast(); 9292 _atend = true; 9293 in.rewind(_m); 9294 } catch(EOFException _e) { 9295 _s.RgPrc.removeLast(); 9296 _atend = true; 9297 in.rewind(_m); 9298 } 9299 } 9300 parsePcdt(in, _s.pcdt); 9301 } 9302 void MSO::parsePcr(LEInputStream& in, Pcr& _s) { 9303 _s.streamOffset = in.getPosition(); 9304 _s.clxt = in.readuint8(); 9305 if (!(((quint8)_s.clxt) == 1)) { 9306 throw IncorrectValueException(in.getPosition(), "((quint8)_s.clxt) == 1"); 9307 } 9308 parsePrcData(in, _s.prcData); 9309 } 9310 void MSO::parsePrm(LEInputStream& in, Prm& _s) { 9311 _s.streamOffset = in.getPosition(); 9312 LEInputStream::Mark _m; 9313 _m = in.setMark(); 9314 bool _choice = in.readbit(); 9315 in.rewind(_m); 9316 qint64 startPos = in.getPosition(); 9317 if (startPos == in.getPosition() && ((_choice == false))) { 9318 _s.prm = Prm::choice1129181155(new Prm0(&_s)); 9319 parsePrm0(in, *(Prm0*)_s.prm.data()); 9320 } 9321 if (startPos == in.getPosition()) { 9322 _s.prm = Prm::choice1129181155(new Prm1(&_s)); 9323 parsePrm1(in, *(Prm1*)_s.prm.data()); 9324 } 9325 } 9326 void MSO::parseOfficeArtBlipEMF(LEInputStream& in, OfficeArtBlipEMF& _s) { 9327 _s.streamOffset = in.getPosition(); 9328 int _c; 9329 LEInputStream::Mark _m; 9330 parseOfficeArtRecordHeader(in, _s.rh); 9331 if (!(_s.rh.recVer == 0)) { 9332 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 9333 } 9334 if (!(_s.rh.recInstance == 0x3D4 || _s.rh.recInstance == 0x3D5)) { 9335 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x3D4 || _s.rh.recInstance == 0x3D5"); 9336 } 9337 if (!(_s.rh.recType == 0xF01A)) { 9338 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01A"); 9339 } 9340 _c = 16; 9341 _s.rgbUid1.resize(_c); 9342 in.readBytes(_s.rgbUid1); 9343 _s._has_rgbUid2 = _s.rh.recInstance == 0x3D5; 9344 if (_s._has_rgbUid2) { 9345 _c = 16; 9346 _s.rgbUid2.resize(_c); 9347 in.readBytes(_s.rgbUid2); 9348 } 9349 parseOfficeArtMetafileHeader(in, _s.metafileHeader); 9350 _c = _s.rh.recLen-((_s.rh.recInstance==0x3D4)?50:66); 9351 _s.BLIPFileData.resize(_c); 9352 in.readBytes(_s.BLIPFileData); 9353 } 9354 void MSO::parseOfficeArtBlipWMF(LEInputStream& in, OfficeArtBlipWMF& _s) { 9355 _s.streamOffset = in.getPosition(); 9356 int _c; 9357 LEInputStream::Mark _m; 9358 parseOfficeArtRecordHeader(in, _s.rh); 9359 if (!(_s.rh.recVer == 0)) { 9360 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 9361 } 9362 if (!(_s.rh.recInstance == 0x216 || _s.rh.recInstance == 0x217)) { 9363 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x216 || _s.rh.recInstance == 0x217"); 9364 } 9365 if (!(_s.rh.recType == 0xF01B)) { 9366 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01B"); 9367 } 9368 _c = 16; 9369 _s.rgbUid1.resize(_c); 9370 in.readBytes(_s.rgbUid1); 9371 _s._has_rgbUid2 = _s.rh.recInstance == 0x217; 9372 if (_s._has_rgbUid2) { 9373 _c = 16; 9374 _s.rgbUid2.resize(_c); 9375 in.readBytes(_s.rgbUid2); 9376 } 9377 parseOfficeArtMetafileHeader(in, _s.metafileHeader); 9378 _c = _s.rh.recLen-((_s.rh.recInstance==0x216)?50:66); 9379 _s.BLIPFileData.resize(_c); 9380 in.readBytes(_s.BLIPFileData); 9381 } 9382 void MSO::parseOfficeArtBlipPICT(LEInputStream& in, OfficeArtBlipPICT& _s) { 9383 _s.streamOffset = in.getPosition(); 9384 int _c; 9385 LEInputStream::Mark _m; 9386 parseOfficeArtRecordHeader(in, _s.rh); 9387 if (!(_s.rh.recVer == 0)) { 9388 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 9389 } 9390 if (!(_s.rh.recInstance == 0x542 || _s.rh.recInstance == 0x543)) { 9391 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x542 || _s.rh.recInstance == 0x543"); 9392 } 9393 if (!(_s.rh.recType == 0xF01C)) { 9394 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF01C"); 9395 } 9396 _c = 16; 9397 _s.rgbUid1.resize(_c); 9398 in.readBytes(_s.rgbUid1); 9399 _s._has_rgbUid2 = _s.rh.recInstance == 0x543; 9400 if (_s._has_rgbUid2) { 9401 _c = 16; 9402 _s.rgbUid2.resize(_c); 9403 in.readBytes(_s.rgbUid2); 9404 } 9405 parseOfficeArtMetafileHeader(in, _s.metafileHeader); 9406 _c = _s.rh.recLen-((_s.rh.recInstance==0x542)?50:66); 9407 _s.BLIPFileData.resize(_c); 9408 in.readBytes(_s.BLIPFileData); 9409 } 9410 void MSO::parseOfficeArtBlip(LEInputStream& in, OfficeArtBlip& _s) { 9411 _s.streamOffset = in.getPosition(); 9412 LEInputStream::Mark _m; 9413 _m = in.setMark(); 9414 OfficeArtRecordHeader _choice(&_s); 9415 parseOfficeArtRecordHeader(in, _choice); 9416 in.rewind(_m); 9417 qint64 startPos = in.getPosition(); 9418 if (startPos == in.getPosition() && ((_choice.recInstance == 0x3D4 || _choice.recInstance == 0x3D5)&&(_choice.recType == 0xF01A))) { 9419 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipEMF(&_s)); 9420 parseOfficeArtBlipEMF(in, *(OfficeArtBlipEMF*)_s.anon.data()); 9421 } 9422 if (startPos == in.getPosition() && ((_choice.recInstance == 0x216 || _choice.recInstance == 0x217)&&(_choice.recType == 0xF01B))) { 9423 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipWMF(&_s)); 9424 parseOfficeArtBlipWMF(in, *(OfficeArtBlipWMF*)_s.anon.data()); 9425 } 9426 if (startPos == in.getPosition() && ((_choice.recInstance == 0x542 || _choice.recInstance == 0x543)&&(_choice.recType == 0xF01C))) { 9427 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipPICT(&_s)); 9428 parseOfficeArtBlipPICT(in, *(OfficeArtBlipPICT*)_s.anon.data()); 9429 } 9430 if (startPos == in.getPosition() && ((_choice.recInstance == 0x46A || _choice.recInstance == 0x46B || _choice.recInstance == 0x6E2 || _choice.recInstance == 0x6E3)&&(_choice.recType == 0xF01D))) { 9431 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipJPEG(&_s)); 9432 parseOfficeArtBlipJPEG(in, *(OfficeArtBlipJPEG*)_s.anon.data()); 9433 } 9434 if (startPos == in.getPosition() && ((_choice.recInstance == 0x6E0 || _choice.recInstance == 0x6E1)&&(_choice.recType == 0xF01E))) { 9435 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipPNG(&_s)); 9436 parseOfficeArtBlipPNG(in, *(OfficeArtBlipPNG*)_s.anon.data()); 9437 } 9438 if (startPos == in.getPosition() && ((_choice.recInstance == 0x7A8 || _choice.recInstance == 0x7A9)&&(_choice.recType == 0xF01F))) { 9439 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipDIB(&_s)); 9440 parseOfficeArtBlipDIB(in, *(OfficeArtBlipDIB*)_s.anon.data()); 9441 } 9442 if (startPos == in.getPosition()) { 9443 _s.anon = OfficeArtBlip::choice279968329(new OfficeArtBlipTIFF(&_s)); 9444 parseOfficeArtBlipTIFF(in, *(OfficeArtBlipTIFF*)_s.anon.data()); 9445 } 9446 } 9447 void MSO::parseZoomViewInfoAtom(LEInputStream& in, ZoomViewInfoAtom& _s) { 9448 _s.streamOffset = in.getPosition(); 9449 int _c; 9450 LEInputStream::Mark _m; 9451 parseRecordHeader(in, _s.rh); 9452 if (!(_s.rh.recVer == 0)) { 9453 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 9454 } 9455 if (!(_s.rh.recInstance == 0)) { 9456 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9457 } 9458 if (!(_s.rh.recType == 0x3FD)) { 9459 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FD"); 9460 } 9461 if (!(_s.rh.recLen == 0x34)) { 9462 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x34"); 9463 } 9464 parseScalingStruct(in, _s.curScale); 9465 _c = 24; 9466 _s.unused1.resize(_c); 9467 in.readBytes(_s.unused1); 9468 parsePointStruct(in, _s.origin); 9469 _s.fUseVarScale = in.readuint8(); 9470 if (!(((quint8)_s.fUseVarScale) == 0 || ((quint8)_s.fUseVarScale) == 1)) { 9471 throw IncorrectValueException(in.getPosition(), "((quint8)_s.fUseVarScale) == 0 || ((quint8)_s.fUseVarScale) == 1"); 9472 } 9473 _s.fDraftMode = in.readuint8(); 9474 _s.unused2 = in.readuint16(); 9475 } 9476 void MSO::parsePP9DocBinaryTagExtension(LEInputStream& in, PP9DocBinaryTagExtension& _s) { 9477 _s.streamOffset = in.getPosition(); 9478 int _c; 9479 LEInputStream::Mark _m; 9480 bool _possiblyPresent; 9481 bool _atend; 9482 parseRecordHeader(in, _s.rh); 9483 if (!(_s.rh.recVer == 0x0)) { 9484 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 9485 } 9486 if (!(_s.rh.recInstance == 0)) { 9487 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9488 } 9489 if (!(_s.rh.recType == 0x0FBA)) { 9490 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA"); 9491 } 9492 if (!(_s.rh.recLen == 0x0E)) { 9493 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x0E"); 9494 } 9495 _c = 14; 9496 _s.tagName.resize(_c); 9497 in.readBytes(_s.tagName); 9498 parseRecordHeader(in, _s.rhData); 9499 if (!(_s.rhData.recVer == 0x0)) { 9500 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0x0"); 9501 } 9502 if (!(_s.rhData.recInstance == 0)) { 9503 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0"); 9504 } 9505 if (!(_s.rhData.recType == 0x138B)) { 9506 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B"); 9507 } 9508 _atend = false; 9509 while (!_atend) { 9510 _m = in.setMark(); 9511 try { 9512 _s.rgTextMasterStyle9.append(TextMasterStyle9Atom(&_s)); 9513 parseTextMasterStyle9Atom(in, _s.rgTextMasterStyle9.last()); 9514 } catch(IncorrectValueException _e) { 9515 _s.rgTextMasterStyle9.removeLast(); 9516 _atend = true; 9517 in.rewind(_m); 9518 } catch(EOFException _e) { 9519 _s.rgTextMasterStyle9.removeLast(); 9520 _atend = true; 9521 in.rewind(_m); 9522 } 9523 } 9524 _m = in.setMark(); 9525 try { 9526 RecordHeader _optionCheck(&_s); 9527 parseRecordHeader(in, _optionCheck); 9528 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x07F8); 9529 } catch(EOFException _e) { 9530 _possiblyPresent = false; 9531 } 9532 in.rewind(_m); 9533 _m = in.setMark(); 9534 if (_possiblyPresent) { 9535 try { 9536 _s.blipCollectionContainer = QSharedPointer<BlipCollection9Container>(new BlipCollection9Container(&_s)); 9537 parseBlipCollection9Container(in, *_s.blipCollectionContainer.data()); 9538 } catch(IncorrectValueException _e) { 9539 _s.blipCollectionContainer.clear(); 9540 in.rewind(_m); 9541 } catch(EOFException _e) { 9542 _s.blipCollectionContainer.clear(); 9543 in.rewind(_m); 9544 } 9545 } 9546 _m = in.setMark(); 9547 try { 9548 RecordHeader _optionCheck(&_s); 9549 parseRecordHeader(in, _optionCheck); 9550 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x00)&&(_optionCheck.recType == 0x0FB0); 9551 } catch(EOFException _e) { 9552 _possiblyPresent = false; 9553 } 9554 in.rewind(_m); 9555 _m = in.setMark(); 9556 if (_possiblyPresent) { 9557 try { 9558 _s.textDefaultsAtom = QSharedPointer<TextDefaults9Atom>(new TextDefaults9Atom(&_s)); 9559 parseTextDefaults9Atom(in, *_s.textDefaultsAtom.data()); 9560 } catch(IncorrectValueException _e) { 9561 _s.textDefaultsAtom.clear(); 9562 in.rewind(_m); 9563 } catch(EOFException _e) { 9564 _s.textDefaultsAtom.clear(); 9565 in.rewind(_m); 9566 } 9567 } 9568 _m = in.setMark(); 9569 try { 9570 RecordHeader _optionCheck(&_s); 9571 parseRecordHeader(in, _optionCheck); 9572 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x2)&&(_optionCheck.recType == 0x0FC8); 9573 } catch(EOFException _e) { 9574 _possiblyPresent = false; 9575 } 9576 in.rewind(_m); 9577 _m = in.setMark(); 9578 if (_possiblyPresent) { 9579 try { 9580 _s.kinsokuContainer = QSharedPointer<Kinsoku9Container>(new Kinsoku9Container(&_s)); 9581 parseKinsoku9Container(in, *_s.kinsokuContainer.data()); 9582 } catch(IncorrectValueException _e) { 9583 _s.kinsokuContainer.clear(); 9584 in.rewind(_m); 9585 } catch(EOFException _e) { 9586 _s.kinsokuContainer.clear(); 9587 in.rewind(_m); 9588 } 9589 } 9590 _atend = false; 9591 while (!_atend) { 9592 _m = in.setMark(); 9593 try { 9594 _s.rgExternalHyperlink9.append(ExHyperlink9Container(&_s)); 9595 parseExHyperlink9Container(in, _s.rgExternalHyperlink9.last()); 9596 } catch(IncorrectValueException _e) { 9597 _s.rgExternalHyperlink9.removeLast(); 9598 _atend = true; 9599 in.rewind(_m); 9600 } catch(EOFException _e) { 9601 _s.rgExternalHyperlink9.removeLast(); 9602 _atend = true; 9603 in.rewind(_m); 9604 } 9605 } 9606 _m = in.setMark(); 9607 try { 9608 RecordHeader _optionCheck(&_s); 9609 parseRecordHeader(in, _optionCheck); 9610 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x177A)&&(_optionCheck.recLen == 0x4); 9611 } catch(EOFException _e) { 9612 _possiblyPresent = false; 9613 } 9614 in.rewind(_m); 9615 _m = in.setMark(); 9616 if (_possiblyPresent) { 9617 try { 9618 _s.presAdvisorFlagsAtom = QSharedPointer<PresAdvisorFlags9Atom>(new PresAdvisorFlags9Atom(&_s)); 9619 parsePresAdvisorFlags9Atom(in, *_s.presAdvisorFlagsAtom.data()); 9620 } catch(IncorrectValueException _e) { 9621 _s.presAdvisorFlagsAtom.clear(); 9622 in.rewind(_m); 9623 } catch(EOFException _e) { 9624 _s.presAdvisorFlagsAtom.clear(); 9625 in.rewind(_m); 9626 } 9627 } 9628 _m = in.setMark(); 9629 try { 9630 RecordHeader _optionCheck(&_s); 9631 parseRecordHeader(in, _optionCheck); 9632 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1785); 9633 } catch(EOFException _e) { 9634 _possiblyPresent = false; 9635 } 9636 in.rewind(_m); 9637 _m = in.setMark(); 9638 if (_possiblyPresent) { 9639 try { 9640 _s.envelopeDataAtom = QSharedPointer<EnvelopeData9Atom>(new EnvelopeData9Atom(&_s)); 9641 parseEnvelopeData9Atom(in, *_s.envelopeDataAtom.data()); 9642 } catch(IncorrectValueException _e) { 9643 _s.envelopeDataAtom.clear(); 9644 in.rewind(_m); 9645 } catch(EOFException _e) { 9646 _s.envelopeDataAtom.clear(); 9647 in.rewind(_m); 9648 } 9649 } 9650 _m = in.setMark(); 9651 try { 9652 RecordHeader _optionCheck(&_s); 9653 parseRecordHeader(in, _optionCheck); 9654 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1784)&&(_optionCheck.recLen == 4); 9655 } catch(EOFException _e) { 9656 _possiblyPresent = false; 9657 } 9658 in.rewind(_m); 9659 _m = in.setMark(); 9660 if (_possiblyPresent) { 9661 try { 9662 _s.envelopeFlagsAtom = QSharedPointer<EnvelopeFlags9Atom>(new EnvelopeFlags9Atom(&_s)); 9663 parseEnvelopeFlags9Atom(in, *_s.envelopeFlagsAtom.data()); 9664 } catch(IncorrectValueException _e) { 9665 _s.envelopeFlagsAtom.clear(); 9666 in.rewind(_m); 9667 } catch(EOFException _e) { 9668 _s.envelopeFlagsAtom.clear(); 9669 in.rewind(_m); 9670 } 9671 } 9672 _m = in.setMark(); 9673 try { 9674 RecordHeader _optionCheck(&_s); 9675 parseRecordHeader(in, _optionCheck); 9676 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x177B)&&(_optionCheck.recLen == 0x10); 9677 } catch(EOFException _e) { 9678 _possiblyPresent = false; 9679 } 9680 in.rewind(_m); 9681 _m = in.setMark(); 9682 if (_possiblyPresent) { 9683 try { 9684 _s.htmlDocInfoAtom = QSharedPointer<HTMLDocInfo9Atom>(new HTMLDocInfo9Atom(&_s)); 9685 parseHTMLDocInfo9Atom(in, *_s.htmlDocInfoAtom.data()); 9686 } catch(IncorrectValueException _e) { 9687 _s.htmlDocInfoAtom.clear(); 9688 in.rewind(_m); 9689 } catch(EOFException _e) { 9690 _s.htmlDocInfoAtom.clear(); 9691 in.rewind(_m); 9692 } 9693 } 9694 _m = in.setMark(); 9695 try { 9696 RecordHeader _optionCheck(&_s); 9697 parseRecordHeader(in, _optionCheck); 9698 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x177D); 9699 } catch(EOFException _e) { 9700 _possiblyPresent = false; 9701 } 9702 in.rewind(_m); 9703 _m = in.setMark(); 9704 if (_possiblyPresent) { 9705 try { 9706 _s.htmlPublishInfoAtom = QSharedPointer<HTMLPublishInfo9Container>(new HTMLPublishInfo9Container(&_s)); 9707 parseHTMLPublishInfo9Container(in, *_s.htmlPublishInfoAtom.data()); 9708 } catch(IncorrectValueException _e) { 9709 _s.htmlPublishInfoAtom.clear(); 9710 in.rewind(_m); 9711 } catch(EOFException _e) { 9712 _s.htmlPublishInfoAtom.clear(); 9713 in.rewind(_m); 9714 } 9715 } 9716 _atend = false; 9717 while (!_atend) { 9718 _m = in.setMark(); 9719 try { 9720 _s.rgBroadcastDocInfo9.append(BroadcastDocInfo9Container(&_s)); 9721 parseBroadcastDocInfo9Container(in, _s.rgBroadcastDocInfo9.last()); 9722 } catch(IncorrectValueException _e) { 9723 _s.rgBroadcastDocInfo9.removeLast(); 9724 _atend = true; 9725 in.rewind(_m); 9726 } catch(EOFException _e) { 9727 _s.rgBroadcastDocInfo9.removeLast(); 9728 _atend = true; 9729 in.rewind(_m); 9730 } 9731 } 9732 _m = in.setMark(); 9733 try { 9734 RecordHeader _optionCheck(&_s); 9735 parseRecordHeader(in, _optionCheck); 9736 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x0FAE); 9737 } catch(EOFException _e) { 9738 _possiblyPresent = false; 9739 } 9740 in.rewind(_m); 9741 _m = in.setMark(); 9742 if (_possiblyPresent) { 9743 try { 9744 _s.outlineTextPropsContainer = QSharedPointer<OutlineTextProps9Container>(new OutlineTextProps9Container(&_s)); 9745 parseOutlineTextProps9Container(in, *_s.outlineTextPropsContainer.data()); 9746 } catch(IncorrectValueException _e) { 9747 _s.outlineTextPropsContainer.clear(); 9748 in.rewind(_m); 9749 } catch(EOFException _e) { 9750 _s.outlineTextPropsContainer.clear(); 9751 in.rewind(_m); 9752 } 9753 } 9754 } 9755 void MSO::parseTextMasterStyle9Level(LEInputStream& in, TextMasterStyle9Level& _s) { 9756 _s.streamOffset = in.getPosition(); 9757 parseTextPFException9(in, _s.pf9); 9758 parseTextCFException9(in, _s.cf9); 9759 } 9760 void MSO::parseStyleTextProp9(LEInputStream& in, StyleTextProp9& _s) { 9761 _s.streamOffset = in.getPosition(); 9762 parseTextPFException9(in, _s.pf9); 9763 parseTextCFException9(in, _s.cf9); 9764 parseTextSIException(in, _s.si); 9765 if (!(_s.si.spell == false)) { 9766 throw IncorrectValueException(in.getPosition(), "_s.si.spell == false"); 9767 } 9768 if (!(_s.si.lang == false)) { 9769 throw IncorrectValueException(in.getPosition(), "_s.si.lang == false"); 9770 } 9771 if (!(_s.si.altLang == false)) { 9772 throw IncorrectValueException(in.getPosition(), "_s.si.altLang == false"); 9773 } 9774 if (!(_s.si.smartTag == false)) { 9775 throw IncorrectValueException(in.getPosition(), "_s.si.smartTag == false"); 9776 } 9777 } 9778 void MSO::parsePP10DocBinaryTagExtension(LEInputStream& in, PP10DocBinaryTagExtension& _s) { 9779 _s.streamOffset = in.getPosition(); 9780 int _c; 9781 LEInputStream::Mark _m; 9782 bool _possiblyPresent; 9783 bool _atend; 9784 parseRecordHeader(in, _s.rh); 9785 if (!(_s.rh.recVer == 0x0)) { 9786 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 9787 } 9788 if (!(_s.rh.recInstance == 0)) { 9789 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 9790 } 9791 if (!(_s.rh.recType == 0x0FBA)) { 9792 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FBA"); 9793 } 9794 if (!(_s.rh.recLen == 0x10)) { 9795 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10"); 9796 } 9797 _c = 16; 9798 _s.tagName.resize(_c); 9799 in.readBytes(_s.tagName); 9800 parseRecordHeader(in, _s.rhData); 9801 if (!(_s.rhData.recVer == 0x0)) { 9802 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0x0"); 9803 } 9804 if (!(_s.rhData.recInstance == 0)) { 9805 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0"); 9806 } 9807 if (!(_s.rhData.recType == 0x138B)) { 9808 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B"); 9809 } 9810 _m = in.setMark(); 9811 try { 9812 RecordHeader _optionCheck(&_s); 9813 parseRecordHeader(in, _optionCheck); 9814 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x07D6); 9815 } catch(EOFException _e) { 9816 _possiblyPresent = false; 9817 } 9818 in.rewind(_m); 9819 _m = in.setMark(); 9820 if (_possiblyPresent) { 9821 try { 9822 _s.fontCollectionContainer = QSharedPointer<FontCollection10Container>(new FontCollection10Container(&_s)); 9823 parseFontCollection10Container(in, *_s.fontCollectionContainer.data()); 9824 } catch(IncorrectValueException _e) { 9825 _s.fontCollectionContainer.clear(); 9826 in.rewind(_m); 9827 } catch(EOFException _e) { 9828 _s.fontCollectionContainer.clear(); 9829 in.rewind(_m); 9830 } 9831 } 9832 _atend = false; 9833 while (!_atend) { 9834 _m = in.setMark(); 9835 try { 9836 _s.rgTextMasterStyle10.append(TextMasterStyle10Atom(&_s)); 9837 parseTextMasterStyle10Atom(in, _s.rgTextMasterStyle10.last()); 9838 } catch(IncorrectValueException _e) { 9839 _s.rgTextMasterStyle10.removeLast(); 9840 _atend = true; 9841 in.rewind(_m); 9842 } catch(EOFException _e) { 9843 _s.rgTextMasterStyle10.removeLast(); 9844 _atend = true; 9845 in.rewind(_m); 9846 } 9847 } 9848 _m = in.setMark(); 9849 try { 9850 RecordHeader _optionCheck(&_s); 9851 parseRecordHeader(in, _optionCheck); 9852 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FB4); 9853 } catch(EOFException _e) { 9854 _possiblyPresent = false; 9855 } 9856 in.rewind(_m); 9857 _m = in.setMark(); 9858 if (_possiblyPresent) { 9859 try { 9860 _s.textDefaultsAtom = QSharedPointer<TextDefaults10Atom>(new TextDefaults10Atom(&_s)); 9861 parseTextDefaults10Atom(in, *_s.textDefaultsAtom.data()); 9862 } catch(IncorrectValueException _e) { 9863 _s.textDefaultsAtom.clear(); 9864 in.rewind(_m); 9865 } catch(EOFException _e) { 9866 _s.textDefaultsAtom.clear(); 9867 in.rewind(_m); 9868 } 9869 } 9870 parseGridSpacing10Atom(in, _s.gridSpacingAtom); 9871 _atend = false; 9872 while (!_atend) { 9873 _m = in.setMark(); 9874 try { 9875 _s.rgCommentIndex10.append(CommentIndex10Container(&_s)); 9876 parseCommentIndex10Container(in, _s.rgCommentIndex10.last()); 9877 } catch(IncorrectValueException _e) { 9878 _s.rgCommentIndex10.removeLast(); 9879 _atend = true; 9880 in.rewind(_m); 9881 } catch(EOFException _e) { 9882 _s.rgCommentIndex10.removeLast(); 9883 _atend = true; 9884 in.rewind(_m); 9885 } 9886 } 9887 _m = in.setMark(); 9888 try { 9889 RecordHeader _optionCheck(&_s); 9890 parseRecordHeader(in, _optionCheck); 9891 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x32C8)&&(_optionCheck.recLen == 0x04); 9892 } catch(EOFException _e) { 9893 _possiblyPresent = false; 9894 } 9895 in.rewind(_m); 9896 _m = in.setMark(); 9897 if (_possiblyPresent) { 9898 try { 9899 _s.fontEmbedFlagsAtom = QSharedPointer<FontEmbedFlags10Atom>(new FontEmbedFlags10Atom(&_s)); 9900 parseFontEmbedFlags10Atom(in, *_s.fontEmbedFlagsAtom.data()); 9901 } catch(IncorrectValueException _e) { 9902 _s.fontEmbedFlagsAtom.clear(); 9903 in.rewind(_m); 9904 } catch(EOFException _e) { 9905 _s.fontEmbedFlagsAtom.clear(); 9906 in.rewind(_m); 9907 } 9908 } 9909 _m = in.setMark(); 9910 try { 9911 RecordHeader _optionCheck(&_s); 9912 parseRecordHeader(in, _optionCheck); 9913 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x1)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen<=510)&&(_optionCheck.recLen%2==0); 9914 } catch(EOFException _e) { 9915 _possiblyPresent = false; 9916 } 9917 in.rewind(_m); 9918 _m = in.setMark(); 9919 if (_possiblyPresent) { 9920 try { 9921 _s.copyrightAtom = QSharedPointer<CopyrightAtom>(new CopyrightAtom(&_s)); 9922 parseCopyrightAtom(in, *_s.copyrightAtom.data()); 9923 } catch(IncorrectValueException _e) { 9924 _s.copyrightAtom.clear(); 9925 in.rewind(_m); 9926 } catch(EOFException _e) { 9927 _s.copyrightAtom.clear(); 9928 in.rewind(_m); 9929 } 9930 } 9931 _m = in.setMark(); 9932 try { 9933 RecordHeader _optionCheck(&_s); 9934 parseRecordHeader(in, _optionCheck); 9935 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x2)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen<=510)&&(_optionCheck.recLen%2==0); 9936 } catch(EOFException _e) { 9937 _possiblyPresent = false; 9938 } 9939 in.rewind(_m); 9940 _m = in.setMark(); 9941 if (_possiblyPresent) { 9942 try { 9943 _s.keywordsAtom = QSharedPointer<KeywordsAtom>(new KeywordsAtom(&_s)); 9944 parseKeywordsAtom(in, *_s.keywordsAtom.data()); 9945 } catch(IncorrectValueException _e) { 9946 _s.keywordsAtom.clear(); 9947 in.rewind(_m); 9948 } catch(EOFException _e) { 9949 _s.keywordsAtom.clear(); 9950 in.rewind(_m); 9951 } 9952 } 9953 _m = in.setMark(); 9954 try { 9955 RecordHeader _optionCheck(&_s); 9956 parseRecordHeader(in, _optionCheck); 9957 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x36B0)&&(_optionCheck.recLen == 0x04); 9958 } catch(EOFException _e) { 9959 _possiblyPresent = false; 9960 } 9961 in.rewind(_m); 9962 _m = in.setMark(); 9963 if (_possiblyPresent) { 9964 try { 9965 _s.filterPrivacyFlagsAtom = QSharedPointer<FilterPrivacyFlags10Atom>(new FilterPrivacyFlags10Atom(&_s)); 9966 parseFilterPrivacyFlags10Atom(in, *_s.filterPrivacyFlagsAtom.data()); 9967 } catch(IncorrectValueException _e) { 9968 _s.filterPrivacyFlagsAtom.clear(); 9969 in.rewind(_m); 9970 } catch(EOFException _e) { 9971 _s.filterPrivacyFlagsAtom.clear(); 9972 in.rewind(_m); 9973 } 9974 } 9975 _m = in.setMark(); 9976 try { 9977 RecordHeader _optionCheck(&_s); 9978 parseRecordHeader(in, _optionCheck); 9979 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x0FB3); 9980 } catch(EOFException _e) { 9981 _possiblyPresent = false; 9982 } 9983 in.rewind(_m); 9984 _m = in.setMark(); 9985 if (_possiblyPresent) { 9986 try { 9987 _s.outlineTextPropsContainer = QSharedPointer<OutlineTextProps10Container>(new OutlineTextProps10Container(&_s)); 9988 parseOutlineTextProps10Container(in, *_s.outlineTextPropsContainer.data()); 9989 } catch(IncorrectValueException _e) { 9990 _s.outlineTextPropsContainer.clear(); 9991 in.rewind(_m); 9992 } catch(EOFException _e) { 9993 _s.outlineTextPropsContainer.clear(); 9994 in.rewind(_m); 9995 } 9996 } 9997 _m = in.setMark(); 9998 try { 9999 RecordHeader _optionCheck(&_s); 10000 parseRecordHeader(in, _optionCheck); 10001 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x36B1)&&(_optionCheck.recLen == 0x01); 10002 } catch(EOFException _e) { 10003 _possiblyPresent = false; 10004 } 10005 in.rewind(_m); 10006 _m = in.setMark(); 10007 if (_possiblyPresent) { 10008 try { 10009 _s.docToolbarStatesAtom = QSharedPointer<DocToolbarStates10Atom>(new DocToolbarStates10Atom(&_s)); 10010 parseDocToolbarStates10Atom(in, *_s.docToolbarStatesAtom.data()); 10011 } catch(IncorrectValueException _e) { 10012 _s.docToolbarStatesAtom.clear(); 10013 in.rewind(_m); 10014 } catch(EOFException _e) { 10015 _s.docToolbarStatesAtom.clear(); 10016 in.rewind(_m); 10017 } 10018 } 10019 _m = in.setMark(); 10020 try { 10021 RecordHeader _optionCheck(&_s); 10022 parseRecordHeader(in, _optionCheck); 10023 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2EF1); 10024 } catch(EOFException _e) { 10025 _possiblyPresent = false; 10026 } 10027 in.rewind(_m); 10028 _m = in.setMark(); 10029 if (_possiblyPresent) { 10030 try { 10031 _s.slideListTableContainer = QSharedPointer<SlideListTable10Container>(new SlideListTable10Container(&_s)); 10032 parseSlideListTable10Container(in, *_s.slideListTableContainer.data()); 10033 } catch(IncorrectValueException _e) { 10034 _s.slideListTableContainer.clear(); 10035 in.rewind(_m); 10036 } catch(EOFException _e) { 10037 _s.slideListTableContainer.clear(); 10038 in.rewind(_m); 10039 } 10040 } 10041 _m = in.setMark(); 10042 try { 10043 RecordHeader _optionCheck(&_s); 10044 parseRecordHeader(in, _optionCheck); 10045 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2EEC); 10046 } catch(EOFException _e) { 10047 _possiblyPresent = false; 10048 } 10049 in.rewind(_m); 10050 _m = in.setMark(); 10051 if (_possiblyPresent) { 10052 try { 10053 _s.rgDiffTree10Container = QSharedPointer<DiffTree10Container>(new DiffTree10Container(&_s)); 10054 parseDiffTree10Container(in, *_s.rgDiffTree10Container.data()); 10055 } catch(IncorrectValueException _e) { 10056 _s.rgDiffTree10Container.clear(); 10057 in.rewind(_m); 10058 } catch(EOFException _e) { 10059 _s.rgDiffTree10Container.clear(); 10060 in.rewind(_m); 10061 } 10062 } 10063 _m = in.setMark(); 10064 try { 10065 RecordHeader _optionCheck(&_s); 10066 parseRecordHeader(in, _optionCheck); 10067 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x03)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen<=510)&&(_optionCheck.recLen%2==0); 10068 } catch(EOFException _e) { 10069 _possiblyPresent = false; 10070 } 10071 in.rewind(_m); 10072 _m = in.setMark(); 10073 if (_possiblyPresent) { 10074 try { 10075 _s.modifyPasswordAtom = QSharedPointer<ModifyPasswordAtom>(new ModifyPasswordAtom(&_s)); 10076 parseModifyPasswordAtom(in, *_s.modifyPasswordAtom.data()); 10077 } catch(IncorrectValueException _e) { 10078 _s.modifyPasswordAtom.clear(); 10079 in.rewind(_m); 10080 } catch(EOFException _e) { 10081 _s.modifyPasswordAtom.clear(); 10082 in.rewind(_m); 10083 } 10084 } 10085 _m = in.setMark(); 10086 try { 10087 RecordHeader _optionCheck(&_s); 10088 parseRecordHeader(in, _optionCheck); 10089 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x036B2)&&(_optionCheck.recLen == 0x06); 10090 } catch(EOFException _e) { 10091 _possiblyPresent = false; 10092 } 10093 in.rewind(_m); 10094 _m = in.setMark(); 10095 if (_possiblyPresent) { 10096 try { 10097 _s.photoAlbumInfoAtom = QSharedPointer<PhotoAlbumInfo10Atom>(new PhotoAlbumInfo10Atom(&_s)); 10098 parsePhotoAlbumInfo10Atom(in, *_s.photoAlbumInfoAtom.data()); 10099 } catch(IncorrectValueException _e) { 10100 _s.photoAlbumInfoAtom.clear(); 10101 in.rewind(_m); 10102 } catch(EOFException _e) { 10103 _s.photoAlbumInfoAtom.clear(); 10104 in.rewind(_m); 10105 } 10106 } 10107 } 10108 void MSO::parseTextMasterStyle10Level(LEInputStream& in, TextMasterStyle10Level& _s) { 10109 _s.streamOffset = in.getPosition(); 10110 parseTextCFException10(in, _s.cf10); 10111 } 10112 void MSO::parseNotesTextViewInfoContainer(LEInputStream& in, NotesTextViewInfoContainer& _s) { 10113 _s.streamOffset = in.getPosition(); 10114 parseRecordHeader(in, _s.rh); 10115 if (!(_s.rh.recVer == 0xF)) { 10116 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 10117 } 10118 if (!(_s.rh.recInstance == 1)) { 10119 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1"); 10120 } 10121 if (!(_s.rh.recType == 0x413)) { 10122 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x413"); 10123 } 10124 parseZoomViewInfoAtom(in, _s.zoomViewInfo); 10125 } 10126 void MSO::parseOutlineViewInfoContainer(LEInputStream& in, OutlineViewInfoContainer& _s) { 10127 _s.streamOffset = in.getPosition(); 10128 parseRecordHeader(in, _s.rh); 10129 if (!(_s.rh.recVer == 0xF)) { 10130 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 10131 } 10132 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1)) { 10133 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1"); 10134 } 10135 if (!(_s.rh.recType == 0x407)) { 10136 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x407"); 10137 } 10138 parseNoZoomViewInfoAtom(in, _s.noZoomViewInfo); 10139 } 10140 void MSO::parseNormalViewSetInfoContainer(LEInputStream& in, NormalViewSetInfoContainer& _s) { 10141 _s.streamOffset = in.getPosition(); 10142 parseRecordHeader(in, _s.rh); 10143 if (!(_s.rh.recVer == 0xF)) { 10144 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 10145 } 10146 if (!(_s.rh.recInstance == 1)) { 10147 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 1"); 10148 } 10149 if (!(_s.rh.recType == 0x414)) { 10150 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x414"); 10151 } 10152 if (!(_s.rh.recLen == 0x1C)) { 10153 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x1C"); 10154 } 10155 parseNormalViewSetInfoAtom(in, _s.normalViewSetInfoAtom); 10156 } 10157 void MSO::parseSlideListWithTextSubContainerOrAtom(LEInputStream& in, SlideListWithTextSubContainerOrAtom& _s) { 10158 _s.streamOffset = in.getPosition(); 10159 LEInputStream::Mark _m; 10160 bool _atend; 10161 parseSlidePersistAtom(in, _s.slidePersistAtom); 10162 _atend = false; 10163 while (!_atend) { 10164 _m = in.setMark(); 10165 try { 10166 _s.atoms.append(TextContainer(&_s)); 10167 parseTextContainer(in, _s.atoms.last()); 10168 } catch(IncorrectValueException _e) { 10169 _s.atoms.removeLast(); 10170 _atend = true; 10171 in.rewind(_m); 10172 } catch(EOFException _e) { 10173 _s.atoms.removeLast(); 10174 _atend = true; 10175 in.rewind(_m); 10176 } 10177 } 10178 } 10179 void MSO::parseOutlineAtom(LEInputStream& in, OutlineAtom& _s) { 10180 _s.streamOffset = in.getPosition(); 10181 LEInputStream::Mark _m; 10182 bool _possiblyPresent; 10183 parseOutlineTextRefAtom(in, _s.outlineTextRefAtom); 10184 _m = in.setMark(); 10185 try { 10186 RecordHeader _optionCheck(&_s); 10187 parseRecordHeader(in, _optionCheck); 10188 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFA6); 10189 } catch(EOFException _e) { 10190 _possiblyPresent = false; 10191 } 10192 in.rewind(_m); 10193 _m = in.setMark(); 10194 if (_possiblyPresent) { 10195 try { 10196 _s.textRulerAtom = QSharedPointer<TextRulerAtom>(new TextRulerAtom(&_s)); 10197 parseTextRulerAtom(in, *_s.textRulerAtom.data()); 10198 } catch(IncorrectValueException _e) { 10199 _s.textRulerAtom.clear(); 10200 in.rewind(_m); 10201 } catch(EOFException _e) { 10202 _s.textRulerAtom.clear(); 10203 in.rewind(_m); 10204 } 10205 } 10206 } 10207 void MSO::parseTextContainer(LEInputStream& in, TextContainer& _s) { 10208 _s.streamOffset = in.getPosition(); 10209 LEInputStream::Mark _m; 10210 bool _possiblyPresent; 10211 bool _atend; 10212 parseTextHeaderAtom(in, _s.textHeaderAtom); 10213 _m = in.setMark(); 10214 RecordHeader _choice(&_s); 10215 parseRecordHeader(in, _choice); 10216 in.rewind(_m); 10217 qint64 startPos = in.getPosition(); 10218 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recInstance == 0)&&(_choice.recType == 0xFA0)&&(_choice.recLen%2==0))) { 10219 _s.text = TextContainer::choice1060411409(new TextCharsAtom(&_s)); 10220 parseTextCharsAtom(in, *(TextCharsAtom*)_s.text.data()); 10221 } 10222 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recInstance == 0)&&(_choice.recType == 0xFA8))) { 10223 _s.text = TextContainer::choice1060411409(new TextBytesAtom(&_s)); 10224 parseTextBytesAtom(in, *(TextBytesAtom*)_s.text.data()); 10225 } 10226 _m = in.setMark(); 10227 try { 10228 RecordHeader _optionCheck(&_s); 10229 parseRecordHeader(in, _optionCheck); 10230 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFA1); 10231 } catch(EOFException _e) { 10232 _possiblyPresent = false; 10233 } 10234 in.rewind(_m); 10235 _m = in.setMark(); 10236 if (_possiblyPresent) { 10237 try { 10238 _s.style = QSharedPointer<StyleTextPropAtom>(new StyleTextPropAtom(&_s)); 10239 parseStyleTextPropAtom(in, *_s.style.data()); 10240 } catch(IncorrectValueException _e) { 10241 _s.style.clear(); 10242 in.rewind(_m); 10243 } catch(EOFException _e) { 10244 _s.style.clear(); 10245 in.rewind(_m); 10246 } 10247 } 10248 if (_s.style) { 10249 quint32 count = 0; 10250 if (_s.text.is<TextCharsAtom>()) { 10251 count = _s.text.get<TextCharsAtom>()->textChars.size(); 10252 } 10253 if (_s.text.is<TextBytesAtom>()) { 10254 count = _s.text.get<TextBytesAtom>()->textChars.size(); 10255 } 10256 quint32 sum = 0; 10257 do { 10258 _s.style->rgTextPFRun.append(TextPFRun(_s.style.data())); 10259 parseTextPFRun(in, _s.style->rgTextPFRun.last()); 10260 sum += _s.style->rgTextPFRun.last().count; 10261 } while (sum <= count); 10262 sum = 0; 10263 do { 10264 _s.style->rgTextCFRun.append(TextCFRun(_s.style.data())); 10265 parseTextCFRun(in, _s.style->rgTextCFRun.last()); 10266 sum += _s.style->rgTextCFRun.last().count; 10267 } while (sum <= count); 10268 } 10269 _atend = false; 10270 while (!_atend) { 10271 _m = in.setMark(); 10272 try { 10273 _s.meta.append(TextContainerMeta(&_s)); 10274 parseTextContainerMeta(in, _s.meta.last()); 10275 } catch(IncorrectValueException _e) { 10276 _s.meta.removeLast(); 10277 _atend = true; 10278 in.rewind(_m); 10279 } catch(EOFException _e) { 10280 _s.meta.removeLast(); 10281 _atend = true; 10282 in.rewind(_m); 10283 } 10284 } 10285 _m = in.setMark(); 10286 try { 10287 RecordHeader _optionCheck(&_s); 10288 parseRecordHeader(in, _optionCheck); 10289 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFA2); 10290 } catch(EOFException _e) { 10291 _possiblyPresent = false; 10292 } 10293 in.rewind(_m); 10294 _m = in.setMark(); 10295 if (_possiblyPresent) { 10296 try { 10297 _s.master = QSharedPointer<MasterTextPropAtom>(new MasterTextPropAtom(&_s)); 10298 parseMasterTextPropAtom(in, *_s.master.data()); 10299 } catch(IncorrectValueException _e) { 10300 _s.master.clear(); 10301 in.rewind(_m); 10302 } catch(EOFException _e) { 10303 _s.master.clear(); 10304 in.rewind(_m); 10305 } 10306 } 10307 _atend = false; 10308 while (!_atend) { 10309 _m = in.setMark(); 10310 try { 10311 _s.bookmark.append(TextBookmarkAtom(&_s)); 10312 parseTextBookmarkAtom(in, _s.bookmark.last()); 10313 } catch(IncorrectValueException _e) { 10314 _s.bookmark.removeLast(); 10315 _atend = true; 10316 in.rewind(_m); 10317 } catch(EOFException _e) { 10318 _s.bookmark.removeLast(); 10319 _atend = true; 10320 in.rewind(_m); 10321 } 10322 } 10323 _m = in.setMark(); 10324 try { 10325 RecordHeader _optionCheck(&_s); 10326 parseRecordHeader(in, _optionCheck); 10327 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recInstance == 9)&&(_optionCheck.recType == 0); 10328 } catch(EOFException _e) { 10329 _possiblyPresent = false; 10330 } 10331 in.rewind(_m); 10332 _m = in.setMark(); 10333 if (_possiblyPresent) { 10334 try { 10335 _s.unknown = QSharedPointer<UnknownTextContainerChild>(new UnknownTextContainerChild(&_s)); 10336 parseUnknownTextContainerChild(in, *_s.unknown.data()); 10337 } catch(IncorrectValueException _e) { 10338 _s.unknown.clear(); 10339 in.rewind(_m); 10340 } catch(EOFException _e) { 10341 _s.unknown.clear(); 10342 in.rewind(_m); 10343 } 10344 } 10345 _m = in.setMark(); 10346 try { 10347 RecordHeader _optionCheck(&_s); 10348 parseRecordHeader(in, _optionCheck); 10349 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0xFAA); 10350 } catch(EOFException _e) { 10351 _possiblyPresent = false; 10352 } 10353 in.rewind(_m); 10354 _m = in.setMark(); 10355 if (_possiblyPresent) { 10356 try { 10357 _s.specialinfo = QSharedPointer<TextSpecialInfoAtom>(new TextSpecialInfoAtom(&_s)); 10358 parseTextSpecialInfoAtom(in, *_s.specialinfo.data()); 10359 } catch(IncorrectValueException _e) { 10360 _s.specialinfo.clear(); 10361 in.rewind(_m); 10362 } catch(EOFException _e) { 10363 _s.specialinfo.clear(); 10364 in.rewind(_m); 10365 } 10366 } 10367 _atend = false; 10368 while (!_atend) { 10369 _m = in.setMark(); 10370 try { 10371 _s.interactive.append(TextContainerInteractiveInfo(&_s)); 10372 parseTextContainerInteractiveInfo(in, _s.interactive.last()); 10373 } catch(IncorrectValueException _e) { 10374 _s.interactive.removeLast(); 10375 _atend = true; 10376 in.rewind(_m); 10377 } catch(EOFException _e) { 10378 _s.interactive.removeLast(); 10379 _atend = true; 10380 in.rewind(_m); 10381 } 10382 } 10383 _m = in.setMark(); 10384 try { 10385 RecordHeader _optionCheck(&_s); 10386 parseRecordHeader(in, _optionCheck); 10387 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0xFAA); 10388 } catch(EOFException _e) { 10389 _possiblyPresent = false; 10390 } 10391 in.rewind(_m); 10392 _m = in.setMark(); 10393 if (_possiblyPresent) { 10394 try { 10395 _s.specialinfo2 = QSharedPointer<TextSpecialInfoAtom>(new TextSpecialInfoAtom(&_s)); 10396 parseTextSpecialInfoAtom(in, *_s.specialinfo2.data()); 10397 } catch(IncorrectValueException _e) { 10398 _s.specialinfo2.clear(); 10399 in.rewind(_m); 10400 } catch(EOFException _e) { 10401 _s.specialinfo2.clear(); 10402 in.rewind(_m); 10403 } 10404 } 10405 _m = in.setMark(); 10406 try { 10407 RecordHeader _optionCheck(&_s); 10408 parseRecordHeader(in, _optionCheck); 10409 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFA6); 10410 } catch(EOFException _e) { 10411 _possiblyPresent = false; 10412 } 10413 in.rewind(_m); 10414 _m = in.setMark(); 10415 if (_possiblyPresent) { 10416 try { 10417 _s.textRulerAtom = QSharedPointer<TextRulerAtom>(new TextRulerAtom(&_s)); 10418 parseTextRulerAtom(in, *_s.textRulerAtom.data()); 10419 } catch(IncorrectValueException _e) { 10420 _s.textRulerAtom.clear(); 10421 in.rewind(_m); 10422 } catch(EOFException _e) { 10423 _s.textRulerAtom.clear(); 10424 in.rewind(_m); 10425 } 10426 } 10427 _atend = false; 10428 while (!_atend) { 10429 _m = in.setMark(); 10430 try { 10431 _s.interactive2.append(TextContainerInteractiveInfo(&_s)); 10432 parseTextContainerInteractiveInfo(in, _s.interactive2.last()); 10433 } catch(IncorrectValueException _e) { 10434 _s.interactive2.removeLast(); 10435 _atend = true; 10436 in.rewind(_m); 10437 } catch(EOFException _e) { 10438 _s.interactive2.removeLast(); 10439 _atend = true; 10440 in.rewind(_m); 10441 } 10442 } 10443 } 10444 void MSO::parseMouseClickTextInfo(LEInputStream& in, MouseClickTextInfo& _s) { 10445 _s.streamOffset = in.getPosition(); 10446 parseMouseClickInteractiveInfoContainer(in, _s.interactive); 10447 parseMouseClickTextInteractiveInfoAtom(in, _s.text); 10448 } 10449 void MSO::parseMouseOverTextInfo(LEInputStream& in, MouseOverTextInfo& _s) { 10450 _s.streamOffset = in.getPosition(); 10451 parseMouseOverInteractiveInfoContainer(in, _s.interactive); 10452 parseMouseOverTextInteractiveInfoAtom(in, _s.text); 10453 } 10454 void MSO::parseTextPFRun(LEInputStream& in, TextPFRun& _s) { 10455 _s.streamOffset = in.getPosition(); 10456 _s.count = in.readuint32(); 10457 if (!(((quint32)_s.count)>0)) { 10458 throw IncorrectValueException(in.getPosition(), "((quint32)_s.count)>0"); 10459 } 10460 _s.indentLevel = in.readuint16(); 10461 if (!(((quint16)_s.indentLevel)<=4)) { 10462 throw IncorrectValueException(in.getPosition(), "((quint16)_s.indentLevel)<=4"); 10463 } 10464 parseTextPFException(in, _s.pf); 10465 if (!(_s.pf.masks.defaultTabSize == false)) { 10466 throw IncorrectValueException(in.getPosition(), "_s.pf.masks.defaultTabSize == false"); 10467 } 10468 if (!(_s.pf.masks.tabStops == false)) { 10469 throw IncorrectValueException(in.getPosition(), "_s.pf.masks.tabStops == false"); 10470 } 10471 } 10472 void MSO::parseTextCFRun(LEInputStream& in, TextCFRun& _s) { 10473 _s.streamOffset = in.getPosition(); 10474 _s.count = in.readuint32(); 10475 if (!(((quint32)_s.count)>0)) { 10476 throw IncorrectValueException(in.getPosition(), "((quint32)_s.count)>0"); 10477 } 10478 parseTextCFException(in, _s.cf); 10479 } 10480 void MSO::parseTextCFExceptionAtom(LEInputStream& in, TextCFExceptionAtom& _s) { 10481 _s.streamOffset = in.getPosition(); 10482 parseRecordHeader(in, _s.rh); 10483 if (!(_s.rh.recVer == 0x0)) { 10484 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 10485 } 10486 if (!(_s.rh.recInstance == 0x0)) { 10487 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 10488 } 10489 if (!(_s.rh.recType == 0x0FA4)) { 10490 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FA4"); 10491 } 10492 parseTextCFException(in, _s.cf); 10493 } 10494 void MSO::parseDefaultRulerAtom(LEInputStream& in, DefaultRulerAtom& _s) { 10495 _s.streamOffset = in.getPosition(); 10496 parseRecordHeader(in, _s.rh); 10497 if (!(_s.rh.recVer == 0x0)) { 10498 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 10499 } 10500 if (!(_s.rh.recInstance == 0x0)) { 10501 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 10502 } 10503 if (!(_s.rh.recType == 0x0FAB)) { 10504 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FAB"); 10505 } 10506 parseTextRuler(in, _s.defaultTextRuler); 10507 if (!(_s.defaultTextRuler.fDefaultTabSize == true)) { 10508 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fDefaultTabSize == true"); 10509 } 10510 if (!(_s.defaultTextRuler.fCLevels == true)) { 10511 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fCLevels == true"); 10512 } 10513 if (!(_s.defaultTextRuler.fTabStops == true)) { 10514 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fTabStops == true"); 10515 } 10516 if (!(_s.defaultTextRuler.fLeftMargin1 == true)) { 10517 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fLeftMargin1 == true"); 10518 } 10519 if (!(_s.defaultTextRuler.fLeftMargin2 == true)) { 10520 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fLeftMargin2 == true"); 10521 } 10522 if (!(_s.defaultTextRuler.fLeftMargin3 == true)) { 10523 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fLeftMargin3 == true"); 10524 } 10525 if (!(_s.defaultTextRuler.fLeftMargin4 == true)) { 10526 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fLeftMargin4 == true"); 10527 } 10528 if (!(_s.defaultTextRuler.fIndent1 == true)) { 10529 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fIndent1 == true"); 10530 } 10531 if (!(_s.defaultTextRuler.fIndent2 == true)) { 10532 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fIndent2 == true"); 10533 } 10534 if (!(_s.defaultTextRuler.fIndent3 == true)) { 10535 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fIndent3 == true"); 10536 } 10537 if (!(_s.defaultTextRuler.fIndent4 == true)) { 10538 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fIndent4 == true"); 10539 } 10540 if (!(_s.defaultTextRuler.fIndent5 == true)) { 10541 throw IncorrectValueException(in.getPosition(), "_s.defaultTextRuler.fIndent5 == true"); 10542 } 10543 } 10544 void MSO::parseTextPFExceptionAtom(LEInputStream& in, TextPFExceptionAtom& _s) { 10545 _s.streamOffset = in.getPosition(); 10546 parseRecordHeader(in, _s.rh); 10547 if (!(_s.rh.recVer == 0x0)) { 10548 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 10549 } 10550 if (!(_s.rh.recInstance == 0x0)) { 10551 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 10552 } 10553 if (!(_s.rh.recType == 0x0FA5)) { 10554 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FA5"); 10555 } 10556 _s.reserved = in.readuint16(); 10557 parseTextPFException(in, _s.pf); 10558 } 10559 void MSO::parseTextSIRun(LEInputStream& in, TextSIRun& _s) { 10560 _s.streamOffset = in.getPosition(); 10561 _s.count = in.readuint32(); 10562 if (!(((quint32)_s.count)>=1)) { 10563 throw IncorrectValueException(in.getPosition(), "((quint32)_s.count)>=1"); 10564 } 10565 parseTextSIException(in, _s.si); 10566 } 10567 void MSO::parseTextSIExceptionAtom(LEInputStream& in, TextSIExceptionAtom& _s) { 10568 _s.streamOffset = in.getPosition(); 10569 parseRecordHeader(in, _s.rh); 10570 if (!(_s.rh.recVer == 0x0)) { 10571 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 10572 } 10573 if (!(_s.rh.recInstance == 0x0)) { 10574 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 10575 } 10576 if (!(_s.rh.recType == 0x0FA9)) { 10577 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FA9"); 10578 } 10579 parseTextSIException(in, _s.textSIException); 10580 if (!(_s.textSIException.fPp10ext == false)) { 10581 throw IncorrectValueException(in.getPosition(), "_s.textSIException.fPp10ext == false"); 10582 } 10583 if (!(_s.textSIException.fBidi == false)) { 10584 throw IncorrectValueException(in.getPosition(), "_s.textSIException.fBidi == false"); 10585 } 10586 if (!(_s.textSIException.smartTag == false)) { 10587 throw IncorrectValueException(in.getPosition(), "_s.textSIException.smartTag == false"); 10588 } 10589 } 10590 void MSO::parseTextMasterStyleAtom(LEInputStream& in, TextMasterStyleAtom& _s) { 10591 _s.streamOffset = in.getPosition(); 10592 parseRecordHeader(in, _s.rh); 10593 if (!(_s.rh.recVer == 0x0)) { 10594 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 10595 } 10596 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 8)) { 10597 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 8"); 10598 } 10599 if (!(_s.rh.recType == 0x0FA3)) { 10600 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FA3"); 10601 } 10602 _s.cLevels = in.readuint16(); 10603 if (!(((quint16)_s.cLevels)<=5)) { 10604 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cLevels)<=5"); 10605 } 10606 _s._has_lstLvl1level = _s.cLevels>0 && _s.rh.recInstance>=5; 10607 if (_s._has_lstLvl1level) { 10608 _s.lstLvl1level = in.readuint16(); 10609 } 10610 if (_s.cLevels>0) { 10611 _s.lstLvl1 = QSharedPointer<TextMasterStyleLevel>(new TextMasterStyleLevel(&_s)); 10612 parseTextMasterStyleLevel(in, *_s.lstLvl1.data()); 10613 } 10614 _s._has_lstLvl2level = _s.cLevels>1 && _s.rh.recInstance>=5; 10615 if (_s._has_lstLvl2level) { 10616 _s.lstLvl2level = in.readuint16(); 10617 } 10618 if (_s.cLevels>1) { 10619 _s.lstLvl2 = QSharedPointer<TextMasterStyleLevel>(new TextMasterStyleLevel(&_s)); 10620 parseTextMasterStyleLevel(in, *_s.lstLvl2.data()); 10621 } 10622 _s._has_lstLvl3level = _s.cLevels>2 && _s.rh.recInstance>=5; 10623 if (_s._has_lstLvl3level) { 10624 _s.lstLvl3level = in.readuint16(); 10625 } 10626 if (_s.cLevels>2) { 10627 _s.lstLvl3 = QSharedPointer<TextMasterStyleLevel>(new TextMasterStyleLevel(&_s)); 10628 parseTextMasterStyleLevel(in, *_s.lstLvl3.data()); 10629 } 10630 _s._has_lstLvl4level = _s.cLevels>3 && _s.rh.recInstance>=5; 10631 if (_s._has_lstLvl4level) { 10632 _s.lstLvl4level = in.readuint16(); 10633 } 10634 if (_s.cLevels>3) { 10635 _s.lstLvl4 = QSharedPointer<TextMasterStyleLevel>(new TextMasterStyleLevel(&_s)); 10636 parseTextMasterStyleLevel(in, *_s.lstLvl4.data()); 10637 } 10638 _s._has_lstLvl5level = _s.cLevels>4 && _s.rh.recInstance>=5; 10639 if (_s._has_lstLvl5level) { 10640 _s.lstLvl5level = in.readuint16(); 10641 } 10642 if (_s.cLevels>4) { 10643 _s.lstLvl5 = QSharedPointer<TextMasterStyleLevel>(new TextMasterStyleLevel(&_s)); 10644 parseTextMasterStyleLevel(in, *_s.lstLvl5.data()); 10645 } 10646 } 10647 void MSO::parsePP10SlideBinaryTagExtension(LEInputStream& in, PP10SlideBinaryTagExtension& _s) { 10648 _s.streamOffset = in.getPosition(); 10649 int _c; 10650 LEInputStream::Mark _m; 10651 bool _possiblyPresent; 10652 bool _atend; 10653 parseRecordHeader(in, _s.rh); 10654 if (!(_s.rh.recVer == 0)) { 10655 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 10656 } 10657 if (!(_s.rh.recInstance == 0)) { 10658 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 10659 } 10660 if (!(_s.rh.recType == 0xFBA)) { 10661 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xFBA"); 10662 } 10663 if (!(_s.rh.recLen == 0x10)) { 10664 throw IncorrectValueException(in.getPosition(), "_s.rh.recLen == 0x10"); 10665 } 10666 _c = 8; 10667 _s.tagName.resize(_c); 10668 for (int _i=0; _i<_c; ++_i) { 10669 _s.tagName[_i] = in.readuint16(); 10670 } 10671 parseRecordHeader(in, _s.rhData); 10672 if (!(_s.rhData.recVer == 0)) { 10673 throw IncorrectValueException(in.getPosition(), "_s.rhData.recVer == 0"); 10674 } 10675 if (!(_s.rhData.recInstance == 0)) { 10676 throw IncorrectValueException(in.getPosition(), "_s.rhData.recInstance == 0"); 10677 } 10678 if (!(_s.rhData.recType == 0x138B)) { 10679 throw IncorrectValueException(in.getPosition(), "_s.rhData.recType == 0x138B"); 10680 } 10681 _atend = false; 10682 while (!_atend) { 10683 _m = in.setMark(); 10684 try { 10685 _s.rgTextMasterStyleAtom.append(TextMasterStyle10Atom(&_s)); 10686 parseTextMasterStyle10Atom(in, _s.rgTextMasterStyleAtom.last()); 10687 } catch(IncorrectValueException _e) { 10688 _s.rgTextMasterStyleAtom.removeLast(); 10689 _atend = true; 10690 in.rewind(_m); 10691 } catch(EOFException _e) { 10692 _s.rgTextMasterStyleAtom.removeLast(); 10693 _atend = true; 10694 in.rewind(_m); 10695 } 10696 } 10697 _atend = false; 10698 while (!_atend) { 10699 _m = in.setMark(); 10700 try { 10701 _s.rgComment10Container.append(Comment10Container(&_s)); 10702 parseComment10Container(in, _s.rgComment10Container.last()); 10703 } catch(IncorrectValueException _e) { 10704 _s.rgComment10Container.removeLast(); 10705 _atend = true; 10706 in.rewind(_m); 10707 } catch(EOFException _e) { 10708 _s.rgComment10Container.removeLast(); 10709 _atend = true; 10710 in.rewind(_m); 10711 } 10712 } 10713 _m = in.setMark(); 10714 try { 10715 RecordHeader _optionCheck(&_s); 10716 parseRecordHeader(in, _optionCheck); 10717 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2EE7)&&(_optionCheck.recLen == 8); 10718 } catch(EOFException _e) { 10719 _possiblyPresent = false; 10720 } 10721 in.rewind(_m); 10722 _m = in.setMark(); 10723 if (_possiblyPresent) { 10724 try { 10725 _s.linkedSlideAtom = QSharedPointer<LinkedSlide10Atom>(new LinkedSlide10Atom(&_s)); 10726 parseLinkedSlide10Atom(in, *_s.linkedSlideAtom.data()); 10727 } catch(IncorrectValueException _e) { 10728 _s.linkedSlideAtom.clear(); 10729 in.rewind(_m); 10730 } catch(EOFException _e) { 10731 _s.linkedSlideAtom.clear(); 10732 in.rewind(_m); 10733 } 10734 } 10735 _atend = false; 10736 while (!_atend) { 10737 _m = in.setMark(); 10738 try { 10739 _s.rgLinkedShape10Atom.append(LinkedShape10Atom(&_s)); 10740 parseLinkedShape10Atom(in, _s.rgLinkedShape10Atom.last()); 10741 } catch(IncorrectValueException _e) { 10742 _s.rgLinkedShape10Atom.removeLast(); 10743 _atend = true; 10744 in.rewind(_m); 10745 } catch(EOFException _e) { 10746 _s.rgLinkedShape10Atom.removeLast(); 10747 _atend = true; 10748 in.rewind(_m); 10749 } 10750 } 10751 _m = in.setMark(); 10752 try { 10753 RecordHeader _optionCheck(&_s); 10754 parseRecordHeader(in, _optionCheck); 10755 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2EEA)&&(_optionCheck.recLen == 4); 10756 } catch(EOFException _e) { 10757 _possiblyPresent = false; 10758 } 10759 in.rewind(_m); 10760 _m = in.setMark(); 10761 if (_possiblyPresent) { 10762 try { 10763 _s.slideFlagsAtom = QSharedPointer<SlideFlags10Atom>(new SlideFlags10Atom(&_s)); 10764 parseSlideFlags10Atom(in, *_s.slideFlagsAtom.data()); 10765 } catch(IncorrectValueException _e) { 10766 _s.slideFlagsAtom.clear(); 10767 in.rewind(_m); 10768 } catch(EOFException _e) { 10769 _s.slideFlagsAtom.clear(); 10770 in.rewind(_m); 10771 } 10772 } 10773 _m = in.setMark(); 10774 try { 10775 RecordHeader _optionCheck(&_s); 10776 parseRecordHeader(in, _optionCheck); 10777 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2EEB)&&(_optionCheck.recLen == 8); 10778 } catch(EOFException _e) { 10779 _possiblyPresent = false; 10780 } 10781 in.rewind(_m); 10782 _m = in.setMark(); 10783 if (_possiblyPresent) { 10784 try { 10785 _s.slideTimeAtom = QSharedPointer<SlideTime10Atom>(new SlideTime10Atom(&_s)); 10786 parseSlideTime10Atom(in, *_s.slideTimeAtom.data()); 10787 } catch(IncorrectValueException _e) { 10788 _s.slideTimeAtom.clear(); 10789 in.rewind(_m); 10790 } catch(EOFException _e) { 10791 _s.slideTimeAtom.clear(); 10792 in.rewind(_m); 10793 } 10794 } 10795 _m = in.setMark(); 10796 try { 10797 RecordHeader _optionCheck(&_s); 10798 parseRecordHeader(in, _optionCheck); 10799 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x101D); 10800 } catch(EOFException _e) { 10801 _possiblyPresent = false; 10802 } 10803 in.rewind(_m); 10804 _m = in.setMark(); 10805 if (_possiblyPresent) { 10806 try { 10807 _s.unknown = QSharedPointer<UnknownSlideContainerChild>(new UnknownSlideContainerChild(&_s)); 10808 parseUnknownSlideContainerChild(in, *_s.unknown.data()); 10809 } catch(IncorrectValueException _e) { 10810 _s.unknown.clear(); 10811 in.rewind(_m); 10812 } catch(EOFException _e) { 10813 _s.unknown.clear(); 10814 in.rewind(_m); 10815 } 10816 } 10817 _m = in.setMark(); 10818 try { 10819 RecordHeader _optionCheck(&_s); 10820 parseRecordHeader(in, _optionCheck); 10821 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2B00)&&(_optionCheck.recLen == 4); 10822 } catch(EOFException _e) { 10823 _possiblyPresent = false; 10824 } 10825 in.rewind(_m); 10826 _m = in.setMark(); 10827 if (_possiblyPresent) { 10828 try { 10829 _s.hashCodeAtom = QSharedPointer<HashCode10Atom>(new HashCode10Atom(&_s)); 10830 parseHashCode10Atom(in, *_s.hashCodeAtom.data()); 10831 } catch(IncorrectValueException _e) { 10832 _s.hashCodeAtom.clear(); 10833 in.rewind(_m); 10834 } catch(EOFException _e) { 10835 _s.hashCodeAtom.clear(); 10836 in.rewind(_m); 10837 } 10838 } 10839 _m = in.setMark(); 10840 try { 10841 RecordHeader _optionCheck(&_s); 10842 parseRecordHeader(in, _optionCheck); 10843 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xF144); 10844 } catch(EOFException _e) { 10845 _possiblyPresent = false; 10846 } 10847 in.rewind(_m); 10848 _m = in.setMark(); 10849 if (_possiblyPresent) { 10850 try { 10851 _s.extTimeNodeContainer = QSharedPointer<ExtTimeNodeContainer>(new ExtTimeNodeContainer(&_s)); 10852 parseExtTimeNodeContainer(in, *_s.extTimeNodeContainer.data()); 10853 } catch(IncorrectValueException _e) { 10854 _s.extTimeNodeContainer.clear(); 10855 in.rewind(_m); 10856 } catch(EOFException _e) { 10857 _s.extTimeNodeContainer.clear(); 10858 in.rewind(_m); 10859 } 10860 } 10861 _m = in.setMark(); 10862 try { 10863 RecordHeader _optionCheck(&_s); 10864 parseRecordHeader(in, _optionCheck); 10865 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x2B02); 10866 } catch(EOFException _e) { 10867 _possiblyPresent = false; 10868 } 10869 in.rewind(_m); 10870 _m = in.setMark(); 10871 if (_possiblyPresent) { 10872 try { 10873 _s.buildListContainer = QSharedPointer<BuildListContainer>(new BuildListContainer(&_s)); 10874 parseBuildListContainer(in, *_s.buildListContainer.data()); 10875 } catch(IncorrectValueException _e) { 10876 _s.buildListContainer.clear(); 10877 in.rewind(_m); 10878 } catch(EOFException _e) { 10879 _s.buildListContainer.clear(); 10880 in.rewind(_m); 10881 } 10882 } 10883 } 10884 void MSO::parseExObjListSubContainer(LEInputStream& in, ExObjListSubContainer& _s) { 10885 _s.streamOffset = in.getPosition(); 10886 LEInputStream::Mark _m; 10887 _m = in.setMark(); 10888 OfficeArtRecordHeader _choice(&_s); 10889 parseOfficeArtRecordHeader(in, _choice); 10890 in.rewind(_m); 10891 qint64 startPos = in.getPosition(); 10892 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0x1006))) { 10893 _s.anon = ExObjListSubContainer::choice2338534801(new ExAviMovieContainer(&_s)); 10894 parseExAviMovieContainer(in, *(ExAviMovieContainer*)_s.anon.data()); 10895 } 10896 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0x100E))) { 10897 _s.anon = ExObjListSubContainer::choice2338534801(new ExCDAudioContainer(&_s)); 10898 parseExCDAudioContainer(in, *(ExCDAudioContainer*)_s.anon.data()); 10899 } 10900 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0xFEE))) { 10901 _s.anon = ExObjListSubContainer::choice2338534801(new ExControlContainer(&_s)); 10902 parseExControlContainer(in, *(ExControlContainer*)_s.anon.data()); 10903 } 10904 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0xFD7))) { 10905 _s.anon = ExObjListSubContainer::choice2338534801(new ExHyperlinkContainer(&_s)); 10906 parseExHyperlinkContainer(in, *(ExHyperlinkContainer*)_s.anon.data()); 10907 } 10908 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0x1007))) { 10909 _s.anon = ExObjListSubContainer::choice2338534801(new ExMCIMovieContainer(&_s)); 10910 parseExMCIMovieContainer(in, *(ExMCIMovieContainer*)_s.anon.data()); 10911 } 10912 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0x100D))) { 10913 _s.anon = ExObjListSubContainer::choice2338534801(new ExMIDIAudioContainer(&_s)); 10914 parseExMIDIAudioContainer(in, *(ExMIDIAudioContainer*)_s.anon.data()); 10915 } 10916 if (startPos == in.getPosition() && ((_choice.recInstance == 0x0)&&(_choice.recType == 0x0FCC))) { 10917 _s.anon = ExObjListSubContainer::choice2338534801(new ExOleEmbedContainer(&_s)); 10918 parseExOleEmbedContainer(in, *(ExOleEmbedContainer*)_s.anon.data()); 10919 } 10920 if (startPos == in.getPosition() && ((_choice.recInstance == 0x0)&&(_choice.recType == 0x0FCE))) { 10921 _s.anon = ExObjListSubContainer::choice2338534801(new ExOleLinkContainer(&_s)); 10922 parseExOleLinkContainer(in, *(ExOleLinkContainer*)_s.anon.data()); 10923 } 10924 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0x100F))) { 10925 _s.anon = ExObjListSubContainer::choice2338534801(new ExWAVAudioEmbeddedContainer(&_s)); 10926 parseExWAVAudioEmbeddedContainer(in, *(ExWAVAudioEmbeddedContainer*)_s.anon.data()); 10927 } 10928 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0x1010))) { 10929 _s.anon = ExObjListSubContainer::choice2338534801(new ExWAVAudioLinkContainer(&_s)); 10930 parseExWAVAudioLinkContainer(in, *(ExWAVAudioLinkContainer*)_s.anon.data()); 10931 } 10932 if (startPos == in.getPosition()) { 10933 _s.anon = ExObjListSubContainer::choice2338534801(new UnknownExObjListSubContainerChild(&_s)); 10934 parseUnknownExObjListSubContainerChild(in, *(UnknownExObjListSubContainerChild*)_s.anon.data()); 10935 } 10936 } 10937 void MSO::parseOfficeArtDggContainer(LEInputStream& in, OfficeArtDggContainer& _s) { 10938 _s.streamOffset = in.getPosition(); 10939 LEInputStream::Mark _m; 10940 bool _possiblyPresent; 10941 parseOfficeArtRecordHeader(in, _s.rh); 10942 if (!(_s.rh.recVer == 0xF)) { 10943 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 10944 } 10945 if (!(_s.rh.recInstance == 0x0)) { 10946 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 10947 } 10948 if (!(_s.rh.recType == 0x0F000)) { 10949 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F000"); 10950 } 10951 parseOfficeArtFDGGBlock(in, _s.drawingGroup); 10952 _m = in.setMark(); 10953 try { 10954 OfficeArtRecordHeader _optionCheck(&_s); 10955 parseOfficeArtRecordHeader(in, _optionCheck); 10956 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recType == 0x0F001); 10957 } catch(EOFException _e) { 10958 _possiblyPresent = false; 10959 } 10960 in.rewind(_m); 10961 _m = in.setMark(); 10962 if (_possiblyPresent) { 10963 try { 10964 _s.blipStore = QSharedPointer<OfficeArtBStoreContainer>(new OfficeArtBStoreContainer(&_s)); 10965 parseOfficeArtBStoreContainer(in, *_s.blipStore.data()); 10966 } catch(IncorrectValueException _e) { 10967 _s.blipStore.clear(); 10968 in.rewind(_m); 10969 } catch(EOFException _e) { 10970 _s.blipStore.clear(); 10971 in.rewind(_m); 10972 } 10973 } 10974 _m = in.setMark(); 10975 try { 10976 OfficeArtRecordHeader _optionCheck(&_s); 10977 parseOfficeArtRecordHeader(in, _optionCheck); 10978 _possiblyPresent = (_optionCheck.recVer == 0x3)&&(_optionCheck.recType == 0x0F00B); 10979 } catch(EOFException _e) { 10980 _possiblyPresent = false; 10981 } 10982 in.rewind(_m); 10983 _m = in.setMark(); 10984 if (_possiblyPresent) { 10985 try { 10986 _s.drawingPrimaryOptions = QSharedPointer<OfficeArtFOPT>(new OfficeArtFOPT(&_s)); 10987 parseOfficeArtFOPT(in, *_s.drawingPrimaryOptions.data()); 10988 } catch(IncorrectValueException _e) { 10989 _s.drawingPrimaryOptions.clear(); 10990 in.rewind(_m); 10991 } catch(EOFException _e) { 10992 _s.drawingPrimaryOptions.clear(); 10993 in.rewind(_m); 10994 } 10995 } 10996 _m = in.setMark(); 10997 try { 10998 OfficeArtRecordHeader _optionCheck(&_s); 10999 parseOfficeArtRecordHeader(in, _optionCheck); 11000 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recType == 0xF122); 11001 } catch(EOFException _e) { 11002 _possiblyPresent = false; 11003 } 11004 in.rewind(_m); 11005 _m = in.setMark(); 11006 if (_possiblyPresent) { 11007 try { 11008 _s.drawingTertiaryOptions = QSharedPointer<OfficeArtTertiaryFOPT>(new OfficeArtTertiaryFOPT(&_s)); 11009 parseOfficeArtTertiaryFOPT(in, *_s.drawingTertiaryOptions.data()); 11010 } catch(IncorrectValueException _e) { 11011 _s.drawingTertiaryOptions.clear(); 11012 in.rewind(_m); 11013 } catch(EOFException _e) { 11014 _s.drawingTertiaryOptions.clear(); 11015 in.rewind(_m); 11016 } 11017 } 11018 _m = in.setMark(); 11019 try { 11020 OfficeArtRecordHeader _optionCheck(&_s); 11021 parseOfficeArtRecordHeader(in, _optionCheck); 11022 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recType == 0xF11A)&&(_optionCheck.recLen==4*_optionCheck.recInstance); 11023 } catch(EOFException _e) { 11024 _possiblyPresent = false; 11025 } 11026 in.rewind(_m); 11027 _m = in.setMark(); 11028 if (_possiblyPresent) { 11029 try { 11030 _s.colorMRU = QSharedPointer<OfficeArtColorMRUContainer>(new OfficeArtColorMRUContainer(&_s)); 11031 parseOfficeArtColorMRUContainer(in, *_s.colorMRU.data()); 11032 } catch(IncorrectValueException _e) { 11033 _s.colorMRU.clear(); 11034 in.rewind(_m); 11035 } catch(EOFException _e) { 11036 _s.colorMRU.clear(); 11037 in.rewind(_m); 11038 } 11039 } 11040 _m = in.setMark(); 11041 try { 11042 OfficeArtRecordHeader _optionCheck(&_s); 11043 parseOfficeArtRecordHeader(in, _optionCheck); 11044 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x4)&&(_optionCheck.recType == 0xF11E)&&(_optionCheck.recLen == 0x10); 11045 } catch(EOFException _e) { 11046 _possiblyPresent = false; 11047 } 11048 in.rewind(_m); 11049 _m = in.setMark(); 11050 if (_possiblyPresent) { 11051 try { 11052 _s.splitColors = QSharedPointer<OfficeArtSplitMenuColorContainer>(new OfficeArtSplitMenuColorContainer(&_s)); 11053 parseOfficeArtSplitMenuColorContainer(in, *_s.splitColors.data()); 11054 } catch(IncorrectValueException _e) { 11055 _s.splitColors.clear(); 11056 in.rewind(_m); 11057 } catch(EOFException _e) { 11058 _s.splitColors.clear(); 11059 in.rewind(_m); 11060 } 11061 } 11062 _m = in.setMark(); 11063 try { 11064 OfficeArtRecordHeader _optionCheck(&_s); 11065 parseOfficeArtRecordHeader(in, _optionCheck); 11066 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recType == 0x0F001); 11067 } catch(EOFException _e) { 11068 _possiblyPresent = false; 11069 } 11070 in.rewind(_m); 11071 _m = in.setMark(); 11072 if (_possiblyPresent) { 11073 try { 11074 _s.blipStore2 = QSharedPointer<OfficeArtBStoreContainer>(new OfficeArtBStoreContainer(&_s)); 11075 parseOfficeArtBStoreContainer(in, *_s.blipStore2.data()); 11076 } catch(IncorrectValueException _e) { 11077 _s.blipStore2.clear(); 11078 in.rewind(_m); 11079 } catch(EOFException _e) { 11080 _s.blipStore2.clear(); 11081 in.rewind(_m); 11082 } 11083 } 11084 _m = in.setMark(); 11085 try { 11086 OfficeArtRecordHeader _optionCheck(&_s); 11087 parseOfficeArtRecordHeader(in, _optionCheck); 11088 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recType == 0xF122); 11089 } catch(EOFException _e) { 11090 _possiblyPresent = false; 11091 } 11092 in.rewind(_m); 11093 _m = in.setMark(); 11094 if (_possiblyPresent) { 11095 try { 11096 _s.unknown = QSharedPointer<OfficeArtTertiaryFOPT>(new OfficeArtTertiaryFOPT(&_s)); 11097 parseOfficeArtTertiaryFOPT(in, *_s.unknown.data()); 11098 } catch(IncorrectValueException _e) { 11099 _s.unknown.clear(); 11100 in.rewind(_m); 11101 } catch(EOFException _e) { 11102 _s.unknown.clear(); 11103 in.rewind(_m); 11104 } 11105 } 11106 } 11107 void MSO::parseOfficeArtFOPTEChoice(LEInputStream& in, OfficeArtFOPTEChoice& _s) { 11108 _s.streamOffset = in.getPosition(); 11109 LEInputStream::Mark _m; 11110 _m = in.setMark(); 11111 OfficeArtFOPTEOPID _choice(&_s); 11112 parseOfficeArtFOPTEOPID(in, _choice); 11113 in.rewind(_m); 11114 qint64 startPos = in.getPosition(); 11115 if (startPos == in.getPosition() && ((_choice.opid == 0x0004)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11116 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Rotation(&_s)); 11117 parseRotation(in, *(Rotation*)_s.anon.data()); 11118 } 11119 if (startPos == in.getPosition() && ((_choice.opid == 0x007F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11120 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ProtectionBooleanProperties(&_s)); 11121 parseProtectionBooleanProperties(in, *(ProtectionBooleanProperties*)_s.anon.data()); 11122 } 11123 if (startPos == in.getPosition() && ((_choice.opid == 0x0080)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11124 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ITxid(&_s)); 11125 parseITxid(in, *(ITxid*)_s.anon.data()); 11126 } 11127 if (startPos == in.getPosition() && ((_choice.opid == 0x0081)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11128 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxTextLeft(&_s)); 11129 parseDxTextLeft(in, *(DxTextLeft*)_s.anon.data()); 11130 } 11131 if (startPos == in.getPosition() && ((_choice.opid == 0x0082)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11132 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DyTextTop(&_s)); 11133 parseDyTextTop(in, *(DyTextTop*)_s.anon.data()); 11134 } 11135 if (startPos == in.getPosition() && ((_choice.opid == 0x0083)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11136 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxTextRight(&_s)); 11137 parseDxTextRight(in, *(DxTextRight*)_s.anon.data()); 11138 } 11139 if (startPos == in.getPosition() && ((_choice.opid == 0x0084)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11140 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DyTextBottom(&_s)); 11141 parseDyTextBottom(in, *(DyTextBottom*)_s.anon.data()); 11142 } 11143 if (startPos == in.getPosition() && ((_choice.opid == 0x0085)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11144 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new WrapText(&_s)); 11145 parseWrapText(in, *(WrapText*)_s.anon.data()); 11146 } 11147 if (startPos == in.getPosition() && ((_choice.opid == 0x0087)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11148 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new AnchorText(&_s)); 11149 parseAnchorText(in, *(AnchorText*)_s.anon.data()); 11150 } 11151 if (startPos == in.getPosition() && ((_choice.opid == 0x0088)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11152 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new TxflTextFlow(&_s)); 11153 parseTxflTextFlow(in, *(TxflTextFlow*)_s.anon.data()); 11154 } 11155 if (startPos == in.getPosition() && ((_choice.opid == 0x0089)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11156 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new CdirFont(&_s)); 11157 parseCdirFont(in, *(CdirFont*)_s.anon.data()); 11158 } 11159 if (startPos == in.getPosition() && ((_choice.opid == 0x008A)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11160 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new HspNext(&_s)); 11161 parseHspNext(in, *(HspNext*)_s.anon.data()); 11162 } 11163 if (startPos == in.getPosition() && ((_choice.opid == 0x008B)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11164 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Txdir(&_s)); 11165 parseTxdir(in, *(Txdir*)_s.anon.data()); 11166 } 11167 if (startPos == in.getPosition() && ((_choice.opid == 0x00BF)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11168 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new TextBooleanProperties(&_s)); 11169 parseTextBooleanProperties(in, *(TextBooleanProperties*)_s.anon.data()); 11170 } 11171 if (startPos == in.getPosition() && ((_choice.opid == 0x0100)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11172 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new CropFromTop(&_s)); 11173 parseCropFromTop(in, *(CropFromTop*)_s.anon.data()); 11174 } 11175 if (startPos == in.getPosition() && ((_choice.opid == 0x0101)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11176 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new CropFromBottom(&_s)); 11177 parseCropFromBottom(in, *(CropFromBottom*)_s.anon.data()); 11178 } 11179 if (startPos == in.getPosition() && ((_choice.opid == 0x0102)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11180 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new CropFromLeft(&_s)); 11181 parseCropFromLeft(in, *(CropFromLeft*)_s.anon.data()); 11182 } 11183 if (startPos == in.getPosition() && ((_choice.opid == 0x0103)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11184 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new CropFromRight(&_s)); 11185 parseCropFromRight(in, *(CropFromRight*)_s.anon.data()); 11186 } 11187 if (startPos == in.getPosition() && ((_choice.opid == 0x0104))) { 11188 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Pib(&_s)); 11189 parsePib(in, *(Pib*)_s.anon.data()); 11190 } 11191 if (startPos == in.getPosition() && ((_choice.opid == 0x0105))) { 11192 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PibName(&_s)); 11193 parsePibName(in, *(PibName*)_s.anon.data()); 11194 } 11195 if (startPos == in.getPosition() && ((_choice.opid == 0x0106)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11196 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PibFlags(&_s)); 11197 parsePibFlags(in, *(PibFlags*)_s.anon.data()); 11198 } 11199 if (startPos == in.getPosition() && ((_choice.opid == 0x0107)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11200 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PictureTransparent(&_s)); 11201 parsePictureTransparent(in, *(PictureTransparent*)_s.anon.data()); 11202 } 11203 if (startPos == in.getPosition() && ((_choice.opid == 0x0108)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11204 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PictureContrast(&_s)); 11205 parsePictureContrast(in, *(PictureContrast*)_s.anon.data()); 11206 } 11207 if (startPos == in.getPosition() && ((_choice.opid == 0x0109)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11208 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PictureBrightness(&_s)); 11209 parsePictureBrightness(in, *(PictureBrightness*)_s.anon.data()); 11210 } 11211 if (startPos == in.getPosition() && ((_choice.opid == 0x013F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11212 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new BlipBooleanProperties(&_s)); 11213 parseBlipBooleanProperties(in, *(BlipBooleanProperties*)_s.anon.data()); 11214 } 11215 if (startPos == in.getPosition() && ((_choice.opid == 0x0140)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11216 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new GeoLeft(&_s)); 11217 parseGeoLeft(in, *(GeoLeft*)_s.anon.data()); 11218 } 11219 if (startPos == in.getPosition() && ((_choice.opid == 0x0141)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11220 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new GeoTop(&_s)); 11221 parseGeoTop(in, *(GeoTop*)_s.anon.data()); 11222 } 11223 if (startPos == in.getPosition() && ((_choice.opid == 0x0142)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11224 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new GeoRight(&_s)); 11225 parseGeoRight(in, *(GeoRight*)_s.anon.data()); 11226 } 11227 if (startPos == in.getPosition() && ((_choice.opid == 0x0143)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11228 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new GeoBottom(&_s)); 11229 parseGeoBottom(in, *(GeoBottom*)_s.anon.data()); 11230 } 11231 if (startPos == in.getPosition() && ((_choice.opid == 0x0144)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11232 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShapePath(&_s)); 11233 parseShapePath(in, *(ShapePath*)_s.anon.data()); 11234 } 11235 if (startPos == in.getPosition() && ((_choice.opid == 0x0145))) { 11236 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PVertices(&_s)); 11237 parsePVertices(in, *(PVertices*)_s.anon.data()); 11238 } 11239 if (startPos == in.getPosition() && ((_choice.opid == 0x0146))) { 11240 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PSegmentInfo(&_s)); 11241 parsePSegmentInfo(in, *(PSegmentInfo*)_s.anon.data()); 11242 } 11243 if (startPos == in.getPosition() && ((_choice.opid == 0x0147)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11244 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new AdjustValue(&_s)); 11245 parseAdjustValue(in, *(AdjustValue*)_s.anon.data()); 11246 } 11247 if (startPos == in.getPosition() && ((_choice.opid == 0x0148)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11248 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust2Value(&_s)); 11249 parseAdjust2Value(in, *(Adjust2Value*)_s.anon.data()); 11250 } 11251 if (startPos == in.getPosition() && ((_choice.opid == 0x0149)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11252 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust3Value(&_s)); 11253 parseAdjust3Value(in, *(Adjust3Value*)_s.anon.data()); 11254 } 11255 if (startPos == in.getPosition() && ((_choice.opid == 0x014A)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11256 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust4Value(&_s)); 11257 parseAdjust4Value(in, *(Adjust4Value*)_s.anon.data()); 11258 } 11259 if (startPos == in.getPosition() && ((_choice.opid == 0x014B)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11260 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust5Value(&_s)); 11261 parseAdjust5Value(in, *(Adjust5Value*)_s.anon.data()); 11262 } 11263 if (startPos == in.getPosition() && ((_choice.opid == 0x014C)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11264 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust6Value(&_s)); 11265 parseAdjust6Value(in, *(Adjust6Value*)_s.anon.data()); 11266 } 11267 if (startPos == in.getPosition() && ((_choice.opid == 0x014D)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11268 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust7Value(&_s)); 11269 parseAdjust7Value(in, *(Adjust7Value*)_s.anon.data()); 11270 } 11271 if (startPos == in.getPosition() && ((_choice.opid == 0x014E)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11272 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Adjust8Value(&_s)); 11273 parseAdjust8Value(in, *(Adjust8Value*)_s.anon.data()); 11274 } 11275 if (startPos == in.getPosition() && ((_choice.opid == 0x017F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11276 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new GeometryBooleanProperties(&_s)); 11277 parseGeometryBooleanProperties(in, *(GeometryBooleanProperties*)_s.anon.data()); 11278 } 11279 if (startPos == in.getPosition() && ((_choice.opid == 0x0180)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11280 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillType(&_s)); 11281 parseFillType(in, *(FillType*)_s.anon.data()); 11282 } 11283 if (startPos == in.getPosition() && ((_choice.opid == 0x0181)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11284 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillColor(&_s)); 11285 parseFillColor(in, *(FillColor*)_s.anon.data()); 11286 } 11287 if (startPos == in.getPosition() && ((_choice.opid == 0x0182)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11288 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillOpacity(&_s)); 11289 parseFillOpacity(in, *(FillOpacity*)_s.anon.data()); 11290 } 11291 if (startPos == in.getPosition() && ((_choice.opid == 0x0183)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11292 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillBackColor(&_s)); 11293 parseFillBackColor(in, *(FillBackColor*)_s.anon.data()); 11294 } 11295 if (startPos == in.getPosition() && ((_choice.opid == 0x0184)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11296 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillBackOpacity(&_s)); 11297 parseFillBackOpacity(in, *(FillBackOpacity*)_s.anon.data()); 11298 } 11299 if (startPos == in.getPosition() && ((_choice.opid == 0x0185)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11300 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillCrMod(&_s)); 11301 parseFillCrMod(in, *(FillCrMod*)_s.anon.data()); 11302 } 11303 if (startPos == in.getPosition() && ((_choice.opid == 0x0186))) { 11304 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillBlip(&_s)); 11305 parseFillBlip(in, *(FillBlip*)_s.anon.data()); 11306 } 11307 if (startPos == in.getPosition() && ((_choice.opid == 0x0187))) { 11308 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillBlipName(&_s)); 11309 parseFillBlipName(in, *(FillBlipName*)_s.anon.data()); 11310 } 11311 if (startPos == in.getPosition() && ((_choice.opid == 0x0188)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11312 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillBlipFlags(&_s)); 11313 parseFillBlipFlags(in, *(FillBlipFlags*)_s.anon.data()); 11314 } 11315 if (startPos == in.getPosition() && ((_choice.opid == 0x0189)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11316 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillWidth(&_s)); 11317 parseFillWidth(in, *(FillWidth*)_s.anon.data()); 11318 } 11319 if (startPos == in.getPosition() && ((_choice.opid == 0x018A)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11320 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillHeight(&_s)); 11321 parseFillHeight(in, *(FillHeight*)_s.anon.data()); 11322 } 11323 if (startPos == in.getPosition() && ((_choice.opid == 0x018B)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11324 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillAngle(&_s)); 11325 parseFillAngle(in, *(FillAngle*)_s.anon.data()); 11326 } 11327 if (startPos == in.getPosition() && ((_choice.opid == 0x018C)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11328 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillFocus(&_s)); 11329 parseFillFocus(in, *(FillFocus*)_s.anon.data()); 11330 } 11331 if (startPos == in.getPosition() && ((_choice.opid == 0x018D)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11332 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillToLeft(&_s)); 11333 parseFillToLeft(in, *(FillToLeft*)_s.anon.data()); 11334 } 11335 if (startPos == in.getPosition() && ((_choice.opid == 0x018E)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11336 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillToTop(&_s)); 11337 parseFillToTop(in, *(FillToTop*)_s.anon.data()); 11338 } 11339 if (startPos == in.getPosition() && ((_choice.opid == 0x018F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11340 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillToRight(&_s)); 11341 parseFillToRight(in, *(FillToRight*)_s.anon.data()); 11342 } 11343 if (startPos == in.getPosition() && ((_choice.opid == 0x0190)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11344 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillToBottom(&_s)); 11345 parseFillToBottom(in, *(FillToBottom*)_s.anon.data()); 11346 } 11347 if (startPos == in.getPosition() && ((_choice.opid == 0x0191)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11348 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillRectLeft(&_s)); 11349 parseFillRectLeft(in, *(FillRectLeft*)_s.anon.data()); 11350 } 11351 if (startPos == in.getPosition() && ((_choice.opid == 0x0192)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11352 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillRectTop(&_s)); 11353 parseFillRectTop(in, *(FillRectTop*)_s.anon.data()); 11354 } 11355 if (startPos == in.getPosition() && ((_choice.opid == 0x0193)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11356 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillRectRight(&_s)); 11357 parseFillRectRight(in, *(FillRectRight*)_s.anon.data()); 11358 } 11359 if (startPos == in.getPosition() && ((_choice.opid == 0x0194)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11360 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillRectBottom(&_s)); 11361 parseFillRectBottom(in, *(FillRectBottom*)_s.anon.data()); 11362 } 11363 if (startPos == in.getPosition() && ((_choice.opid == 0x0195)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11364 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillDztype(&_s)); 11365 parseFillDztype(in, *(FillDztype*)_s.anon.data()); 11366 } 11367 if (startPos == in.getPosition() && ((_choice.opid == 0x0196)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11368 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillShadePreset(&_s)); 11369 parseFillShadePreset(in, *(FillShadePreset*)_s.anon.data()); 11370 } 11371 if (startPos == in.getPosition() && ((_choice.opid == 0x0197))) { 11372 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillShadeColors(&_s)); 11373 parseFillShadeColors(in, *(FillShadeColors*)_s.anon.data()); 11374 } 11375 if (startPos == in.getPosition() && ((_choice.opid == 0x0198)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11376 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillOriginX(&_s)); 11377 parseFillOriginX(in, *(FillOriginX*)_s.anon.data()); 11378 } 11379 if (startPos == in.getPosition() && ((_choice.opid == 0x0199)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11380 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillOriginY(&_s)); 11381 parseFillOriginY(in, *(FillOriginY*)_s.anon.data()); 11382 } 11383 if (startPos == in.getPosition() && ((_choice.opid == 0x019A)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11384 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillShapeOriginX(&_s)); 11385 parseFillShapeOriginX(in, *(FillShapeOriginX*)_s.anon.data()); 11386 } 11387 if (startPos == in.getPosition() && ((_choice.opid == 0x019B)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11388 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillShapeOriginY(&_s)); 11389 parseFillShapeOriginY(in, *(FillShapeOriginY*)_s.anon.data()); 11390 } 11391 if (startPos == in.getPosition() && ((_choice.opid == 0x019E)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11392 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillColorExt(&_s)); 11393 parseFillColorExt(in, *(FillColorExt*)_s.anon.data()); 11394 } 11395 if (startPos == in.getPosition() && ((_choice.opid == 0x01A2)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11396 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillBackColorExt(&_s)); 11397 parseFillBackColorExt(in, *(FillBackColorExt*)_s.anon.data()); 11398 } 11399 if (startPos == in.getPosition() && ((_choice.opid == 0x01BF)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11400 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new FillStyleBooleanProperties(&_s)); 11401 parseFillStyleBooleanProperties(in, *(FillStyleBooleanProperties*)_s.anon.data()); 11402 } 11403 if (startPos == in.getPosition() && ((_choice.opid == 0x01C0)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11404 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineColor(&_s)); 11405 parseLineColor(in, *(LineColor*)_s.anon.data()); 11406 } 11407 if (startPos == in.getPosition() && ((_choice.opid == 0x01C1)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11408 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineOpacity(&_s)); 11409 parseLineOpacity(in, *(LineOpacity*)_s.anon.data()); 11410 } 11411 if (startPos == in.getPosition() && ((_choice.opid == 0x01C2))) { 11412 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineBackColor(&_s)); 11413 parseLineBackColor(in, *(LineBackColor*)_s.anon.data()); 11414 } 11415 if (startPos == in.getPosition() && ((_choice.opid == 0x01C5))) { 11416 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineFillBlip(&_s)); 11417 parseLineFillBlip(in, *(LineFillBlip*)_s.anon.data()); 11418 } 11419 if (startPos == in.getPosition() && ((_choice.opid == 0x01CB)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11420 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineWidth(&_s)); 11421 parseLineWidth(in, *(LineWidth*)_s.anon.data()); 11422 } 11423 if (startPos == in.getPosition() && ((_choice.opid == 0x01CD)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11424 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineStyle(&_s)); 11425 parseLineStyle(in, *(LineStyle*)_s.anon.data()); 11426 } 11427 if (startPos == in.getPosition() && ((_choice.opid == 0x01CE)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11428 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineDashing(&_s)); 11429 parseLineDashing(in, *(LineDashing*)_s.anon.data()); 11430 } 11431 if (startPos == in.getPosition() && ((_choice.opid == 0x01D0)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11432 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineStartArrowhead(&_s)); 11433 parseLineStartArrowhead(in, *(LineStartArrowhead*)_s.anon.data()); 11434 } 11435 if (startPos == in.getPosition() && ((_choice.opid == 0x01D1)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11436 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineEndArrowhead(&_s)); 11437 parseLineEndArrowhead(in, *(LineEndArrowhead*)_s.anon.data()); 11438 } 11439 if (startPos == in.getPosition() && ((_choice.opid == 0x01D2)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11440 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineStartArrowWidth(&_s)); 11441 parseLineStartArrowWidth(in, *(LineStartArrowWidth*)_s.anon.data()); 11442 } 11443 if (startPos == in.getPosition() && ((_choice.opid == 0x01D3)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11444 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineStartArrowLength(&_s)); 11445 parseLineStartArrowLength(in, *(LineStartArrowLength*)_s.anon.data()); 11446 } 11447 if (startPos == in.getPosition() && ((_choice.opid == 0x01D4)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11448 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineEndArrowWidth(&_s)); 11449 parseLineEndArrowWidth(in, *(LineEndArrowWidth*)_s.anon.data()); 11450 } 11451 if (startPos == in.getPosition() && ((_choice.opid == 0x01D5)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11452 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineEndArrowLength(&_s)); 11453 parseLineEndArrowLength(in, *(LineEndArrowLength*)_s.anon.data()); 11454 } 11455 if (startPos == in.getPosition() && ((_choice.opid == 0x01D6)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11456 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineJoinStyle(&_s)); 11457 parseLineJoinStyle(in, *(LineJoinStyle*)_s.anon.data()); 11458 } 11459 if (startPos == in.getPosition() && ((_choice.opid == 0x01D7)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11460 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineEndCapStyle(&_s)); 11461 parseLineEndCapStyle(in, *(LineEndCapStyle*)_s.anon.data()); 11462 } 11463 if (startPos == in.getPosition() && ((_choice.opid == 0x01FF)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11464 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LineStyleBooleanProperties(&_s)); 11465 parseLineStyleBooleanProperties(in, *(LineStyleBooleanProperties*)_s.anon.data()); 11466 } 11467 if (startPos == in.getPosition() && ((_choice.opid == 0x0200)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11468 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShadowType(&_s)); 11469 parseShadowType(in, *(ShadowType*)_s.anon.data()); 11470 } 11471 if (startPos == in.getPosition() && ((_choice.opid == 0x0201)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11472 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShadowColor(&_s)); 11473 parseShadowColor(in, *(ShadowColor*)_s.anon.data()); 11474 } 11475 if (startPos == in.getPosition() && ((_choice.opid == 0x0204)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11476 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShadowOpacity(&_s)); 11477 parseShadowOpacity(in, *(ShadowOpacity*)_s.anon.data()); 11478 } 11479 if (startPos == in.getPosition() && ((_choice.opid == 0x0205)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11480 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShadowOffsetX(&_s)); 11481 parseShadowOffsetX(in, *(ShadowOffsetX*)_s.anon.data()); 11482 } 11483 if (startPos == in.getPosition() && ((_choice.opid == 0x0206)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11484 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShadowOffsetY(&_s)); 11485 parseShadowOffsetY(in, *(ShadowOffsetY*)_s.anon.data()); 11486 } 11487 if (startPos == in.getPosition() && ((_choice.opid == 0x023F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11488 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShadowStyleBooleanProperties(&_s)); 11489 parseShadowStyleBooleanProperties(in, *(ShadowStyleBooleanProperties*)_s.anon.data()); 11490 } 11491 if (startPos == in.getPosition() && ((_choice.opid == 0x0301)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11492 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new HspMaster(&_s)); 11493 parseHspMaster(in, *(HspMaster*)_s.anon.data()); 11494 } 11495 if (startPos == in.getPosition() && ((_choice.opid == 0x0303)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11496 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Cxstyle(&_s)); 11497 parseCxstyle(in, *(Cxstyle*)_s.anon.data()); 11498 } 11499 if (startPos == in.getPosition() && ((_choice.opid == 0x0304)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11500 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new BWMode(&_s)); 11501 parseBWMode(in, *(BWMode*)_s.anon.data()); 11502 } 11503 if (startPos == in.getPosition() && ((_choice.opid == 0x033F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11504 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new ShapeBooleanProperties(&_s)); 11505 parseShapeBooleanProperties(in, *(ShapeBooleanProperties*)_s.anon.data()); 11506 } 11507 if (startPos == in.getPosition() && ((_choice.opid == 0x0341)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11508 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxyCalloutGap(&_s)); 11509 parseDxyCalloutGap(in, *(DxyCalloutGap*)_s.anon.data()); 11510 } 11511 if (startPos == in.getPosition() && ((_choice.opid == 0x0342)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11512 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Spcoa(&_s)); 11513 parseSpcoa(in, *(Spcoa*)_s.anon.data()); 11514 } 11515 if (startPos == in.getPosition() && ((_choice.opid == 0x0343)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11516 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new Spcod(&_s)); 11517 parseSpcod(in, *(Spcod*)_s.anon.data()); 11518 } 11519 if (startPos == in.getPosition() && ((_choice.opid == 0x0344)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11520 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxyCalloutDropSpecified(&_s)); 11521 parseDxyCalloutDropSpecified(in, *(DxyCalloutDropSpecified*)_s.anon.data()); 11522 } 11523 if (startPos == in.getPosition() && ((_choice.opid == 0x0345)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11524 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxyCalloutLengthSpecified(&_s)); 11525 parseDxyCalloutLengthSpecified(in, *(DxyCalloutLengthSpecified*)_s.anon.data()); 11526 } 11527 if (startPos == in.getPosition() && ((_choice.opid == 0x037F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11528 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new CalloutBooleanProperties(&_s)); 11529 parseCalloutBooleanProperties(in, *(CalloutBooleanProperties*)_s.anon.data()); 11530 } 11531 if (startPos == in.getPosition() && ((_choice.opid == 0x0383))) { 11532 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PWrapPolygonVertices(&_s)); 11533 parsePWrapPolygonVertices(in, *(PWrapPolygonVertices*)_s.anon.data()); 11534 } 11535 if (startPos == in.getPosition() && ((_choice.opid == 0x0384)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11536 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxWrapDistLeft(&_s)); 11537 parseDxWrapDistLeft(in, *(DxWrapDistLeft*)_s.anon.data()); 11538 } 11539 if (startPos == in.getPosition() && ((_choice.opid == 0x0385)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11540 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DyWrapDistTop(&_s)); 11541 parseDyWrapDistTop(in, *(DyWrapDistTop*)_s.anon.data()); 11542 } 11543 if (startPos == in.getPosition() && ((_choice.opid == 0x0386)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11544 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxWrapDistRight(&_s)); 11545 parseDxWrapDistRight(in, *(DxWrapDistRight*)_s.anon.data()); 11546 } 11547 if (startPos == in.getPosition() && ((_choice.opid == 0x0387)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11548 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DyWrapDistBottom(&_s)); 11549 parseDyWrapDistBottom(in, *(DyWrapDistBottom*)_s.anon.data()); 11550 } 11551 if (startPos == in.getPosition() && ((_choice.opid == 0x0388)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11552 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new LidRegroup(&_s)); 11553 parseLidRegroup(in, *(LidRegroup*)_s.anon.data()); 11554 } 11555 if (startPos == in.getPosition() && ((_choice.opid == 0x038F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11556 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PosH(&_s)); 11557 parsePosH(in, *(PosH*)_s.anon.data()); 11558 } 11559 if (startPos == in.getPosition() && ((_choice.opid == 0x0390)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11560 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PosRelH(&_s)); 11561 parsePosRelH(in, *(PosRelH*)_s.anon.data()); 11562 } 11563 if (startPos == in.getPosition() && ((_choice.opid == 0x0391)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11564 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PosV(&_s)); 11565 parsePosV(in, *(PosV*)_s.anon.data()); 11566 } 11567 if (startPos == in.getPosition() && ((_choice.opid == 0x0392)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11568 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PosRelV(&_s)); 11569 parsePosRelV(in, *(PosRelV*)_s.anon.data()); 11570 } 11571 if (startPos == in.getPosition() && ((_choice.opid == 0x0393)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11572 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new PctHR(&_s)); 11573 parsePctHR(in, *(PctHR*)_s.anon.data()); 11574 } 11575 if (startPos == in.getPosition() && ((_choice.opid == 0x0394)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11576 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new AlignHR(&_s)); 11577 parseAlignHR(in, *(AlignHR*)_s.anon.data()); 11578 } 11579 if (startPos == in.getPosition() && ((_choice.opid == 0x0395)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11580 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxHeightHR(&_s)); 11581 parseDxHeightHR(in, *(DxHeightHR*)_s.anon.data()); 11582 } 11583 if (startPos == in.getPosition() && ((_choice.opid == 0x0396)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11584 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DxWidthHR(&_s)); 11585 parseDxWidthHR(in, *(DxWidthHR*)_s.anon.data()); 11586 } 11587 if (startPos == in.getPosition() && ((_choice.opid == 0x039b)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11588 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new BorderTopColor(&_s)); 11589 parseBorderTopColor(in, *(BorderTopColor*)_s.anon.data()); 11590 } 11591 if (startPos == in.getPosition() && ((_choice.opid == 0x039c)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11592 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new BorderLeftColor(&_s)); 11593 parseBorderLeftColor(in, *(BorderLeftColor*)_s.anon.data()); 11594 } 11595 if (startPos == in.getPosition() && ((_choice.opid == 0x039d)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11596 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new BorderBottomColor(&_s)); 11597 parseBorderBottomColor(in, *(BorderBottomColor*)_s.anon.data()); 11598 } 11599 if (startPos == in.getPosition() && ((_choice.opid == 0x039e)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11600 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new BorderRightColor(&_s)); 11601 parseBorderRightColor(in, *(BorderRightColor*)_s.anon.data()); 11602 } 11603 if (startPos == in.getPosition() && ((_choice.opid == 0x03bf)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11604 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new GroupShapeBooleanProperties(&_s)); 11605 parseGroupShapeBooleanProperties(in, *(GroupShapeBooleanProperties*)_s.anon.data()); 11606 } 11607 if (startPos == in.getPosition() && ((_choice.opid == 0x0403))) { 11608 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new WzFillId(&_s)); 11609 parseWzFillId(in, *(WzFillId*)_s.anon.data()); 11610 } 11611 if (startPos == in.getPosition() && ((_choice.opid == 0x053F)&&(_choice.fBid == false)&&(_choice.fComplex == false))) { 11612 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new DiagramBooleanProperties(&_s)); 11613 parseDiagramBooleanProperties(in, *(DiagramBooleanProperties*)_s.anon.data()); 11614 } 11615 if (startPos == in.getPosition()) { 11616 _s.anon = OfficeArtFOPTEChoice::choice3165202096(new OfficeArtFOPTE(&_s)); 11617 parseOfficeArtFOPTE(in, *(OfficeArtFOPTE*)_s.anon.data()); 11618 } 11619 } 11620 void MSO::parseOfficeArtClientAnchor(LEInputStream& in, OfficeArtClientAnchor& _s) { 11621 _s.streamOffset = in.getPosition(); 11622 LEInputStream::Mark _m; 11623 _m = in.setMark(); 11624 OfficeArtRecordHeader _choice(&_s); 11625 parseOfficeArtRecordHeader(in, _choice); 11626 in.rewind(_m); 11627 qint64 startPos = in.getPosition(); 11628 if (startPos == in.getPosition() && ((_choice.recLen == 0x8 || _choice.recLen == 0x10))) { 11629 _s.anon = OfficeArtClientAnchor::choice1726903461(new PptOfficeArtClientAnchor(&_s)); 11630 parsePptOfficeArtClientAnchor(in, *(PptOfficeArtClientAnchor*)_s.anon.data()); 11631 } 11632 if (startPos == in.getPosition() && ((_choice.recLen == 0x4))) { 11633 _s.anon = OfficeArtClientAnchor::choice1726903461(new DocOfficeArtClientAnchor(&_s)); 11634 parseDocOfficeArtClientAnchor(in, *(DocOfficeArtClientAnchor*)_s.anon.data()); 11635 } 11636 if (startPos == in.getPosition()) { 11637 _s.anon = OfficeArtClientAnchor::choice1726903461(new XlsOfficeArtClientAnchor(&_s)); 11638 parseXlsOfficeArtClientAnchor(in, *(XlsOfficeArtClientAnchor*)_s.anon.data()); 11639 } 11640 } 11641 void MSO::parsePptOfficeArtClientData(LEInputStream& in, PptOfficeArtClientData& _s) { 11642 _s.streamOffset = in.getPosition(); 11643 LEInputStream::Mark _m; 11644 bool _possiblyPresent; 11645 bool _atend; 11646 parseOfficeArtRecordHeader(in, _s.rh); 11647 if (!(_s.rh.recVer == 0xF)) { 11648 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 11649 } 11650 if (!(_s.rh.recInstance == 0)) { 11651 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 11652 } 11653 if (!(_s.rh.recType == 0xF011)) { 11654 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF011"); 11655 } 11656 _m = in.setMark(); 11657 try { 11658 OfficeArtRecordHeader _optionCheck(&_s); 11659 parseOfficeArtRecordHeader(in, _optionCheck); 11660 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xBDB)&&(_optionCheck.recLen == 1); 11661 } catch(EOFException _e) { 11662 _possiblyPresent = false; 11663 } 11664 in.rewind(_m); 11665 _m = in.setMark(); 11666 if (_possiblyPresent) { 11667 try { 11668 _s.shapeFlagsAtom = QSharedPointer<ShapeFlagsAtom>(new ShapeFlagsAtom(&_s)); 11669 parseShapeFlagsAtom(in, *_s.shapeFlagsAtom.data()); 11670 } catch(IncorrectValueException _e) { 11671 _s.shapeFlagsAtom.clear(); 11672 in.rewind(_m); 11673 } catch(EOFException _e) { 11674 _s.shapeFlagsAtom.clear(); 11675 in.rewind(_m); 11676 } 11677 } 11678 _m = in.setMark(); 11679 try { 11680 OfficeArtRecordHeader _optionCheck(&_s); 11681 parseOfficeArtRecordHeader(in, _optionCheck); 11682 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xBDC)&&(_optionCheck.recLen == 1); 11683 } catch(EOFException _e) { 11684 _possiblyPresent = false; 11685 } 11686 in.rewind(_m); 11687 _m = in.setMark(); 11688 if (_possiblyPresent) { 11689 try { 11690 _s.shapeFlags10Atom = QSharedPointer<ShapeFlags10Atom>(new ShapeFlags10Atom(&_s)); 11691 parseShapeFlags10Atom(in, *_s.shapeFlags10Atom.data()); 11692 } catch(IncorrectValueException _e) { 11693 _s.shapeFlags10Atom.clear(); 11694 in.rewind(_m); 11695 } catch(EOFException _e) { 11696 _s.shapeFlags10Atom.clear(); 11697 in.rewind(_m); 11698 } 11699 } 11700 _m = in.setMark(); 11701 try { 11702 OfficeArtRecordHeader _optionCheck(&_s); 11703 parseOfficeArtRecordHeader(in, _optionCheck); 11704 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xBC1)&&(_optionCheck.recLen == 4); 11705 } catch(EOFException _e) { 11706 _possiblyPresent = false; 11707 } 11708 in.rewind(_m); 11709 _m = in.setMark(); 11710 if (_possiblyPresent) { 11711 try { 11712 _s.exObjRefAtom = QSharedPointer<ExObjRefAtom>(new ExObjRefAtom(&_s)); 11713 parseExObjRefAtom(in, *_s.exObjRefAtom.data()); 11714 } catch(IncorrectValueException _e) { 11715 _s.exObjRefAtom.clear(); 11716 in.rewind(_m); 11717 } catch(EOFException _e) { 11718 _s.exObjRefAtom.clear(); 11719 in.rewind(_m); 11720 } 11721 } 11722 _m = in.setMark(); 11723 try { 11724 OfficeArtRecordHeader _optionCheck(&_s); 11725 parseOfficeArtRecordHeader(in, _optionCheck); 11726 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1014); 11727 } catch(EOFException _e) { 11728 _possiblyPresent = false; 11729 } 11730 in.rewind(_m); 11731 _m = in.setMark(); 11732 if (_possiblyPresent) { 11733 try { 11734 _s.animationInfo = QSharedPointer<AnimationInfoContainer>(new AnimationInfoContainer(&_s)); 11735 parseAnimationInfoContainer(in, *_s.animationInfo.data()); 11736 } catch(IncorrectValueException _e) { 11737 _s.animationInfo.clear(); 11738 in.rewind(_m); 11739 } catch(EOFException _e) { 11740 _s.animationInfo.clear(); 11741 in.rewind(_m); 11742 } 11743 } 11744 _m = in.setMark(); 11745 try { 11746 RecordHeader _optionCheck(&_s); 11747 parseRecordHeader(in, _optionCheck); 11748 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFF2); 11749 } catch(EOFException _e) { 11750 _possiblyPresent = false; 11751 } 11752 in.rewind(_m); 11753 _m = in.setMark(); 11754 if (_possiblyPresent) { 11755 try { 11756 _s.mouseClickInteractiveInfo = QSharedPointer<MouseClickInteractiveInfoContainer>(new MouseClickInteractiveInfoContainer(&_s)); 11757 parseMouseClickInteractiveInfoContainer(in, *_s.mouseClickInteractiveInfo.data()); 11758 } catch(IncorrectValueException _e) { 11759 _s.mouseClickInteractiveInfo.clear(); 11760 in.rewind(_m); 11761 } catch(EOFException _e) { 11762 _s.mouseClickInteractiveInfo.clear(); 11763 in.rewind(_m); 11764 } 11765 } 11766 _m = in.setMark(); 11767 try { 11768 RecordHeader _optionCheck(&_s); 11769 parseRecordHeader(in, _optionCheck); 11770 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 1)&&(_optionCheck.recType == 0xFF2); 11771 } catch(EOFException _e) { 11772 _possiblyPresent = false; 11773 } 11774 in.rewind(_m); 11775 _m = in.setMark(); 11776 if (_possiblyPresent) { 11777 try { 11778 _s.mouseOverInteractiveInfo = QSharedPointer<MouseOverInteractiveInfoContainer>(new MouseOverInteractiveInfoContainer(&_s)); 11779 parseMouseOverInteractiveInfoContainer(in, *_s.mouseOverInteractiveInfo.data()); 11780 } catch(IncorrectValueException _e) { 11781 _s.mouseOverInteractiveInfo.clear(); 11782 in.rewind(_m); 11783 } catch(EOFException _e) { 11784 _s.mouseOverInteractiveInfo.clear(); 11785 in.rewind(_m); 11786 } 11787 } 11788 _atend = false; 11789 while (!_atend) { 11790 _m = in.setMark(); 11791 try { 11792 _s.rgShapeClientRoundtripData0.append(ShapeClientRoundtripDataSubcontainerOrAtom(&_s)); 11793 parseShapeClientRoundtripDataSubcontainerOrAtom(in, _s.rgShapeClientRoundtripData0.last()); 11794 } catch(IncorrectValueException _e) { 11795 _s.rgShapeClientRoundtripData0.removeLast(); 11796 _atend = true; 11797 in.rewind(_m); 11798 } catch(EOFException _e) { 11799 _s.rgShapeClientRoundtripData0.removeLast(); 11800 _atend = true; 11801 in.rewind(_m); 11802 } 11803 } 11804 _m = in.setMark(); 11805 try { 11806 OfficeArtRecordHeader _optionCheck(&_s); 11807 parseOfficeArtRecordHeader(in, _optionCheck); 11808 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xBC3)&&(_optionCheck.recLen == 8); 11809 } catch(EOFException _e) { 11810 _possiblyPresent = false; 11811 } 11812 in.rewind(_m); 11813 _m = in.setMark(); 11814 if (_possiblyPresent) { 11815 try { 11816 _s.placeholderAtom = QSharedPointer<PlaceholderAtom>(new PlaceholderAtom(&_s)); 11817 parsePlaceholderAtom(in, *_s.placeholderAtom.data()); 11818 } catch(IncorrectValueException _e) { 11819 _s.placeholderAtom.clear(); 11820 in.rewind(_m); 11821 } catch(EOFException _e) { 11822 _s.placeholderAtom.clear(); 11823 in.rewind(_m); 11824 } 11825 } 11826 _m = in.setMark(); 11827 try { 11828 OfficeArtRecordHeader _optionCheck(&_s); 11829 parseOfficeArtRecordHeader(in, _optionCheck); 11830 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFE7); 11831 } catch(EOFException _e) { 11832 _possiblyPresent = false; 11833 } 11834 in.rewind(_m); 11835 _m = in.setMark(); 11836 if (_possiblyPresent) { 11837 try { 11838 _s.recolorInfoAtom = QSharedPointer<RecolorInfoAtom>(new RecolorInfoAtom(&_s)); 11839 parseRecolorInfoAtom(in, *_s.recolorInfoAtom.data()); 11840 } catch(IncorrectValueException _e) { 11841 _s.recolorInfoAtom.clear(); 11842 in.rewind(_m); 11843 } catch(EOFException _e) { 11844 _s.recolorInfoAtom.clear(); 11845 in.rewind(_m); 11846 } 11847 } 11848 _m = in.setMark(); 11849 try { 11850 RecordHeader _optionCheck(&_s); 11851 parseRecordHeader(in, _optionCheck); 11852 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFE8 || _optionCheck.recType == 0x1019); 11853 } catch(EOFException _e) { 11854 _possiblyPresent = false; 11855 } 11856 in.rewind(_m); 11857 _m = in.setMark(); 11858 if (_possiblyPresent) { 11859 try { 11860 _s.unknown1 = QSharedPointer<UnknownOfficeArtClientDataChild>(new UnknownOfficeArtClientDataChild(&_s)); 11861 parseUnknownOfficeArtClientDataChild(in, *_s.unknown1.data()); 11862 } catch(IncorrectValueException _e) { 11863 _s.unknown1.clear(); 11864 in.rewind(_m); 11865 } catch(EOFException _e) { 11866 _s.unknown1.clear(); 11867 in.rewind(_m); 11868 } 11869 } 11870 _atend = false; 11871 while (!_atend) { 11872 _m = in.setMark(); 11873 try { 11874 _s.rgShapeClientRoundtripData.append(ShapeClientRoundtripDataSubcontainerOrAtom(&_s)); 11875 parseShapeClientRoundtripDataSubcontainerOrAtom(in, _s.rgShapeClientRoundtripData.last()); 11876 } catch(IncorrectValueException _e) { 11877 _s.rgShapeClientRoundtripData.removeLast(); 11878 _atend = true; 11879 in.rewind(_m); 11880 } catch(EOFException _e) { 11881 _s.rgShapeClientRoundtripData.removeLast(); 11882 _atend = true; 11883 in.rewind(_m); 11884 } 11885 } 11886 _m = in.setMark(); 11887 try { 11888 RecordHeader _optionCheck(&_s); 11889 parseRecordHeader(in, _optionCheck); 11890 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFE8 || _optionCheck.recType == 0x1019); 11891 } catch(EOFException _e) { 11892 _possiblyPresent = false; 11893 } 11894 in.rewind(_m); 11895 _m = in.setMark(); 11896 if (_possiblyPresent) { 11897 try { 11898 _s.unknown2 = QSharedPointer<UnknownOfficeArtClientDataChild>(new UnknownOfficeArtClientDataChild(&_s)); 11899 parseUnknownOfficeArtClientDataChild(in, *_s.unknown2.data()); 11900 } catch(IncorrectValueException _e) { 11901 _s.unknown2.clear(); 11902 in.rewind(_m); 11903 } catch(EOFException _e) { 11904 _s.unknown2.clear(); 11905 in.rewind(_m); 11906 } 11907 } 11908 } 11909 void MSO::parseShapeProgBinaryTagContainer(LEInputStream& in, ShapeProgBinaryTagContainer& _s) { 11910 _s.streamOffset = in.getPosition(); 11911 parseOfficeArtRecordHeader(in, _s.rh); 11912 if (!(_s.rh.recVer == 0xF)) { 11913 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 11914 } 11915 if (!(_s.rh.recInstance == 0)) { 11916 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 11917 } 11918 if (!(_s.rh.recType == 0x138A)) { 11919 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x138A"); 11920 } 11921 parseShapeProgBinaryTagSubContainerOrAtom(in, _s.rec); 11922 } 11923 void MSO::parseWordDocument(LEInputStream& in, WordDocument& _s) { 11924 _s.streamOffset = in.getPosition(); 11925 parseFib(in, _s.fib); 11926 } 11927 void MSO::parseTable(LEInputStream& in, Table& _s) { 11928 _s.streamOffset = in.getPosition(); 11929 int _c; 11930 LEInputStream::Mark _m; 11931 parseSTSH(in, _s.stsh); 11932 parsePlcfSed(in, _s.plcfSed); 11933 parsePlcfhdd(in, _s.plcfHdd); 11934 parsePlcBteChpx(in, _s.plcfBteChpx); 11935 parsePlcfBtePapx(in, _s.plcfBtePapx); 11936 parseTcg(in, _s.cmds); 11937 parseClx(in, _s.clx); 11938 parseSttbfFfn(in, _s.sttbfFfn); 11939 _c = 600; 11940 _s.dop.resize(_c); 11941 in.readBytes(_s.dop); 11942 } 11943 void MSO::parsePcd(LEInputStream& in, Pcd& _s) { 11944 _s.streamOffset = in.getPosition(); 11945 _s.fNoParaLast = in.readbit(); 11946 _s.fR1 = in.readbit(); 11947 _s.fDirtly = in.readbit(); 11948 if (!(((bool)_s.fDirtly) == false)) { 11949 throw IncorrectValueException(in.getPosition(), "((bool)_s.fDirtly) == false"); 11950 } 11951 _s.fR2 = in.readbit(); 11952 _s.fR3 = in.readuint12(); 11953 parseFCompressed(in, _s.fc); 11954 parsePrm(in, _s.prm); 11955 } 11956 void MSO::parseOfficeArtFBSE(LEInputStream& in, OfficeArtFBSE& _s) { 11957 _s.streamOffset = in.getPosition(); 11958 int _c; 11959 LEInputStream::Mark _m; 11960 parseOfficeArtRecordHeader(in, _s.rh); 11961 if (!(_s.rh.recVer == 0x2)) { 11962 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x2"); 11963 } 11964 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 0x11 || _s.rh.recInstance == 0x12)) { 11965 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 0x11 || _s.rh.recInstance == 0x12"); 11966 } 11967 if (!(_s.rh.recType == 0xF007)) { 11968 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF007"); 11969 } 11970 _s.btWin32 = in.readuint8(); 11971 _s.btMacOS = in.readuint8(); 11972 _c = 16; 11973 _s.rgbUid.resize(_c); 11974 in.readBytes(_s.rgbUid); 11975 _s.tag = in.readuint16(); 11976 _s.size = in.readuint32(); 11977 _s.cRef = in.readuint32(); 11978 _s.foDelay = in.readuint32(); 11979 _s.unused1 = in.readuint8(); 11980 _s.cbName = in.readuint8(); 11981 _s.unused2 = in.readuint8(); 11982 _s.unused3 = in.readuint8(); 11983 _s._has_nameData = _s.cbName>0; 11984 if (_s._has_nameData) { 11985 _c = _s.cbName; 11986 _s.nameData.resize(_c); 11987 in.readBytes(_s.nameData); 11988 } 11989 if (_s.rh.recLen > 36 + _s.cbName) { 11990 _s.embeddedBlip = QSharedPointer<OfficeArtBlip>(new OfficeArtBlip(&_s)); 11991 parseOfficeArtBlip(in, *_s.embeddedBlip.data()); 11992 } 11993 } 11994 void MSO::parseOfficeArtBStoreContainerFileBlock(LEInputStream& in, OfficeArtBStoreContainerFileBlock& _s) { 11995 _s.streamOffset = in.getPosition(); 11996 LEInputStream::Mark _m; 11997 _m = in.setMark(); 11998 OfficeArtRecordHeader _choice(&_s); 11999 parseOfficeArtRecordHeader(in, _choice); 12000 in.rewind(_m); 12001 qint64 startPos = in.getPosition(); 12002 if (startPos == in.getPosition() && ((_choice.recVer == 0x2)&&(_choice.recInstance == 0 || _choice.recInstance == 1 || _choice.recInstance == 2 || _choice.recInstance == 3 || _choice.recInstance == 4 || _choice.recInstance == 5 || _choice.recInstance == 6 || _choice.recInstance == 7 || _choice.recInstance == 0x11 || _choice.recInstance == 0x12)&&(_choice.recType == 0xF007))) { 12003 _s.anon = OfficeArtBStoreContainerFileBlock::choice2043165903(new OfficeArtFBSE(&_s)); 12004 parseOfficeArtFBSE(in, *(OfficeArtFBSE*)_s.anon.data()); 12005 } 12006 if (startPos == in.getPosition()) { 12007 _s.anon = OfficeArtBStoreContainerFileBlock::choice2043165903(new OfficeArtBlip(&_s)); 12008 parseOfficeArtBlip(in, *(OfficeArtBlip*)_s.anon.data()); 12009 } 12010 } 12011 void MSO::parseSlideViewInfoInstance(LEInputStream& in, SlideViewInfoInstance& _s) { 12012 _s.streamOffset = in.getPosition(); 12013 LEInputStream::Mark _m; 12014 bool _possiblyPresent; 12015 bool _atend; 12016 parseRecordHeader(in, _s.rh); 12017 if (!(_s.rh.recVer == 0xF)) { 12018 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12019 } 12020 if (!(_s.rh.recInstance == 0 || _s.rh.recInstance == 1)) { 12021 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0 || _s.rh.recInstance == 1"); 12022 } 12023 if (!(_s.rh.recType == 0x3FA)) { 12024 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x3FA"); 12025 } 12026 parseSlideViewInfoAtom(in, _s.slideViewInfoAtom); 12027 _m = in.setMark(); 12028 try { 12029 RecordHeader _optionCheck(&_s); 12030 parseRecordHeader(in, _optionCheck); 12031 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x3FD)&&(_optionCheck.recLen == 0x34); 12032 } catch(EOFException _e) { 12033 _possiblyPresent = false; 12034 } 12035 in.rewind(_m); 12036 _m = in.setMark(); 12037 if (_possiblyPresent) { 12038 try { 12039 _s.zoomViewInfoAtom = QSharedPointer<ZoomViewInfoAtom>(new ZoomViewInfoAtom(&_s)); 12040 parseZoomViewInfoAtom(in, *_s.zoomViewInfoAtom.data()); 12041 } catch(IncorrectValueException _e) { 12042 _s.zoomViewInfoAtom.clear(); 12043 in.rewind(_m); 12044 } catch(EOFException _e) { 12045 _s.zoomViewInfoAtom.clear(); 12046 in.rewind(_m); 12047 } 12048 } 12049 _atend = false; 12050 while (!_atend) { 12051 _m = in.setMark(); 12052 try { 12053 _s.rgGuideAtom.append(GuideAtom(&_s)); 12054 parseGuideAtom(in, _s.rgGuideAtom.last()); 12055 } catch(IncorrectValueException _e) { 12056 _s.rgGuideAtom.removeLast(); 12057 _atend = true; 12058 in.rewind(_m); 12059 } catch(EOFException _e) { 12060 _s.rgGuideAtom.removeLast(); 12061 _atend = true; 12062 in.rewind(_m); 12063 } 12064 } 12065 } 12066 void MSO::parseDocProgBinaryTagSubContainerOrAtom(LEInputStream& in, DocProgBinaryTagSubContainerOrAtom& _s) { 12067 _s.streamOffset = in.getPosition(); 12068 LEInputStream::Mark _m; 12069 _m = in.setMark(); 12070 try { 12071 _s.anon = DocProgBinaryTagSubContainerOrAtom::choice214961565(new PP9DocBinaryTagExtension(&_s)); 12072 parsePP9DocBinaryTagExtension(in, *(PP9DocBinaryTagExtension*)_s.anon.data()); 12073 } catch (IncorrectValueException _x) { 12074 _s.anon.clear(); 12075 in.rewind(_m); 12076 try { 12077 _s.anon = DocProgBinaryTagSubContainerOrAtom::choice214961565(new PP10DocBinaryTagExtension(&_s)); 12078 parsePP10DocBinaryTagExtension(in, *(PP10DocBinaryTagExtension*)_s.anon.data()); 12079 } catch (IncorrectValueException _xx) { 12080 _s.anon.clear(); 12081 in.rewind(_m); 12082 try { 12083 _s.anon = DocProgBinaryTagSubContainerOrAtom::choice214961565(new PP11DocBinaryTagExtension(&_s)); 12084 parsePP11DocBinaryTagExtension(in, *(PP11DocBinaryTagExtension*)_s.anon.data()); 12085 } catch (IncorrectValueException _xxx) { 12086 _s.anon.clear(); 12087 in.rewind(_m); 12088 try { 12089 _s.anon = DocProgBinaryTagSubContainerOrAtom::choice214961565(new PP12DocBinaryTagExtension(&_s)); 12090 parsePP12DocBinaryTagExtension(in, *(PP12DocBinaryTagExtension*)_s.anon.data()); 12091 } catch (IncorrectValueException _xxxx) { 12092 _s.anon.clear(); 12093 in.rewind(_m); 12094 _s.anon = DocProgBinaryTagSubContainerOrAtom::choice214961565(new UnknownBinaryTag(&_s)); 12095 parseUnknownBinaryTag(in, *(UnknownBinaryTag*)_s.anon.data()); 12096 }}}} 12097 } 12098 void MSO::parseTextMasterStyle9Atom(LEInputStream& in, TextMasterStyle9Atom& _s) { 12099 _s.streamOffset = in.getPosition(); 12100 parseRecordHeader(in, _s.rh); 12101 if (!(_s.rh.recVer == 0x0)) { 12102 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 12103 } 12104 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 8)) { 12105 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 8"); 12106 } 12107 if (!(_s.rh.recType == 0x0FAD)) { 12108 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FAD"); 12109 } 12110 _s.cLevels = in.readuint16(); 12111 if (!(((quint16)_s.cLevels)<=5)) { 12112 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cLevels)<=5"); 12113 } 12114 if (_s.cLevels>0) { 12115 _s.lstLvl1 = QSharedPointer<TextMasterStyle9Level>(new TextMasterStyle9Level(&_s)); 12116 parseTextMasterStyle9Level(in, *_s.lstLvl1.data()); 12117 } 12118 if (_s.cLevels>1) { 12119 _s.lstLvl2 = QSharedPointer<TextMasterStyle9Level>(new TextMasterStyle9Level(&_s)); 12120 parseTextMasterStyle9Level(in, *_s.lstLvl2.data()); 12121 } 12122 if (_s.cLevels>2) { 12123 _s.lstLvl3 = QSharedPointer<TextMasterStyle9Level>(new TextMasterStyle9Level(&_s)); 12124 parseTextMasterStyle9Level(in, *_s.lstLvl3.data()); 12125 } 12126 if (_s.cLevels>3) { 12127 _s.lstLvl4 = QSharedPointer<TextMasterStyle9Level>(new TextMasterStyle9Level(&_s)); 12128 parseTextMasterStyle9Level(in, *_s.lstLvl4.data()); 12129 } 12130 if (_s.cLevels>4) { 12131 _s.lstLvl5 = QSharedPointer<TextMasterStyle9Level>(new TextMasterStyle9Level(&_s)); 12132 parseTextMasterStyle9Level(in, *_s.lstLvl5.data()); 12133 } 12134 } 12135 void MSO::parseBlipEntityAtom(LEInputStream& in, BlipEntityAtom& _s) { 12136 _s.streamOffset = in.getPosition(); 12137 parseRecordHeader(in, _s.rh); 12138 if (!(_s.rh.recVer == 0)) { 12139 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0"); 12140 } 12141 if (!(_s.rh.recInstance<=128)) { 12142 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance<=128"); 12143 } 12144 if (!(_s.rh.recType == 0x07F9)) { 12145 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x07F9"); 12146 } 12147 _s.winBlipType = in.readuint8(); 12148 if (!(((quint8)_s.winBlipType) == 0x02 || ((quint8)_s.winBlipType) == 0x03 || ((quint8)_s.winBlipType) == 0x05 || ((quint8)_s.winBlipType) == 0x06)) { 12149 throw IncorrectValueException(in.getPosition(), "((quint8)_s.winBlipType) == 0x02 || ((quint8)_s.winBlipType) == 0x03 || ((quint8)_s.winBlipType) == 0x05 || ((quint8)_s.winBlipType) == 0x06"); 12150 } 12151 _s.unused = in.readuint8(); 12152 parseOfficeArtBStoreContainerFileBlock(in, _s.blip); 12153 } 12154 void MSO::parseTextMasterStyle10Atom(LEInputStream& in, TextMasterStyle10Atom& _s) { 12155 _s.streamOffset = in.getPosition(); 12156 parseRecordHeader(in, _s.rh); 12157 if (!(_s.rh.recVer == 0x0)) { 12158 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0x0"); 12159 } 12160 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 8)) { 12161 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 || _s.rh.recInstance == 6 || _s.rh.recInstance == 7 || _s.rh.recInstance == 8"); 12162 } 12163 if (!(_s.rh.recType == 0x0FB2)) { 12164 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0FB2"); 12165 } 12166 _s.cLevels = in.readuint16(); 12167 if (!(((quint16)_s.cLevels)<=5)) { 12168 throw IncorrectValueException(in.getPosition(), "((quint16)_s.cLevels)<=5"); 12169 } 12170 _s._has_lstLvl1level = _s.cLevels>0 && _s.rh.recInstance>=5; 12171 if (_s._has_lstLvl1level) { 12172 _s.lstLvl1level = in.readuint16(); 12173 } 12174 if (_s.cLevels>0) { 12175 _s.lstLvl1 = QSharedPointer<TextMasterStyle10Level>(new TextMasterStyle10Level(&_s)); 12176 parseTextMasterStyle10Level(in, *_s.lstLvl1.data()); 12177 } 12178 _s._has_lstLvl2level = _s.cLevels>1 && _s.rh.recInstance>=5; 12179 if (_s._has_lstLvl2level) { 12180 _s.lstLvl2level = in.readuint16(); 12181 } 12182 if (_s.cLevels>1) { 12183 _s.lstLvl2 = QSharedPointer<TextMasterStyle10Level>(new TextMasterStyle10Level(&_s)); 12184 parseTextMasterStyle10Level(in, *_s.lstLvl2.data()); 12185 } 12186 _s._has_lstLvl3level = _s.cLevels>2 && _s.rh.recInstance>=5; 12187 if (_s._has_lstLvl3level) { 12188 _s.lstLvl3level = in.readuint16(); 12189 } 12190 if (_s.cLevels>2) { 12191 _s.lstLvl3 = QSharedPointer<TextMasterStyle10Level>(new TextMasterStyle10Level(&_s)); 12192 parseTextMasterStyle10Level(in, *_s.lstLvl3.data()); 12193 } 12194 _s._has_lstLvl4level = _s.cLevels>3 && _s.rh.recInstance>=5; 12195 if (_s._has_lstLvl4level) { 12196 _s.lstLvl4level = in.readuint16(); 12197 } 12198 if (_s.cLevels>3) { 12199 _s.lstLvl4 = QSharedPointer<TextMasterStyle10Level>(new TextMasterStyle10Level(&_s)); 12200 parseTextMasterStyle10Level(in, *_s.lstLvl4.data()); 12201 } 12202 _s._has_lstLvl5level = _s.cLevels>4 && _s.rh.recInstance>=5; 12203 if (_s._has_lstLvl5level) { 12204 _s.lstLvl5level = in.readuint16(); 12205 } 12206 if (_s.cLevels>4) { 12207 _s.lstLvl5 = QSharedPointer<TextMasterStyle10Level>(new TextMasterStyle10Level(&_s)); 12208 parseTextMasterStyle10Level(in, *_s.lstLvl5.data()); 12209 } 12210 } 12211 void MSO::parseTextClientDataSubContainerOrAtom(LEInputStream& in, TextClientDataSubContainerOrAtom& _s) { 12212 _s.streamOffset = in.getPosition(); 12213 LEInputStream::Mark _m; 12214 _m = in.setMark(); 12215 RecordHeader _choice(&_s); 12216 parseRecordHeader(in, _choice); 12217 in.rewind(_m); 12218 qint64 startPos = in.getPosition(); 12219 if (startPos == in.getPosition() && ((_choice.recInstance == 0)&&(_choice.recType == 0xF9E))) { 12220 _s.anon = TextClientDataSubContainerOrAtom::choice2925155378(new OutlineAtom(&_s)); 12221 parseOutlineAtom(in, *(OutlineAtom*)_s.anon.data()); 12222 } 12223 if (startPos == in.getPosition()) { 12224 _s.anon = TextClientDataSubContainerOrAtom::choice2925155378(new TextContainer(&_s)); 12225 parseTextContainer(in, *(TextContainer*)_s.anon.data()); 12226 } 12227 } 12228 void MSO::parseTextContainerInteractiveInfo(LEInputStream& in, TextContainerInteractiveInfo& _s) { 12229 _s.streamOffset = in.getPosition(); 12230 LEInputStream::Mark _m; 12231 _m = in.setMark(); 12232 RecordHeader _choice(&_s); 12233 parseRecordHeader(in, _choice); 12234 in.rewind(_m); 12235 qint64 startPos = in.getPosition(); 12236 if (startPos == in.getPosition() && ((_choice.recInstance == 0))) { 12237 _s.interactive = TextContainerInteractiveInfo::choice3752530176(new MouseClickTextInfo(&_s)); 12238 parseMouseClickTextInfo(in, *(MouseClickTextInfo*)_s.interactive.data()); 12239 } 12240 if (startPos == in.getPosition()) { 12241 _s.interactive = TextContainerInteractiveInfo::choice3752530176(new MouseOverTextInfo(&_s)); 12242 parseMouseOverTextInfo(in, *(MouseOverTextInfo*)_s.interactive.data()); 12243 } 12244 } 12245 void MSO::parseDocumentTextInfoContainer(LEInputStream& in, DocumentTextInfoContainer& _s) { 12246 _s.streamOffset = in.getPosition(); 12247 LEInputStream::Mark _m; 12248 bool _possiblyPresent; 12249 parseRecordHeader(in, _s.rh); 12250 if (!(_s.rh.recVer == 0xF)) { 12251 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12252 } 12253 if (!(_s.rh.recInstance == 0x0)) { 12254 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 12255 } 12256 if (!(_s.rh.recType == 0x03F2)) { 12257 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03F2"); 12258 } 12259 _m = in.setMark(); 12260 try { 12261 RecordHeader _optionCheck(&_s); 12262 parseRecordHeader(in, _optionCheck); 12263 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x2)&&(_optionCheck.recType == 0x0FC8); 12264 } catch(EOFException _e) { 12265 _possiblyPresent = false; 12266 } 12267 in.rewind(_m); 12268 _m = in.setMark(); 12269 if (_possiblyPresent) { 12270 try { 12271 _s.kinsoku = QSharedPointer<KinsokuContainer>(new KinsokuContainer(&_s)); 12272 parseKinsokuContainer(in, *_s.kinsoku.data()); 12273 } catch(IncorrectValueException _e) { 12274 _s.kinsoku.clear(); 12275 in.rewind(_m); 12276 } catch(EOFException _e) { 12277 _s.kinsoku.clear(); 12278 in.rewind(_m); 12279 } 12280 } 12281 _m = in.setMark(); 12282 try { 12283 RecordHeader _optionCheck(&_s); 12284 parseRecordHeader(in, _optionCheck); 12285 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x07D5); 12286 } catch(EOFException _e) { 12287 _possiblyPresent = false; 12288 } 12289 in.rewind(_m); 12290 _m = in.setMark(); 12291 if (_possiblyPresent) { 12292 try { 12293 _s.fontCollection = QSharedPointer<FontCollectionContainer>(new FontCollectionContainer(&_s)); 12294 parseFontCollectionContainer(in, *_s.fontCollection.data()); 12295 } catch(IncorrectValueException _e) { 12296 _s.fontCollection.clear(); 12297 in.rewind(_m); 12298 } catch(EOFException _e) { 12299 _s.fontCollection.clear(); 12300 in.rewind(_m); 12301 } 12302 } 12303 _m = in.setMark(); 12304 try { 12305 RecordHeader _optionCheck(&_s); 12306 parseRecordHeader(in, _optionCheck); 12307 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FA4); 12308 } catch(EOFException _e) { 12309 _possiblyPresent = false; 12310 } 12311 in.rewind(_m); 12312 _m = in.setMark(); 12313 if (_possiblyPresent) { 12314 try { 12315 _s.textCFDefaultsAtom = QSharedPointer<TextCFExceptionAtom>(new TextCFExceptionAtom(&_s)); 12316 parseTextCFExceptionAtom(in, *_s.textCFDefaultsAtom.data()); 12317 } catch(IncorrectValueException _e) { 12318 _s.textCFDefaultsAtom.clear(); 12319 in.rewind(_m); 12320 } catch(EOFException _e) { 12321 _s.textCFDefaultsAtom.clear(); 12322 in.rewind(_m); 12323 } 12324 } 12325 _m = in.setMark(); 12326 try { 12327 RecordHeader _optionCheck(&_s); 12328 parseRecordHeader(in, _optionCheck); 12329 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FA5); 12330 } catch(EOFException _e) { 12331 _possiblyPresent = false; 12332 } 12333 in.rewind(_m); 12334 _m = in.setMark(); 12335 if (_possiblyPresent) { 12336 try { 12337 _s.textPFDefaultsAtom = QSharedPointer<TextPFExceptionAtom>(new TextPFExceptionAtom(&_s)); 12338 parseTextPFExceptionAtom(in, *_s.textPFDefaultsAtom.data()); 12339 } catch(IncorrectValueException _e) { 12340 _s.textPFDefaultsAtom.clear(); 12341 in.rewind(_m); 12342 } catch(EOFException _e) { 12343 _s.textPFDefaultsAtom.clear(); 12344 in.rewind(_m); 12345 } 12346 } 12347 _m = in.setMark(); 12348 try { 12349 RecordHeader _optionCheck(&_s); 12350 parseRecordHeader(in, _optionCheck); 12351 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FAB); 12352 } catch(EOFException _e) { 12353 _possiblyPresent = false; 12354 } 12355 in.rewind(_m); 12356 _m = in.setMark(); 12357 if (_possiblyPresent) { 12358 try { 12359 _s.defaultRulerAtom = QSharedPointer<DefaultRulerAtom>(new DefaultRulerAtom(&_s)); 12360 parseDefaultRulerAtom(in, *_s.defaultRulerAtom.data()); 12361 } catch(IncorrectValueException _e) { 12362 _s.defaultRulerAtom.clear(); 12363 in.rewind(_m); 12364 } catch(EOFException _e) { 12365 _s.defaultRulerAtom.clear(); 12366 in.rewind(_m); 12367 } 12368 } 12369 parseTextSIExceptionAtom(in, _s.textSIDefaultsAtom); 12370 parseTextMasterStyleAtom(in, _s.textMasterStyleAtom); 12371 _m = in.setMark(); 12372 try { 12373 RecordHeader _optionCheck(&_s); 12374 parseRecordHeader(in, _optionCheck); 12375 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0 || _optionCheck.recInstance == 1 || _optionCheck.recInstance == 2 || _optionCheck.recInstance == 3 || _optionCheck.recInstance == 4 || _optionCheck.recInstance == 5 || _optionCheck.recInstance == 6 || _optionCheck.recInstance == 7 || _optionCheck.recInstance == 8)&&(_optionCheck.recType == 0x0FA3); 12376 } catch(EOFException _e) { 12377 _possiblyPresent = false; 12378 } 12379 in.rewind(_m); 12380 _m = in.setMark(); 12381 if (_possiblyPresent) { 12382 try { 12383 _s.textMasterStyleAtom2 = QSharedPointer<TextMasterStyleAtom>(new TextMasterStyleAtom(&_s)); 12384 parseTextMasterStyleAtom(in, *_s.textMasterStyleAtom2.data()); 12385 } catch(IncorrectValueException _e) { 12386 _s.textMasterStyleAtom2.clear(); 12387 in.rewind(_m); 12388 } catch(EOFException _e) { 12389 _s.textMasterStyleAtom2.clear(); 12390 in.rewind(_m); 12391 } 12392 } 12393 } 12394 void MSO::parseSlideProgBinaryTagSubContainerOrAtom(LEInputStream& in, SlideProgBinaryTagSubContainerOrAtom& _s) { 12395 _s.streamOffset = in.getPosition(); 12396 LEInputStream::Mark _m; 12397 _m = in.setMark(); 12398 try { 12399 _s.anon = SlideProgBinaryTagSubContainerOrAtom::choice4024872665(new PP9SlideBinaryTagExtension(&_s)); 12400 parsePP9SlideBinaryTagExtension(in, *(PP9SlideBinaryTagExtension*)_s.anon.data()); 12401 } catch (IncorrectValueException _x) { 12402 _s.anon.clear(); 12403 in.rewind(_m); 12404 try { 12405 _s.anon = SlideProgBinaryTagSubContainerOrAtom::choice4024872665(new PP12SlideBinaryTagExtension(&_s)); 12406 parsePP12SlideBinaryTagExtension(in, *(PP12SlideBinaryTagExtension*)_s.anon.data()); 12407 } catch (IncorrectValueException _xx) { 12408 _s.anon.clear(); 12409 in.rewind(_m); 12410 try { 12411 _s.anon = SlideProgBinaryTagSubContainerOrAtom::choice4024872665(new PP10SlideBinaryTagExtension(&_s)); 12412 parsePP10SlideBinaryTagExtension(in, *(PP10SlideBinaryTagExtension*)_s.anon.data()); 12413 } catch (IncorrectValueException _xxx) { 12414 _s.anon.clear(); 12415 in.rewind(_m); 12416 _s.anon = SlideProgBinaryTagSubContainerOrAtom::choice4024872665(new UnknownBinaryTag(&_s)); 12417 parseUnknownBinaryTag(in, *(UnknownBinaryTag*)_s.anon.data()); 12418 }}} 12419 } 12420 void MSO::parseDrawingGroupContainer(LEInputStream& in, DrawingGroupContainer& _s) { 12421 _s.streamOffset = in.getPosition(); 12422 parseRecordHeader(in, _s.rh); 12423 if (!(_s.rh.recVer == 0xF)) { 12424 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12425 } 12426 if (!(_s.rh.recInstance == 0)) { 12427 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 12428 } 12429 if (!(_s.rh.recType == 0x040B)) { 12430 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x040B"); 12431 } 12432 parseOfficeArtDggContainer(in, _s.OfficeArtDgg); 12433 } 12434 void MSO::parseOfficeArtClientData(LEInputStream& in, OfficeArtClientData& _s) { 12435 _s.streamOffset = in.getPosition(); 12436 LEInputStream::Mark _m; 12437 _m = in.setMark(); 12438 OfficeArtRecordHeader _choice(&_s); 12439 parseOfficeArtRecordHeader(in, _choice); 12440 in.rewind(_m); 12441 qint64 startPos = in.getPosition(); 12442 if (startPos == in.getPosition() && ((_choice.recVer == 0)&&(_choice.recLen == 4))) { 12443 _s.anon = OfficeArtClientData::choice2520977885(new DocOfficeArtClientData(&_s)); 12444 parseDocOfficeArtClientData(in, *(DocOfficeArtClientData*)_s.anon.data()); 12445 } 12446 if (startPos == in.getPosition() && ((_choice.recVer == 0xF))) { 12447 _s.anon = OfficeArtClientData::choice2520977885(new PptOfficeArtClientData(&_s)); 12448 parsePptOfficeArtClientData(in, *(PptOfficeArtClientData*)_s.anon.data()); 12449 } 12450 if (startPos == in.getPosition()) { 12451 _s.anon = OfficeArtClientData::choice2520977885(new XlsOfficeArtClientData(&_s)); 12452 parseXlsOfficeArtClientData(in, *(XlsOfficeArtClientData*)_s.anon.data()); 12453 } 12454 } 12455 void MSO::parseShapeProgTagsSubContainerOrAtom(LEInputStream& in, ShapeProgTagsSubContainerOrAtom& _s) { 12456 _s.streamOffset = in.getPosition(); 12457 LEInputStream::Mark _m; 12458 _m = in.setMark(); 12459 OfficeArtRecordHeader _choice(&_s); 12460 parseOfficeArtRecordHeader(in, _choice); 12461 in.rewind(_m); 12462 qint64 startPos = in.getPosition(); 12463 if (startPos == in.getPosition() && ((_choice.recType == 0x1389))) { 12464 _s.anon = ShapeProgTagsSubContainerOrAtom::choice42781012(new ProgStringTagContainer(&_s)); 12465 parseProgStringTagContainer(in, *(ProgStringTagContainer*)_s.anon.data()); 12466 } 12467 if (startPos == in.getPosition()) { 12468 _s.anon = ShapeProgTagsSubContainerOrAtom::choice42781012(new ShapeProgBinaryTagContainer(&_s)); 12469 parseShapeProgBinaryTagContainer(in, *(ShapeProgBinaryTagContainer*)_s.anon.data()); 12470 } 12471 } 12472 void MSO::parseDocumentContainer(LEInputStream& in, DocumentContainer& _s) { 12473 _s.streamOffset = in.getPosition(); 12474 LEInputStream::Mark _m; 12475 bool _possiblyPresent; 12476 bool _atend; 12477 parseRecordHeader(in, _s.rh); 12478 if (!(_s.rh.recVer == 0xF)) { 12479 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12480 } 12481 if (!(_s.rh.recInstance == 0x0)) { 12482 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 12483 } 12484 if (!(_s.rh.recType == 0x03E8)) { 12485 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03E8"); 12486 } 12487 parseDocumentAtom(in, _s.documentAtom); 12488 _m = in.setMark(); 12489 try { 12490 RecordHeader _optionCheck(&_s); 12491 parseRecordHeader(in, _optionCheck); 12492 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0409)&&(_optionCheck.recLen>=12); 12493 } catch(EOFException _e) { 12494 _possiblyPresent = false; 12495 } 12496 in.rewind(_m); 12497 _m = in.setMark(); 12498 if (_possiblyPresent) { 12499 try { 12500 _s.exObjList = QSharedPointer<ExObjListContainer>(new ExObjListContainer(&_s)); 12501 parseExObjListContainer(in, *_s.exObjList.data()); 12502 } catch(IncorrectValueException _e) { 12503 _s.exObjList.clear(); 12504 in.rewind(_m); 12505 } catch(EOFException _e) { 12506 _s.exObjList.clear(); 12507 in.rewind(_m); 12508 } 12509 } 12510 parseDocumentTextInfoContainer(in, _s.documentTextInfo); 12511 _m = in.setMark(); 12512 try { 12513 RecordHeader _optionCheck(&_s); 12514 parseRecordHeader(in, _optionCheck); 12515 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0 || _optionCheck.recInstance == 5)&&(_optionCheck.recType == 0x7E4); 12516 } catch(EOFException _e) { 12517 _possiblyPresent = false; 12518 } 12519 in.rewind(_m); 12520 _m = in.setMark(); 12521 if (_possiblyPresent) { 12522 try { 12523 _s.soundCollection = QSharedPointer<SoundCollectionContainer>(new SoundCollectionContainer(&_s)); 12524 parseSoundCollectionContainer(in, *_s.soundCollection.data()); 12525 } catch(IncorrectValueException _e) { 12526 _s.soundCollection.clear(); 12527 in.rewind(_m); 12528 } catch(EOFException _e) { 12529 _s.soundCollection.clear(); 12530 in.rewind(_m); 12531 } 12532 } 12533 parseDrawingGroupContainer(in, _s.drawingGroup); 12534 parseMasterListWithTextContainer(in, _s.masterList); 12535 _m = in.setMark(); 12536 try { 12537 RecordHeader _optionCheck(&_s); 12538 parseRecordHeader(in, _optionCheck); 12539 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x7D0); 12540 } catch(EOFException _e) { 12541 _possiblyPresent = false; 12542 } 12543 in.rewind(_m); 12544 _m = in.setMark(); 12545 if (_possiblyPresent) { 12546 try { 12547 _s.docInfoList = QSharedPointer<DocInfoListContainer>(new DocInfoListContainer(&_s)); 12548 parseDocInfoListContainer(in, *_s.docInfoList.data()); 12549 } catch(IncorrectValueException _e) { 12550 _s.docInfoList.clear(); 12551 in.rewind(_m); 12552 } catch(EOFException _e) { 12553 _s.docInfoList.clear(); 12554 in.rewind(_m); 12555 } 12556 } 12557 _m = in.setMark(); 12558 try { 12559 RecordHeader _optionCheck(&_s); 12560 parseRecordHeader(in, _optionCheck); 12561 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 3)&&(_optionCheck.recType == 0xFD9); 12562 } catch(EOFException _e) { 12563 _possiblyPresent = false; 12564 } 12565 in.rewind(_m); 12566 _m = in.setMark(); 12567 if (_possiblyPresent) { 12568 try { 12569 _s.slideHF = QSharedPointer<SlideHeadersFootersContainer>(new SlideHeadersFootersContainer(&_s)); 12570 parseSlideHeadersFootersContainer(in, *_s.slideHF.data()); 12571 } catch(IncorrectValueException _e) { 12572 _s.slideHF.clear(); 12573 in.rewind(_m); 12574 } catch(EOFException _e) { 12575 _s.slideHF.clear(); 12576 in.rewind(_m); 12577 } 12578 } 12579 _m = in.setMark(); 12580 try { 12581 RecordHeader _optionCheck(&_s); 12582 parseRecordHeader(in, _optionCheck); 12583 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 4)&&(_optionCheck.recType == 0xFD9); 12584 } catch(EOFException _e) { 12585 _possiblyPresent = false; 12586 } 12587 in.rewind(_m); 12588 _m = in.setMark(); 12589 if (_possiblyPresent) { 12590 try { 12591 _s.notesHF = QSharedPointer<NotesHeadersFootersContainer>(new NotesHeadersFootersContainer(&_s)); 12592 parseNotesHeadersFootersContainer(in, *_s.notesHF.data()); 12593 } catch(IncorrectValueException _e) { 12594 _s.notesHF.clear(); 12595 in.rewind(_m); 12596 } catch(EOFException _e) { 12597 _s.notesHF.clear(); 12598 in.rewind(_m); 12599 } 12600 } 12601 _m = in.setMark(); 12602 try { 12603 RecordHeader _optionCheck(&_s); 12604 parseRecordHeader(in, _optionCheck); 12605 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0x0)&&(_optionCheck.recType == 0x0FF0); 12606 } catch(EOFException _e) { 12607 _possiblyPresent = false; 12608 } 12609 in.rewind(_m); 12610 _m = in.setMark(); 12611 if (_possiblyPresent) { 12612 try { 12613 _s.slideList = QSharedPointer<SlideListWithTextContainer>(new SlideListWithTextContainer(&_s)); 12614 parseSlideListWithTextContainer(in, *_s.slideList.data()); 12615 } catch(IncorrectValueException _e) { 12616 _s.slideList.clear(); 12617 in.rewind(_m); 12618 } catch(EOFException _e) { 12619 _s.slideList.clear(); 12620 in.rewind(_m); 12621 } 12622 } 12623 _m = in.setMark(); 12624 try { 12625 RecordHeader _optionCheck(&_s); 12626 parseRecordHeader(in, _optionCheck); 12627 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 3)&&(_optionCheck.recType == 0xFD9); 12628 } catch(EOFException _e) { 12629 _possiblyPresent = false; 12630 } 12631 in.rewind(_m); 12632 _m = in.setMark(); 12633 if (_possiblyPresent) { 12634 try { 12635 _s.slideHF2 = QSharedPointer<SlideHeadersFootersContainer>(new SlideHeadersFootersContainer(&_s)); 12636 parseSlideHeadersFootersContainer(in, *_s.slideHF2.data()); 12637 } catch(IncorrectValueException _e) { 12638 _s.slideHF2.clear(); 12639 in.rewind(_m); 12640 } catch(EOFException _e) { 12641 _s.slideHF2.clear(); 12642 in.rewind(_m); 12643 } 12644 } 12645 _m = in.setMark(); 12646 try { 12647 RecordHeader _optionCheck(&_s); 12648 parseRecordHeader(in, _optionCheck); 12649 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 2)&&(_optionCheck.recType == 0x0FF0); 12650 } catch(EOFException _e) { 12651 _possiblyPresent = false; 12652 } 12653 in.rewind(_m); 12654 _m = in.setMark(); 12655 if (_possiblyPresent) { 12656 try { 12657 _s.notesList = QSharedPointer<NotesListWithTextContainer>(new NotesListWithTextContainer(&_s)); 12658 parseNotesListWithTextContainer(in, *_s.notesList.data()); 12659 } catch(IncorrectValueException _e) { 12660 _s.notesList.clear(); 12661 in.rewind(_m); 12662 } catch(EOFException _e) { 12663 _s.notesList.clear(); 12664 in.rewind(_m); 12665 } 12666 } 12667 _m = in.setMark(); 12668 try { 12669 RecordHeader _optionCheck(&_s); 12670 parseRecordHeader(in, _optionCheck); 12671 _possiblyPresent = (_optionCheck.recVer == 1)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x0401)&&(_optionCheck.recLen == 0x50); 12672 } catch(EOFException _e) { 12673 _possiblyPresent = false; 12674 } 12675 in.rewind(_m); 12676 _m = in.setMark(); 12677 if (_possiblyPresent) { 12678 try { 12679 _s.slideShowDocInfoAtom = QSharedPointer<SlideShowDocInfoAtom>(new SlideShowDocInfoAtom(&_s)); 12680 parseSlideShowDocInfoAtom(in, *_s.slideShowDocInfoAtom.data()); 12681 } catch(IncorrectValueException _e) { 12682 _s.slideShowDocInfoAtom.clear(); 12683 in.rewind(_m); 12684 } catch(EOFException _e) { 12685 _s.slideShowDocInfoAtom.clear(); 12686 in.rewind(_m); 12687 } 12688 } 12689 _m = in.setMark(); 12690 try { 12691 RecordHeader _optionCheck(&_s); 12692 parseRecordHeader(in, _optionCheck); 12693 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x410); 12694 } catch(EOFException _e) { 12695 _possiblyPresent = false; 12696 } 12697 in.rewind(_m); 12698 _m = in.setMark(); 12699 if (_possiblyPresent) { 12700 try { 12701 _s.namedShows = QSharedPointer<NamedShowsContainer>(new NamedShowsContainer(&_s)); 12702 parseNamedShowsContainer(in, *_s.namedShows.data()); 12703 } catch(IncorrectValueException _e) { 12704 _s.namedShows.clear(); 12705 in.rewind(_m); 12706 } catch(EOFException _e) { 12707 _s.namedShows.clear(); 12708 in.rewind(_m); 12709 } 12710 } 12711 _m = in.setMark(); 12712 try { 12713 RecordHeader _optionCheck(&_s); 12714 parseRecordHeader(in, _optionCheck); 12715 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x402); 12716 } catch(EOFException _e) { 12717 _possiblyPresent = false; 12718 } 12719 in.rewind(_m); 12720 _m = in.setMark(); 12721 if (_possiblyPresent) { 12722 try { 12723 _s.summary = QSharedPointer<SummaryContainer>(new SummaryContainer(&_s)); 12724 parseSummaryContainer(in, *_s.summary.data()); 12725 } catch(IncorrectValueException _e) { 12726 _s.summary.clear(); 12727 in.rewind(_m); 12728 } catch(EOFException _e) { 12729 _s.summary.clear(); 12730 in.rewind(_m); 12731 } 12732 } 12733 _m = in.setMark(); 12734 try { 12735 RecordHeader _optionCheck(&_s); 12736 parseRecordHeader(in, _optionCheck); 12737 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x406); 12738 } catch(EOFException _e) { 12739 _possiblyPresent = false; 12740 } 12741 in.rewind(_m); 12742 _m = in.setMark(); 12743 if (_possiblyPresent) { 12744 try { 12745 _s.docRoutingSlipAtom = QSharedPointer<DocRoutingSlipAtom>(new DocRoutingSlipAtom(&_s)); 12746 parseDocRoutingSlipAtom(in, *_s.docRoutingSlipAtom.data()); 12747 } catch(IncorrectValueException _e) { 12748 _s.docRoutingSlipAtom.clear(); 12749 in.rewind(_m); 12750 } catch(EOFException _e) { 12751 _s.docRoutingSlipAtom.clear(); 12752 in.rewind(_m); 12753 } 12754 } 12755 _m = in.setMark(); 12756 try { 12757 RecordHeader _optionCheck(&_s); 12758 parseRecordHeader(in, _optionCheck); 12759 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1770)&&(_optionCheck.recLen == 5); 12760 } catch(EOFException _e) { 12761 _possiblyPresent = false; 12762 } 12763 in.rewind(_m); 12764 _m = in.setMark(); 12765 if (_possiblyPresent) { 12766 try { 12767 _s.printOptionsAtom = QSharedPointer<PrintOptionsAtom>(new PrintOptionsAtom(&_s)); 12768 parsePrintOptionsAtom(in, *_s.printOptionsAtom.data()); 12769 } catch(IncorrectValueException _e) { 12770 _s.printOptionsAtom.clear(); 12771 in.rewind(_m); 12772 } catch(EOFException _e) { 12773 _s.printOptionsAtom.clear(); 12774 in.rewind(_m); 12775 } 12776 } 12777 _atend = false; 12778 while (!_atend) { 12779 _m = in.setMark(); 12780 try { 12781 _s.unknown0.append(UnknownDocumentContainerChild(&_s)); 12782 parseUnknownDocumentContainerChild(in, _s.unknown0.last()); 12783 } catch(IncorrectValueException _e) { 12784 _s.unknown0.removeLast(); 12785 _atend = true; 12786 in.rewind(_m); 12787 } catch(EOFException _e) { 12788 _s.unknown0.removeLast(); 12789 _atend = true; 12790 in.rewind(_m); 12791 } 12792 } 12793 _m = in.setMark(); 12794 try { 12795 RecordHeader _optionCheck(&_s); 12796 parseRecordHeader(in, _optionCheck); 12797 _possiblyPresent = (_optionCheck.recVer == 0 || _optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x428); 12798 } catch(EOFException _e) { 12799 _possiblyPresent = false; 12800 } 12801 in.rewind(_m); 12802 _m = in.setMark(); 12803 if (_possiblyPresent) { 12804 try { 12805 _s.rtCustomTableStylesAtom1 = QSharedPointer<RoundTripCustomTableStyles12Atom>(new RoundTripCustomTableStyles12Atom(&_s)); 12806 parseRoundTripCustomTableStyles12Atom(in, *_s.rtCustomTableStylesAtom1.data()); 12807 } catch(IncorrectValueException _e) { 12808 _s.rtCustomTableStylesAtom1.clear(); 12809 in.rewind(_m); 12810 } catch(EOFException _e) { 12811 _s.rtCustomTableStylesAtom1.clear(); 12812 in.rewind(_m); 12813 } 12814 } 12815 _atend = false; 12816 while (!_atend) { 12817 _m = in.setMark(); 12818 try { 12819 _s.unknown1.append(UnknownDocumentContainerChild(&_s)); 12820 parseUnknownDocumentContainerChild(in, _s.unknown1.last()); 12821 } catch(IncorrectValueException _e) { 12822 _s.unknown1.removeLast(); 12823 _atend = true; 12824 in.rewind(_m); 12825 } catch(EOFException _e) { 12826 _s.unknown1.removeLast(); 12827 _atend = true; 12828 in.rewind(_m); 12829 } 12830 } 12831 parseEndDocumentAtom(in, _s.endDocumentAtom); 12832 _atend = false; 12833 while (!_atend) { 12834 _m = in.setMark(); 12835 try { 12836 _s.unknown2.append(UnknownDocumentContainerChild(&_s)); 12837 parseUnknownDocumentContainerChild(in, _s.unknown2.last()); 12838 } catch(IncorrectValueException _e) { 12839 _s.unknown2.removeLast(); 12840 _atend = true; 12841 in.rewind(_m); 12842 } catch(EOFException _e) { 12843 _s.unknown2.removeLast(); 12844 _atend = true; 12845 in.rewind(_m); 12846 } 12847 } 12848 _m = in.setMark(); 12849 try { 12850 RecordHeader _optionCheck(&_s); 12851 parseRecordHeader(in, _optionCheck); 12852 _possiblyPresent = (_optionCheck.recVer == 0 || _optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x428); 12853 } catch(EOFException _e) { 12854 _possiblyPresent = false; 12855 } 12856 in.rewind(_m); 12857 _m = in.setMark(); 12858 if (_possiblyPresent) { 12859 try { 12860 _s.rtCustomTableStylesAtom2 = QSharedPointer<RoundTripCustomTableStyles12Atom>(new RoundTripCustomTableStyles12Atom(&_s)); 12861 parseRoundTripCustomTableStyles12Atom(in, *_s.rtCustomTableStylesAtom2.data()); 12862 } catch(IncorrectValueException _e) { 12863 _s.rtCustomTableStylesAtom2.clear(); 12864 in.rewind(_m); 12865 } catch(EOFException _e) { 12866 _s.rtCustomTableStylesAtom2.clear(); 12867 in.rewind(_m); 12868 } 12869 } 12870 _atend = false; 12871 while (!_atend) { 12872 _m = in.setMark(); 12873 try { 12874 _s.unknown4.append(UnknownDocumentContainerChild(&_s)); 12875 parseUnknownDocumentContainerChild(in, _s.unknown4.last()); 12876 } catch(IncorrectValueException _e) { 12877 _s.unknown4.removeLast(); 12878 _atend = true; 12879 in.rewind(_m); 12880 } catch(EOFException _e) { 12881 _s.unknown4.removeLast(); 12882 _atend = true; 12883 in.rewind(_m); 12884 } 12885 } 12886 _m = in.setMark(); 12887 try { 12888 RecordHeader _optionCheck(&_s); 12889 parseRecordHeader(in, _optionCheck); 12890 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance == 0 || _optionCheck.recInstance == 1 || _optionCheck.recInstance == 2 || _optionCheck.recInstance == 3 || _optionCheck.recInstance == 4 || _optionCheck.recInstance == 5 || _optionCheck.recInstance == 6 || _optionCheck.recInstance == 7 || _optionCheck.recInstance == 8)&&(_optionCheck.recType == 0x0FB2); 12891 } catch(EOFException _e) { 12892 _possiblyPresent = false; 12893 } 12894 in.rewind(_m); 12895 _m = in.setMark(); 12896 if (_possiblyPresent) { 12897 try { 12898 _s.unknown5 = QSharedPointer<TextMasterStyle10Atom>(new TextMasterStyle10Atom(&_s)); 12899 parseTextMasterStyle10Atom(in, *_s.unknown5.data()); 12900 } catch(IncorrectValueException _e) { 12901 _s.unknown5.clear(); 12902 in.rewind(_m); 12903 } catch(EOFException _e) { 12904 _s.unknown5.clear(); 12905 in.rewind(_m); 12906 } 12907 } 12908 } 12909 void MSO::parseDocInfoListSubContainerOrAtom(LEInputStream& in, DocInfoListSubContainerOrAtom& _s) { 12910 _s.streamOffset = in.getPosition(); 12911 LEInputStream::Mark _m; 12912 _m = in.setMark(); 12913 RecordHeader _choice(&_s); 12914 parseRecordHeader(in, _choice); 12915 in.rewind(_m); 12916 qint64 startPos = in.getPosition(); 12917 if (startPos == in.getPosition() && ((_choice.recInstance == 0 || _choice.recInstance == 1)&&(_choice.recType == 0x1388))) { 12918 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new DocProgTagsContainer(&_s)); 12919 parseDocProgTagsContainer(in, *(DocProgTagsContainer*)_s.anon.data()); 12920 } 12921 if (startPos == in.getPosition() && ((_choice.recInstance == 1)&&(_choice.recType == 0x414)&&(_choice.recLen == 0x1C))) { 12922 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new NormalViewSetInfoContainer(&_s)); 12923 parseNormalViewSetInfoContainer(in, *(NormalViewSetInfoContainer*)_s.anon.data()); 12924 } 12925 if (startPos == in.getPosition() && ((_choice.recInstance == 1)&&(_choice.recType == 0x413))) { 12926 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new NotesTextViewInfoContainer(&_s)); 12927 parseNotesTextViewInfoContainer(in, *(NotesTextViewInfoContainer*)_s.anon.data()); 12928 } 12929 if (startPos == in.getPosition() && ((_choice.recInstance == 0 || _choice.recInstance == 1)&&(_choice.recType == 0x407))) { 12930 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new OutlineViewInfoContainer(&_s)); 12931 parseOutlineViewInfoContainer(in, *(OutlineViewInfoContainer*)_s.anon.data()); 12932 } 12933 if (startPos == in.getPosition() && ((_choice.recInstance == 0 || _choice.recInstance == 1)&&(_choice.recType == 0x3FA))) { 12934 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new SlideViewInfoInstance(&_s)); 12935 parseSlideViewInfoInstance(in, *(SlideViewInfoInstance*)_s.anon.data()); 12936 } 12937 if (startPos == in.getPosition() && ((_choice.recInstance == 1)&&(_choice.recType == 0x408))) { 12938 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new SorterViewInfoContainer(&_s)); 12939 parseSorterViewInfoContainer(in, *(SorterViewInfoContainer*)_s.anon.data()); 12940 } 12941 if (startPos == in.getPosition()) { 12942 _s.anon = DocInfoListSubContainerOrAtom::choice2631814737(new VBAInfoContainer(&_s)); 12943 parseVBAInfoContainer(in, *(VBAInfoContainer*)_s.anon.data()); 12944 } 12945 } 12946 void MSO::parseDocProgBinaryTagContainer(LEInputStream& in, DocProgBinaryTagContainer& _s) { 12947 _s.streamOffset = in.getPosition(); 12948 parseRecordHeader(in, _s.rh); 12949 if (!(_s.rh.recVer == 0xF)) { 12950 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12951 } 12952 if (!(_s.rh.recInstance == 0)) { 12953 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 12954 } 12955 if (!(_s.rh.recType == 0x138A)) { 12956 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x138A"); 12957 } 12958 parseDocProgBinaryTagSubContainerOrAtom(in, _s.rec); 12959 } 12960 void MSO::parseSlideProgBinaryTagContainer(LEInputStream& in, SlideProgBinaryTagContainer& _s) { 12961 _s.streamOffset = in.getPosition(); 12962 parseRecordHeader(in, _s.rh); 12963 if (!(_s.rh.recVer == 0xF)) { 12964 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12965 } 12966 if (!(_s.rh.recInstance == 0)) { 12967 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 12968 } 12969 if (!(_s.rh.recType == 0x138A)) { 12970 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x138A"); 12971 } 12972 parseSlideProgBinaryTagSubContainerOrAtom(in, _s.rec); 12973 } 12974 void MSO::parseOfficeArtSpContainer(LEInputStream& in, OfficeArtSpContainer& _s) { 12975 _s.streamOffset = in.getPosition(); 12976 LEInputStream::Mark _m; 12977 bool _possiblyPresent; 12978 parseOfficeArtRecordHeader(in, _s.rh); 12979 if (!(_s.rh.recVer == 0xF)) { 12980 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 12981 } 12982 if (!(_s.rh.recInstance == 0)) { 12983 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 12984 } 12985 if (!(_s.rh.recType == 0x0F004)) { 12986 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x0F004"); 12987 } 12988 _m = in.setMark(); 12989 try { 12990 OfficeArtRecordHeader _optionCheck(&_s); 12991 parseOfficeArtRecordHeader(in, _optionCheck); 12992 _possiblyPresent = (_optionCheck.recVer == 0x1)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x0F009)&&(_optionCheck.recLen == 0x10); 12993 } catch(EOFException _e) { 12994 _possiblyPresent = false; 12995 } 12996 in.rewind(_m); 12997 _m = in.setMark(); 12998 if (_possiblyPresent) { 12999 try { 13000 _s.shapeGroup = QSharedPointer<OfficeArtFSPGR>(new OfficeArtFSPGR(&_s)); 13001 parseOfficeArtFSPGR(in, *_s.shapeGroup.data()); 13002 } catch(IncorrectValueException _e) { 13003 _s.shapeGroup.clear(); 13004 in.rewind(_m); 13005 } catch(EOFException _e) { 13006 _s.shapeGroup.clear(); 13007 in.rewind(_m); 13008 } 13009 } 13010 parseOfficeArtFSP(in, _s.shapeProp); 13011 _m = in.setMark(); 13012 try { 13013 OfficeArtRecordHeader _optionCheck(&_s); 13014 parseOfficeArtRecordHeader(in, _optionCheck); 13015 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xF11D)&&(_optionCheck.recLen == 4); 13016 } catch(EOFException _e) { 13017 _possiblyPresent = false; 13018 } 13019 in.rewind(_m); 13020 _m = in.setMark(); 13021 if (_possiblyPresent) { 13022 try { 13023 _s.deletedshape = QSharedPointer<OfficeArtFPSPL>(new OfficeArtFPSPL(&_s)); 13024 parseOfficeArtFPSPL(in, *_s.deletedshape.data()); 13025 } catch(IncorrectValueException _e) { 13026 _s.deletedshape.clear(); 13027 in.rewind(_m); 13028 } catch(EOFException _e) { 13029 _s.deletedshape.clear(); 13030 in.rewind(_m); 13031 } 13032 } 13033 _m = in.setMark(); 13034 try { 13035 OfficeArtRecordHeader _optionCheck(&_s); 13036 parseOfficeArtRecordHeader(in, _optionCheck); 13037 _possiblyPresent = (_optionCheck.recVer == 0x3)&&(_optionCheck.recType == 0x0F00B); 13038 } catch(EOFException _e) { 13039 _possiblyPresent = false; 13040 } 13041 in.rewind(_m); 13042 _m = in.setMark(); 13043 if (_possiblyPresent) { 13044 try { 13045 _s.shapePrimaryOptions = QSharedPointer<OfficeArtFOPT>(new OfficeArtFOPT(&_s)); 13046 parseOfficeArtFOPT(in, *_s.shapePrimaryOptions.data()); 13047 } catch(IncorrectValueException _e) { 13048 _s.shapePrimaryOptions.clear(); 13049 in.rewind(_m); 13050 } catch(EOFException _e) { 13051 _s.shapePrimaryOptions.clear(); 13052 in.rewind(_m); 13053 } 13054 } 13055 _m = in.setMark(); 13056 try { 13057 OfficeArtRecordHeader _optionCheck(&_s); 13058 parseOfficeArtRecordHeader(in, _optionCheck); 13059 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recType == 0xF121); 13060 } catch(EOFException _e) { 13061 _possiblyPresent = false; 13062 } 13063 in.rewind(_m); 13064 _m = in.setMark(); 13065 if (_possiblyPresent) { 13066 try { 13067 _s.shapeSecondaryOptions1 = QSharedPointer<OfficeArtSecondaryFOPT>(new OfficeArtSecondaryFOPT(&_s)); 13068 parseOfficeArtSecondaryFOPT(in, *_s.shapeSecondaryOptions1.data()); 13069 } catch(IncorrectValueException _e) { 13070 _s.shapeSecondaryOptions1.clear(); 13071 in.rewind(_m); 13072 } catch(EOFException _e) { 13073 _s.shapeSecondaryOptions1.clear(); 13074 in.rewind(_m); 13075 } 13076 } 13077 _m = in.setMark(); 13078 try { 13079 OfficeArtRecordHeader _optionCheck(&_s); 13080 parseOfficeArtRecordHeader(in, _optionCheck); 13081 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recType == 0xF122); 13082 } catch(EOFException _e) { 13083 _possiblyPresent = false; 13084 } 13085 in.rewind(_m); 13086 _m = in.setMark(); 13087 if (_possiblyPresent) { 13088 try { 13089 _s.shapeTertiaryOptions1 = QSharedPointer<OfficeArtTertiaryFOPT>(new OfficeArtTertiaryFOPT(&_s)); 13090 parseOfficeArtTertiaryFOPT(in, *_s.shapeTertiaryOptions1.data()); 13091 } catch(IncorrectValueException _e) { 13092 _s.shapeTertiaryOptions1.clear(); 13093 in.rewind(_m); 13094 } catch(EOFException _e) { 13095 _s.shapeTertiaryOptions1.clear(); 13096 in.rewind(_m); 13097 } 13098 } 13099 _m = in.setMark(); 13100 try { 13101 OfficeArtRecordHeader _optionCheck(&_s); 13102 parseOfficeArtRecordHeader(in, _optionCheck); 13103 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xF00F)&&(_optionCheck.recLen == 0x10); 13104 } catch(EOFException _e) { 13105 _possiblyPresent = false; 13106 } 13107 in.rewind(_m); 13108 _m = in.setMark(); 13109 if (_possiblyPresent) { 13110 try { 13111 _s.childAnchor = QSharedPointer<OfficeArtChildAnchor>(new OfficeArtChildAnchor(&_s)); 13112 parseOfficeArtChildAnchor(in, *_s.childAnchor.data()); 13113 } catch(IncorrectValueException _e) { 13114 _s.childAnchor.clear(); 13115 in.rewind(_m); 13116 } catch(EOFException _e) { 13117 _s.childAnchor.clear(); 13118 in.rewind(_m); 13119 } 13120 } 13121 _m = in.setMark(); 13122 try { 13123 OfficeArtRecordHeader _optionCheck(&_s); 13124 parseOfficeArtRecordHeader(in, _optionCheck); 13125 _possiblyPresent = ((_optionCheck.recLen == 0x8 || _optionCheck.recLen == 0x10))||((_optionCheck.recLen == 0x4))||((_optionCheck.recLen == 0x8 || _optionCheck.recLen == 0x12)); 13126 } catch(EOFException _e) { 13127 _possiblyPresent = false; 13128 } 13129 in.rewind(_m); 13130 _m = in.setMark(); 13131 if (_possiblyPresent) { 13132 try { 13133 _s.clientAnchor = QSharedPointer<OfficeArtClientAnchor>(new OfficeArtClientAnchor(&_s)); 13134 parseOfficeArtClientAnchor(in, *_s.clientAnchor.data()); 13135 } catch(IncorrectValueException _e) { 13136 _s.clientAnchor.clear(); 13137 in.rewind(_m); 13138 } catch(EOFException _e) { 13139 _s.clientAnchor.clear(); 13140 in.rewind(_m); 13141 } 13142 } 13143 _m = in.setMark(); 13144 try { 13145 OfficeArtRecordHeader _optionCheck(&_s); 13146 parseOfficeArtRecordHeader(in, _optionCheck); 13147 _possiblyPresent = ((_optionCheck.recVer == 0)&&(_optionCheck.recLen == 4))||((_optionCheck.recVer == 0xF))||((_optionCheck.recVer == 0)&&(_optionCheck.recLen == 0)); 13148 } catch(EOFException _e) { 13149 _possiblyPresent = false; 13150 } 13151 in.rewind(_m); 13152 _m = in.setMark(); 13153 if (_possiblyPresent) { 13154 try { 13155 _s.clientData = QSharedPointer<OfficeArtClientData>(new OfficeArtClientData(&_s)); 13156 parseOfficeArtClientData(in, *_s.clientData.data()); 13157 } catch(IncorrectValueException _e) { 13158 _s.clientData.clear(); 13159 in.rewind(_m); 13160 } catch(EOFException _e) { 13161 _s.clientData.clear(); 13162 in.rewind(_m); 13163 } 13164 } 13165 _m = in.setMark(); 13166 try { 13167 OfficeArtRecordHeader _optionCheck(&_s); 13168 parseOfficeArtRecordHeader(in, _optionCheck); 13169 _possiblyPresent = ((_optionCheck.recVer == 0)&&(_optionCheck.recLen == 0))||((_optionCheck.recVer == 0 || _optionCheck.recVer == 0xF)&&(_optionCheck.recLen == 0x4))||((_optionCheck.recVer == 0 || _optionCheck.recVer == 0xF)&&(_optionCheck.recLen!=4)); 13170 } catch(EOFException _e) { 13171 _possiblyPresent = false; 13172 } 13173 in.rewind(_m); 13174 _m = in.setMark(); 13175 if (_possiblyPresent) { 13176 try { 13177 _s.clientTextbox = QSharedPointer<OfficeArtClientTextBox>(new OfficeArtClientTextBox(&_s)); 13178 parseOfficeArtClientTextBox(in, *_s.clientTextbox.data()); 13179 } catch(IncorrectValueException _e) { 13180 _s.clientTextbox.clear(); 13181 in.rewind(_m); 13182 } catch(EOFException _e) { 13183 _s.clientTextbox.clear(); 13184 in.rewind(_m); 13185 } 13186 } 13187 _m = in.setMark(); 13188 try { 13189 OfficeArtRecordHeader _optionCheck(&_s); 13190 parseOfficeArtRecordHeader(in, _optionCheck); 13191 _possiblyPresent = (_optionCheck.recVer == 0x3)&&(_optionCheck.recType == 0x0F00B); 13192 } catch(EOFException _e) { 13193 _possiblyPresent = false; 13194 } 13195 in.rewind(_m); 13196 _m = in.setMark(); 13197 if (_possiblyPresent) { 13198 try { 13199 _s.shapePrimaryOptions2 = QSharedPointer<OfficeArtFOPT>(new OfficeArtFOPT(&_s)); 13200 parseOfficeArtFOPT(in, *_s.shapePrimaryOptions2.data()); 13201 } catch(IncorrectValueException _e) { 13202 _s.shapePrimaryOptions2.clear(); 13203 in.rewind(_m); 13204 } catch(EOFException _e) { 13205 _s.shapePrimaryOptions2.clear(); 13206 in.rewind(_m); 13207 } 13208 } 13209 _m = in.setMark(); 13210 try { 13211 OfficeArtRecordHeader _optionCheck(&_s); 13212 parseOfficeArtRecordHeader(in, _optionCheck); 13213 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recType == 0xF121); 13214 } catch(EOFException _e) { 13215 _possiblyPresent = false; 13216 } 13217 in.rewind(_m); 13218 _m = in.setMark(); 13219 if (_possiblyPresent) { 13220 try { 13221 _s.shapeSecondaryOptions2 = QSharedPointer<OfficeArtSecondaryFOPT>(new OfficeArtSecondaryFOPT(&_s)); 13222 parseOfficeArtSecondaryFOPT(in, *_s.shapeSecondaryOptions2.data()); 13223 } catch(IncorrectValueException _e) { 13224 _s.shapeSecondaryOptions2.clear(); 13225 in.rewind(_m); 13226 } catch(EOFException _e) { 13227 _s.shapeSecondaryOptions2.clear(); 13228 in.rewind(_m); 13229 } 13230 } 13231 _m = in.setMark(); 13232 try { 13233 OfficeArtRecordHeader _optionCheck(&_s); 13234 parseOfficeArtRecordHeader(in, _optionCheck); 13235 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recType == 0xF122); 13236 } catch(EOFException _e) { 13237 _possiblyPresent = false; 13238 } 13239 in.rewind(_m); 13240 _m = in.setMark(); 13241 if (_possiblyPresent) { 13242 try { 13243 _s.shapeTertiaryOptions2 = QSharedPointer<OfficeArtTertiaryFOPT>(new OfficeArtTertiaryFOPT(&_s)); 13244 parseOfficeArtTertiaryFOPT(in, *_s.shapeTertiaryOptions2.data()); 13245 } catch(IncorrectValueException _e) { 13246 _s.shapeTertiaryOptions2.clear(); 13247 in.rewind(_m); 13248 } catch(EOFException _e) { 13249 _s.shapeTertiaryOptions2.clear(); 13250 in.rewind(_m); 13251 } 13252 } 13253 _m = in.setMark(); 13254 try { 13255 RecordHeader _optionCheck(&_s); 13256 parseRecordHeader(in, _optionCheck); 13257 _possiblyPresent = (_optionCheck.recVer == 3)&&(_optionCheck.recInstance == 9)&&(_optionCheck.recType == 0); 13258 } catch(EOFException _e) { 13259 _possiblyPresent = false; 13260 } 13261 in.rewind(_m); 13262 _m = in.setMark(); 13263 if (_possiblyPresent) { 13264 try { 13265 _s.unknown = QSharedPointer<UnknownTextContainerChild>(new UnknownTextContainerChild(&_s)); 13266 parseUnknownTextContainerChild(in, *_s.unknown.data()); 13267 } catch(IncorrectValueException _e) { 13268 _s.unknown.clear(); 13269 in.rewind(_m); 13270 } catch(EOFException _e) { 13271 _s.unknown.clear(); 13272 in.rewind(_m); 13273 } 13274 } 13275 } 13276 void MSO::parseOfficeArtInlineSpContainer(LEInputStream& in, OfficeArtInlineSpContainer& _s) { 13277 _s.streamOffset = in.getPosition(); 13278 LEInputStream::Mark _m; 13279 bool _atend; 13280 parseOfficeArtSpContainer(in, _s.shape); 13281 _atend = false; 13282 while (!_atend) { 13283 _m = in.setMark(); 13284 try { 13285 _s.rgfb.append(OfficeArtBStoreContainerFileBlock(&_s)); 13286 parseOfficeArtBStoreContainerFileBlock(in, _s.rgfb.last()); 13287 } catch(IncorrectValueException _e) { 13288 _s.rgfb.removeLast(); 13289 _atend = true; 13290 in.rewind(_m); 13291 } catch(EOFException _e) { 13292 _s.rgfb.removeLast(); 13293 _atend = true; 13294 in.rewind(_m); 13295 } 13296 } 13297 } 13298 void MSO::parseDocProgTagsSubContainerOrAtom(LEInputStream& in, DocProgTagsSubContainerOrAtom& _s) { 13299 _s.streamOffset = in.getPosition(); 13300 LEInputStream::Mark _m; 13301 _m = in.setMark(); 13302 RecordHeader _choice(&_s); 13303 parseRecordHeader(in, _choice); 13304 in.rewind(_m); 13305 qint64 startPos = in.getPosition(); 13306 if (startPos == in.getPosition() && ((_choice.recType == 0x1389))) { 13307 _s.anon = DocProgTagsSubContainerOrAtom::choice61655436(new ProgStringTagContainer(&_s)); 13308 parseProgStringTagContainer(in, *(ProgStringTagContainer*)_s.anon.data()); 13309 } 13310 if (startPos == in.getPosition()) { 13311 _s.anon = DocProgTagsSubContainerOrAtom::choice61655436(new DocProgBinaryTagContainer(&_s)); 13312 parseDocProgBinaryTagContainer(in, *(DocProgBinaryTagContainer*)_s.anon.data()); 13313 } 13314 } 13315 void MSO::parseSlideProgTagsSubContainerOrAtom(LEInputStream& in, SlideProgTagsSubContainerOrAtom& _s) { 13316 _s.streamOffset = in.getPosition(); 13317 LEInputStream::Mark _m; 13318 _m = in.setMark(); 13319 RecordHeader _choice(&_s); 13320 parseRecordHeader(in, _choice); 13321 in.rewind(_m); 13322 qint64 startPos = in.getPosition(); 13323 if (startPos == in.getPosition() && ((_choice.recType == 0x1389))) { 13324 _s.anon = SlideProgTagsSubContainerOrAtom::choice310259039(new ProgStringTagContainer(&_s)); 13325 parseProgStringTagContainer(in, *(ProgStringTagContainer*)_s.anon.data()); 13326 } 13327 if (startPos == in.getPosition()) { 13328 _s.anon = SlideProgTagsSubContainerOrAtom::choice310259039(new SlideProgBinaryTagContainer(&_s)); 13329 parseSlideProgBinaryTagContainer(in, *(SlideProgBinaryTagContainer*)_s.anon.data()); 13330 } 13331 } 13332 void MSO::parseOfficeArtDgContainer(LEInputStream& in, OfficeArtDgContainer& _s) { 13333 _s.streamOffset = in.getPosition(); 13334 LEInputStream::Mark _m; 13335 bool _possiblyPresent; 13336 bool _atend; 13337 parseOfficeArtRecordHeader(in, _s.rh); 13338 if (!(_s.rh.recVer == 0xF)) { 13339 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 13340 } 13341 if (!(_s.rh.recInstance == 0x0)) { 13342 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 13343 } 13344 if (!(_s.rh.recType == 0xF002)) { 13345 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0xF002"); 13346 } 13347 _m = in.setMark(); 13348 try { 13349 OfficeArtRecordHeader _optionCheck(&_s); 13350 parseOfficeArtRecordHeader(in, _optionCheck); 13351 _possiblyPresent = (_optionCheck.recVer == 0x0)&&(_optionCheck.recInstance<=4094)&&(_optionCheck.recType == 0x0F008)&&(_optionCheck.recLen == 8); 13352 } catch(EOFException _e) { 13353 _possiblyPresent = false; 13354 } 13355 in.rewind(_m); 13356 _m = in.setMark(); 13357 if (_possiblyPresent) { 13358 try { 13359 _s.drawingData = QSharedPointer<OfficeArtFDG>(new OfficeArtFDG(&_s)); 13360 parseOfficeArtFDG(in, *_s.drawingData.data()); 13361 } catch(IncorrectValueException _e) { 13362 _s.drawingData.clear(); 13363 in.rewind(_m); 13364 } catch(EOFException _e) { 13365 _s.drawingData.clear(); 13366 in.rewind(_m); 13367 } 13368 } 13369 _m = in.setMark(); 13370 try { 13371 OfficeArtRecordHeader _optionCheck(&_s); 13372 parseOfficeArtRecordHeader(in, _optionCheck); 13373 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recType == 0xF118)&&(_optionCheck.recLen==4*_optionCheck.recInstance); 13374 } catch(EOFException _e) { 13375 _possiblyPresent = false; 13376 } 13377 in.rewind(_m); 13378 _m = in.setMark(); 13379 if (_possiblyPresent) { 13380 try { 13381 _s.regroupItems = QSharedPointer<OfficeArtFRITContainer>(new OfficeArtFRITContainer(&_s)); 13382 parseOfficeArtFRITContainer(in, *_s.regroupItems.data()); 13383 } catch(IncorrectValueException _e) { 13384 _s.regroupItems.clear(); 13385 in.rewind(_m); 13386 } catch(EOFException _e) { 13387 _s.regroupItems.clear(); 13388 in.rewind(_m); 13389 } 13390 } 13391 _m = in.setMark(); 13392 try { 13393 OfficeArtRecordHeader _optionCheck(&_s); 13394 parseOfficeArtRecordHeader(in, _optionCheck); 13395 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x0F003); 13396 } catch(EOFException _e) { 13397 _possiblyPresent = false; 13398 } 13399 in.rewind(_m); 13400 _m = in.setMark(); 13401 if (_possiblyPresent) { 13402 try { 13403 _s.groupShape = QSharedPointer<OfficeArtSpgrContainer>(new OfficeArtSpgrContainer(&_s)); 13404 parseOfficeArtSpgrContainer(in, *_s.groupShape.data()); 13405 } catch(IncorrectValueException _e) { 13406 _s.groupShape.clear(); 13407 in.rewind(_m); 13408 } catch(EOFException _e) { 13409 _s.groupShape.clear(); 13410 in.rewind(_m); 13411 } 13412 } 13413 _m = in.setMark(); 13414 try { 13415 OfficeArtRecordHeader _optionCheck(&_s); 13416 parseOfficeArtRecordHeader(in, _optionCheck); 13417 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x0F004); 13418 } catch(EOFException _e) { 13419 _possiblyPresent = false; 13420 } 13421 in.rewind(_m); 13422 _m = in.setMark(); 13423 if (_possiblyPresent) { 13424 try { 13425 _s.shape = QSharedPointer<OfficeArtSpContainer>(new OfficeArtSpContainer(&_s)); 13426 parseOfficeArtSpContainer(in, *_s.shape.data()); 13427 } catch(IncorrectValueException _e) { 13428 _s.shape.clear(); 13429 in.rewind(_m); 13430 } catch(EOFException _e) { 13431 _s.shape.clear(); 13432 in.rewind(_m); 13433 } 13434 } 13435 _atend = false; 13436 while (!_atend) { 13437 _m = in.setMark(); 13438 try { 13439 _s.deletedShapes.append(OfficeArtSpgrContainerFileBlock(&_s)); 13440 parseOfficeArtSpgrContainerFileBlock(in, _s.deletedShapes.last()); 13441 } catch(IncorrectValueException _e) { 13442 _s.deletedShapes.removeLast(); 13443 _atend = true; 13444 in.rewind(_m); 13445 } catch(EOFException _e) { 13446 _s.deletedShapes.removeLast(); 13447 _atend = true; 13448 in.rewind(_m); 13449 } 13450 } 13451 _m = in.setMark(); 13452 try { 13453 OfficeArtRecordHeader _optionCheck(&_s); 13454 parseOfficeArtRecordHeader(in, _optionCheck); 13455 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recType == 0xF005); 13456 } catch(EOFException _e) { 13457 _possiblyPresent = false; 13458 } 13459 in.rewind(_m); 13460 _m = in.setMark(); 13461 if (_possiblyPresent) { 13462 try { 13463 _s.solvers = QSharedPointer<OfficeArtSolverContainer>(new OfficeArtSolverContainer(&_s)); 13464 parseOfficeArtSolverContainer(in, *_s.solvers.data()); 13465 } catch(IncorrectValueException _e) { 13466 _s.solvers.clear(); 13467 in.rewind(_m); 13468 } catch(EOFException _e) { 13469 _s.solvers.clear(); 13470 in.rewind(_m); 13471 } 13472 } 13473 } 13474 void MSO::parseOfficeArtSpgrContainerFileBlock(LEInputStream& in, OfficeArtSpgrContainerFileBlock& _s) { 13475 _s.streamOffset = in.getPosition(); 13476 LEInputStream::Mark _m; 13477 _m = in.setMark(); 13478 try { 13479 _s.anon = OfficeArtSpgrContainerFileBlock::choice4117040(new OfficeArtSpContainer(&_s)); 13480 parseOfficeArtSpContainer(in, *(OfficeArtSpContainer*)_s.anon.data()); 13481 } catch (IncorrectValueException _x) { 13482 _s.anon.clear(); 13483 in.rewind(_m); 13484 try { 13485 _s.anon = OfficeArtSpgrContainerFileBlock::choice4117040(new OfficeArtSpgrContainer(&_s)); 13486 parseOfficeArtSpgrContainer(in, *(OfficeArtSpgrContainer*)_s.anon.data()); 13487 } catch (IncorrectValueException _xx) { 13488 _s.anon.clear(); 13489 in.rewind(_m); 13490 try { 13491 _s.anon = OfficeArtSpgrContainerFileBlock::choice4117040(new OfficeArtFSP(&_s)); 13492 parseOfficeArtFSP(in, *(OfficeArtFSP*)_s.anon.data()); 13493 } catch (IncorrectValueException _xxx) { 13494 _s.anon.clear(); 13495 in.rewind(_m); 13496 try { 13497 _s.anon = OfficeArtSpgrContainerFileBlock::choice4117040(new OfficeArtFSPGR(&_s)); 13498 parseOfficeArtFSPGR(in, *(OfficeArtFSPGR*)_s.anon.data()); 13499 } catch (IncorrectValueException _xxxx) { 13500 _s.anon.clear(); 13501 in.rewind(_m); 13502 try { 13503 _s.anon = OfficeArtSpgrContainerFileBlock::choice4117040(new OfficeArtClientAnchor(&_s)); 13504 parseOfficeArtClientAnchor(in, *(OfficeArtClientAnchor*)_s.anon.data()); 13505 } catch (IncorrectValueException _xxxxx) { 13506 _s.anon.clear(); 13507 in.rewind(_m); 13508 _s.anon = OfficeArtSpgrContainerFileBlock::choice4117040(new OfficeArtClientData(&_s)); 13509 parseOfficeArtClientData(in, *(OfficeArtClientData*)_s.anon.data()); 13510 }}}}} 13511 } 13512 void MSO::parseDrawingContainer(LEInputStream& in, DrawingContainer& _s) { 13513 _s.streamOffset = in.getPosition(); 13514 parseRecordHeader(in, _s.rh); 13515 if (!(_s.rh.recVer == 0xF)) { 13516 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 13517 } 13518 if (!(_s.rh.recInstance == 0)) { 13519 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 13520 } 13521 if (!(_s.rh.recType == 0x040C)) { 13522 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x040C"); 13523 } 13524 parseOfficeArtDgContainer(in, _s.OfficeArtDg); 13525 } 13526 void MSO::parseMainMasterContainer(LEInputStream& in, MainMasterContainer& _s) { 13527 _s.streamOffset = in.getPosition(); 13528 LEInputStream::Mark _m; 13529 bool _possiblyPresent; 13530 bool _atend; 13531 parseRecordHeader(in, _s.rh); 13532 if (!(_s.rh.recVer == 0xF)) { 13533 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 13534 } 13535 if (!(_s.rh.recInstance == 0x0)) { 13536 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 13537 } 13538 if (!(_s.rh.recType == 0x03F8)) { 13539 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03F8"); 13540 } 13541 parseSlideAtom(in, _s.slideAtom); 13542 _m = in.setMark(); 13543 try { 13544 RecordHeader _optionCheck(&_s); 13545 parseRecordHeader(in, _optionCheck); 13546 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x03F9)&&(_optionCheck.recLen == 0x10); 13547 } catch(EOFException _e) { 13548 _possiblyPresent = false; 13549 } 13550 in.rewind(_m); 13551 _m = in.setMark(); 13552 if (_possiblyPresent) { 13553 try { 13554 _s.unknown = QSharedPointer<SlideShowSlideInfoAtom>(new SlideShowSlideInfoAtom(&_s)); 13555 parseSlideShowSlideInfoAtom(in, *_s.unknown.data()); 13556 } catch(IncorrectValueException _e) { 13557 _s.unknown.clear(); 13558 in.rewind(_m); 13559 } catch(EOFException _e) { 13560 _s.unknown.clear(); 13561 in.rewind(_m); 13562 } 13563 } 13564 _atend = false; 13565 while (!_atend) { 13566 _m = in.setMark(); 13567 try { 13568 _s.rgSchemeListElementColorScheme.append(SchemeListElementColorSchemeAtom(&_s)); 13569 parseSchemeListElementColorSchemeAtom(in, _s.rgSchemeListElementColorScheme.last()); 13570 } catch(IncorrectValueException _e) { 13571 _s.rgSchemeListElementColorScheme.removeLast(); 13572 _atend = true; 13573 in.rewind(_m); 13574 } catch(EOFException _e) { 13575 _s.rgSchemeListElementColorScheme.removeLast(); 13576 _atend = true; 13577 in.rewind(_m); 13578 } 13579 } 13580 _atend = false; 13581 while (!_atend) { 13582 _m = in.setMark(); 13583 try { 13584 _s.rgTextMasterStyle.append(TextMasterStyleAtom(&_s)); 13585 parseTextMasterStyleAtom(in, _s.rgTextMasterStyle.last()); 13586 } catch(IncorrectValueException _e) { 13587 _s.rgTextMasterStyle.removeLast(); 13588 _atend = true; 13589 in.rewind(_m); 13590 } catch(EOFException _e) { 13591 _s.rgTextMasterStyle.removeLast(); 13592 _atend = true; 13593 in.rewind(_m); 13594 } 13595 } 13596 _m = in.setMark(); 13597 try { 13598 RecordHeader _optionCheck(&_s); 13599 parseRecordHeader(in, _optionCheck); 13600 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x423); 13601 } catch(EOFException _e) { 13602 _possiblyPresent = false; 13603 } 13604 in.rewind(_m); 13605 _m = in.setMark(); 13606 if (_possiblyPresent) { 13607 try { 13608 _s.roundTripOArtTextSTyles12Atom = QSharedPointer<RoundTripOArtTextStyles12Atom>(new RoundTripOArtTextStyles12Atom(&_s)); 13609 parseRoundTripOArtTextStyles12Atom(in, *_s.roundTripOArtTextSTyles12Atom.data()); 13610 } catch(IncorrectValueException _e) { 13611 _s.roundTripOArtTextSTyles12Atom.clear(); 13612 in.rewind(_m); 13613 } catch(EOFException _e) { 13614 _s.roundTripOArtTextSTyles12Atom.clear(); 13615 in.rewind(_m); 13616 } 13617 } 13618 _m = in.setMark(); 13619 try { 13620 RecordHeader _optionCheck(&_s); 13621 parseRecordHeader(in, _optionCheck); 13622 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x03F9)&&(_optionCheck.recLen == 0x10); 13623 } catch(EOFException _e) { 13624 _possiblyPresent = false; 13625 } 13626 in.rewind(_m); 13627 _m = in.setMark(); 13628 if (_possiblyPresent) { 13629 try { 13630 _s.slideShowInfoAtom = QSharedPointer<SlideShowSlideInfoAtom>(new SlideShowSlideInfoAtom(&_s)); 13631 parseSlideShowSlideInfoAtom(in, *_s.slideShowInfoAtom.data()); 13632 } catch(IncorrectValueException _e) { 13633 _s.slideShowInfoAtom.clear(); 13634 in.rewind(_m); 13635 } catch(EOFException _e) { 13636 _s.slideShowInfoAtom.clear(); 13637 in.rewind(_m); 13638 } 13639 } 13640 _m = in.setMark(); 13641 try { 13642 RecordHeader _optionCheck(&_s); 13643 parseRecordHeader(in, _optionCheck); 13644 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFD9); 13645 } catch(EOFException _e) { 13646 _possiblyPresent = false; 13647 } 13648 in.rewind(_m); 13649 _m = in.setMark(); 13650 if (_possiblyPresent) { 13651 try { 13652 _s.perSlideHeadersFootersContainer = QSharedPointer<PerSlideHeadersFootersContainer>(new PerSlideHeadersFootersContainer(&_s)); 13653 parsePerSlideHeadersFootersContainer(in, *_s.perSlideHeadersFootersContainer.data()); 13654 } catch(IncorrectValueException _e) { 13655 _s.perSlideHeadersFootersContainer.clear(); 13656 in.rewind(_m); 13657 } catch(EOFException _e) { 13658 _s.perSlideHeadersFootersContainer.clear(); 13659 in.rewind(_m); 13660 } 13661 } 13662 parseDrawingContainer(in, _s.drawing); 13663 parseSlideSchemeColorSchemeAtom(in, _s.slideSchemeColorSchemeAtom); 13664 _m = in.setMark(); 13665 try { 13666 RecordHeader _optionCheck(&_s); 13667 parseRecordHeader(in, _optionCheck); 13668 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 3)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2==0); 13669 } catch(EOFException _e) { 13670 _possiblyPresent = false; 13671 } 13672 in.rewind(_m); 13673 _m = in.setMark(); 13674 if (_possiblyPresent) { 13675 try { 13676 _s.slideNameAtom = QSharedPointer<SlideNameAtom>(new SlideNameAtom(&_s)); 13677 parseSlideNameAtom(in, *_s.slideNameAtom.data()); 13678 } catch(IncorrectValueException _e) { 13679 _s.slideNameAtom.clear(); 13680 in.rewind(_m); 13681 } catch(EOFException _e) { 13682 _s.slideNameAtom.clear(); 13683 in.rewind(_m); 13684 } 13685 } 13686 _m = in.setMark(); 13687 try { 13688 RecordHeader _optionCheck(&_s); 13689 parseRecordHeader(in, _optionCheck); 13690 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1388); 13691 } catch(EOFException _e) { 13692 _possiblyPresent = false; 13693 } 13694 in.rewind(_m); 13695 _m = in.setMark(); 13696 if (_possiblyPresent) { 13697 try { 13698 _s.slideProgTagsContainer = QSharedPointer<SlideProgTagsContainer>(new SlideProgTagsContainer(&_s)); 13699 parseSlideProgTagsContainer(in, *_s.slideProgTagsContainer.data()); 13700 } catch(IncorrectValueException _e) { 13701 _s.slideProgTagsContainer.clear(); 13702 in.rewind(_m); 13703 } catch(EOFException _e) { 13704 _s.slideProgTagsContainer.clear(); 13705 in.rewind(_m); 13706 } 13707 } 13708 _atend = false; 13709 while (!_atend) { 13710 _m = in.setMark(); 13711 try { 13712 _s.rgRoundTripMainMaster.append(RoundTripMainMasterRecord(&_s)); 13713 parseRoundTripMainMasterRecord(in, _s.rgRoundTripMainMaster.last()); 13714 } catch(IncorrectValueException _e) { 13715 _s.rgRoundTripMainMaster.removeLast(); 13716 _atend = true; 13717 in.rewind(_m); 13718 } catch(EOFException _e) { 13719 _s.rgRoundTripMainMaster.removeLast(); 13720 _atend = true; 13721 in.rewind(_m); 13722 } 13723 } 13724 _m = in.setMark(); 13725 try { 13726 RecordHeader _optionCheck(&_s); 13727 parseRecordHeader(in, _optionCheck); 13728 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 2)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2==0); 13729 } catch(EOFException _e) { 13730 _possiblyPresent = false; 13731 } 13732 in.rewind(_m); 13733 _m = in.setMark(); 13734 if (_possiblyPresent) { 13735 try { 13736 _s.templateNameAtom = QSharedPointer<TemplateNameAtom>(new TemplateNameAtom(&_s)); 13737 parseTemplateNameAtom(in, *_s.templateNameAtom.data()); 13738 } catch(IncorrectValueException _e) { 13739 _s.templateNameAtom.clear(); 13740 in.rewind(_m); 13741 } catch(EOFException _e) { 13742 _s.templateNameAtom.clear(); 13743 in.rewind(_m); 13744 } 13745 } 13746 _m = in.setMark(); 13747 try { 13748 RecordHeader _optionCheck(&_s); 13749 parseRecordHeader(in, _optionCheck); 13750 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1388); 13751 } catch(EOFException _e) { 13752 _possiblyPresent = false; 13753 } 13754 in.rewind(_m); 13755 _m = in.setMark(); 13756 if (_possiblyPresent) { 13757 try { 13758 _s.unknown3 = QSharedPointer<SlideProgTagsContainer>(new SlideProgTagsContainer(&_s)); 13759 parseSlideProgTagsContainer(in, *_s.unknown3.data()); 13760 } catch(IncorrectValueException _e) { 13761 _s.unknown3.clear(); 13762 in.rewind(_m); 13763 } catch(EOFException _e) { 13764 _s.unknown3.clear(); 13765 in.rewind(_m); 13766 } 13767 } 13768 } 13769 void MSO::parseSlideContainer(LEInputStream& in, SlideContainer& _s) { 13770 _s.streamOffset = in.getPosition(); 13771 LEInputStream::Mark _m; 13772 bool _possiblyPresent; 13773 bool _atend; 13774 parseRecordHeader(in, _s.rh); 13775 if (!(_s.rh.recVer == 0xF)) { 13776 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 13777 } 13778 if (!(_s.rh.recInstance == 0x0)) { 13779 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0x0"); 13780 } 13781 if (!(_s.rh.recType == 0x03EE)) { 13782 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03EE"); 13783 } 13784 parseSlideAtom(in, _s.slideAtom); 13785 _m = in.setMark(); 13786 try { 13787 RecordHeader _optionCheck(&_s); 13788 parseRecordHeader(in, _optionCheck); 13789 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x03F9)&&(_optionCheck.recLen == 0x10); 13790 } catch(EOFException _e) { 13791 _possiblyPresent = false; 13792 } 13793 in.rewind(_m); 13794 _m = in.setMark(); 13795 if (_possiblyPresent) { 13796 try { 13797 _s.slideShowSlideInfoAtom = QSharedPointer<SlideShowSlideInfoAtom>(new SlideShowSlideInfoAtom(&_s)); 13798 parseSlideShowSlideInfoAtom(in, *_s.slideShowSlideInfoAtom.data()); 13799 } catch(IncorrectValueException _e) { 13800 _s.slideShowSlideInfoAtom.clear(); 13801 in.rewind(_m); 13802 } catch(EOFException _e) { 13803 _s.slideShowSlideInfoAtom.clear(); 13804 in.rewind(_m); 13805 } 13806 } 13807 _m = in.setMark(); 13808 try { 13809 RecordHeader _optionCheck(&_s); 13810 parseRecordHeader(in, _optionCheck); 13811 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFD9); 13812 } catch(EOFException _e) { 13813 _possiblyPresent = false; 13814 } 13815 in.rewind(_m); 13816 _m = in.setMark(); 13817 if (_possiblyPresent) { 13818 try { 13819 _s.perSlideHFContainer = QSharedPointer<PerSlideHeadersFootersContainer>(new PerSlideHeadersFootersContainer(&_s)); 13820 parsePerSlideHeadersFootersContainer(in, *_s.perSlideHFContainer.data()); 13821 } catch(IncorrectValueException _e) { 13822 _s.perSlideHFContainer.clear(); 13823 in.rewind(_m); 13824 } catch(EOFException _e) { 13825 _s.perSlideHFContainer.clear(); 13826 in.rewind(_m); 13827 } 13828 } 13829 _m = in.setMark(); 13830 try { 13831 RecordHeader _optionCheck(&_s); 13832 parseRecordHeader(in, _optionCheck); 13833 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x3714); 13834 } catch(EOFException _e) { 13835 _possiblyPresent = false; 13836 } 13837 in.rewind(_m); 13838 _m = in.setMark(); 13839 if (_possiblyPresent) { 13840 try { 13841 _s.rtSlideSyncInfo12 = QSharedPointer<RoundTripSlideSyncInfo12Container>(new RoundTripSlideSyncInfo12Container(&_s)); 13842 parseRoundTripSlideSyncInfo12Container(in, *_s.rtSlideSyncInfo12.data()); 13843 } catch(IncorrectValueException _e) { 13844 _s.rtSlideSyncInfo12.clear(); 13845 in.rewind(_m); 13846 } catch(EOFException _e) { 13847 _s.rtSlideSyncInfo12.clear(); 13848 in.rewind(_m); 13849 } 13850 } 13851 parseDrawingContainer(in, _s.drawing); 13852 parseSlideSchemeColorSchemeAtom(in, _s.slideSchemeColorSchemeAtom); 13853 _m = in.setMark(); 13854 try { 13855 RecordHeader _optionCheck(&_s); 13856 parseRecordHeader(in, _optionCheck); 13857 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 3)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2==0); 13858 } catch(EOFException _e) { 13859 _possiblyPresent = false; 13860 } 13861 in.rewind(_m); 13862 _m = in.setMark(); 13863 if (_possiblyPresent) { 13864 try { 13865 _s.slideNameAtom = QSharedPointer<SlideNameAtom>(new SlideNameAtom(&_s)); 13866 parseSlideNameAtom(in, *_s.slideNameAtom.data()); 13867 } catch(IncorrectValueException _e) { 13868 _s.slideNameAtom.clear(); 13869 in.rewind(_m); 13870 } catch(EOFException _e) { 13871 _s.slideNameAtom.clear(); 13872 in.rewind(_m); 13873 } 13874 } 13875 _m = in.setMark(); 13876 try { 13877 RecordHeader _optionCheck(&_s); 13878 parseRecordHeader(in, _optionCheck); 13879 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1388); 13880 } catch(EOFException _e) { 13881 _possiblyPresent = false; 13882 } 13883 in.rewind(_m); 13884 _m = in.setMark(); 13885 if (_possiblyPresent) { 13886 try { 13887 _s.slideProgTagsContainer = QSharedPointer<SlideProgTagsContainer>(new SlideProgTagsContainer(&_s)); 13888 parseSlideProgTagsContainer(in, *_s.slideProgTagsContainer.data()); 13889 } catch(IncorrectValueException _e) { 13890 _s.slideProgTagsContainer.clear(); 13891 in.rewind(_m); 13892 } catch(EOFException _e) { 13893 _s.slideProgTagsContainer.clear(); 13894 in.rewind(_m); 13895 } 13896 } 13897 _m = in.setMark(); 13898 try { 13899 RecordHeader _optionCheck(&_s); 13900 parseRecordHeader(in, _optionCheck); 13901 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x101D); 13902 } catch(EOFException _e) { 13903 _possiblyPresent = false; 13904 } 13905 in.rewind(_m); 13906 _m = in.setMark(); 13907 if (_possiblyPresent) { 13908 try { 13909 _s.unknown = QSharedPointer<UnknownSlideContainerChild>(new UnknownSlideContainerChild(&_s)); 13910 parseUnknownSlideContainerChild(in, *_s.unknown.data()); 13911 } catch(IncorrectValueException _e) { 13912 _s.unknown.clear(); 13913 in.rewind(_m); 13914 } catch(EOFException _e) { 13915 _s.unknown.clear(); 13916 in.rewind(_m); 13917 } 13918 } 13919 _atend = false; 13920 while (!_atend) { 13921 _m = in.setMark(); 13922 try { 13923 _s.rgRoundTripSlide.append(RoundTripSlideRecord(&_s)); 13924 parseRoundTripSlideRecord(in, _s.rgRoundTripSlide.last()); 13925 } catch(IncorrectValueException _e) { 13926 _s.rgRoundTripSlide.removeLast(); 13927 _atend = true; 13928 in.rewind(_m); 13929 } catch(EOFException _e) { 13930 _s.rgRoundTripSlide.removeLast(); 13931 _atend = true; 13932 in.rewind(_m); 13933 } 13934 } 13935 _m = in.setMark(); 13936 try { 13937 RecordHeader _optionCheck(&_s); 13938 parseRecordHeader(in, _optionCheck); 13939 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x101D); 13940 } catch(EOFException _e) { 13941 _possiblyPresent = false; 13942 } 13943 in.rewind(_m); 13944 _m = in.setMark(); 13945 if (_possiblyPresent) { 13946 try { 13947 _s.unknown2 = QSharedPointer<UnknownSlideContainerChild>(new UnknownSlideContainerChild(&_s)); 13948 parseUnknownSlideContainerChild(in, *_s.unknown2.data()); 13949 } catch(IncorrectValueException _e) { 13950 _s.unknown2.clear(); 13951 in.rewind(_m); 13952 } catch(EOFException _e) { 13953 _s.unknown2.clear(); 13954 in.rewind(_m); 13955 } 13956 } 13957 } 13958 void MSO::parseNotesContainer(LEInputStream& in, NotesContainer& _s) { 13959 _s.streamOffset = in.getPosition(); 13960 LEInputStream::Mark _m; 13961 bool _possiblyPresent; 13962 bool _atend; 13963 parseRecordHeader(in, _s.rh); 13964 if (!(_s.rh.recVer == 0xF)) { 13965 throw IncorrectValueException(in.getPosition(), "_s.rh.recVer == 0xF"); 13966 } 13967 if (!(_s.rh.recInstance == 0)) { 13968 throw IncorrectValueException(in.getPosition(), "_s.rh.recInstance == 0"); 13969 } 13970 if (!(_s.rh.recType == 0x03F0)) { 13971 throw IncorrectValueException(in.getPosition(), "_s.rh.recType == 0x03F0"); 13972 } 13973 parseNotesAtom(in, _s.notesAtom); 13974 _m = in.setMark(); 13975 try { 13976 RecordHeader _optionCheck(&_s); 13977 parseRecordHeader(in, _optionCheck); 13978 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFD9); 13979 } catch(EOFException _e) { 13980 _possiblyPresent = false; 13981 } 13982 in.rewind(_m); 13983 _m = in.setMark(); 13984 if (_possiblyPresent) { 13985 try { 13986 _s.perSlideHFContainer = QSharedPointer<PerSlideHeadersFootersContainer>(new PerSlideHeadersFootersContainer(&_s)); 13987 parsePerSlideHeadersFootersContainer(in, *_s.perSlideHFContainer.data()); 13988 } catch(IncorrectValueException _e) { 13989 _s.perSlideHFContainer.clear(); 13990 in.rewind(_m); 13991 } catch(EOFException _e) { 13992 _s.perSlideHFContainer.clear(); 13993 in.rewind(_m); 13994 } 13995 } 13996 parseDrawingContainer(in, _s.drawing); 13997 parseSlideSchemeColorSchemeAtom(in, _s.slideSchemeColorSchemeAtom); 13998 _m = in.setMark(); 13999 try { 14000 RecordHeader _optionCheck(&_s); 14001 parseRecordHeader(in, _optionCheck); 14002 _possiblyPresent = (_optionCheck.recVer == 0)&&(_optionCheck.recInstance == 3)&&(_optionCheck.recType == 0x0FBA)&&(_optionCheck.recLen%2==0); 14003 } catch(EOFException _e) { 14004 _possiblyPresent = false; 14005 } 14006 in.rewind(_m); 14007 _m = in.setMark(); 14008 if (_possiblyPresent) { 14009 try { 14010 _s.slideNameAtom = QSharedPointer<SlideNameAtom>(new SlideNameAtom(&_s)); 14011 parseSlideNameAtom(in, *_s.slideNameAtom.data()); 14012 } catch(IncorrectValueException _e) { 14013 _s.slideNameAtom.clear(); 14014 in.rewind(_m); 14015 } catch(EOFException _e) { 14016 _s.slideNameAtom.clear(); 14017 in.rewind(_m); 14018 } 14019 } 14020 _m = in.setMark(); 14021 try { 14022 RecordHeader _optionCheck(&_s); 14023 parseRecordHeader(in, _optionCheck); 14024 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0x1388); 14025 } catch(EOFException _e) { 14026 _possiblyPresent = false; 14027 } 14028 in.rewind(_m); 14029 _m = in.setMark(); 14030 if (_possiblyPresent) { 14031 try { 14032 _s.slideProgTagsContainer = QSharedPointer<SlideProgTagsContainer>(new SlideProgTagsContainer(&_s)); 14033 parseSlideProgTagsContainer(in, *_s.slideProgTagsContainer.data()); 14034 } catch(IncorrectValueException _e) { 14035 _s.slideProgTagsContainer.clear(); 14036 in.rewind(_m); 14037 } catch(EOFException _e) { 14038 _s.slideProgTagsContainer.clear(); 14039 in.rewind(_m); 14040 } 14041 } 14042 _m = in.setMark(); 14043 try { 14044 RecordHeader _optionCheck(&_s); 14045 parseRecordHeader(in, _optionCheck); 14046 _possiblyPresent = (_optionCheck.recVer == 0xF)&&(_optionCheck.recInstance == 0)&&(_optionCheck.recType == 0xFD9); 14047 } catch(EOFException _e) { 14048 _possiblyPresent = false; 14049 } 14050 in.rewind(_m); 14051 _m = in.setMark(); 14052 if (_possiblyPresent) { 14053 try { 14054 _s.perSlideHFContainer2 = QSharedPointer<PerSlideHeadersFootersContainer>(new PerSlideHeadersFootersContainer(&_s)); 14055 parsePerSlideHeadersFootersContainer(in, *_s.perSlideHFContainer2.data()); 14056 } catch(IncorrectValueException _e) { 14057 _s.perSlideHFContainer2.clear(); 14058 in.rewind(_m); 14059 } catch(EOFException _e) { 14060 _s.perSlideHFContainer2.clear(); 14061 in.rewind(_m); 14062 } 14063 } 14064 _atend = false; 14065 while (!_atend) { 14066 _m = in.setMark(); 14067 try { 14068 _s.rgNotesRoundTripAtom.append(NotesRoundTripAtom(&_s)); 14069 parseNotesRoundTripAtom(in, _s.rgNotesRoundTripAtom.last()); 14070 } catch(IncorrectValueException _e) { 14071 _s.rgNotesRoundTripAtom.removeLast(); 14072 _atend = true; 14073 in.rewind(_m); 14074 } catch(EOFException _e) { 14075 _s.rgNotesRoundTripAtom.removeLast(); 14076 _atend = true; 14077 in.rewind(_m); 14078 } 14079 } 14080 } 14081 void MSO::parseMasterOrSlideContainer(LEInputStream& in, MasterOrSlideContainer& _s) { 14082 _s.streamOffset = in.getPosition(); 14083 LEInputStream::Mark _m; 14084 _m = in.setMark(); 14085 RecordHeader _choice(&_s); 14086 parseRecordHeader(in, _choice); 14087 in.rewind(_m); 14088 qint64 startPos = in.getPosition(); 14089 if (startPos == in.getPosition() && ((_choice.recType == 0x03F8))) { 14090 _s.anon = MasterOrSlideContainer::choice2788643208(new MainMasterContainer(&_s)); 14091 parseMainMasterContainer(in, *(MainMasterContainer*)_s.anon.data()); 14092 } 14093 if (startPos == in.getPosition()) { 14094 _s.anon = MasterOrSlideContainer::choice2788643208(new SlideContainer(&_s)); 14095 parseSlideContainer(in, *(SlideContainer*)_s.anon.data()); 14096 } 14097 } 14098 void MSO::parsePowerPointStruct(LEInputStream& in, PowerPointStruct& _s) { 14099 _s.streamOffset = in.getPosition(); 14100 LEInputStream::Mark _m; 14101 _m = in.setMark(); 14102 try { 14103 _s.anon = PowerPointStruct::choice394521820(new DocumentContainer(&_s)); 14104 parseDocumentContainer(in, *(DocumentContainer*)_s.anon.data()); 14105 } catch (IncorrectValueException _x) { 14106 _s.anon.clear(); 14107 in.rewind(_m); 14108 try { 14109 _s.anon = PowerPointStruct::choice394521820(new MasterOrSlideContainer(&_s)); 14110 parseMasterOrSlideContainer(in, *(MasterOrSlideContainer*)_s.anon.data()); 14111 } catch (IncorrectValueException _xx) { 14112 _s.anon.clear(); 14113 in.rewind(_m); 14114 try { 14115 _s.anon = PowerPointStruct::choice394521820(new PersistDirectoryAtom(&_s)); 14116 parsePersistDirectoryAtom(in, *(PersistDirectoryAtom*)_s.anon.data()); 14117 } catch (IncorrectValueException _xxx) { 14118 _s.anon.clear(); 14119 in.rewind(_m); 14120 try { 14121 _s.anon = PowerPointStruct::choice394521820(new NotesContainer(&_s)); 14122 parseNotesContainer(in, *(NotesContainer*)_s.anon.data()); 14123 } catch (IncorrectValueException _xxxx) { 14124 _s.anon.clear(); 14125 in.rewind(_m); 14126 try { 14127 _s.anon = PowerPointStruct::choice394521820(new HandoutContainer(&_s)); 14128 parseHandoutContainer(in, *(HandoutContainer*)_s.anon.data()); 14129 } catch (IncorrectValueException _xxxxx) { 14130 _s.anon.clear(); 14131 in.rewind(_m); 14132 try { 14133 _s.anon = PowerPointStruct::choice394521820(new SlideContainer(&_s)); 14134 parseSlideContainer(in, *(SlideContainer*)_s.anon.data()); 14135 } catch (IncorrectValueException _xxxxxx) { 14136 _s.anon.clear(); 14137 in.rewind(_m); 14138 try { 14139 _s.anon = PowerPointStruct::choice394521820(new ExOleObjStg(&_s)); 14140 parseExOleObjStg(in, *(ExOleObjStg*)_s.anon.data()); 14141 } catch (IncorrectValueException _xxxxxxx) { 14142 _s.anon.clear(); 14143 in.rewind(_m); 14144 try { 14145 _s.anon = PowerPointStruct::choice394521820(new ExControlStg(&_s)); 14146 parseExControlStg(in, *(ExControlStg*)_s.anon.data()); 14147 } catch (IncorrectValueException _xxxxxxxx) { 14148 _s.anon.clear(); 14149 in.rewind(_m); 14150 try { 14151 _s.anon = PowerPointStruct::choice394521820(new VbaProjectStg(&_s)); 14152 parseVbaProjectStg(in, *(VbaProjectStg*)_s.anon.data()); 14153 } catch (IncorrectValueException _xxxxxxxxx) { 14154 _s.anon.clear(); 14155 in.rewind(_m); 14156 _s.anon = PowerPointStruct::choice394521820(new UserEditAtom(&_s)); 14157 parseUserEditAtom(in, *(UserEditAtom*)_s.anon.data()); 14158 }}}}}}}}} 14159 }