Save This Page
Home » jexcelapi_2_6_8 » jxl.biff.formula » [javadoc | source]
    1   /*********************************************************************
    2   *
    3   *      Copyright (C) 2003 Andrew Khan
    4   *
    5   * This library is free software; you can redistribute it and/or
    6   * modify it under the terms of the GNU Lesser General Public
    7   * License as published by the Free Software Foundation; either
    8   * version 2.1 of the License, or (at your option) any later version.
    9   *
   10   * This library is distributed in the hope that it will be useful,
   11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13   * Lesser General Public License for more details.
   14   *
   15   * You should have received a copy of the GNU Lesser General Public
   16   * License along with this library; if not, write to the Free Software
   17   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   18   ***************************************************************************/
   19   
   20   package jxl.biff.formula;
   21   
   22   /**
   23    * A dummy implementation used for typing information when tokens
   24    * are read when parsing strings.  These are then stored by the parser before
   25    * being re-stored as the appropriate RPN syntactic equivalent
   26    */
   27   class StringParseItem extends ParseItem
   28   {
   29     /**
   30      * Constructor
   31      */
   32     protected StringParseItem()
   33     {
   34     }
   35   
   36     /**
   37      * Gets the string representation of this item.  Does nothing here
   38      *
   39      * @param buf
   40      */
   41     void getString(StringBuffer buf)
   42     {
   43     }
   44   
   45     /**
   46      * Gets the token representation of this item in RPN.  Does nothing here
   47      *
   48      * @return the bytes applicable to this formula
   49      */
   50     byte[] getBytes()
   51     {
   52       return new byte[0];
   53     }
   54   
   55     /**
   56      * Default behaviour is to do nothing
   57      *
   58      * @param colAdjust the amount to add on to each relative cell reference
   59      * @param rowAdjust the amount to add on to each relative row reference
   60      */
   61     public void adjustRelativeCellReferences(int colAdjust, int rowAdjust)
   62     {
   63     }
   64   
   65     /**
   66      * Default behaviour is to do nothing
   67      *
   68      * @param sheetIndex the sheet on which the column was inserted
   69      * @param col the column number which was inserted
   70      * @param currentSheet TRUE if this formula is on the sheet in which the
   71      * column was inserted, FALSE otherwise
   72      */
   73     void columnInserted(int sheetIndex, int col, boolean currentSheet)
   74     {
   75     }
   76   
   77     /**
   78      * Called when a column is inserted on the specified sheet.  Tells
   79      * the formula  parser to update all of its cell references beyond this
   80      * column
   81      *
   82      * @param sheetIndex the sheet on which the column was removed
   83      * @param col the column number which was removed
   84      * @param currentSheet TRUE if this formula is on the sheet in which the
   85      * column was inserted, FALSE otherwise
   86      */
   87     void columnRemoved(int sheetIndex, int col, boolean currentSheet)
   88     {
   89     }
   90   
   91     /**
   92      * Called when a column is inserted on the specified sheet.  Tells
   93      * the formula  parser to update all of its cell references beyond this
   94      * column
   95      *
   96      * @param sheetIndex the sheet on which the row was inserted
   97      * @param row the row number which was inserted
   98      * @param currentSheet TRUE if this formula is on the sheet in which the
   99      * column was inserted, FALSE otherwise
  100      */
  101     void rowInserted(int sheetIndex, int row, boolean currentSheet)
  102     {
  103     }
  104   
  105     /**
  106      * Called when a column is inserted on the specified sheet.  Tells
  107      * the formula  parser to update all of its cell references beyond this
  108      * column
  109      *
  110      * @param sheetIndex the sheet on which the row was removed
  111      * @param row the row number which was removed
  112      * @param currentSheet TRUE if this formula is on the sheet in which the
  113      * column was inserted, FALSE otherwise
  114      */
  115     void rowRemoved(int sheetIndex, int row, boolean currentSheet)
  116     {
  117     }
  118   
  119     /**
  120      * If this formula was on an imported sheet, check that
  121      * cell references to another sheet are warned appropriately
  122      * Does nothing
  123      */
  124     void handleImportedCellReferences()
  125     {
  126     }
  127   
  128   }

Save This Page
Home » jexcelapi_2_6_8 » jxl.biff.formula » [javadoc | source]