mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
remove ignoreInvalidColors param
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902634 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e0ca0baebf
commit
69036c64ea
@ -833,16 +833,14 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
||||
* Set the background fill color represented as a {@link org.apache.poi.ss.usermodel.Color} value.
|
||||
* <br>
|
||||
* @param color org.apache.poi.ss.usermodel.Color to set
|
||||
* @param ignoreInvalidColors when set to true, the method will ignore issues like trying to set a
|
||||
* HSSFColor on a XSSFCellStyle
|
||||
* @throws IllegalArgumentException if you provide a <code>Color</code> instance that is not a {@link XSSFColor}
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
@Override
|
||||
public void setFillBackgroundColor(org.apache.poi.ss.usermodel.Color color, boolean ignoreInvalidColors) {
|
||||
public void setFillBackgroundColor(org.apache.poi.ss.usermodel.Color color) {
|
||||
if (color == null || color instanceof XSSFColor) {
|
||||
setFillBackgroundColor((XSSFColor)color);
|
||||
} else if (!ignoreInvalidColors) {
|
||||
} else {
|
||||
throw new IllegalArgumentException("XSSFCellStyle only accepts XSSFColor instances");
|
||||
}
|
||||
}
|
||||
@ -905,16 +903,14 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
||||
* Set the foreground fill color represented as a {@link org.apache.poi.ss.usermodel.Color} value.
|
||||
* <br>
|
||||
* @param color the color to use
|
||||
* @param ignoreInvalidColors when set to true, the method will ignore issues like trying to set a
|
||||
* HSSFColor on a XSSFCellStyle
|
||||
* @throws IllegalArgumentException if you provide a <code>Color</code> instance that is not a {@link XSSFColor}
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
@Override
|
||||
public void setFillForegroundColor(org.apache.poi.ss.usermodel.Color color, boolean ignoreInvalidColors) {
|
||||
public void setFillForegroundColor(org.apache.poi.ss.usermodel.Color color) {
|
||||
if (color == null || color instanceof XSSFColor) {
|
||||
setFillForegroundColor((XSSFColor)color);
|
||||
} else if (!ignoreInvalidColors) {
|
||||
} else {
|
||||
throw new IllegalArgumentException("XSSFCellStyle only accepts XSSFColor instances");
|
||||
}
|
||||
}
|
||||
|
||||
@ -642,18 +642,16 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
||||
* Set the background fill color represented as a {@link org.apache.poi.ss.usermodel.Color} value.
|
||||
* <br>
|
||||
* @param color the color to use
|
||||
* @param ignoreInvalidColors when set to true, the method will ignore issues like trying to set a
|
||||
* XSSFColor on a HSSFCellStyle
|
||||
* @throws IllegalArgumentException if you provide a <code>Color</code> instance that is not a {@link HSSFColor}
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
@Override
|
||||
public void setFillBackgroundColor(org.apache.poi.ss.usermodel.Color color, boolean ignoreInvalidColors)
|
||||
public void setFillBackgroundColor(org.apache.poi.ss.usermodel.Color color)
|
||||
{
|
||||
if (color instanceof HSSFColor) {
|
||||
short index2 = ((HSSFColor)color).getIndex2();
|
||||
if (index2 != -1) setFillBackgroundColor(index2);
|
||||
} else if (color != null && !ignoreInvalidColors) {
|
||||
} else if (color != null) {
|
||||
throw new IllegalArgumentException("HSSFCellStyle only accepts HSSFColor instances");
|
||||
}
|
||||
}
|
||||
@ -703,18 +701,16 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
|
||||
* Set the foreground fill color represented as a {@link org.apache.poi.ss.usermodel.Color} value.
|
||||
* <br>
|
||||
* @param color the color to use
|
||||
* @param ignoreInvalidColors when set to true, the method will ignore issues like trying to set a
|
||||
* XSSFColor on a HSSFCellStyle
|
||||
* @throws IllegalArgumentException if you provide a <code>Color</code> instance that is not a {@link HSSFColor}
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
@Override
|
||||
public void setFillForegroundColor(org.apache.poi.ss.usermodel.Color color, boolean ignoreInvalidColors)
|
||||
public void setFillForegroundColor(org.apache.poi.ss.usermodel.Color color)
|
||||
{
|
||||
if (color instanceof HSSFColor) {
|
||||
short index2 = ((HSSFColor)color).getIndex2();
|
||||
if (index2 != -1) setFillForegroundColor(index2);
|
||||
} else if (color != null && !ignoreInvalidColors) {
|
||||
} else if (color != null) {
|
||||
throw new IllegalArgumentException("HSSFCellStyle only accepts HSSFColor instances");
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,20 +318,7 @@ public interface CellStyle {
|
||||
* @param color org.apache.poi.ss.usermodel.Color to set
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
default void setFillBackgroundColor(Color color) {
|
||||
setFillBackgroundColor(color, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the background fill color.
|
||||
* Uses a {@link org.apache.poi.ss.usermodel.Color} instead of an indexed color.
|
||||
*
|
||||
* @param color org.apache.poi.ss.usermodel.Color to set
|
||||
* @param ignoreInvalidColors when set to true, the method will ignore issues like trying to set a
|
||||
* HSSFColor on a XSSFCellStyle
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
void setFillBackgroundColor(Color color, boolean ignoreInvalidColors);
|
||||
void setFillBackgroundColor(Color color);
|
||||
|
||||
/**
|
||||
* get the background fill color, if the fill
|
||||
@ -363,20 +350,7 @@ public interface CellStyle {
|
||||
* @param color org.apache.poi.ss.usermodel.Color to set
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
default void setFillForegroundColor(Color color) {
|
||||
setFillForegroundColor(color, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the foreground fill color.
|
||||
* Uses a {@link org.apache.poi.ss.usermodel.Color} instead of an indexed color.
|
||||
*
|
||||
* @param color org.apache.poi.ss.usermodel.Color to set
|
||||
* @param ignoreInvalidColors when set to true, the method will ignore issues like trying to set a
|
||||
* HSSFColor on a XSSFCellStyle
|
||||
* @since POI 5.2.3
|
||||
*/
|
||||
void setFillForegroundColor(Color color, boolean ignoreInvalidColors);
|
||||
void setFillForegroundColor(Color color);
|
||||
|
||||
/**
|
||||
* get the foreground fill color, if the fill
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user