/** * Convenience method to return the raw data as {@code InputStream} * * @return the raw data stream * * @throws IOException if the data couldn't be retrieved */ default InputStream readObjectDataRaw() throws IOException { return getObjectData().getInputStream(); }
private static < S extends Shape<S,P>, P extends TextParagraph<S,P,? extends TextRun> > SlideShow<S,P> createHSLFSlideShow(Object... args) throws IOException, EncryptedDocumentException { return createSlideShow("org.apache.poi.hslf.usermodel.HSLFSlideShowFactory", args); }
public static LineCap fromNativeId(int nativeId) { for (LineCap ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }
private void printComments(final Slide<S,P> slide, final StringBuilder sb) { for (final Comment comment : slide.getComments()) { sb.append(comment.getAuthor()); sb.append(" - "); sb.append(comment.getText()); sb.append("\n"); } }
@Override public Sheet<?,?> getSheet() { return paragraph.getParentShape().getSheet(); } };
@Override public Rectangle2D getAnchor() { return paragraph.getParentShape().getAnchor(); } @Override
public static DecorationShape fromNativeId(int nativeId) { for (DecorationShape ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }
public static TabStopType fromOoxmlId(final int ooxmlId) { for (TabStopType tst : values()) { if (tst.ooxmlId == ooxmlId) { return tst; } } return null; } }
public static LineCompound fromNativeId(int nativeId) { for (LineCompound lc : values()) { if (lc.nativeId == nativeId) return lc; } return null; }
public static DecorationSize fromNativeId(int nativeId) { for (DecorationSize ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }
public static AutoNumberingScheme forOoxmlID(int ooxmlId) { for (AutoNumberingScheme ans : values()) { if (ans.ooxmlId == ooxmlId) return ans; } return null; }
public static LineDash fromNativeId(int nativeId) { for (LineDash ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }
public static Placeholder lookupOoxml(int ooxmlId) { for (Placeholder ph : values()) { if (ph.ooxmlId == ooxmlId) { return ph; } } return null; } }
@Override public int getSatOff() { return orig.getSatOff(); }
@Override public int getLumOff() { return orig.getLumOff(); }
/** * Apply the shade * * For a shade, the equation is luminance * %tint. */ private static void applyShade(double[] hsl, ColorStyle fc) { int shade = fc.getShade(); if (shade == -1) { return; } double shadePct = shade / 100000.; hsl[2] *= 1. - shadePct; }
public static PictureType forNativeID(int nativeId) { for (PictureType ans : values()) { if (ans.nativeId == nativeId) return ans; } return null; }
@Override public Color getColor() { return orig.getColor(); }
public static DecorationShape fromOoxmlId(int ooxmlId) { for (DecorationShape ds : values()) { if (ds.ooxmlId == ooxmlId) return ds; } return null; } }
public static TabStopType fromNativeId(final int nativeId) { for (TabStopType tst : values()) { if (tst.nativeId == nativeId) { return tst; } } return null; } public static TabStopType fromOoxmlId(final int ooxmlId) {