Exemplo n.º 1
0
    /**
     * Returns the background shape for this sheet.
     *
     * @return the background shape for this sheet.
     */
    public Background GetBackground() {
        if (_background == null) {
            PPDrawing ppdrawing = GetPPDrawing();

            EscherContainerRecord dg = (EscherContainerRecord) ppdrawing.GetEscherRecords()[0];
            EscherContainerRecord spContainer = null;

            for (Iterator<EscherRecord> it = dg.GetChildIterator(); it.HasNext();) {
                EscherRecord rec = it.next();
                if (rec.GetRecordId() == EscherContainerRecord.SP_CONTAINER) {
                    spContainer = (EscherContainerRecord) rec;
                    break;
                }
            }
            _background = new Background(spContainer, null);
            _background.SetSheet(this);
        }
        return _background;
    }