poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55982] ClassCastException from BOFRecord to TabIdRecord
Date Thu, 09 Jan 2014 16:44:46 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55982

--- Comment #3 from Matthieu BACHELIER <bachelier.matthieu@gmail.com> ---
Sure, I change the method fixTabIdRecord() :

    /**
     * Make the tabid record look like the current situation.
     */
    private void fixTabIdRecord() {
        Record r = records.get(records.getTabpos());
        if (r instanceof TabIdRecord) {
            TabIdRecord tir = ( TabIdRecord ) r;
            int sz = tir.getRecordSize();
            short[]     tia = new short[ boundsheets.size() ];

            for (short k = 0; k < tia.length; k++) {
                tia[ k ] = k;
            }
            tir.setTabIdArray(tia);
            // No need to return int because it's not used in this class
            // return tir.getRecordSize() - sz;
        } else if (r instanceof BOFRecord) {
            // so what ?
            BOFRecord bof = null; 
        }
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message