/** * Creates section 2 if it is not already present. */ private void ensureSection2() { if (getSectionCount() < 2) { Section s2 = new Section(); s2.setFormatID(USER_DEFINED_PROPERTIES); addSection(s2); } }
/** * Removes the custom properties. */ public void removeCustomProperties() { if (getSectionCount() < 2) { throw new HPSFRuntimeException("Illegal internal format of Document SummaryInformation stream: second section is missing."); } List<Section> l = new LinkedList<>(getSections()); clearSections(); int idx = 0; for (Section s : l) { if (idx++ != 1) { addSection(s); } } }
/** * Creates section 2 if it is not already present. */ private void ensureSection2() { if (getSectionCount() < 2) { Section s2 = new Section(); s2.setFormatID(USER_DEFINED_PROPERTIES); addSection(s2); } }
/** * <p>Creates section 2 if it is not already present.</p> * */ private void ensureSection2() { if (getSectionCount() < 2) { MutableSection s2 = new MutableSection(); s2.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID[1]); addSection(s2); } }
/** * <p>Creates section 2 if it is not already present.</p> * */ private void ensureSection2() { if (getSectionCount() < 2) { MutableSection s2 = new MutableSection(); s2.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID[1]); addSection(s2); } }
/** * Removes the custom properties. */ public void removeCustomProperties() { if (getSectionCount() < 2) { throw new HPSFRuntimeException("Illegal internal format of Document SummaryInformation stream: second section is missing."); } List<Section> l = new LinkedList<>(getSections()); clearSections(); int idx = 0; for (Section s : l) { if (idx++ != 1) { addSection(s); } } }