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

FibBaseAbstractType.java 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.hwpf.model.types;
  16. import org.apache.poi.util.BitField;
  17. import org.apache.poi.util.Internal;
  18. import org.apache.poi.util.LittleEndian;
  19. /**
  20. * Base part of the File information Block (FibBase). Holds the core part of the FIB,
  21. * from the first 32 bytes.
  22. */
  23. @Internal
  24. public abstract class FibBaseAbstractType
  25. {
  26. protected int field_1_wIdent;
  27. protected int field_2_nFib;
  28. protected int field_3_unused;
  29. protected int field_4_lid;
  30. protected int field_5_pnNext;
  31. protected short field_6_flags1;
  32. /**/private static final BitField fDot = new BitField(0x0001);
  33. /**/private static final BitField fGlsy = new BitField(0x0002);
  34. /**/private static final BitField fComplex = new BitField(0x0004);
  35. /**/private static final BitField fHasPic = new BitField(0x0008);
  36. /**/private static final BitField cQuickSaves = new BitField(0x00F0);
  37. /**/private static final BitField fEncrypted = new BitField(0x0100);
  38. /**/private static final BitField fWhichTblStm = new BitField(0x0200);
  39. /**/private static final BitField fReadOnlyRecommended = new BitField(0x0400);
  40. /**/private static final BitField fWriteReservation = new BitField(0x0800);
  41. /**/private static final BitField fExtChar = new BitField(0x1000);
  42. /**/private static final BitField fLoadOverride = new BitField(0x2000);
  43. /**/private static final BitField fFarEast = new BitField(0x4000);
  44. /**/private static final BitField fObfuscated = new BitField(0x8000);
  45. protected int field_7_nFibBack;
  46. protected int field_8_lKey;
  47. @Deprecated
  48. protected byte field_9_envr;
  49. protected byte field_10_flags2;
  50. /**/private static final BitField fMac = new BitField(0x01);
  51. /**/private static final BitField fEmptySpecial = new BitField(0x02);
  52. /**/private static final BitField fLoadOverridePage = new BitField(0x04);
  53. /**/private static final BitField reserved1 = new BitField(0x08);
  54. /**/private static final BitField reserved2 = new BitField(0x10);
  55. /**/private static final BitField fSpare0 = new BitField(0xFE);
  56. @Deprecated
  57. protected short field_11_Chs;
  58. @Deprecated
  59. protected short field_12_chsTables;
  60. @Deprecated
  61. protected int field_13_fcMin;
  62. @Deprecated
  63. protected int field_14_fcMac;
  64. protected FibBaseAbstractType()
  65. {
  66. }
  67. protected void fillFields( byte[] data, int offset )
  68. {
  69. field_1_wIdent = LittleEndian.getShort( data, 0x0 + offset );
  70. field_2_nFib = LittleEndian.getShort( data, 0x2 + offset );
  71. field_3_unused = LittleEndian.getShort( data, 0x4 + offset );
  72. field_4_lid = LittleEndian.getShort( data, 0x6 + offset );
  73. field_5_pnNext = LittleEndian.getShort( data, 0x8 + offset );
  74. field_6_flags1 = LittleEndian.getShort( data, 0xa + offset );
  75. field_7_nFibBack = LittleEndian.getShort( data, 0xc + offset );
  76. field_8_lKey = LittleEndian.getInt( data, 0xe + offset );
  77. field_9_envr = data[ 0x12 + offset ];
  78. field_10_flags2 = data[ 0x13 + offset ];
  79. field_11_Chs = LittleEndian.getShort( data, 0x14 + offset );
  80. field_12_chsTables = LittleEndian.getShort( data, 0x16 + offset );
  81. field_13_fcMin = LittleEndian.getInt( data, 0x18 + offset );
  82. field_14_fcMac = LittleEndian.getInt( data, 0x1c + offset );
  83. }
  84. public void serialize( byte[] data, int offset )
  85. {
  86. LittleEndian.putUShort( data, 0x0 + offset, field_1_wIdent );
  87. LittleEndian.putUShort( data, 0x2 + offset, field_2_nFib );
  88. LittleEndian.putUShort( data, 0x4 + offset, field_3_unused );
  89. LittleEndian.putUShort( data, 0x6 + offset, field_4_lid );
  90. LittleEndian.putUShort( data, 0x8 + offset, field_5_pnNext );
  91. LittleEndian.putShort( data, 0xa + offset, field_6_flags1 );
  92. LittleEndian.putUShort( data, 0xc + offset, field_7_nFibBack );
  93. LittleEndian.putInt( data, 0xe + offset, field_8_lKey );
  94. data[ 0x12 + offset ] = field_9_envr;
  95. data[ 0x13 + offset ] = field_10_flags2;
  96. LittleEndian.putShort( data, 0x14 + offset, field_11_Chs );
  97. LittleEndian.putShort( data, 0x16 + offset, field_12_chsTables );
  98. LittleEndian.putInt( data, 0x18 + offset, field_13_fcMin );
  99. LittleEndian.putInt( data, 0x1c + offset, field_14_fcMac );
  100. }
  101. public byte[] serialize()
  102. {
  103. final byte[] result = new byte[ getSize() ];
  104. serialize( result, 0 );
  105. return result;
  106. }
  107. /**
  108. * Size of record
  109. */
  110. public static int getSize()
  111. {
  112. return 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 1 + 1 + 2 + 2 + 4 + 4;
  113. }
  114. public String toString()
  115. {
  116. StringBuilder builder = new StringBuilder();
  117. builder.append("[FibBase]\n");
  118. builder.append(" .wIdent = ");
  119. builder.append(" (").append(getWIdent()).append(" )\n");
  120. builder.append(" .nFib = ");
  121. builder.append(" (").append(getNFib()).append(" )\n");
  122. builder.append(" .unused = ");
  123. builder.append(" (").append(getUnused()).append(" )\n");
  124. builder.append(" .lid = ");
  125. builder.append(" (").append(getLid()).append(" )\n");
  126. builder.append(" .pnNext = ");
  127. builder.append(" (").append(getPnNext()).append(" )\n");
  128. builder.append(" .flags1 = ");
  129. builder.append(" (").append(getFlags1()).append(" )\n");
  130. builder.append(" .fDot = ").append(isFDot()).append('\n');
  131. builder.append(" .fGlsy = ").append(isFGlsy()).append('\n');
  132. builder.append(" .fComplex = ").append(isFComplex()).append('\n');
  133. builder.append(" .fHasPic = ").append(isFHasPic()).append('\n');
  134. builder.append(" .cQuickSaves = ").append(getCQuickSaves()).append('\n');
  135. builder.append(" .fEncrypted = ").append(isFEncrypted()).append('\n');
  136. builder.append(" .fWhichTblStm = ").append(isFWhichTblStm()).append('\n');
  137. builder.append(" .fReadOnlyRecommended = ").append(isFReadOnlyRecommended()).append('\n');
  138. builder.append(" .fWriteReservation = ").append(isFWriteReservation()).append('\n');
  139. builder.append(" .fExtChar = ").append(isFExtChar()).append('\n');
  140. builder.append(" .fLoadOverride = ").append(isFLoadOverride()).append('\n');
  141. builder.append(" .fFarEast = ").append(isFFarEast()).append('\n');
  142. builder.append(" .fObfuscated = ").append(isFObfuscated()).append('\n');
  143. builder.append(" .nFibBack = ");
  144. builder.append(" (").append(getNFibBack()).append(" )\n");
  145. builder.append(" .lKey = ");
  146. builder.append(" (").append(getLKey()).append(" )\n");
  147. builder.append(" .envr = ");
  148. builder.append(" (").append(getEnvr()).append(" )\n");
  149. builder.append(" .flags2 = ");
  150. builder.append(" (").append(getFlags2()).append(" )\n");
  151. builder.append(" .fMac = ").append(isFMac()).append('\n');
  152. builder.append(" .fEmptySpecial = ").append(isFEmptySpecial()).append('\n');
  153. builder.append(" .fLoadOverridePage = ").append(isFLoadOverridePage()).append('\n');
  154. builder.append(" .reserved1 = ").append(isReserved1()).append('\n');
  155. builder.append(" .reserved2 = ").append(isReserved2()).append('\n');
  156. builder.append(" .fSpare0 = ").append(getFSpare0()).append('\n');
  157. builder.append(" .Chs = ");
  158. builder.append(" (").append(getChs()).append(" )\n");
  159. builder.append(" .chsTables = ");
  160. builder.append(" (").append(getChsTables()).append(" )\n");
  161. builder.append(" .fcMin = ");
  162. builder.append(" (").append(getFcMin()).append(" )\n");
  163. builder.append(" .fcMac = ");
  164. builder.append(" (").append(getFcMac()).append(" )\n");
  165. builder.append("[/FibBase]\n");
  166. return builder.toString();
  167. }
  168. /**
  169. * An unsigned integer that specifies that this is a Word Binary File. This value MUST be 0xA5EC.
  170. */
  171. @Internal
  172. public int getWIdent()
  173. {
  174. return field_1_wIdent;
  175. }
  176. /**
  177. * An unsigned integer that specifies that this is a Word Binary File. This value MUST be 0xA5EC.
  178. */
  179. @Internal
  180. public void setWIdent( int field_1_wIdent )
  181. {
  182. this.field_1_wIdent = field_1_wIdent;
  183. }
  184. /**
  185. * An unsigned integer that specifies the version number of the file format used. Superseded by FibRgCswNew.nFibNew if it is present. This value SHOULD be 0x00C1.
  186. */
  187. @Internal
  188. public int getNFib()
  189. {
  190. return field_2_nFib;
  191. }
  192. /**
  193. * An unsigned integer that specifies the version number of the file format used. Superseded by FibRgCswNew.nFibNew if it is present. This value SHOULD be 0x00C1.
  194. */
  195. @Internal
  196. public void setNFib( int field_2_nFib )
  197. {
  198. this.field_2_nFib = field_2_nFib;
  199. }
  200. /**
  201. * This value is undefined and MUST be ignored.
  202. */
  203. @Internal
  204. public int getUnused()
  205. {
  206. return field_3_unused;
  207. }
  208. /**
  209. * This value is undefined and MUST be ignored.
  210. */
  211. @Internal
  212. public void setUnused( int field_3_unused )
  213. {
  214. this.field_3_unused = field_3_unused;
  215. }
  216. /**
  217. * A LID that specifies the install language of the application that is producing the document. If nFib is 0x00D9 or greater, then any East Asian install lid or any install lid with a base language of Spanish, German or French MUST be recorded as lidAmerican. If the nFib is 0x0101 or greater, then any install lid with a base language of Vietnamese, Thai, or Hindi MUST be recorded as lidAmerican..
  218. */
  219. @Internal
  220. public int getLid()
  221. {
  222. return field_4_lid;
  223. }
  224. /**
  225. * A LID that specifies the install language of the application that is producing the document. If nFib is 0x00D9 or greater, then any East Asian install lid or any install lid with a base language of Spanish, German or French MUST be recorded as lidAmerican. If the nFib is 0x0101 or greater, then any install lid with a base language of Vietnamese, Thai, or Hindi MUST be recorded as lidAmerican..
  226. */
  227. @Internal
  228. public void setLid( int field_4_lid )
  229. {
  230. this.field_4_lid = field_4_lid;
  231. }
  232. /**
  233. * An unsigned integer that specifies the offset in the WordDocument stream of the FIB for the document which contains all the AutoText items.
  234. */
  235. @Internal
  236. public int getPnNext()
  237. {
  238. return field_5_pnNext;
  239. }
  240. /**
  241. * An unsigned integer that specifies the offset in the WordDocument stream of the FIB for the document which contains all the AutoText items.
  242. */
  243. @Internal
  244. public void setPnNext( int field_5_pnNext )
  245. {
  246. this.field_5_pnNext = field_5_pnNext;
  247. }
  248. /**
  249. * Get the flags1 field for the FibBase record.
  250. */
  251. @Internal
  252. public short getFlags1()
  253. {
  254. return field_6_flags1;
  255. }
  256. /**
  257. * Set the flags1 field for the FibBase record.
  258. */
  259. @Internal
  260. public void setFlags1( short field_6_flags1 )
  261. {
  262. this.field_6_flags1 = field_6_flags1;
  263. }
  264. /**
  265. * This value SHOULD be 0x00BF. This value MUST be 0x00BF or 0x00C1.
  266. */
  267. @Internal
  268. public int getNFibBack()
  269. {
  270. return field_7_nFibBack;
  271. }
  272. /**
  273. * This value SHOULD be 0x00BF. This value MUST be 0x00BF or 0x00C1.
  274. */
  275. @Internal
  276. public void setNFibBack( int field_7_nFibBack )
  277. {
  278. this.field_7_nFibBack = field_7_nFibBack;
  279. }
  280. /**
  281. * If fEncryption is 1 and fObfuscation is 1, this value specifies the XOR obfuscation password verifier. If fEncryption is 1 and fObfuscation is 0, this value specifies the size of the EncryptionHeader that is stored at the beginning of the Table stream as described in Encryption and Obfuscation. Otherwise, this value MUST be 0.
  282. */
  283. @Internal
  284. public int getLKey()
  285. {
  286. return field_8_lKey;
  287. }
  288. /**
  289. * If fEncryption is 1 and fObfuscation is 1, this value specifies the XOR obfuscation password verifier. If fEncryption is 1 and fObfuscation is 0, this value specifies the size of the EncryptionHeader that is stored at the beginning of the Table stream as described in Encryption and Obfuscation. Otherwise, this value MUST be 0.
  290. */
  291. @Internal
  292. public void setLKey( int field_8_lKey )
  293. {
  294. this.field_8_lKey = field_8_lKey;
  295. }
  296. /**
  297. * This value MUST be 0, and MUST be ignored.
  298. */
  299. @Internal
  300. public byte getEnvr()
  301. {
  302. return field_9_envr;
  303. }
  304. /**
  305. * This value MUST be 0, and MUST be ignored.
  306. */
  307. @Internal
  308. public void setEnvr( byte field_9_envr )
  309. {
  310. this.field_9_envr = field_9_envr;
  311. }
  312. /**
  313. * Get the flags2 field for the FibBase record.
  314. */
  315. @Internal
  316. public byte getFlags2()
  317. {
  318. return field_10_flags2;
  319. }
  320. /**
  321. * Set the flags2 field for the FibBase record.
  322. */
  323. @Internal
  324. public void setFlags2( byte field_10_flags2 )
  325. {
  326. this.field_10_flags2 = field_10_flags2;
  327. }
  328. /**
  329. * This value MUST be 0 and MUST be ignored.
  330. */
  331. @Internal
  332. public short getChs()
  333. {
  334. return field_11_Chs;
  335. }
  336. /**
  337. * This value MUST be 0 and MUST be ignored.
  338. */
  339. @Internal
  340. public void setChs( short field_11_Chs )
  341. {
  342. this.field_11_Chs = field_11_Chs;
  343. }
  344. /**
  345. * This value MUST be 0 and MUST be ignored.
  346. */
  347. @Internal
  348. public short getChsTables()
  349. {
  350. return field_12_chsTables;
  351. }
  352. /**
  353. * This value MUST be 0 and MUST be ignored.
  354. */
  355. @Internal
  356. public void setChsTables( short field_12_chsTables )
  357. {
  358. this.field_12_chsTables = field_12_chsTables;
  359. }
  360. /**
  361. * This value is undefined and MUST be ignored.
  362. */
  363. @Internal
  364. public int getFcMin()
  365. {
  366. return field_13_fcMin;
  367. }
  368. /**
  369. * This value is undefined and MUST be ignored.
  370. */
  371. @Internal
  372. public void setFcMin( int field_13_fcMin )
  373. {
  374. this.field_13_fcMin = field_13_fcMin;
  375. }
  376. /**
  377. * This value is undefined and MUST be ignored.
  378. */
  379. @Internal
  380. public int getFcMac()
  381. {
  382. return field_14_fcMac;
  383. }
  384. /**
  385. * This value is undefined and MUST be ignored.
  386. */
  387. @Internal
  388. public void setFcMac( int field_14_fcMac )
  389. {
  390. this.field_14_fcMac = field_14_fcMac;
  391. }
  392. /**
  393. * Sets the fDot field value.
  394. * Specifies whether this is a document template
  395. */
  396. @Internal
  397. public void setFDot( boolean value )
  398. {
  399. field_6_flags1 = (short)fDot.setBoolean(field_6_flags1, value);
  400. }
  401. /**
  402. * Specifies whether this is a document template
  403. * @return the fDot field value.
  404. */
  405. @Internal
  406. public boolean isFDot()
  407. {
  408. return fDot.isSet(field_6_flags1);
  409. }
  410. /**
  411. * Sets the fGlsy field value.
  412. * Specifies whether this is a document that contains only AutoText items
  413. */
  414. @Internal
  415. public void setFGlsy( boolean value )
  416. {
  417. field_6_flags1 = (short)fGlsy.setBoolean(field_6_flags1, value);
  418. }
  419. /**
  420. * Specifies whether this is a document that contains only AutoText items
  421. * @return the fGlsy field value.
  422. */
  423. @Internal
  424. public boolean isFGlsy()
  425. {
  426. return fGlsy.isSet(field_6_flags1);
  427. }
  428. /**
  429. * Sets the fComplex field value.
  430. * Specifies that the last save operation that was performed on this document was an incremental save operation
  431. */
  432. @Internal
  433. public void setFComplex( boolean value )
  434. {
  435. field_6_flags1 = (short)fComplex.setBoolean(field_6_flags1, value);
  436. }
  437. /**
  438. * Specifies that the last save operation that was performed on this document was an incremental save operation
  439. * @return the fComplex field value.
  440. */
  441. @Internal
  442. public boolean isFComplex()
  443. {
  444. return fComplex.isSet(field_6_flags1);
  445. }
  446. /**
  447. * Sets the fHasPic field value.
  448. * When set to 0, there SHOULD be no pictures in the document
  449. */
  450. @Internal
  451. public void setFHasPic( boolean value )
  452. {
  453. field_6_flags1 = (short)fHasPic.setBoolean(field_6_flags1, value);
  454. }
  455. /**
  456. * When set to 0, there SHOULD be no pictures in the document
  457. * @return the fHasPic field value.
  458. */
  459. @Internal
  460. public boolean isFHasPic()
  461. {
  462. return fHasPic.isSet(field_6_flags1);
  463. }
  464. /**
  465. * Sets the cQuickSaves field value.
  466. * An unsigned integer. If nFib is less than 0x00D9, then cQuickSaves specifies the number of consecutive times this document was incrementally saved. If nFib is 0x00D9 or greater, then cQuickSaves MUST be 0xF
  467. */
  468. @Internal
  469. public void setCQuickSaves( byte value )
  470. {
  471. field_6_flags1 = (short)cQuickSaves.setValue(field_6_flags1, value);
  472. }
  473. /**
  474. * An unsigned integer. If nFib is less than 0x00D9, then cQuickSaves specifies the number of consecutive times this document was incrementally saved. If nFib is 0x00D9 or greater, then cQuickSaves MUST be 0xF
  475. * @return the cQuickSaves field value.
  476. */
  477. @Internal
  478. public byte getCQuickSaves()
  479. {
  480. return ( byte )cQuickSaves.getValue(field_6_flags1);
  481. }
  482. /**
  483. * Sets the fEncrypted field value.
  484. * Specifies whether the document is encrypted or obfuscated as specified in Encryption and Obfuscation
  485. */
  486. @Internal
  487. public void setFEncrypted( boolean value )
  488. {
  489. field_6_flags1 = (short)fEncrypted.setBoolean(field_6_flags1, value);
  490. }
  491. /**
  492. * Specifies whether the document is encrypted or obfuscated as specified in Encryption and Obfuscation
  493. * @return the fEncrypted field value.
  494. */
  495. @Internal
  496. public boolean isFEncrypted()
  497. {
  498. return fEncrypted.isSet(field_6_flags1);
  499. }
  500. /**
  501. * Sets the fWhichTblStm field value.
  502. * Specifies the Table stream to which the FIB refers. When this value is set to 1, use 1Table; when this value is set to 0, use 0Table.
  503. */
  504. @Internal
  505. public void setFWhichTblStm( boolean value )
  506. {
  507. field_6_flags1 = (short)fWhichTblStm.setBoolean(field_6_flags1, value);
  508. }
  509. /**
  510. * Specifies the Table stream to which the FIB refers. When this value is set to 1, use 1Table; when this value is set to 0, use 0Table.
  511. * @return the fWhichTblStm field value.
  512. */
  513. @Internal
  514. public boolean isFWhichTblStm()
  515. {
  516. return fWhichTblStm.isSet(field_6_flags1);
  517. }
  518. /**
  519. * Sets the fReadOnlyRecommended field value.
  520. * Specifies whether the document author recommended that the document be opened in read-only mode
  521. */
  522. @Internal
  523. public void setFReadOnlyRecommended( boolean value )
  524. {
  525. field_6_flags1 = (short)fReadOnlyRecommended.setBoolean(field_6_flags1, value);
  526. }
  527. /**
  528. * Specifies whether the document author recommended that the document be opened in read-only mode
  529. * @return the fReadOnlyRecommended field value.
  530. */
  531. @Internal
  532. public boolean isFReadOnlyRecommended()
  533. {
  534. return fReadOnlyRecommended.isSet(field_6_flags1);
  535. }
  536. /**
  537. * Sets the fWriteReservation field value.
  538. * Specifies whether the document has a write-reservation password
  539. */
  540. @Internal
  541. public void setFWriteReservation( boolean value )
  542. {
  543. field_6_flags1 = (short)fWriteReservation.setBoolean(field_6_flags1, value);
  544. }
  545. /**
  546. * Specifies whether the document has a write-reservation password
  547. * @return the fWriteReservation field value.
  548. */
  549. @Internal
  550. public boolean isFWriteReservation()
  551. {
  552. return fWriteReservation.isSet(field_6_flags1);
  553. }
  554. /**
  555. * Sets the fExtChar field value.
  556. * This value MUST be 1
  557. */
  558. @Internal
  559. public void setFExtChar( boolean value )
  560. {
  561. field_6_flags1 = (short)fExtChar.setBoolean(field_6_flags1, value);
  562. }
  563. /**
  564. * This value MUST be 1
  565. * @return the fExtChar field value.
  566. */
  567. @Internal
  568. public boolean isFExtChar()
  569. {
  570. return fExtChar.isSet(field_6_flags1);
  571. }
  572. /**
  573. * Sets the fLoadOverride field value.
  574. * Specifies whether to override the language information and font that are specified in the paragraph style at istd 0 (the normal style) with the defaults that are appropriate for the installation language of the application
  575. */
  576. @Internal
  577. public void setFLoadOverride( boolean value )
  578. {
  579. field_6_flags1 = (short)fLoadOverride.setBoolean(field_6_flags1, value);
  580. }
  581. /**
  582. * Specifies whether to override the language information and font that are specified in the paragraph style at istd 0 (the normal style) with the defaults that are appropriate for the installation language of the application
  583. * @return the fLoadOverride field value.
  584. */
  585. @Internal
  586. public boolean isFLoadOverride()
  587. {
  588. return fLoadOverride.isSet(field_6_flags1);
  589. }
  590. /**
  591. * Sets the fFarEast field value.
  592. * Specifies whether the installation language of the application that created the document was an East Asian language
  593. */
  594. @Internal
  595. public void setFFarEast( boolean value )
  596. {
  597. field_6_flags1 = (short)fFarEast.setBoolean(field_6_flags1, value);
  598. }
  599. /**
  600. * Specifies whether the installation language of the application that created the document was an East Asian language
  601. * @return the fFarEast field value.
  602. */
  603. @Internal
  604. public boolean isFFarEast()
  605. {
  606. return fFarEast.isSet(field_6_flags1);
  607. }
  608. /**
  609. * Sets the fObfuscated field value.
  610. * If fEncrypted is 1, this bit specifies whether the document is obfuscated by using XOR obfuscation; otherwise, this bit MUST be ignored
  611. */
  612. @Internal
  613. public void setFObfuscated( boolean value )
  614. {
  615. field_6_flags1 = (short)fObfuscated.setBoolean(field_6_flags1, value);
  616. }
  617. /**
  618. * If fEncrypted is 1, this bit specifies whether the document is obfuscated by using XOR obfuscation; otherwise, this bit MUST be ignored
  619. * @return the fObfuscated field value.
  620. */
  621. @Internal
  622. public boolean isFObfuscated()
  623. {
  624. return fObfuscated.isSet(field_6_flags1);
  625. }
  626. /**
  627. * Sets the fMac field value.
  628. * This value MUST be 0, and MUST be ignored
  629. */
  630. @Internal
  631. public void setFMac( boolean value )
  632. {
  633. field_10_flags2 = (byte)fMac.setBoolean(field_10_flags2, value);
  634. }
  635. /**
  636. * This value MUST be 0, and MUST be ignored
  637. * @return the fMac field value.
  638. * @deprecated This field should not be used according to specification
  639. */
  640. @Internal
  641. @Deprecated
  642. public boolean isFMac()
  643. {
  644. return fMac.isSet(field_10_flags2);
  645. }
  646. /**
  647. * Sets the fEmptySpecial field value.
  648. * This value SHOULD be 0 and SHOULD be ignored
  649. */
  650. @Internal
  651. public void setFEmptySpecial( boolean value )
  652. {
  653. field_10_flags2 = (byte)fEmptySpecial.setBoolean(field_10_flags2, value);
  654. }
  655. /**
  656. * This value SHOULD be 0 and SHOULD be ignored
  657. * @return the fEmptySpecial field value.
  658. * @deprecated This field should not be used according to specification
  659. */
  660. @Internal
  661. @Deprecated
  662. public boolean isFEmptySpecial()
  663. {
  664. return fEmptySpecial.isSet(field_10_flags2);
  665. }
  666. /**
  667. * Sets the fLoadOverridePage field value.
  668. * Specifies whether to override the section properties for page size, orientation, and margins with the defaults that are appropriate for the installation language of the application
  669. */
  670. @Internal
  671. public void setFLoadOverridePage( boolean value )
  672. {
  673. field_10_flags2 = (byte)fLoadOverridePage.setBoolean(field_10_flags2, value);
  674. }
  675. /**
  676. * Specifies whether to override the section properties for page size, orientation, and margins with the defaults that are appropriate for the installation language of the application
  677. * @return the fLoadOverridePage field value.
  678. */
  679. @Internal
  680. public boolean isFLoadOverridePage()
  681. {
  682. return fLoadOverridePage.isSet(field_10_flags2);
  683. }
  684. /**
  685. * Sets the reserved1 field value.
  686. * This value is undefined and MUST be ignored
  687. */
  688. @Internal
  689. public void setReserved1( boolean value )
  690. {
  691. field_10_flags2 = (byte)reserved1.setBoolean(field_10_flags2, value);
  692. }
  693. /**
  694. * This value is undefined and MUST be ignored
  695. * @return the reserved1 field value.
  696. * @deprecated This field should not be used according to specification
  697. */
  698. @Internal
  699. @Deprecated
  700. public boolean isReserved1()
  701. {
  702. return reserved1.isSet(field_10_flags2);
  703. }
  704. /**
  705. * Sets the reserved2 field value.
  706. * This value is undefined and MUST be ignored
  707. */
  708. @Internal
  709. public void setReserved2( boolean value )
  710. {
  711. field_10_flags2 = (byte)reserved2.setBoolean(field_10_flags2, value);
  712. }
  713. /**
  714. * This value is undefined and MUST be ignored
  715. * @return the reserved2 field value.
  716. * @deprecated This field should not be used according to specification
  717. */
  718. @Internal
  719. @Deprecated
  720. public boolean isReserved2()
  721. {
  722. return reserved2.isSet(field_10_flags2);
  723. }
  724. /**
  725. * Sets the fSpare0 field value.
  726. * This value is undefined and MUST be ignored
  727. */
  728. @Internal
  729. public void setFSpare0( byte value )
  730. {
  731. field_10_flags2 = (byte)fSpare0.setValue(field_10_flags2, value);
  732. }
  733. /**
  734. * This value is undefined and MUST be ignored
  735. * @return the fSpare0 field value.
  736. * @deprecated This field should not be used according to specification
  737. */
  738. @Internal
  739. @Deprecated
  740. public byte getFSpare0()
  741. {
  742. return ( byte )fSpare0.getValue(field_10_flags2);
  743. }
  744. } // END OF CLASS