text: public boolean updateFormulasAfterCellShift(FormulaShifter shifter, int currentExternSheetIx) {CellRangeAddress[] cellRanges = header.getCellRanges();boolean changed = false;List<CellRangeAddress> temp = new ArrayList<>();for (CellRangeAddress craOld : cellRanges) {CellRangeAddress craNew = BaseRowColShifter.shiftRange(shifter, craOld, currentExternSheetIx);if (craNew == null) {changed = true;continue;}temp.add(craNew);if (craNew != craOld) {changed = true;}}if (changed) {int nRanges = temp.size();if (nRanges == 0) {return false;}CellRangeAddress[] newRanges = new CellRangeAddress[nRanges];temp.toArray(newRanges);header.setCellRanges(newRanges);}for (CFRuleBase rule : rules) {Ptg[] ptgs;ptgs = rule.getParsedExpression1();if (ptgs != null && shifter.adjustFormula(ptgs, currentExternSheetIx)) {rule.setParsedExpression1(ptgs);}ptgs = rule.getParsedExpression2();if (ptgs != null && shifter.adjustFormula(ptgs, currentExternSheetIx)) {rule.setParsedExpression2(ptgs);}if (rule instanceof CFRule12Record) {CFRule12Record rule12 = (CFRule12Record)rule;ptgs = rule12.getParsedExpressionScale();if (ptgs != null && shifter.adjustFormula(ptgs, currentExternSheetIx)) {rule12.setParsedExpressionScale(ptgs);}}}return true;}