Example usage for org.apache.poi.hslf.usermodel HSLFMasterSheet isPlaceholder

List of usage examples for org.apache.poi.hslf.usermodel HSLFMasterSheet isPlaceholder

Introduction

In this page you can find the example usage for org.apache.poi.hslf.usermodel HSLFMasterSheet isPlaceholder.

Prototype

@Deprecated
@Removal(version = "4.1.0")
public static boolean isPlaceholder(HSLFShape shape) 

Source Link

Document

Checks if the shape is a placeholder.

Usage

From source file:org.apache.tika.parser.microsoft.HSLFExtractor.java

License:Apache License

private void extractMaster(XHTMLContentHandler xhtml, HSLFMasterSheet master) throws SAXException {
    if (master == null) {
        return;/*from w w  w  . ja v  a 2s . c  o m*/
    }
    List<HSLFShape> shapes = master.getShapes();
    if (shapes == null || shapes.isEmpty()) {
        return;
    }

    xhtml.startElement("div", "class", "slide-master-content");
    for (HSLFShape shape : shapes) {
        if (shape != null && !HSLFMasterSheet.isPlaceholder(shape)) {
            if (shape instanceof HSLFTextShape) {
                HSLFTextShape tsh = (HSLFTextShape) shape;
                String text = tsh.getText();
                if (text != null) {
                    xhtml.element("p", text);
                }
            }
        }
    }
    xhtml.endElement("div");
}