org.apache.poi.ss.usermodel.helpers

## Class BaseRowColShifter

- java.lang.Object
- - org.apache.poi.ss.usermodel.helpers.BaseRowColShifter

- Direct Known Subclasses:
    ColumnShifter, RowShifter

      @Internal
      public abstract class BaseRowColShifter
      extends java.lang.Object

  Class for code common to `RowShifter` and `ColumnShifter` Helper for shifting rows up or down and columns left and right
  Since:
    POI 4.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseRowColShifter()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.util.List<CellRangeAddress>` | `shiftMergedRegions(int start, int end, int n)` Shifts, grows, or shrinks the merged regions due to a row shift (`RowShifter`) or column shift (`ColumnShifter`).
    `static CellRangeAddress` | `shiftRange(FormulaShifter formulaShifter, CellRangeAddress cra, int currentExternSheetIx)`
    `abstract void` | `updateConditionalFormatting(FormulaShifter formulaShifter)` Update conditional formatting
    `abstract void` | `updateFormulas(FormulaShifter formulaShifter)` Update formulas.
    `abstract void` | `updateHyperlinks(FormulaShifter formulaShifter)` Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink is of type LINK_DOCUMENT and refers to a cell that was shifted).
    `abstract void` | `updateNamedRanges(FormulaShifter formulaShifter)` Update named ranges

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseRowColShifter

          public BaseRowColShifter()

  - ### Method Detail

    - #### updateNamedRanges

          public abstract void updateNamedRanges(FormulaShifter formulaShifter)

      Update named ranges

    - #### updateFormulas

          public abstract void updateFormulas(FormulaShifter formulaShifter)

      Update formulas.

    - #### shiftMergedRegions

          public abstract java.util.List<CellRangeAddress> shiftMergedRegions(int start,
                                                                              int end,
                                                                              int n)

      Shifts, grows, or shrinks the merged regions due to a row shift (`RowShifter`) or column shift (`ColumnShifter`). Merged regions that are completely overlaid by shifting will be deleted.
      Parameters:
        `start` - the first row or column to be shifted
        `end` - the last row or column to be shifted
        `n` - the number of rows or columns to shift
      Returns:
        a list of affected merged regions, excluding contain deleted ones

    - #### updateConditionalFormatting

          public abstract void updateConditionalFormatting(FormulaShifter formulaShifter)

      Update conditional formatting
      Parameters:
        `formulaShifter` - The `FormulaShifter` to use

    - #### updateHyperlinks

          public abstract void updateHyperlinks(FormulaShifter formulaShifter)

      Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink is of type LINK_DOCUMENT and refers to a cell that was shifted). Hyperlinks do not track the content they point to.
      Parameters:
        `formulaShifter` - the formula shifting policy

    - #### shiftRange

          public static CellRangeAddress shiftRange(FormulaShifter formulaShifter,
                                                    CellRangeAddress cra,
                                                    int currentExternSheetIx)

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.