Exemplo n.º 1
0
        /**
         * If this formula was on an imported sheet, check that
         * cell references to another sheet are warned appropriately
         *
         * @return TRUE if this formula was able to be imported, FALSE otherwise
         */
        public bool handleImportedCellReferences(ExternalSheet es,
                                                 WorkbookMethods mt,
                                                 WorkbookSettings ws)
        {
            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,
                                               es, mt, ws);
                    parser.parse();
                }

                return(parser.handleImportedCellReferences());
            }
            catch (FormulaException e)
            {
                //logger.warn("cannot import formula:  " + e.Message);
                return(false);
            }
        }