This is an automated email from the ASF dual-hosted git repository. centic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/poi.git
commit b770a35abadbbd39e8e79cceebaed22c237c326c Author: Dominik Stadler <[email protected]> AuthorDate: Sun Nov 16 20:50:29 2025 +0100 Add missing @Deprecated and @Removal --- poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java | 1 + poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java b/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java index 761adedb53..1b3149da64 100644 --- a/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java +++ b/poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java @@ -170,6 +170,7 @@ public class HSSFColor implements Color { * @param color color to extract RGB from * @deprecated use {@link #HSSFColor(int, int, int)} instead */ + @Deprecated @Removal(version = "7.0.0") public HSSFColor(int index, int index2, java.awt.Color color) { this(index, index2, color.getRGB()); diff --git a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java index cf3525005a..2a0e478cd9 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java @@ -40,7 +40,7 @@ import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.util.ExceptionUtil; import org.apache.poi.util.Internal; - +import org.apache.poi.util.Removal; /** * Helper methods for when working with Usermodel sheets @@ -115,6 +115,8 @@ public class SheetUtil { * @return the width in pixels or -1 if cell is empty * @deprecated since POI 5.2.5, it is better to pass defaultCharWidth as a float */ + @Deprecated + @Removal(version = "7.0.0") public static double getCellWidth(Cell cell, int defaultCharWidth, DataFormatter formatter, boolean useMergedCells) { return getCellWidth(cell, (float) defaultCharWidth, formatter, useMergedCells); } @@ -150,6 +152,8 @@ public class SheetUtil { * @return the width in pixels or -1 if cell is empty * @deprecated since POI 5.2.5, it is better to pass defaultCharWidth as a float */ + @Deprecated + @Removal(version = "7.0.0") public static double getCellWidth(Cell cell, int defaultCharWidth, DataFormatter formatter, boolean useMergedCells, List<CellRangeAddress> mergedRegions) { return getCellWidth(cell, (float) defaultCharWidth, formatter, useMergedCells, mergedRegions); @@ -295,7 +299,7 @@ public class SheetUtil { TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext); return layout.getAdvance(); } - + /** * Copy text attributes from the supplied Font to Java2D AttributedString */ @@ -313,7 +317,7 @@ public class SheetUtil { TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext); return layout.getBounds().getWidth() > 0; } - + } /** @@ -365,6 +369,8 @@ public class SheetUtil { * @deprecated since POI 5.2.5, it is recommended to switch to {@link #getDefaultCharWidthAsFloat(Workbook)}. */ @Internal + @Deprecated + @Removal(version = "7.0.0") public static int getDefaultCharWidth(final Workbook wb) { return Math.round(getDefaultCharWidthAsFloat(wb)); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
