Package org.zkoss.zss.engine

Examples of org.zkoss.zss.engine.RefSheet.deleteRange()


  }
 
  private static ChangeInfo deleteHSSFRange(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean horizontal) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteRange(tRow, lCol, bRow, rCol, horizontal);
    final int num = horizontal ? rCol - lCol + 1 : bRow - tRow + 1;
    final List<CellRangeAddress[]> shiftedRanges = horizontal ?
      ((HSSFSheetImpl)sheet).shiftColumnsRange(rCol + 1, -1, -num, tRow, bRow, true, false, true, true, Range.FORMAT_NONE):
      ((HSSFSheetImpl)sheet).shiftRowsRange(bRow + 1, -1, -num, lCol, rCol, true, false, true, true, Range.FORMAT_NONE);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
View Full Code Here


  }

  private static ChangeInfo deleteXSSFRange(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean horizontal) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteRange(tRow, lCol, bRow, rCol, horizontal);
    final int num = horizontal ? rCol - lCol + 1 : bRow - tRow + 1;
    final List<CellRangeAddress[]> shiftedRanges = horizontal ?
      ((XSSFSheetImpl)sheet).shiftColumnsRange(rCol + 1, -1, -num, tRow, bRow, true, false, true, true, Range.FORMAT_NONE):
      ((XSSFSheetImpl)sheet).shiftRowsRange(bRow + 1, -1, -num, lCol, rCol, true, false, true, true, Range.FORMAT_NONE);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.