312313314315316317318319320321322323
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; }
326327328329330331332333
* Add a new string property * * @throws IllegalArgumentException if a property with this name already exists */ public void addProperty(String name, String value){ CTProperty p = add(name); p.setLpwstr(value); }
336337338339340341342343
* Add a new double property * * @throws IllegalArgumentException if a property with this name already exists */ public void addProperty(String name, double value){ CTProperty p = add(name); p.setR8(value); }
346347348349350351352353
* Add a new integer property * * @throws IllegalArgumentException if a property with this name already exists */ public void addProperty(String name, int value){ CTProperty p = add(name); p.setI4(value); }
356357358359360361362363
* Add a new boolean property * * @throws IllegalArgumentException if a property with this name already exists */ public void addProperty(String name, boolean value){ CTProperty p = add(name); p.setBool(value); }
313314315316317318319320321322323324
327328329330331332333334
337338339340341342343344
347348349350351352353354
357358359360361362363364