org.apache.poi.ss.usermodel

## Class RangeCopier

- java.lang.Object
- - org.apache.poi.ss.usermodel.RangeCopier

- Direct Known Subclasses:
    HSSFRangeCopier, XSSFRangeCopier

      @Beta
      public abstract class RangeCopier
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RangeCopier(Sheet sheet)`
    `RangeCopier(Sheet sourceSheet, Sheet destSheet)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `adjustCellReferencesInsideFormula(Cell cell, Sheet destSheet, int deltaX, int deltaY)`
    `protected boolean` | `adjustInBothDirections(Ptg[] ptgs, int sheetIndex, int deltaX, int deltaY)`
    `static void` | `cloneCellContent(Cell srcCell, Cell destCell, java.util.Map<java.lang.Integer,CellStyle> styleMap)`
    `void` | `copyRange(CellRangeAddress tilePatternRange, CellRangeAddress tileDestRange)` Uses input pattern to tile destination region, overwriting existing content.

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

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

- - ### Constructor Detail

    - #### RangeCopier

          public RangeCopier(Sheet sourceSheet,
                             Sheet destSheet)

    - #### RangeCopier

          public RangeCopier(Sheet sheet)

  - ### Method Detail

    - #### copyRange

          public void copyRange(CellRangeAddress tilePatternRange,
                                CellRangeAddress tileDestRange)

      Uses input pattern to tile destination region, overwriting existing content. Works in following manner : 1.Start from top-left of destination. 2.Paste source but only inside of destination borders. 3.If there is space left on right or bottom side of copy, process it as in step 2.
      Parameters:
        `tilePatternRange` - source range which should be copied in tiled manner
        `tileDestRange` - destination range, which should be overridden

    - #### adjustCellReferencesInsideFormula

          protected abstract void adjustCellReferencesInsideFormula(Cell cell,
                                                                    Sheet destSheet,
                                                                    int deltaX,
                                                                    int deltaY)

    - #### adjustInBothDirections

          protected boolean adjustInBothDirections(Ptg[] ptgs,
                                                   int sheetIndex,
                                                   int deltaX,
                                                   int deltaY)

    - #### cloneCellContent

          public static void cloneCellContent(Cell srcCell,
                                              Cell destCell,
                                              java.util.Map<java.lang.Integer,CellStyle> styleMap)

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