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.

ITableAttributes.java 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /*
  2. * $Id$
  3. * ============================================================================
  4. * The Apache Software License, Version 1.1
  5. * ============================================================================
  6. *
  7. * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without modifica-
  10. * tion, are permitted provided that the following conditions are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright notice,
  13. * this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. *
  19. * 3. The end-user documentation included with the redistribution, if any, must
  20. * include the following acknowledgment: "This product includes software
  21. * developed by the Apache Software Foundation (http://www.apache.org/)."
  22. * Alternately, this acknowledgment may appear in the software itself, if
  23. * and wherever such third-party acknowledgments normally appear.
  24. *
  25. * 4. The names "FOP" and "Apache Software Foundation" must not be used to
  26. * endorse or promote products derived from this software without prior
  27. * written permission. For written permission, please contact
  28. * apache@apache.org.
  29. *
  30. * 5. Products derived from this software may not be called "Apache", nor may
  31. * "Apache" appear in their name, without prior written permission of the
  32. * Apache Software Foundation.
  33. *
  34. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  35. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  36. * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  37. * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  38. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
  39. * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  40. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  41. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  42. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  43. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  44. * ============================================================================
  45. *
  46. * This software consists of voluntary contributions made by many individuals
  47. * on behalf of the Apache Software Foundation and was originally created by
  48. * James Tauber <jtauber@jtauber.com>. For more information on the Apache
  49. * Software Foundation, please see <http://www.apache.org/>.
  50. */
  51. /*
  52. * This file is part of the RTF library of the FOP project, which was originally
  53. * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
  54. * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
  55. * the FOP project.
  56. */
  57. package org.apache.fop.render.rtf.rtflib.rtfdoc;
  58. /**
  59. * Constants for RTF table attribute names
  60. * @author unascribed
  61. * @author Boris POUDEROUS
  62. * @author Chris Scott, Westinghouse
  63. */
  64. public interface ITableAttributes {
  65. /** to process column spanning */
  66. public static final String COLUMN_SPAN = "number-columns-spanned";
  67. /** to process row spanning */
  68. public static final String ROW_SPAN = "number-rows-spanned";
  69. // RTF 1.5 attributes (word 97)
  70. /** half the space between the cells of a table row in twips */
  71. public static final String ATTR_RTF_15_TRGAPH = "trgaph";
  72. // RTF 1.6 Row and table attributes
  73. /** table row padding, top */
  74. public static final String ATTR_ROW_PADDING_TOP = "trpaddt";
  75. /** table row padding, bottom */
  76. public static final String ATTR_ROW_PADDING_BOTTOM = "trpaddb";
  77. /** table row padding, left */
  78. public static final String ATTR_ROW_PADDING_LEFT = "trpaddl";
  79. /** table row padding, right */
  80. public static final String ATTR_ROW_PADDING_RIGHT = "trpaddr";
  81. /** table row padding, top */
  82. public static final String ATTR_ROW_U_PADDING_TOP = "trpaddft";
  83. /** table row padding, bottom */
  84. public static final String ATTR_ROW_U_PADDING_BOTTOM = "trpaddfb";
  85. /** table row padding, left */
  86. public static final String ATTR_ROW_U_PADDING_LEFT = "trpaddfl";
  87. /** table row padding, right */
  88. public static final String ATTR_ROW_U_PADDING_RIGHT = "trpaddfr";
  89. /**
  90. * List of ALL ROW PADDING attributes, used to select them when writing
  91. * attributes
  92. */
  93. public static final String[] ATTRIB_ROW_PADDING = {
  94. ATTR_ROW_PADDING_TOP, ATTR_ROW_U_PADDING_TOP,
  95. ATTR_ROW_PADDING_BOTTOM, ATTR_ROW_U_PADDING_BOTTOM,
  96. ATTR_ROW_PADDING_LEFT, ATTR_ROW_U_PADDING_LEFT,
  97. ATTR_ROW_PADDING_RIGHT, ATTR_ROW_U_PADDING_RIGHT,
  98. ATTR_RTF_15_TRGAPH
  99. };
  100. // Cell attributes
  101. /** cell padding, top */
  102. public static final String ATTR_CELL_PADDING_TOP = "clpadt";
  103. /** cell padding, bottom */
  104. public static final String ATTR_CELL_PADDING_BOTTOM = "clpadb";
  105. /** cell padding, left */
  106. public static final String ATTR_CELL_PADDING_LEFT = "clpadl";
  107. /** cell padding, right */
  108. public static final String ATTR_CELL_PADDING_RIGHT = "clpadr";
  109. /** cell padding, top */
  110. public static final String ATTR_CELL_U_PADDING_TOP = "clpadft";
  111. /** cell padding, bottom */
  112. public static final String ATTR_CELL_U_PADDING_BOTTOM = "clpadfb";
  113. /** cell padding, left */
  114. public static final String ATTR_CELL_U_PADDING_LEFT = "clpadfl";
  115. /** cell padding, right */
  116. public static final String ATTR_CELL_U_PADDING_RIGHT = "clpadfr";
  117. // for border style file
  118. /** cell border, top */
  119. public static final String CELL_BORDER_TOP = "clbrdrt";
  120. /** cell border, bottom */
  121. public static final String CELL_BORDER_BOTTOM = "clbrdrb";
  122. /** cell border, left */
  123. public static final String CELL_BORDER_LEFT = "clbrdrl";
  124. /** cell border, right */
  125. public static final String CELL_BORDER_RIGHT = "clbrdrr";
  126. //Table row border attributes
  127. /** row border, top */
  128. public static final String ROW_BORDER_TOP = "trbrdrt";
  129. /** row border, bottom */
  130. public static final String ROW_BORDER_BOTTOM = "trbrdrb";
  131. /** row border, left */
  132. public static final String ROW_BORDER_LEFT = "trbrdrl";
  133. /** row border, right */
  134. public static final String ROW_BORDER_RIGHT = "trbrdrr";
  135. /** row border, horizontal */
  136. public static final String ROW_BORDER_HORIZONTAL = "trbrdrh";
  137. /** row border, vertical */
  138. public static final String ROW_BORDER_VERTICAL = "trbrdrv";
  139. //Table row attributes
  140. /** row attribute, keep-together */
  141. public static final String ROW_KEEP_TOGETHER = "trkeep";
  142. public static final String ROW_HEIGHT = "trrh";
  143. /**
  144. * This control word is nonexistent in RTF, used to simulate the
  145. * FO:keep-with-next attribute.
  146. */
  147. public static final String ROW_KEEP_WITH_NEXT = "knext";
  148. /**
  149. * This control word is nonexistent in RTF, used to simulate the
  150. * FO:keep-with-previous attribute.
  151. */
  152. public static final String ROW_KEEP_WITH_PREVIOUS = "kprevious";
  153. /** cell shading, a unit-based attribute */
  154. public static final String CELL_SHADE = "clshdng";
  155. /** cell background color, a unit-based attribute */
  156. public static final String CELL_COLOR_BACKGROUND = "clcbpat";
  157. /** cell foreground color, a unit-based attribute */
  158. public static final String CELL_COLOR_FOREGROUND = "clcfpat";
  159. /**
  160. * List of ALL CELL PADDING attributes, used to select them when writing
  161. * attributes
  162. */
  163. public static final String[] ATTRIB_CELL_PADDING = {
  164. ATTR_CELL_PADDING_TOP, ATTR_CELL_U_PADDING_TOP,
  165. ATTR_CELL_PADDING_BOTTOM, ATTR_CELL_U_PADDING_BOTTOM,
  166. ATTR_CELL_PADDING_LEFT, ATTR_CELL_U_PADDING_LEFT,
  167. ATTR_CELL_PADDING_RIGHT, ATTR_CELL_U_PADDING_RIGHT,
  168. };
  169. /**
  170. * List of ALL CELL BORDER attributes, used to select them when writing
  171. * attributes
  172. */
  173. public static final String[] CELL_BORDER = {
  174. CELL_BORDER_TOP, CELL_BORDER_BOTTOM,
  175. CELL_BORDER_LEFT, CELL_BORDER_RIGHT
  176. };
  177. /**
  178. * List of ALL ROW BORDER attributes, used to select them when writing
  179. * attributes
  180. */
  181. public static final String[] ROW_BORDER = {
  182. ROW_BORDER_TOP, ROW_BORDER_BOTTOM, ROW_BORDER_LEFT,
  183. ROW_BORDER_RIGHT, ROW_BORDER_HORIZONTAL, ROW_BORDER_VERTICAL
  184. };
  185. /**
  186. * List of ALL CELL SHADING AND COLOR attributes, used to select them when
  187. * writing attributes
  188. */
  189. public static final String[] CELL_COLOR = {
  190. CELL_SHADE, CELL_COLOR_BACKGROUND, CELL_COLOR_FOREGROUND
  191. };
  192. }