Example usage for org.apache.poi.xwpf.usermodel XWPFSettings getPackagePart

List of usage examples for org.apache.poi.xwpf.usermodel XWPFSettings getPackagePart

Introduction

In this page you can find the example usage for org.apache.poi.xwpf.usermodel XWPFSettings getPackagePart.

Prototype

public final PackagePart getPackagePart() 

Source Link

Document

Provides access to the underlying PackagePart

Usage

From source file:fr.opensagres.poi.xwpf.converter.core.styles.XWPFStylesDocument.java

License:Open Source License

private static CTSettings getCTSettings(XWPFDocument document) {

    XWPFSettings settings = getSettings(document);
    if (settings != null) {
        try {//from  ww  w  . ja  va2  s.  c  o m
            InputStream inputStream = settings.getPackagePart().getInputStream();
            return SettingsDocument.Factory.parse(inputStream).getSettings();
        } catch (Exception e) {

        }
    }
    return null;
}