Esempio n. 1
0
        /**
         * Called when a column is removed on the specified sheet.  Notifies all
         * RCIR cells of this change. The default implementation here does nothing
         *
         * @param s the sheet on which the column was inserted
         * @param sheetIndex the sheet index on which the column was inserted
         * @param col the column number which was inserted
         */
        public override void columnRemoved(Sheet s, int sheetIndex, int col)
        {
            try
            {
                if (parser == null)
                {
                    byte[] formulaData  = formula.getFormulaData();
                    byte[] formulaBytes = new byte[formulaData.Length - 16];
                    System.Array.Copy(formulaData, 16,
                                      formulaBytes, 0, formulaBytes.Length);
                    parser = new FormulaParser(formulaBytes,
                                               this,
                                               getSheet().getWorkbook(),
                                               getSheet().getWorkbook(),
                                               getSheet().getWorkbookSettings());
                    parser.parse();
                }

                parser.columnRemoved(sheetIndex, col, s == getSheet());
            }
            catch (FormulaException e)
            {
                //logger.warn("cannot remove column within formula:  " + e.Message);
            }
        }
Esempio n. 2
0
        /**
         * Removes a column
         *
         * @param col the row to remove
         */
        public void removeColumn(int col)
        {
            if (formula1 != null)
            {
                formula1.columnRemoved(0, col, true);
            }

            if (formula2 != null)
            {
                formula2.columnRemoved(0, col, true);
            }

            if (column1 > col)
            {
                column1--;
            }

            if (column2 >= col && column2 != MAX_COLUMNS)
            {
                column2--;
            }
        }
Esempio n. 3
0
 /**
  * Called when a column is removed on the specified sheet.  Notifies all
  * RCIR cells of this change. The default implementation here does nothing
  *
  * @param s the sheet on which the column was inserted
  * @param sheetIndex the sheet index on which the column was inserted
  * @param col the column number which was inserted
  */
 public override void columnRemoved(Sheet s, int sheetIndex, int col)
 {
     parser.columnRemoved(sheetIndex, col, s == getSheet());
     formulaBytes = parser.getBytes();
 }