Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

XSSFRowShifter.java 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.xssf.usermodel.helpers;
  16. import org.apache.poi.ss.formula.FormulaShifter;
  17. import org.apache.poi.ss.usermodel.helpers.RowShifter;
  18. import org.apache.poi.util.Internal;
  19. import org.apache.poi.xssf.usermodel.XSSFRow;
  20. import org.apache.poi.xssf.usermodel.XSSFSheet;
  21. /**
  22. * Helper for shifting rows up or down
  23. */
  24. // non-Javadoc: When possible, code should be implemented in the RowShifter abstract class to avoid duplication with
  25. // {@link org.apache.poi.hssf.usermodel.helpers.HSSFRowShifter}
  26. public final class XSSFRowShifter extends RowShifter {
  27. public XSSFRowShifter(XSSFSheet sh) {
  28. super(sh);
  29. }
  30. @Override
  31. public void updateNamedRanges(FormulaShifter formulaShifter) {
  32. XSSFRowColShifter.updateNamedRanges(sheet, formulaShifter);
  33. }
  34. @Override
  35. public void updateFormulas(FormulaShifter formulaShifter) {
  36. XSSFRowColShifter.updateFormulas(sheet, formulaShifter);
  37. }
  38. /**
  39. * Update the formulas in specified row using the formula shifting policy specified by shifter
  40. *
  41. * @param row the row to update the formulas on
  42. * @param formulaShifter the formula shifting policy
  43. */
  44. @Internal(since="3.15 beta 2")
  45. public void updateRowFormulas(XSSFRow row, FormulaShifter formulaShifter) {
  46. XSSFRowColShifter.updateRowFormulas(row, formulaShifter);
  47. }
  48. @Override
  49. public void updateConditionalFormatting(FormulaShifter formulaShifter) {
  50. XSSFRowColShifter.updateConditionalFormatting(sheet, formulaShifter);
  51. }
  52. @Override
  53. public void updateHyperlinks(FormulaShifter formulaShifter) {
  54. XSSFRowColShifter.updateHyperlinks(sheet, formulaShifter);
  55. }
  56. }