Methods Summary |
---|
private void | ensureSection2()Creates section 2 if it is not already present.
if (getSectionCount() < 2)
{
MutableSection s2 = new MutableSection();
s2.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID[1]);
addSection(s2);
}
|
public int | getByteCount()Returns the byte count or 0 if the {@link
DocumentSummaryInformation} does not contain a byte count.
return getPropertyIntValue(PropertyIDMap.PID_BYTECOUNT);
|
public java.lang.String | getCategory()Returns the category (or null ).
return (String) getProperty(PropertyIDMap.PID_CATEGORY);
|
public java.lang.String | getCompany()Returns the company (or null ).
return (String) getProperty(PropertyIDMap.PID_COMPANY);
|
public org.apache.poi.hpsf.CustomProperties | getCustomProperties()Gets the custom properties.
CustomProperties cps = null;
if (getSectionCount() >= 2)
{
cps = new CustomProperties();
final Section section = (Section) getSections().get(1);
final Map dictionary = section.getDictionary();
final Property[] properties = section.getProperties();
int propertyCount = 0;
for (int i = 0; i < properties.length; i++)
{
final Property p = properties[i];
final long id = p.getID();
if (id != 0 && id != 1)
{
propertyCount++;
final CustomProperty cp = new CustomProperty(p,
(String) dictionary.get(new Long(id)));
cps.put(cp.getName(), cp);
}
}
if (cps.size() != propertyCount)
cps.setPure(false);
}
return cps;
|
public byte[] | getDocparts()Returns the doc parts (or null )
when this method is implemented. Please note that the
return type is likely to change!
notYetImplemented("Reading byte arrays");
return (byte[]) getProperty(PropertyIDMap.PID_DOCPARTS);
|
public byte[] | getHeadingPair()Returns the heading pair (or null )
when this method is implemented. Please note that the
return type is likely to change!
notYetImplemented("Reading byte arrays ");
return (byte[]) getProperty(PropertyIDMap.PID_HEADINGPAIR);
|
public int | getHiddenCount()Returns the hidden count or 0 if the {@link
DocumentSummaryInformation} does not contain a hidden
count.
return getPropertyIntValue(PropertyIDMap.PID_HIDDENCOUNT);
|
public int | getLineCount()Returns the line count or 0 if the {@link
DocumentSummaryInformation} does not contain a line count.
return getPropertyIntValue(PropertyIDMap.PID_LINECOUNT);
|
public boolean | getLinksDirty()Returns true if the custom links are dirty.
return getPropertyBooleanValue(PropertyIDMap.PID_LINKSDIRTY);
|
public int | getMMClipCount()Returns the mmclip count or 0 if the {@link
DocumentSummaryInformation} does not contain a mmclip
count.
return getPropertyIntValue(PropertyIDMap.PID_MMCLIPCOUNT);
|
public java.lang.String | getManager()Returns the manager (or null ).
return (String) getProperty(PropertyIDMap.PID_MANAGER);
|
public int | getNoteCount()Returns the note count or 0 if the {@link
DocumentSummaryInformation} does not contain a note count.
return getPropertyIntValue(PropertyIDMap.PID_NOTECOUNT);
|
public int | getParCount()Returns the par count or 0 if the {@link
DocumentSummaryInformation} does not contain a par count.
return getPropertyIntValue(PropertyIDMap.PID_PARCOUNT);
|
public java.lang.String | getPresentationFormat()Returns the presentation format (or
null ).
return (String) getProperty(PropertyIDMap.PID_PRESFORMAT);
|
public boolean | getScale()Returns true when scaling of the thumbnail is
desired, false if cropping is desired.
return getPropertyBooleanValue(PropertyIDMap.PID_SCALE);
|
public int | getSlideCount()Returns the slide count or 0 if the {@link
DocumentSummaryInformation} does not contain a slide count.
return getPropertyIntValue(PropertyIDMap.PID_SLIDECOUNT);
|
private void | notYetImplemented(java.lang.String msg)Throws an {@link UnsupportedOperationException} with a message text
telling which functionality is not yet implemented.
throw new UnsupportedOperationException(msg + " is not yet implemented.");
|
public void | removeByteCount()Removes the byte count.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_BYTECOUNT);
|
public void | removeCategory()Removes the category.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_CATEGORY);
|
public void | removeCompany()Removes the company.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_COMPANY);
|
public void | removeCustomProperties()Removes the custom properties.
if (getSectionCount() >= 2)
getSections().remove(1);
else
throw new HPSFRuntimeException("Illegal internal format of Document SummaryInformation stream: second section is missing.");
|
public void | removeDocparts()Removes the doc parts.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_DOCPARTS);
|
public void | removeHeadingPair()Removes the heading pair.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_HEADINGPAIR);
|
public void | removeHiddenCount()Removes the hidden count.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_HIDDENCOUNT);
|
public void | removeLineCount()Removes the line count.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_LINECOUNT);
|
public void | removeLinksDirty()Removes the links dirty.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_LINKSDIRTY);
|
public void | removeMMClipCount()Removes the mmclip count.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_MMCLIPCOUNT);
|
public void | removeManager()Removes the manager.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_MANAGER);
|
public void | removeNoteCount()Removes the noteCount.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_NOTECOUNT);
|
public void | removeParCount()Removes the par count.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_PARCOUNT);
|
public void | removePresentationFormat()Removes the presentation format.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_PRESFORMAT);
|
public void | removeScale()Removes the scale.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_SCALE);
|
public void | removeSlideCount()Removes the slide count.
final MutableSection s = (MutableSection) getFirstSection();
s.removeProperty(PropertyIDMap.PID_SLIDECOUNT);
|
public void | setByteCount(int byteCount)Sets the byte count.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_BYTECOUNT, byteCount);
|
public void | setCategory(java.lang.String category)Sets the category.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_CATEGORY, category);
|
public void | setCompany(java.lang.String company)Sets the company.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_COMPANY, company);
|
public void | setCustomProperties(org.apache.poi.hpsf.CustomProperties customProperties)Sets the custom properties.
ensureSection2();
final MutableSection section = (MutableSection) getSections().get(1);
final Map dictionary = customProperties.getDictionary();
section.clear();
/* Set the codepage. If both custom properties and section have a
* codepage, the codepage from the custom properties wins, else take the
* one that is defined. If none is defined, take Unicode. */
int cpCodepage = customProperties.getCodepage();
if (cpCodepage < 0)
cpCodepage = section.getCodepage();
if (cpCodepage < 0)
cpCodepage = Constants.CP_UNICODE;
customProperties.setCodepage(cpCodepage);
section.setCodepage(cpCodepage);
section.setDictionary(dictionary);
for (final Iterator i = customProperties.values().iterator(); i.hasNext();)
{
final Property p = (Property) i.next();
section.setProperty(p);
}
|
public void | setDocparts(byte[] docparts)Sets the doc parts.
notYetImplemented("Writing byte arrays");
|
public void | setHeadingPair(byte[] headingPair)Sets the heading pair.
notYetImplemented("Writing byte arrays ");
|
public void | setHiddenCount(int hiddenCount)Sets the hidden count.
final MutableSection s = (MutableSection) getSections().get(0);
s.setProperty(PropertyIDMap.PID_HIDDENCOUNT, hiddenCount);
|
public void | setLineCount(int lineCount)Sets the line count.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_LINECOUNT, lineCount);
|
public void | setLinksDirty(boolean linksDirty)Sets the linksDirty.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_LINKSDIRTY, linksDirty);
|
public void | setMMClipCount(int mmClipCount)Sets the mmclip count.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_MMCLIPCOUNT, mmClipCount);
|
public void | setManager(java.lang.String manager)Sets the manager.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_MANAGER, manager);
|
public void | setNoteCount(int noteCount)Sets the note count.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_NOTECOUNT, noteCount);
|
public void | setParCount(int parCount)Sets the par count.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_PARCOUNT, parCount);
|
public void | setPresentationFormat(java.lang.String presentationFormat)Sets the presentation format.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_PRESFORMAT, presentationFormat);
|
public void | setScale(boolean scale)Sets the scale.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_SCALE, scale);
|
public void | setSlideCount(int slideCount)Sets the slideCount.
final MutableSection s = (MutableSection) getFirstSection();
s.setProperty(PropertyIDMap.PID_SLIDECOUNT, slideCount);
|