您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

TCAbstractType.java 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  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.hwpf.usermodel.BorderCode;
  17. import org.apache.poi.hwpf.usermodel.ShadingDescriptor;
  18. import org.apache.poi.util.BitField;
  19. import org.apache.poi.util.Internal;
  20. /**
  21. * Table Cell Descriptor.
  22. */
  23. @Internal
  24. public abstract class TCAbstractType {
  25. private static final BitField fFirstMerged = new BitField(0x0001);
  26. private static final BitField fMerged = new BitField(0x0002);
  27. private static final BitField fVertical = new BitField(0x0004);
  28. private static final BitField fBackward = new BitField(0x0008);
  29. private static final BitField fRotateFont = new BitField(0x0010);
  30. private static final BitField fVertMerge = new BitField(0x0020);
  31. private static final BitField fVertRestart = new BitField(0x0040);
  32. private static final BitField vertAlign = new BitField(0x0180);
  33. private static final BitField ftsWidth = new BitField(0x0E00);
  34. private static final BitField fFitText = new BitField(0x1000);
  35. private static final BitField fNoWrap = new BitField(0x2000);
  36. private static final BitField fUnused = new BitField(0xC000);
  37. protected short field_1_rgf;
  38. protected short field_2_wWidth;
  39. protected ShadingDescriptor field_3_shd;
  40. protected short field_4_wCellPaddingLeft;
  41. protected short field_5_wCellPaddingTop;
  42. protected short field_6_wCellPaddingBottom;
  43. protected short field_7_wCellPaddingRight;
  44. protected byte field_8_ftsCellPaddingLeft;
  45. protected byte field_9_ftsCellPaddingTop;
  46. protected byte field_10_ftsCellPaddingBottom;
  47. protected byte field_11_ftsCellPaddingRight;
  48. protected short field_12_wCellSpacingLeft;
  49. protected short field_13_wCellSpacingTop;
  50. protected short field_14_wCellSpacingBottom;
  51. protected short field_15_wCellSpacingRight;
  52. protected byte field_16_ftsCellSpacingLeft;
  53. protected byte field_17_ftsCellSpacingTop;
  54. protected byte field_18_ftsCellSpacingBottom;
  55. protected byte field_19_ftsCellSpacingRight;
  56. protected BorderCode field_20_brcTop;
  57. protected BorderCode field_21_brcLeft;
  58. protected BorderCode field_22_brcBottom;
  59. protected BorderCode field_23_brcRight;
  60. protected TCAbstractType() {
  61. this.field_3_shd = new ShadingDescriptor();
  62. this.field_20_brcTop = new BorderCode();
  63. this.field_21_brcLeft = new BorderCode();
  64. this.field_22_brcBottom = new BorderCode();
  65. this.field_23_brcRight = new BorderCode();
  66. }
  67. protected TCAbstractType(TCAbstractType other) {
  68. field_1_rgf = other.field_1_rgf;
  69. field_2_wWidth = other.field_2_wWidth;
  70. field_3_shd = (other.field_3_shd == null) ? null : other.field_3_shd.copy();
  71. field_4_wCellPaddingLeft = other.field_4_wCellPaddingLeft;
  72. field_5_wCellPaddingTop = other.field_5_wCellPaddingTop;
  73. field_6_wCellPaddingBottom = other.field_6_wCellPaddingBottom;
  74. field_7_wCellPaddingRight = other.field_7_wCellPaddingRight;
  75. field_8_ftsCellPaddingLeft = other.field_8_ftsCellPaddingLeft;
  76. field_9_ftsCellPaddingTop = other.field_9_ftsCellPaddingTop;
  77. field_10_ftsCellPaddingBottom = other.field_10_ftsCellPaddingBottom;
  78. field_11_ftsCellPaddingRight = other.field_11_ftsCellPaddingRight;
  79. field_12_wCellSpacingLeft = other.field_12_wCellSpacingLeft;
  80. field_13_wCellSpacingTop = other.field_13_wCellSpacingTop;
  81. field_14_wCellSpacingBottom = other.field_14_wCellSpacingBottom;
  82. field_15_wCellSpacingRight = other.field_15_wCellSpacingRight;
  83. field_16_ftsCellSpacingLeft = other.field_16_ftsCellSpacingLeft;
  84. field_17_ftsCellSpacingTop = other.field_17_ftsCellSpacingTop;
  85. field_18_ftsCellSpacingBottom = other.field_18_ftsCellSpacingBottom;
  86. field_19_ftsCellSpacingRight = other.field_19_ftsCellSpacingRight;
  87. field_20_brcTop = (other.field_20_brcTop == null) ? null : other.field_20_brcTop.copy();
  88. field_21_brcLeft = (other.field_21_brcLeft == null) ? null : other.field_21_brcLeft.copy();
  89. field_22_brcBottom = (other.field_22_brcBottom == null) ? null : other.field_22_brcBottom.copy();
  90. field_23_brcRight = (other.field_23_brcRight == null) ? null : other.field_23_brcRight.copy();
  91. }
  92. public String toString()
  93. {
  94. StringBuilder builder = new StringBuilder();
  95. builder.append("[TC]\n");
  96. builder.append(" .rgf = ");
  97. builder.append(" (").append(getRgf()).append(" )\n");
  98. builder.append(" .fFirstMerged = ").append(isFFirstMerged()).append('\n');
  99. builder.append(" .fMerged = ").append(isFMerged()).append('\n');
  100. builder.append(" .fVertical = ").append(isFVertical()).append('\n');
  101. builder.append(" .fBackward = ").append(isFBackward()).append('\n');
  102. builder.append(" .fRotateFont = ").append(isFRotateFont()).append('\n');
  103. builder.append(" .fVertMerge = ").append(isFVertMerge()).append('\n');
  104. builder.append(" .fVertRestart = ").append(isFVertRestart()).append('\n');
  105. builder.append(" .vertAlign = ").append(getVertAlign()).append('\n');
  106. builder.append(" .ftsWidth = ").append(getFtsWidth()).append('\n');
  107. builder.append(" .fFitText = ").append(isFFitText()).append('\n');
  108. builder.append(" .fNoWrap = ").append(isFNoWrap()).append('\n');
  109. builder.append(" .fUnused = ").append(getFUnused()).append('\n');
  110. builder.append(" .wWidth = ");
  111. builder.append(" (").append(getWWidth()).append(" )\n");
  112. builder.append(" .shd = ");
  113. builder.append(" (").append(getShd()).append(" )\n");
  114. builder.append(" .wCellPaddingLeft = ");
  115. builder.append(" (").append(getWCellPaddingLeft()).append(" )\n");
  116. builder.append(" .wCellPaddingTop = ");
  117. builder.append(" (").append(getWCellPaddingTop()).append(" )\n");
  118. builder.append(" .wCellPaddingBottom = ");
  119. builder.append(" (").append(getWCellPaddingBottom()).append(" )\n");
  120. builder.append(" .wCellPaddingRight = ");
  121. builder.append(" (").append(getWCellPaddingRight()).append(" )\n");
  122. builder.append(" .ftsCellPaddingLeft = ");
  123. builder.append(" (").append(getFtsCellPaddingLeft()).append(" )\n");
  124. builder.append(" .ftsCellPaddingTop = ");
  125. builder.append(" (").append(getFtsCellPaddingTop()).append(" )\n");
  126. builder.append(" .ftsCellPaddingBottom = ");
  127. builder.append(" (").append(getFtsCellPaddingBottom()).append(" )\n");
  128. builder.append(" .ftsCellPaddingRight = ");
  129. builder.append(" (").append(getFtsCellPaddingRight()).append(" )\n");
  130. builder.append(" .wCellSpacingLeft = ");
  131. builder.append(" (").append(getWCellSpacingLeft()).append(" )\n");
  132. builder.append(" .wCellSpacingTop = ");
  133. builder.append(" (").append(getWCellSpacingTop()).append(" )\n");
  134. builder.append(" .wCellSpacingBottom = ");
  135. builder.append(" (").append(getWCellSpacingBottom()).append(" )\n");
  136. builder.append(" .wCellSpacingRight = ");
  137. builder.append(" (").append(getWCellSpacingRight()).append(" )\n");
  138. builder.append(" .ftsCellSpacingLeft = ");
  139. builder.append(" (").append(getFtsCellSpacingLeft()).append(" )\n");
  140. builder.append(" .ftsCellSpacingTop = ");
  141. builder.append(" (").append(getFtsCellSpacingTop()).append(" )\n");
  142. builder.append(" .ftsCellSpacingBottom = ");
  143. builder.append(" (").append(getFtsCellSpacingBottom()).append(" )\n");
  144. builder.append(" .ftsCellSpacingRight = ");
  145. builder.append(" (").append(getFtsCellSpacingRight()).append(" )\n");
  146. builder.append(" .brcTop = ");
  147. builder.append(" (").append(getBrcTop()).append(" )\n");
  148. builder.append(" .brcLeft = ");
  149. builder.append(" (").append(getBrcLeft()).append(" )\n");
  150. builder.append(" .brcBottom = ");
  151. builder.append(" (").append(getBrcBottom()).append(" )\n");
  152. builder.append(" .brcRight = ");
  153. builder.append(" (").append(getBrcRight()).append(" )\n");
  154. builder.append("[/TC]\n");
  155. return builder.toString();
  156. }
  157. /**
  158. * Get the rgf field for the TC record.
  159. */
  160. @Internal
  161. public short getRgf()
  162. {
  163. return field_1_rgf;
  164. }
  165. /**
  166. * Set the rgf field for the TC record.
  167. */
  168. @Internal
  169. public void setRgf( short field_1_rgf )
  170. {
  171. this.field_1_rgf = field_1_rgf;
  172. }
  173. /**
  174. * Preferred cell width.
  175. */
  176. @Internal
  177. public short getWWidth()
  178. {
  179. return field_2_wWidth;
  180. }
  181. /**
  182. * Preferred cell width.
  183. */
  184. @Internal
  185. public void setWWidth( short field_2_wWidth )
  186. {
  187. this.field_2_wWidth = field_2_wWidth;
  188. }
  189. /**
  190. * Cell shading.
  191. */
  192. @Internal
  193. public ShadingDescriptor getShd()
  194. {
  195. return field_3_shd;
  196. }
  197. /**
  198. * Cell shading.
  199. */
  200. @Internal
  201. public void setShd( ShadingDescriptor field_3_shd )
  202. {
  203. this.field_3_shd = field_3_shd;
  204. }
  205. /**
  206. * Left cell margin/padding.
  207. */
  208. @Internal
  209. public short getWCellPaddingLeft()
  210. {
  211. return field_4_wCellPaddingLeft;
  212. }
  213. /**
  214. * Left cell margin/padding.
  215. */
  216. @Internal
  217. public void setWCellPaddingLeft( short field_4_wCellPaddingLeft )
  218. {
  219. this.field_4_wCellPaddingLeft = field_4_wCellPaddingLeft;
  220. }
  221. /**
  222. * Top cell margin/padding.
  223. */
  224. @Internal
  225. public short getWCellPaddingTop()
  226. {
  227. return field_5_wCellPaddingTop;
  228. }
  229. /**
  230. * Top cell margin/padding.
  231. */
  232. @Internal
  233. public void setWCellPaddingTop( short field_5_wCellPaddingTop )
  234. {
  235. this.field_5_wCellPaddingTop = field_5_wCellPaddingTop;
  236. }
  237. /**
  238. * Bottom cell margin/padding.
  239. */
  240. @Internal
  241. public short getWCellPaddingBottom()
  242. {
  243. return field_6_wCellPaddingBottom;
  244. }
  245. /**
  246. * Bottom cell margin/padding.
  247. */
  248. @Internal
  249. public void setWCellPaddingBottom( short field_6_wCellPaddingBottom )
  250. {
  251. this.field_6_wCellPaddingBottom = field_6_wCellPaddingBottom;
  252. }
  253. /**
  254. * Right cell margin/padding.
  255. */
  256. @Internal
  257. public short getWCellPaddingRight()
  258. {
  259. return field_7_wCellPaddingRight;
  260. }
  261. /**
  262. * Right cell margin/padding.
  263. */
  264. @Internal
  265. public void setWCellPaddingRight( short field_7_wCellPaddingRight )
  266. {
  267. this.field_7_wCellPaddingRight = field_7_wCellPaddingRight;
  268. }
  269. /**
  270. * Left cell margin/padding units.
  271. */
  272. @Internal
  273. public byte getFtsCellPaddingLeft()
  274. {
  275. return field_8_ftsCellPaddingLeft;
  276. }
  277. /**
  278. * Left cell margin/padding units.
  279. */
  280. @Internal
  281. public void setFtsCellPaddingLeft( byte field_8_ftsCellPaddingLeft )
  282. {
  283. this.field_8_ftsCellPaddingLeft = field_8_ftsCellPaddingLeft;
  284. }
  285. /**
  286. * Top cell margin/padding units.
  287. */
  288. @Internal
  289. public byte getFtsCellPaddingTop()
  290. {
  291. return field_9_ftsCellPaddingTop;
  292. }
  293. /**
  294. * Top cell margin/padding units.
  295. */
  296. @Internal
  297. public void setFtsCellPaddingTop( byte field_9_ftsCellPaddingTop )
  298. {
  299. this.field_9_ftsCellPaddingTop = field_9_ftsCellPaddingTop;
  300. }
  301. /**
  302. * Bottom cell margin/padding units.
  303. */
  304. @Internal
  305. public byte getFtsCellPaddingBottom()
  306. {
  307. return field_10_ftsCellPaddingBottom;
  308. }
  309. /**
  310. * Bottom cell margin/padding units.
  311. */
  312. @Internal
  313. public void setFtsCellPaddingBottom( byte field_10_ftsCellPaddingBottom )
  314. {
  315. this.field_10_ftsCellPaddingBottom = field_10_ftsCellPaddingBottom;
  316. }
  317. /**
  318. * Right cell margin/padding units.
  319. */
  320. @Internal
  321. public byte getFtsCellPaddingRight()
  322. {
  323. return field_11_ftsCellPaddingRight;
  324. }
  325. /**
  326. * Right cell margin/padding units.
  327. */
  328. @Internal
  329. public void setFtsCellPaddingRight( byte field_11_ftsCellPaddingRight )
  330. {
  331. this.field_11_ftsCellPaddingRight = field_11_ftsCellPaddingRight;
  332. }
  333. /**
  334. * Left cell spacing.
  335. */
  336. @Internal
  337. public short getWCellSpacingLeft()
  338. {
  339. return field_12_wCellSpacingLeft;
  340. }
  341. /**
  342. * Left cell spacing.
  343. */
  344. @Internal
  345. public void setWCellSpacingLeft( short field_12_wCellSpacingLeft )
  346. {
  347. this.field_12_wCellSpacingLeft = field_12_wCellSpacingLeft;
  348. }
  349. /**
  350. * Top cell spacing.
  351. */
  352. @Internal
  353. public short getWCellSpacingTop()
  354. {
  355. return field_13_wCellSpacingTop;
  356. }
  357. /**
  358. * Top cell spacing.
  359. */
  360. @Internal
  361. public void setWCellSpacingTop( short field_13_wCellSpacingTop )
  362. {
  363. this.field_13_wCellSpacingTop = field_13_wCellSpacingTop;
  364. }
  365. /**
  366. * Bottom cell spacing.
  367. */
  368. @Internal
  369. public short getWCellSpacingBottom()
  370. {
  371. return field_14_wCellSpacingBottom;
  372. }
  373. /**
  374. * Bottom cell spacing.
  375. */
  376. @Internal
  377. public void setWCellSpacingBottom( short field_14_wCellSpacingBottom )
  378. {
  379. this.field_14_wCellSpacingBottom = field_14_wCellSpacingBottom;
  380. }
  381. /**
  382. * Right cell spacing.
  383. */
  384. @Internal
  385. public short getWCellSpacingRight()
  386. {
  387. return field_15_wCellSpacingRight;
  388. }
  389. /**
  390. * Right cell spacing.
  391. */
  392. @Internal
  393. public void setWCellSpacingRight( short field_15_wCellSpacingRight )
  394. {
  395. this.field_15_wCellSpacingRight = field_15_wCellSpacingRight;
  396. }
  397. /**
  398. * Left cell spacing units.
  399. */
  400. @Internal
  401. public byte getFtsCellSpacingLeft()
  402. {
  403. return field_16_ftsCellSpacingLeft;
  404. }
  405. /**
  406. * Left cell spacing units.
  407. */
  408. @Internal
  409. public void setFtsCellSpacingLeft( byte field_16_ftsCellSpacingLeft )
  410. {
  411. this.field_16_ftsCellSpacingLeft = field_16_ftsCellSpacingLeft;
  412. }
  413. /**
  414. * Top cell spacing units.
  415. */
  416. @Internal
  417. public byte getFtsCellSpacingTop()
  418. {
  419. return field_17_ftsCellSpacingTop;
  420. }
  421. /**
  422. * Top cell spacing units.
  423. */
  424. @Internal
  425. public void setFtsCellSpacingTop( byte field_17_ftsCellSpacingTop )
  426. {
  427. this.field_17_ftsCellSpacingTop = field_17_ftsCellSpacingTop;
  428. }
  429. /**
  430. * Bottom cell spacing units.
  431. */
  432. @Internal
  433. public byte getFtsCellSpacingBottom()
  434. {
  435. return field_18_ftsCellSpacingBottom;
  436. }
  437. /**
  438. * Bottom cell spacing units.
  439. */
  440. @Internal
  441. public void setFtsCellSpacingBottom( byte field_18_ftsCellSpacingBottom )
  442. {
  443. this.field_18_ftsCellSpacingBottom = field_18_ftsCellSpacingBottom;
  444. }
  445. /**
  446. * Right cell spacing units.
  447. */
  448. @Internal
  449. public byte getFtsCellSpacingRight()
  450. {
  451. return field_19_ftsCellSpacingRight;
  452. }
  453. /**
  454. * Right cell spacing units.
  455. */
  456. @Internal
  457. public void setFtsCellSpacingRight( byte field_19_ftsCellSpacingRight )
  458. {
  459. this.field_19_ftsCellSpacingRight = field_19_ftsCellSpacingRight;
  460. }
  461. /**
  462. * Top border.
  463. */
  464. @Internal
  465. public BorderCode getBrcTop()
  466. {
  467. return field_20_brcTop;
  468. }
  469. /**
  470. * Top border.
  471. */
  472. @Internal
  473. public void setBrcTop( BorderCode field_20_brcTop )
  474. {
  475. this.field_20_brcTop = field_20_brcTop;
  476. }
  477. /**
  478. * Left border.
  479. */
  480. @Internal
  481. public BorderCode getBrcLeft()
  482. {
  483. return field_21_brcLeft;
  484. }
  485. /**
  486. * Left border.
  487. */
  488. @Internal
  489. public void setBrcLeft( BorderCode field_21_brcLeft )
  490. {
  491. this.field_21_brcLeft = field_21_brcLeft;
  492. }
  493. /**
  494. * Bottom border.
  495. */
  496. @Internal
  497. public BorderCode getBrcBottom()
  498. {
  499. return field_22_brcBottom;
  500. }
  501. /**
  502. * Bottom border.
  503. */
  504. @Internal
  505. public void setBrcBottom( BorderCode field_22_brcBottom )
  506. {
  507. this.field_22_brcBottom = field_22_brcBottom;
  508. }
  509. /**
  510. * Right border.
  511. */
  512. @Internal
  513. public BorderCode getBrcRight()
  514. {
  515. return field_23_brcRight;
  516. }
  517. /**
  518. * Right border.
  519. */
  520. @Internal
  521. public void setBrcRight( BorderCode field_23_brcRight )
  522. {
  523. this.field_23_brcRight = field_23_brcRight;
  524. }
  525. /**
  526. * Sets the fFirstMerged field value.
  527. * When 1, cell is first cell of a range of cells that have been merged. When a cell is merged, the display areas of the merged cells are consolidated and the text within the cells is interpreted as belonging to one text stream for purposes of calculating line breaks.
  528. */
  529. @Internal
  530. public void setFFirstMerged( boolean value )
  531. {
  532. field_1_rgf = (short)fFirstMerged.setBoolean(field_1_rgf, value);
  533. }
  534. /**
  535. * When 1, cell is first cell of a range of cells that have been merged. When a cell is merged, the display areas of the merged cells are consolidated and the text within the cells is interpreted as belonging to one text stream for purposes of calculating line breaks.
  536. * @return the fFirstMerged field value.
  537. */
  538. @Internal
  539. public boolean isFFirstMerged()
  540. {
  541. return fFirstMerged.isSet(field_1_rgf);
  542. }
  543. /**
  544. * Sets the fMerged field value.
  545. * When 1, cell has been merged with preceding cell
  546. */
  547. @Internal
  548. public void setFMerged( boolean value )
  549. {
  550. field_1_rgf = (short)fMerged.setBoolean(field_1_rgf, value);
  551. }
  552. /**
  553. * When 1, cell has been merged with preceding cell
  554. * @return the fMerged field value.
  555. */
  556. @Internal
  557. public boolean isFMerged()
  558. {
  559. return fMerged.isSet(field_1_rgf);
  560. }
  561. /**
  562. * Sets the fVertical field value.
  563. * When 1, cell has vertical text flow
  564. */
  565. @Internal
  566. public void setFVertical( boolean value )
  567. {
  568. field_1_rgf = (short)fVertical.setBoolean(field_1_rgf, value);
  569. }
  570. /**
  571. * When 1, cell has vertical text flow
  572. * @return the fVertical field value.
  573. */
  574. @Internal
  575. public boolean isFVertical()
  576. {
  577. return fVertical.isSet(field_1_rgf);
  578. }
  579. /**
  580. * Sets the fBackward field value.
  581. * For a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0
  582. */
  583. @Internal
  584. public void setFBackward( boolean value )
  585. {
  586. field_1_rgf = (short)fBackward.setBoolean(field_1_rgf, value);
  587. }
  588. /**
  589. * For a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0
  590. * @return the fBackward field value.
  591. */
  592. @Internal
  593. public boolean isFBackward()
  594. {
  595. return fBackward.isSet(field_1_rgf);
  596. }
  597. /**
  598. * Sets the fRotateFont field value.
  599. * When 1, cell has rotated characters (i.e. uses @font)
  600. */
  601. @Internal
  602. public void setFRotateFont( boolean value )
  603. {
  604. field_1_rgf = (short)fRotateFont.setBoolean(field_1_rgf, value);
  605. }
  606. /**
  607. * When 1, cell has rotated characters (i.e. uses @font)
  608. * @return the fRotateFont field value.
  609. */
  610. @Internal
  611. public boolean isFRotateFont()
  612. {
  613. return fRotateFont.isSet(field_1_rgf);
  614. }
  615. /**
  616. * Sets the fVertMerge field value.
  617. * When 1, cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
  618. */
  619. @Internal
  620. public void setFVertMerge( boolean value )
  621. {
  622. field_1_rgf = (short)fVertMerge.setBoolean(field_1_rgf, value);
  623. }
  624. /**
  625. * When 1, cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
  626. * @return the fVertMerge field value.
  627. */
  628. @Internal
  629. public boolean isFVertMerge()
  630. {
  631. return fVertMerge.isSet(field_1_rgf);
  632. }
  633. /**
  634. * Sets the fVertRestart field value.
  635. * When 1, the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
  636. */
  637. @Internal
  638. public void setFVertRestart( boolean value )
  639. {
  640. field_1_rgf = (short)fVertRestart.setBoolean(field_1_rgf, value);
  641. }
  642. /**
  643. * When 1, the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
  644. * @return the fVertRestart field value.
  645. */
  646. @Internal
  647. public boolean isFVertRestart()
  648. {
  649. return fVertRestart.isSet(field_1_rgf);
  650. }
  651. /**
  652. * Sets the vertAlign field value.
  653. * Specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary)
  654. */
  655. @Internal
  656. public void setVertAlign( byte value )
  657. {
  658. field_1_rgf = (short)vertAlign.setValue(field_1_rgf, value);
  659. }
  660. /**
  661. * Specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary)
  662. * @return the vertAlign field value.
  663. */
  664. @Internal
  665. public byte getVertAlign()
  666. {
  667. return ( byte )vertAlign.getValue(field_1_rgf);
  668. }
  669. /**
  670. * Sets the ftsWidth field value.
  671. * Units for wWidth
  672. */
  673. @Internal
  674. public void setFtsWidth( byte value )
  675. {
  676. field_1_rgf = (short)ftsWidth.setValue(field_1_rgf, value);
  677. }
  678. /**
  679. * Units for wWidth
  680. * @return the ftsWidth field value.
  681. */
  682. @Internal
  683. public byte getFtsWidth()
  684. {
  685. return ( byte )ftsWidth.getValue(field_1_rgf);
  686. }
  687. /**
  688. * Sets the fFitText field value.
  689. * When 1, make the text fit the table cell
  690. */
  691. @Internal
  692. public void setFFitText( boolean value )
  693. {
  694. field_1_rgf = (short)fFitText.setBoolean(field_1_rgf, value);
  695. }
  696. /**
  697. * When 1, make the text fit the table cell
  698. * @return the fFitText field value.
  699. */
  700. @Internal
  701. public boolean isFFitText()
  702. {
  703. return fFitText.isSet(field_1_rgf);
  704. }
  705. /**
  706. * Sets the fNoWrap field value.
  707. * When 1, do not allow text to wrap in the table cell
  708. */
  709. @Internal
  710. public void setFNoWrap( boolean value )
  711. {
  712. field_1_rgf = (short)fNoWrap.setBoolean(field_1_rgf, value);
  713. }
  714. /**
  715. * When 1, do not allow text to wrap in the table cell
  716. * @return the fNoWrap field value.
  717. */
  718. @Internal
  719. public boolean isFNoWrap()
  720. {
  721. return fNoWrap.isSet(field_1_rgf);
  722. }
  723. /**
  724. * Sets the fUnused field value.
  725. * Not used
  726. */
  727. @Internal
  728. public void setFUnused( byte value )
  729. {
  730. field_1_rgf = (short)fUnused.setValue(field_1_rgf, value);
  731. }
  732. /**
  733. * Not used
  734. * @return the fUnused field value.
  735. */
  736. @Internal
  737. public byte getFUnused()
  738. {
  739. return ( byte )fUnused.getValue(field_1_rgf);
  740. }
  741. } // END OF CLASS