From: Nick Burch Date: Tue, 25 Jun 2013 23:30:37 +0000 (+0000) Subject: Fix to have consistent whitespace X-Git-Tag: REL_3_10_BETA2~74 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=546b1e7171f1d752cd905f716aa427a7bdc31395;p=poi.git Fix to have consistent whitespace git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1496671 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java b/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java index 2c9a062892..64e0dafcbb 100644 --- a/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java +++ b/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java @@ -40,132 +40,131 @@ import org.apache.poi.util.LittleEndian; * textual form. */ public class HPSFPropertiesExtractor extends POITextExtractor { - public HPSFPropertiesExtractor(POITextExtractor mainExtractor) { - super(mainExtractor); - } - public HPSFPropertiesExtractor(POIDocument doc) { - super(doc); - } - public HPSFPropertiesExtractor(POIFSFileSystem fs) { - super(new PropertiesOnlyDocument(fs)); - } - public HPSFPropertiesExtractor(NPOIFSFileSystem fs) { - super(new PropertiesOnlyDocument(fs)); - } - - public String getDocumentSummaryInformationText() { - DocumentSummaryInformation dsi = document.getDocumentSummaryInformation(); - StringBuffer text = new StringBuffer(); - - // Normal properties - text.append( getPropertiesText(dsi) ); - - // Now custom ones - CustomProperties cps = dsi == null ? null : dsi.getCustomProperties(); - if(cps != null) { - Iterator keys = cps.nameSet().iterator(); - while(keys.hasNext()) { - String key = keys.next(); - String val = getPropertyValueText( cps.get(key) ); - text.append(key + " = " + val + "\n"); - } - } - - // All done - return text.toString(); - } - public String getSummaryInformationText() { - SummaryInformation si = document.getSummaryInformation(); - - // Just normal properties - return getPropertiesText(si); - } - - private static String getPropertiesText(SpecialPropertySet ps) { - if(ps == null) { - // Not defined, oh well - return ""; - } - - StringBuffer text = new StringBuffer(); - - PropertyIDMap idMap = ps.getPropertySetIDMap(); - Property[] props = ps.getProperties(); - for(int i=0; i keys = cps.nameSet().iterator(); + while (keys.hasNext()) { + String key = keys.next(); + String val = getPropertyValueText( cps.get(key) ); + text.append(key + " = " + val + "\n"); + } + } + + // All done + return text.toString(); + } + public String getSummaryInformationText() { + SummaryInformation si = document.getSummaryInformation(); + + // Just normal properties + return getPropertiesText(si); + } + + private static String getPropertiesText(SpecialPropertySet ps) { + if (ps == null) { + // Not defined, oh well + return ""; + } + + StringBuffer text = new StringBuffer(); + + PropertyIDMap idMap = ps.getPropertySetIDMap(); + Property[] props = ps.getProperties(); + for (int i=0; i