1 2 17 18 19 package org.apache.poi.hwpf.usermodel; 20 21 import org.apache.poi.hwpf.model.SEPX; 22 23 public class Section 24 extends Range 25 { 26 27 private SectionProperties _props; 28 29 public Section(SEPX sepx, Range parent) 30 { 31 super(Math.max(parent._start, sepx.getStart()), Math.min(parent._end, sepx.getEnd()), parent); 32 _props = sepx.getSectionProperties(); 33 } 34 35 public int type() 36 { 37 return TYPE_SECTION; 38 } 39 40 public int getNumColumns() 41 { 42 return _props.getCcolM1() + 1; 43 } 44 45 public Object clone() 46 throws CloneNotSupportedException 47 { 48 Section s = (Section)super.clone(); 49 s._props = (SectionProperties)_props.clone(); 50 return s; 51 } 52 53 54 } 55 | Popular Tags |