1 2 17 18 19 package org.apache.poi.hwpf.usermodel; 20 21 import org.apache.poi.hwpf.model.types.PAPAbstractType; 22 import org.apache.poi.hwpf.model.StyleDescription; 23 24 import org.apache.poi.hwpf.sprm.SprmBuffer; 25 26 public class ParagraphProperties 27 extends PAPAbstractType 28 implements Cloneable 29 { 30 31 public ParagraphProperties() 32 { 33 field_21_lspd = new LineSpacingDescriptor(); 34 field_24_phe = new byte[12]; 35 field_46_brcTop = new BorderCode(); 36 field_47_brcLeft = new BorderCode(); 37 field_48_brcBottom = new BorderCode(); 38 field_49_brcRight = new BorderCode(); 39 field_50_brcBetween = new BorderCode(); 40 field_51_brcBar = new BorderCode(); 41 field_60_anld = new byte[84]; 42 this.field_17_fWidowControl = 1; 43 this.field_21_lspd.setMultiLinespace((short)1); 44 this.field_21_lspd.setDyaLine((short)240); 45 this.field_12_ilvl = (byte)9; 46 this.field_66_rgdxaTab = new int[0]; 47 this.field_67_rgtbd = new byte[0]; 48 this.field_63_dttmPropRMark = new DateAndTime(); 49 50 } 51 52 public int getJustification() 53 { 54 return super.getJc(); 55 } 56 57 public void setJustification(byte jc) 58 { 59 super.setJc(jc); 60 } 61 62 public boolean keepOnPage() 63 { 64 return super.getFKeep() != 0; 65 } 66 67 public void setKeepOnPage(boolean fKeep) 68 { 69 super.setFKeep((byte)(fKeep ? 1 : 0)); 70 } 71 72 public boolean keepWithNext() 73 { 74 return super.getFKeepFollow() != 0; 75 } 76 77 public void setKeepWithNext(boolean fKeepFollow) 78 { 79 super.setFKeepFollow((byte)(fKeepFollow ? 1 : 0)); 80 } 81 82 public boolean pageBreakBefore() 83 { 84 return super.getFPageBreakBefore() != 0; 85 } 86 87 public void setPageBreakBefore(boolean fPageBreak) 88 { 89 super.setFPageBreakBefore((byte)(fPageBreak ? 1 : 0)); 90 } 91 92 public boolean isLineNotNumbered() 93 { 94 return super.getFNoLnn() != 0; 95 } 96 97 public void setLineNotNumbered(boolean fNoLnn) 98 { 99 super.setFNoLnn((byte)(fNoLnn ? 1 : 0)); 100 } 101 102 public boolean isSideBySide() 103 { 104 return super.getFSideBySide() != 0; 105 } 106 107 public void setSideBySide(boolean fSideBySide) 108 { 109 super.setFSideBySide((byte)(fSideBySide ? 1 : 0)); 110 } 111 112 public boolean isAutoHyphenated() 113 { 114 return super.getFNoAutoHyph() == 0; 115 } 116 117 public void setAutoHyphenated(boolean auto) 118 { 119 super.setFNoAutoHyph((byte)(!auto ? 1 : 0)); 120 } 121 122 public boolean isWidowControlled() 123 { 124 return super.getFWidowControl() != 0; 125 } 126 127 public void setWidowControl(boolean widowControl) 128 { 129 super.setFWidowControl((byte)(widowControl ? 1 : 0)); 130 } 131 132 public int getIndentFromRight() 133 { 134 return super.getDxaRight(); 135 } 136 137 public void setIndentFromRight(int dxaRight) 138 { 139 super.setDxaRight(dxaRight); 140 } 141 142 public int getIndentFromLeft() 143 { 144 return super.getDxaLeft(); 145 } 146 147 public void setIndentFromLeft(int dxaLeft) 148 { 149 super.setDxaLeft(dxaLeft); 150 } 151 152 public int getFirstLineIndent() 153 { 154 return super.getDxaLeft1(); 155 } 156 157 public void setFirstLineIndent(int first) 158 { 159 super.setDxaLeft1(first); 160 } 161 162 public LineSpacingDescriptor getLineSpacing() 163 { 164 return super.getLspd(); 165 } 166 167 public void setLineSpacing(LineSpacingDescriptor lspd) 168 { 169 super.setLspd(lspd); 170 } 171 172 public int getSpacingBefore() 173 { 174 return super.getDyaBefore(); 175 } 176 177 public void setSpacingBefore(int before) 178 { 179 super.setDyaBefore(before); 180 } 181 182 public int getSpacingAfter() 183 { 184 return super.getDyaAfter(); 185 } 186 187 public void setSpacingAfter(int after) 188 { 189 super.setDyaAfter(after); 190 } 191 192 public boolean isKinsoku() 193 { 194 return super.getFKinsoku() != 0; 195 } 196 197 public void setKinsoku(boolean kinsoku) 198 { 199 super.setFKinsoku((byte)(kinsoku ? 1 : 0)); 200 } 201 202 public boolean isWordWrapped() 203 { 204 return super.getFWordWrap() != 0; 205 } 206 207 public void setWordWrapped(boolean wrap) 208 { 209 super.setFWordWrap((byte)(wrap ? 1 : 0)); 210 } 211 212 public int getFontAlignment() 213 { 214 return super.getWAlignFont(); 215 } 216 217 public void setFontAlignment(int align) 218 { 219 super.setWAlignFont(align); 220 } 221 222 public boolean isVertical() 223 { 224 return super.isFVertical(); 225 } 226 227 public void setVertical(boolean vertical) 228 { 229 super.setFVertical(vertical); 230 } 231 232 public boolean isBackward() 233 { 234 return super.isFBackward(); 235 } 236 237 public void setBackward(boolean bward) 238 { 239 super.setFBackward(bward); 240 } 241 242 public BorderCode getTopBorder() 243 { 244 return super.getBrcTop(); 245 } 246 247 public void setTopBorder(BorderCode top) 248 { 249 super.setBrcTop(top); 250 } 251 252 public BorderCode getLeftBorder() 253 { 254 return super.getBrcLeft(); 255 } 256 257 public void setLeftBorder(BorderCode left) 258 { 259 super.setBrcLeft(left); 260 } 261 262 public BorderCode getBottomBorder() 263 { 264 return super.getBrcBottom(); 265 } 266 267 public void setBottomBorder(BorderCode bottom) 268 { 269 super.setBrcBottom(bottom); 270 } 271 272 public BorderCode getRightBorder() 273 { 274 return super.getBrcRight(); 275 } 276 277 public void setRightBorder(BorderCode right) 278 { 279 super.setBrcRight(right); 280 } 281 282 public BorderCode getBarBorder() 283 { 284 return super.getBrcBar(); 285 } 286 287 public void setBarBorder(BorderCode bar) 288 { 289 super.setBrcBar(bar); 290 } 291 292 public ShadingDescriptor getShading() 293 { 294 return super.getShd(); 295 } 296 297 public void setShading(ShadingDescriptor shd) 298 { 299 super.setShd(shd); 300 } 301 302 public DropCapSpecifier getDropCap() 303 { 304 return super.getDcs(); 305 } 306 307 public void setDropCap(DropCapSpecifier dcs) 308 { 309 super.setDcs(dcs); 310 } 311 312 public Object clone() 313 throws CloneNotSupportedException 314 { 315 ParagraphProperties pp = (ParagraphProperties)super.clone(); 316 pp.field_21_lspd = (LineSpacingDescriptor)field_21_lspd.clone(); 317 pp.field_24_phe = (byte[])field_24_phe.clone(); 318 pp.field_46_brcTop = (BorderCode)field_46_brcTop.clone(); 319 pp.field_47_brcLeft = (BorderCode)field_47_brcLeft.clone(); 320 pp.field_48_brcBottom = (BorderCode)field_48_brcBottom.clone(); 321 pp.field_49_brcRight = (BorderCode)field_49_brcRight.clone(); 322 pp.field_50_brcBetween = (BorderCode)field_50_brcBetween.clone(); 323 pp.field_51_brcBar = (BorderCode)field_51_brcBar.clone(); 324 pp.field_60_anld = (byte[])field_60_anld.clone(); 325 return pp; 326 } 327 328 } 329 | Popular Tags |