Search in sources :

Example 1 with ConnectType

use of com.microsoft.schemas.office.visio.x2012.main.ConnectType in project poi by apache.

the class XDGFBaseContents method onDocumentRead.

@Override
protected void onDocumentRead() {
    if (_pageContents.isSetShapes()) {
        for (ShapeSheetType shapeSheet : _pageContents.getShapes().getShapeArray()) {
            XDGFShape shape = new XDGFShape(shapeSheet, this, _document);
            _toplevelShapes.add(shape);
            addToShapeIndex(shape);
        }
    }
    if (_pageContents.isSetConnects()) {
        for (ConnectType connect : _pageContents.getConnects().getConnectArray()) {
            XDGFShape from = _shapes.get(connect.getFromSheet());
            XDGFShape to = _shapes.get(connect.getToSheet());
            if (from == null)
                throw new POIXMLException(this + "; Connect; Invalid from id: " + connect.getFromSheet());
            if (to == null)
                throw new POIXMLException(this + "; Connect; Invalid to id: " + connect.getToSheet());
            _connections.add(new XDGFConnection(connect, from, to));
        }
    }
}
Also used : ShapeSheetType(com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType) POIXMLException(org.apache.poi.POIXMLException) ConnectType(com.microsoft.schemas.office.visio.x2012.main.ConnectType)

Aggregations

ConnectType (com.microsoft.schemas.office.visio.x2012.main.ConnectType)1 ShapeSheetType (com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType)1 POIXMLException (org.apache.poi.POIXMLException)1