/** * Add a new property * * @param name the property name * @throws IllegalArgumentException if a property with this name already exists */ private CTProperty add(String name) { if(contains(name)) { throw new IllegalArgumentException("A property with this name " + "already exists in the custom properties"); } CTProperty p = props.getProperties().addNewProperty(); int pid = nextPid(); p.setPid(pid); p.setFmtid(FORMAT_ID); p.setName(name); return p; }