mirror of https://github.com/apache/poi.git
remove some deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d4dde4e36e
commit
3e4d80f66a
|
@ -33,7 +33,6 @@ import org.apache.poi.util.LittleEndianInput;
|
|||
import org.apache.poi.util.LittleEndianOutput;
|
||||
import org.apache.poi.util.POILogFactory;
|
||||
import org.apache.poi.util.POILogger;
|
||||
import org.apache.poi.util.Removal;
|
||||
|
||||
/**
|
||||
* Data Bar Conditional Formatting Rule Record.
|
||||
|
@ -154,16 +153,6 @@ public final class DataBarFormatting implements Duplicatable, GenericRecord {
|
|||
return GenericRecordJsonWriter.marshal(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #copy()} instead
|
||||
*/
|
||||
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
|
||||
@Deprecated
|
||||
@Removal(version = "5.0.0")
|
||||
public DataBarFormatting clone() {
|
||||
return copy();
|
||||
}
|
||||
|
||||
public DataBarFormatting copy() {
|
||||
return new DataBarFormatting(this);
|
||||
}
|
||||
|
|
|
@ -294,12 +294,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return HorizontalAlignment.forInt(_format.getAlignment());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HorizontalAlignment getAlignmentEnum()
|
||||
{
|
||||
return getAlignment();
|
||||
}
|
||||
|
||||
/**
|
||||
* set whether the text should be wrapped
|
||||
* @param wrapped wrap text or not
|
||||
|
@ -336,11 +330,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return VerticalAlignment.forInt(_format.getVerticalAlignment());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VerticalAlignment getVerticalAlignmentEnum() {
|
||||
return getVerticalAlignment();
|
||||
}
|
||||
|
||||
/**
|
||||
* set the degree of rotation for the text in the cell
|
||||
*
|
||||
|
@ -430,9 +419,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf(_format.getBorderLeft());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderLeftEnum() { return getBorderLeft(); }
|
||||
|
||||
/**
|
||||
* set the type of border to use for the right border of the cell
|
||||
* @param border type
|
||||
|
@ -451,9 +437,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf(_format.getBorderRight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderRightEnum() { return getBorderRight(); }
|
||||
|
||||
/**
|
||||
* set the type of border to use for the top border of the cell
|
||||
* @param border type
|
||||
|
@ -472,9 +455,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf(_format.getBorderTop());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderTopEnum() { return getBorderTop(); }
|
||||
|
||||
/**
|
||||
* set the type of border to use for the bottom border of the cell
|
||||
* @param border type
|
||||
|
@ -493,9 +473,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf(_format.getBorderBottom());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderBottomEnum() { return getBorderBottom(); }
|
||||
|
||||
/**
|
||||
* set the color to use for the left border
|
||||
* @param color The index of the color definition
|
||||
|
@ -598,9 +575,6 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return FillPatternType.forInt(_format.getAdtlFillPattern());
|
||||
}
|
||||
|
||||
@Override
|
||||
public FillPatternType getFillPatternEnum() { return getFillPattern(); }
|
||||
|
||||
/**
|
||||
* Checks if the background and foreground fills are set correctly when one
|
||||
* or the other is set to the default color.
|
||||
|
|
|
@ -120,15 +120,6 @@ public interface CellStyle {
|
|||
*/
|
||||
HorizontalAlignment getAlignment();
|
||||
|
||||
/**
|
||||
* get the type of horizontal alignment for the cell
|
||||
* @return align - the type of alignment
|
||||
* @deprecated use <code>getAlignment()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
HorizontalAlignment getAlignmentEnum();
|
||||
|
||||
/**
|
||||
* Set whether the text should be wrapped.
|
||||
* Setting this flag to <code>true</code> make all content visible
|
||||
|
@ -156,15 +147,6 @@ public interface CellStyle {
|
|||
*/
|
||||
VerticalAlignment getVerticalAlignment();
|
||||
|
||||
/**
|
||||
* get the type of vertical alignment for the cell
|
||||
* @return align the type of alignment
|
||||
* @deprecated use <code>getVerticalAlignment()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
VerticalAlignment getVerticalAlignmentEnum();
|
||||
|
||||
/**
|
||||
* set the degree of rotation for the text in the cell.
|
||||
*
|
||||
|
@ -214,16 +196,6 @@ public interface CellStyle {
|
|||
*/
|
||||
BorderStyle getBorderLeft();
|
||||
|
||||
/**
|
||||
* get the type of border to use for the left border of the cell
|
||||
* @return border type
|
||||
* @since POI 3.15
|
||||
* @deprecated use <code>getBorderLeft()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
BorderStyle getBorderLeftEnum();
|
||||
|
||||
/**
|
||||
* set the type of border to use for the right border of the cell
|
||||
* @param border type
|
||||
|
@ -238,16 +210,6 @@ public interface CellStyle {
|
|||
*/
|
||||
BorderStyle getBorderRight();
|
||||
|
||||
/**
|
||||
* get the type of border to use for the right border of the cell
|
||||
* @return border type
|
||||
* @since POI 3.15
|
||||
* @deprecated use <code>getBorderRight()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
BorderStyle getBorderRightEnum();
|
||||
|
||||
/**
|
||||
* set the type of border to use for the top border of the cell
|
||||
* @param border type
|
||||
|
@ -262,16 +224,6 @@ public interface CellStyle {
|
|||
*/
|
||||
BorderStyle getBorderTop();
|
||||
|
||||
/**
|
||||
* get the type of border to use for the top border of the cell
|
||||
* @return border type
|
||||
* @since POI 3.15
|
||||
* @deprecated use <code>getBorderTop()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
BorderStyle getBorderTopEnum();
|
||||
|
||||
/**
|
||||
* set the type of border to use for the bottom border of the cell
|
||||
* @param border type
|
||||
|
@ -286,16 +238,6 @@ public interface CellStyle {
|
|||
*/
|
||||
BorderStyle getBorderBottom();
|
||||
|
||||
/**
|
||||
* get the type of border to use for the bottom border of the cell
|
||||
* @return border type
|
||||
* @since POI 3.15
|
||||
* @deprecated use <code>getBorderBottom()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
BorderStyle getBorderBottomEnum();
|
||||
|
||||
/**
|
||||
* set the color to use for the left border
|
||||
* @param color The index of the color definition
|
||||
|
@ -360,17 +302,6 @@ public interface CellStyle {
|
|||
*/
|
||||
FillPatternType getFillPattern();
|
||||
|
||||
/**
|
||||
* Get the fill pattern
|
||||
*
|
||||
* @return the fill pattern, default value is {@link FillPatternType#NO_FILL}
|
||||
* @since POI 3.15 beta 3
|
||||
* @deprecated use <code>getFillPattern()</code> instead
|
||||
*/
|
||||
@Removal(version = "4.2")
|
||||
@Deprecated
|
||||
FillPatternType getFillPatternEnum();
|
||||
|
||||
/**
|
||||
* set the background fill color.
|
||||
*
|
||||
|
|
|
@ -229,11 +229,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return HorizontalAlignment.GENERAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HorizontalAlignment getAlignmentEnum() {
|
||||
return getAlignment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderBottom() {
|
||||
if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
|
||||
|
@ -247,11 +242,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf((short)(ptrn.intValue() - 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderBottomEnum() {
|
||||
return getBorderBottom();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderLeft() {
|
||||
if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
|
||||
|
@ -265,9 +255,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf((short)(ptrn.intValue() - 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderLeftEnum() { return getBorderLeft(); }
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderRight() {
|
||||
if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
|
||||
|
@ -281,11 +268,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf((short)(ptrn.intValue() - 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderRightEnum() {
|
||||
return getBorderRight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderTop() {
|
||||
if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
|
||||
|
@ -299,11 +281,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return BorderStyle.valueOf((short) (ptrn.intValue() - 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderTopEnum() {
|
||||
return getBorderTop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the color to use for the bottom border
|
||||
* <br>
|
||||
|
@ -448,11 +425,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return FillPatternType.forInt(ptrn.intValue() - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FillPatternType getFillPatternEnum() {
|
||||
return getFillPattern();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the font for this style
|
||||
* @return Font - font
|
||||
|
@ -661,11 +633,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return VerticalAlignment.BOTTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VerticalAlignment getVerticalAlignmentEnum() {
|
||||
return getVerticalAlignment();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the text should be wrapped
|
||||
*
|
||||
|
|
|
@ -590,13 +590,11 @@ public class TestXSSFCellStyle {
|
|||
assertEquals(IndexedColors.AUTOMATIC.getIndex(), defaultStyle.getFillForegroundColor());
|
||||
assertNull(defaultStyle.getFillForegroundXSSFColor());
|
||||
assertEquals(FillPatternType.NO_FILL, defaultStyle.getFillPattern());
|
||||
assertEquals(FillPatternType.NO_FILL, defaultStyle.getFillPatternEnum());
|
||||
|
||||
XSSFCellStyle customStyle = wb.createCellStyle();
|
||||
|
||||
customStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
assertEquals(FillPatternType.SOLID_FOREGROUND, customStyle.getFillPattern());
|
||||
assertEquals(FillPatternType.SOLID_FOREGROUND, customStyle.getFillPatternEnum());
|
||||
assertEquals(3, styles.getFills().size());
|
||||
|
||||
customStyle.setFillForegroundColor(IndexedColors.BRIGHT_GREEN.getIndex());
|
||||
|
@ -838,7 +836,7 @@ public class TestXSSFCellStyle {
|
|||
assertEquals("TestingFont", clone.getFont().getFontName());
|
||||
assertEquals(fmtClone.getFormat("Test##"), clone.getDataFormat());
|
||||
assertNotEquals(fmtClone.getFormat("Test##"), fmt.getFormat("Test##"));
|
||||
assertEquals(clone.getFillPatternEnum(), FillPatternType.SOLID_FOREGROUND);
|
||||
assertEquals(clone.getFillPattern(), FillPatternType.SOLID_FOREGROUND);
|
||||
assertEquals(clone.getFillForegroundColor(), IndexedColors.BRIGHT_GREEN.getIndex());
|
||||
|
||||
// Save it and re-check
|
||||
|
@ -852,7 +850,7 @@ public class TestXSSFCellStyle {
|
|||
assertEquals("TestingFont", reload.getFont().getFontName());
|
||||
assertEquals(fmtClone.getFormat("Test##"), reload.getDataFormat());
|
||||
assertNotEquals(fmtClone.getFormat("Test##"), fmt.getFormat("Test##"));
|
||||
assertEquals(clone.getFillPatternEnum(), FillPatternType.SOLID_FOREGROUND);
|
||||
assertEquals(clone.getFillPattern(), FillPatternType.SOLID_FOREGROUND);
|
||||
assertEquals(clone.getFillForegroundColor(), IndexedColors.BRIGHT_GREEN.getIndex());
|
||||
|
||||
XSSFWorkbook wbOrig2 = XSSFTestDataSamples.writeOutAndReadBack(wbOrig);
|
||||
|
|
|
@ -105,7 +105,6 @@ public final class TestHSSFPalette {
|
|||
assertEquals(64, cellA.getCellStyle().getFillBackgroundColor());
|
||||
assertEquals(Font.COLOR_NORMAL, cellA.getCellStyle().getFont(book).getColor());
|
||||
assertEquals(FillPatternType.NO_FILL, cellA.getCellStyle().getFillPattern());
|
||||
assertEquals(FillPatternType.NO_FILL, cellA.getCellStyle().getFillPatternEnum());
|
||||
assertEquals("0:0:0", p.getColor((short)64).getHexString());
|
||||
assertNull(p.getColor((short) 32767));
|
||||
|
||||
|
@ -115,7 +114,6 @@ public final class TestHSSFPalette {
|
|||
assertEquals(64, cellB.getCellStyle().getFillBackgroundColor());
|
||||
assertEquals(10, cellB.getCellStyle().getFont(book).getColor());
|
||||
assertEquals(FillPatternType.NO_FILL, cellB.getCellStyle().getFillPattern());
|
||||
assertEquals(FillPatternType.NO_FILL, cellB.getCellStyle().getFillPatternEnum());
|
||||
assertEquals("0:0:0", p.getColor((short)64).getHexString());
|
||||
assertEquals("FFFF:0:0", p.getColor((short)10).getHexString());
|
||||
|
||||
|
@ -125,7 +123,6 @@ public final class TestHSSFPalette {
|
|||
assertEquals(64, cellC.getCellStyle().getFillBackgroundColor());
|
||||
assertEquals(10, cellC.getCellStyle().getFont(book).getColor());
|
||||
assertEquals(FillPatternType.SOLID_FOREGROUND, cellC.getCellStyle().getFillPattern());
|
||||
assertEquals(FillPatternType.SOLID_FOREGROUND, cellC.getCellStyle().getFillPatternEnum());
|
||||
assertEquals("0:FFFF:0", p.getColor((short)11).getHexString());
|
||||
assertEquals("FFFF:0:0", p.getColor((short)10).getHexString());
|
||||
|
||||
|
@ -135,7 +132,6 @@ public final class TestHSSFPalette {
|
|||
assertEquals(64, cellD.getCellStyle().getFillBackgroundColor());
|
||||
assertEquals(14, cellD.getCellStyle().getFont(book).getColor());
|
||||
assertEquals(FillPatternType.NO_FILL, cellD.getCellStyle().getFillPattern());
|
||||
assertEquals(FillPatternType.NO_FILL, cellD.getCellStyle().getFillPatternEnum());
|
||||
assertEquals("FFFF:FFFF:0", p.getColor((short)13).getHexString());
|
||||
assertEquals("FFFF:0:FFFF", p.getColor((short)14).getHexString());
|
||||
|
||||
|
@ -145,7 +141,6 @@ public final class TestHSSFPalette {
|
|||
assertEquals(64, cellE.getCellStyle().getFillBackgroundColor());
|
||||
assertEquals(14, cellE.getCellStyle().getFont(book).getColor());
|
||||
assertEquals(FillPatternType.NO_FILL, cellE.getCellStyle().getFillPattern());
|
||||
assertEquals(FillPatternType.NO_FILL, cellE.getCellStyle().getFillPatternEnum());
|
||||
assertEquals("FFFF:FFFF:0", p.getColor((short)13).getHexString());
|
||||
assertEquals("FFFF:0:FFFF", p.getColor((short)14).getHexString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue