Class MergeUtil


  • public class MergeUtil
    extends Object
    Spreadsheet merge utils.
    • Constructor Detail

      • MergeUtil

        public MergeUtil()
    • Method Detail

      • convertSheetToSubsheets

        public static boolean convertSheetToSubsheets​(SpreadsheetDocument sheet,
                                                      List<com._1c.g5.v8.dt.moxel.ui.extension.diff.SubsheetElement> subsheets)
        Convert sheet to list of subsheets.
        Parameters:
        sheet - SpreadsheetDocument, must not be null
        subsheets - collection the result subsheets area placed to, must not be null
        Returns:
        true in case of successful conversion, false otherwise.
      • convertSubsheetToRowElements

        public static List<com._1c.g5.v8.dt.moxel.ui.extension.diff.RowElement> convertSubsheetToRowElements​(SpreadsheetDocument sheet,
                                                                                                             RowsArea subsheetRowsArea)
        Convert subsheet to the sequence of row elements.
        Parameters:
        sheet - SpreadsheetDocument, must not be null
        subsheetRowsArea - RowsArea of spreadsheet, must not be null
        Returns:
        list of RowElement instances, never null
      • convertRowToCellElements

        public static List<com._1c.g5.v8.dt.moxel.ui.extension.diff.CellElement> convertRowToCellElements​(SpreadsheetDocument sheet,
                                                                                                          int rowIndex)
        Convert row to the sequence of cell elements.
        Parameters:
        sheet - SpreadsheetDocument, must not be null
        rowIndex - row index
        Returns:
        list of CellElement instances, never null
      • getCenterArea

        public static RowsArea getCenterArea​(SpreadsheetDocument sheet)
        Get area between first named rows area and last named rows area.
        Parameters:
        sheet - SpreadsheetDocument, must not be null
        Returns:
        RowsArea which represents area between first named rows area and last named rows area, never null
      • getAreaBetweenNamedRows

        public static RowsArea getAreaBetweenNamedRows​(SpreadsheetDocument document,
                                                       String nameOfTopArea,
                                                       String nameOfBottomArea)
        Get area between 2 named rows areas.
        Parameters:
        document - SpreadsheetDocument, must not be null
        nameOfTopArea - name of first named area, must not be null
        nameOfBottomArea - name of second named area, must not be null
        Returns:
        RowsArea, never null