View | Details | Raw Unified | Return to bug 15537
Collapse All | Expand All

(-)org/apache/poi/hssf/model/Sheet.java (-2 / +69 lines)
Line 84 Link Here
84
 * @author  Brian Sanders (kestrel at burdell dot org) Active Cell support
Line 111 Link Here
112
    protected SelectionRecord           selection        = null;
Line 255 Link Here
257
            else if ( rec.getSid() == SelectionRecord.sid )
258
            {
259
                retval.selection = (SelectionRecord) rec;
260
            }
Line 379 Link Here
379
        records.add(retval.createSelection());
385
        retval.selection = 
380
--
386
                (SelectionRecord) retval.createSelection();
387
        records.add(retval.selection);
Line 1937 Link Here
1945
    }
1946
    
1947
    /**
1948
     * Returns the active row
1949
     *
1950
     * @see org.apache.poi.hssf.record.SelectionRecord
1951
     * @return row the active row index
1952
     */
1953
    public int getActiveCellRow()
1954
    {
1955
        if (selection == null)
1956
        {
1957
            return 0;
1958
        }
1959
        return selection.getActiveCellRow();
1960
    }
1961
    
1962
    /**
1963
     * Sets the active row
1964
     *
1965
     * @param row the row index
1966
     * @see org.apache.poi.hssf.record.SelectionRecord
1967
     */
1968
    public void setActiveCellRow(int row)
1969
    {
1970
        //shouldn't have a sheet w/o a SelectionRecord, but best to guard anyway
1971
        if (selection != null)
1972
        {
1973
            selection.setActiveCellRow(row);
1974
        }
1975
    }
1976
    
1977
    /**
1978
     * Returns the active column
1979
     *
1980
     * @see org.apache.poi.hssf.record.SelectionRecord
1981
     * @return row the active column index
1982
     */
1983
    public short getActiveCellCol()
1984
    {
1985
        if (selection == null)
1986
        {
1987
            return (short) 0;
1988
        }
1989
        return selection.getActiveCellCol();
1990
    }
1991
    
1992
    /**
1993
     * Sets the active column
1994
     *
1995
     * @param col the column index
1996
     * @see org.apache.poi.hssf.record.SelectionRecord
1997
     */
1998
    public void setActiveCellCol(short col)
1999
    {
2000
        //shouldn't have a sheet w/o a SelectionRecord, but best to guard anyway
2001
        if (selection != null)
2002
        {
2003
            selection.setActiveCellCol(col);
2004
        }

Return to bug 15537