예제 #1
0
        /**
         * Calls formulaCell.SetFormulaResult(null, null) recursively all the way up the tree of
         * dependencies. Calls usedCell.ClearConsumingCell(fc) for each child of a cell that Is
         * Cleared along the way.
         * @param formulaCells
         */
        protected void RecurseClearCachedFormulaResults()
        {
            FormulaCellCacheEntry[] formulaCells = GetConsumingCells();

            for (int i = 0; i < formulaCells.Length; i++)
            {
                FormulaCellCacheEntry fc = formulaCells[i];
                fc.ClearFormulaEntry();
                fc.RecurseClearCachedFormulaResults();
            }
        }
예제 #2
0
        /**
         * Identical To {@link #RecurseClearCachedFormulaResults()} except for the listener call-backs
         */
        protected void RecurseClearCachedFormulaResults(IEvaluationListener listener, int depth)
        {
            FormulaCellCacheEntry[] formulaCells = GetConsumingCells();

            listener.SortDependentCachedValues(formulaCells);
            for (int i = 0; i < formulaCells.Length; i++)
            {
                FormulaCellCacheEntry fc = formulaCells[i];
                listener.OnClearDependentCachedValue(fc, depth);
                fc.ClearFormulaEntry();
                fc.RecurseClearCachedFormulaResults(listener, depth + 1);
            }
        }