From e23c20828fc9387bf82aaf3f46297b1602613cf4 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Tue, 5 Apr 2016 23:30:37 +0000 Subject: [PATCH] bug 59264: move border style deprecations to POI 3.15 beta 2. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737894 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/hssf/usermodel/HSSFCellStyle.java | 8 +-- .../poi/ss/usermodel/BorderFormatting.java | 38 +++++++------- .../apache/poi/ss/usermodel/CellStyle.java | 50 +++++++------------ src/java/org/apache/poi/ss/util/CellUtil.java | 2 +- .../xssf/usermodel/XSSFBorderFormatting.java | 10 ++-- .../poi/xssf/usermodel/XSSFCellStyle.java | 16 +++--- 6 files changed, 55 insertions(+), 69 deletions(-) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java index a77361dd72..e5b079aa63 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java @@ -411,7 +411,7 @@ public final class HSSFCellStyle implements CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link HSSFCellStyle#setBorderLeft(BorderStyle)} instead. */ @Override public void setBorderLeft(short border) @@ -457,7 +457,7 @@ public final class HSSFCellStyle implements CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link HSSFCellStyle#setBorderRight(BorderStyle)} instead. */ @Override public void setBorderRight(short border) @@ -503,7 +503,7 @@ public final class HSSFCellStyle implements CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link HSSFCellStyle#setBorderTop(BorderStyle)} instead. */ @Override public void setBorderTop(short border) @@ -549,7 +549,7 @@ public final class HSSFCellStyle implements CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link HSSFCellStyle#setBorderBottom(BorderStyle)} instead. */ @Override public void setBorderBottom(short border) diff --git a/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java b/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java index 044d344879..6ee56629cc 100644 --- a/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java +++ b/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java @@ -25,73 +25,73 @@ package org.apache.poi.ss.usermodel; */ public interface BorderFormatting { /** No border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#NONE} */ short BORDER_NONE = 0x0; /** Thin border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#THIN} */ short BORDER_THIN = 0x1; /** Medium border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM} */ short BORDER_MEDIUM = 0x2; /** dash border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DASHED} */ short BORDER_DASHED = 0x3; /** dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DOTTED} */ short BORDER_DOTTED = 0x4; /** Thick border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#THICK} */ short BORDER_THICK = 0x5; /** double-line border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DOUBLE} */ short BORDER_DOUBLE = 0x6; /** hair-line border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#HAIR} */ short BORDER_HAIR = 0x7; /** Medium dashed border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM_DASHED} */ short BORDER_MEDIUM_DASHED = 0x8; /** dash-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DASH_DOT} */ short BORDER_DASH_DOT = 0x9; /** medium dash-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM_DASH_DOT} */ short BORDER_MEDIUM_DASH_DOT = 0xA; /** dash-dot-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DASH_DOT_DOT} */ short BORDER_DASH_DOT_DOT = 0xB; /** medium dash-dot-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM_DASH_DOT_DOT} */ short BORDER_MEDIUM_DASH_DOT_DOT = 0xC; /** slanted dash-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} + * @deprecated 3.15 beta 2. Use {@link BorderStyle#SLANTED_DASH_DOT} */ short BORDER_SLANTED_DASH_DOT = 0xD; @@ -124,7 +124,7 @@ public interface BorderFormatting { * Set bottom border. * * @param border MUST be a BORDER_* constant - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link BorderFormatting#setBorderBottom(BorderStyle)} */ void setBorderBottom(short border); @@ -139,7 +139,7 @@ public interface BorderFormatting { * Set diagonal border. * * @param border MUST be a BORDER_* constant - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link BorderFormatting#setBorderDiagonal(BorderStyle)} */ void setBorderDiagonal(short border); @@ -154,7 +154,7 @@ public interface BorderFormatting { * Set left border. * * @param border MUST be a BORDER_* constant - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link BorderFormatting#setBorderLeftBorderStyle)} */ void setBorderLeft(short border); @@ -169,7 +169,7 @@ public interface BorderFormatting { * Set right border. * * @param border MUST be a BORDER_* constant - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link BorderFormatting#setBorderRight(BorderStyle)} */ void setBorderRight(short border); @@ -184,7 +184,7 @@ public interface BorderFormatting { * Set top border. * * @param border MUST be a BORDER_* constant - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link BorderFormatting#setBorderTop(BorderStyle)} */ void setBorderTop(short border); diff --git a/src/java/org/apache/poi/ss/usermodel/CellStyle.java b/src/java/org/apache/poi/ss/usermodel/CellStyle.java index 526024fda2..518003944e 100644 --- a/src/java/org/apache/poi/ss/usermodel/CellStyle.java +++ b/src/java/org/apache/poi/ss/usermodel/CellStyle.java @@ -87,100 +87,86 @@ public interface CellStyle { /** * No border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#NONE} instead. */ - short BORDER_NONE = 0x0; /** * Thin border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#THIN} instead. */ - short BORDER_THIN = 0x1; /** * Medium border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM} instead. */ - short BORDER_MEDIUM = 0x2; /** * dash border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DASHED} instead. */ - short BORDER_DASHED = 0x3; /** * dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DOTTED} instead. */ - short BORDER_DOTTED = 0x4; /** * Thick border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#THICK} instead. */ - short BORDER_THICK = 0x5; /** * double-line border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DOUBLE} instead. */ - short BORDER_DOUBLE = 0x6; /** * hair-line border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#HAIR} instead. */ - short BORDER_HAIR = 0x7; /** * Medium dashed border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM_DASHED} instead. */ - short BORDER_MEDIUM_DASHED = 0x8; /** * dash-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DASH_DOT} instead. */ - short BORDER_DASH_DOT = 0x9; /** * medium dash-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM_DASH_DOT} instead. */ - short BORDER_MEDIUM_DASH_DOT = 0xA; /** * dash-dot-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#DASH_DOT_DOT} instead. */ - short BORDER_DASH_DOT_DOT = 0xB; /** * medium dash-dot-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#MEDIUM_DASH_DOT_DOT} instead. */ - short BORDER_MEDIUM_DASH_DOT_DOT = 0xC; /** * slanted dash-dot border - * @deprecated 3.15 beta 1. Use {@link BorderStyle} instead. + * @deprecated 3.15 beta 2. Use {@link BorderStyle#SLANTED_DASH_DOT} instead. */ - short BORDER_SLANTED_DASH_DOT = 0xD; /** No background */ @@ -430,7 +416,7 @@ public interface CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link #setBorderLeft(BorderStyle)} instead */ void setBorderLeft(short border); @@ -463,7 +449,7 @@ public interface CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link #setBorderRight(BorderStyle)} instead */ void setBorderRight(short border); @@ -496,7 +482,7 @@ public interface CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link #setBorderTop(BorderStyle)} instead */ void setBorderTop(short border); @@ -529,7 +515,7 @@ public interface CellStyle { * @see #BORDER_DASH_DOT_DOT * @see #BORDER_MEDIUM_DASH_DOT_DOT * @see #BORDER_SLANTED_DASH_DOT - * @deprecated 3.15 beta 1 + * @deprecated 3.15 beta 2. Use {@link #setBorderBottom(BorderStyle)} instead. */ void setBorderBottom(short border); diff --git a/src/java/org/apache/poi/ss/util/CellUtil.java b/src/java/org/apache/poi/ss/util/CellUtil.java index 3cc16dd63c..9ae26e4734 100644 --- a/src/java/org/apache/poi/ss/util/CellUtil.java +++ b/src/java/org/apache/poi/ss/util/CellUtil.java @@ -360,7 +360,7 @@ public final class CellUtil { if (value instanceof BorderStyle) { border = (BorderStyle) value; } - // @deprecated 3.15 beta 1. getBorderStyle will only work on BorderStyle enums instead of codes in the future. + // @deprecated 3.15 beta 2. getBorderStyle will only work on BorderStyle enums instead of codes in the future. else if (value instanceof Short) { short code = Short.valueOf((Short) value); border = BorderStyle.valueOf(code); diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java index 72329cf203..e48fe948e9 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java @@ -136,7 +136,7 @@ public class XSSFBorderFormatting implements BorderFormatting { } /** - * @deprecated 3.15 beta 1. Use {@link #setBorderBottom(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderBottom(BorderStyle)} */ @Override public void setBorderBottom(short border) { @@ -150,7 +150,7 @@ public class XSSFBorderFormatting implements BorderFormatting { } /** - * @deprecated 3.15 beta 1. Use {@link #setBorderDiagonal(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderDiagonal(BorderStyle)} */ @Override public void setBorderDiagonal(short border) { @@ -164,7 +164,7 @@ public class XSSFBorderFormatting implements BorderFormatting { } /** - * @deprecated 3.15 beta 1. Use {@link #setBorderLeft(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderLeft(BorderStyle)} */ @Override public void setBorderLeft(short border) { @@ -178,7 +178,7 @@ public class XSSFBorderFormatting implements BorderFormatting { } /** - * @deprecated 3.15 beta 1. Use {@link #setBorderRight(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderRight(BorderStyle)} */ @Override public void setBorderRight(short border) { @@ -192,7 +192,7 @@ public class XSSFBorderFormatting implements BorderFormatting { } /** - * @deprecated 3.15 beta 1. Use {@link #setBorderTop(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderTop(BorderStyle)} */ @Override public void setBorderTop(short border) { diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java index c91ac6522b..b6636868f6 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java @@ -270,7 +270,7 @@ public class XSSFCellStyle implements CellStyle { * Get the type of border to use for the bottom border of the cell * * @return border type as Java enum - * @deprecated 3.15 beta 1. Use {@link #getBorderBottom} + * @deprecated 3.15 beta 2. Use {@link #getBorderBottom} */ public BorderStyle getBorderBottomEnum() { return getBorderBottom(); @@ -298,7 +298,7 @@ public class XSSFCellStyle implements CellStyle { * Get the type of border to use for the left border of the cell * * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE} - * @deprecated 3.15 beta 1. Use {@link #getBorderLeft} + * @deprecated 3.15 beta 2. Use {@link #getBorderLeft} */ public BorderStyle getBorderLeftEnum() { return getBorderLeft(); @@ -326,7 +326,7 @@ public class XSSFCellStyle implements CellStyle { * Get the type of border to use for the right border of the cell * * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE} - * @deprecated 3.15 beta 1. Use {@link #getBorderRight} + * @deprecated 3.15 beta 2. Use {@link #getBorderRight} */ public BorderStyle getBorderRightEnum() { return getBorderRight(); @@ -354,7 +354,7 @@ public class XSSFCellStyle implements CellStyle { * Get the type of border to use for the top border of the cell * * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE} - * @deprecated 3.15 beta 1. Use {@link #getBorderTop} + * @deprecated 3.15 beta 2. Use {@link #getBorderTop} */ public BorderStyle getBorderTopEnum() { return getBorderTop(); @@ -790,7 +790,7 @@ public class XSSFCellStyle implements CellStyle { * Set the type of border to use for the bottom border of the cell * * @param border the type of border to use - * @deprecated 3.15 beta 1. Use {@link #setBorderBottom(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderBottom(BorderStyle)} */ @Override public void setBorderBottom(short border) { @@ -819,7 +819,7 @@ public class XSSFCellStyle implements CellStyle { /** * Set the type of border to use for the left border of the cell * @param border the type of border to use - * @deprecated 3.15 beta 1. Use {@link #setBorderLeft(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderLeft(BorderStyle)} */ @Override public void setBorderLeft(short border) { @@ -848,7 +848,7 @@ public class XSSFCellStyle implements CellStyle { * Set the type of border to use for the right border of the cell * * @param border the type of border to use - * @deprecated 3.15 beta 1. Use {@link #setBorderRight(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderRight(BorderStyle)} */ @Override public void setBorderRight(short border) { @@ -877,7 +877,7 @@ public class XSSFCellStyle implements CellStyle { * Set the type of border to use for the top border of the cell * * @param border the type of border to use - * @deprecated 3.15 beta 1. Use {@link #setBorderTop(BorderStyle)} + * @deprecated 3.15 beta 2. Use {@link #setBorderTop(BorderStyle)} */ @Override public void setBorderTop(short border) {