mirror of https://github.com/apache/poi.git
bug 55385: deprecate Font.getBoldweight and Font.setBoldweight
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a71a9df566
commit
0d929dbc09
|
@ -205,6 +205,7 @@ public final class HSSFFont implements Font {
|
||||||
* @param boldweight
|
* @param boldweight
|
||||||
* @see #BOLDWEIGHT_NORMAL
|
* @see #BOLDWEIGHT_NORMAL
|
||||||
* @see #BOLDWEIGHT_BOLD
|
* @see #BOLDWEIGHT_BOLD
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)} instead.
|
||||||
*/
|
*/
|
||||||
public void setBoldweight(short boldweight)
|
public void setBoldweight(short boldweight)
|
||||||
{
|
{
|
||||||
|
@ -227,6 +228,7 @@ public final class HSSFFont implements Font {
|
||||||
* @return boldweight
|
* @return boldweight
|
||||||
* @see #BOLDWEIGHT_NORMAL
|
* @see #BOLDWEIGHT_NORMAL
|
||||||
* @see #BOLDWEIGHT_BOLD
|
* @see #BOLDWEIGHT_BOLD
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold} instead.
|
||||||
*/
|
*/
|
||||||
public short getBoldweight()
|
public short getBoldweight()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,14 +21,16 @@ package org.apache.poi.ss.usermodel;
|
||||||
public interface Font {
|
public interface Font {
|
||||||
/**
|
/**
|
||||||
* Normal boldness (not bold)
|
* Normal boldness (not bold)
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17.
|
||||||
|
* Boldweight constants no longer needed due to {@link #getBold} and {@link #setBold(boolean)}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public final static short BOLDWEIGHT_NORMAL = 0x190;
|
public final static short BOLDWEIGHT_NORMAL = 0x190;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bold boldness (bold)
|
* Bold boldness (bold)
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17.
|
||||||
|
* Boldweight constants no longer needed due to {@link #getBold} and {@link #setBold(boolean)}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public final static short BOLDWEIGHT_BOLD = 0x2bc;
|
public final static short BOLDWEIGHT_BOLD = 0x2bc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -281,9 +283,15 @@ public interface Font {
|
||||||
*/
|
*/
|
||||||
public short getIndex();
|
public short getIndex();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)}.
|
||||||
|
*/
|
||||||
public void setBoldweight(short boldweight);
|
public void setBoldweight(short boldweight);
|
||||||
public void setBold(boolean bold);
|
public void setBold(boolean bold);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold()}.
|
||||||
|
*/
|
||||||
public short getBoldweight();
|
public short getBoldweight();
|
||||||
public boolean getBold();
|
public boolean getBold();
|
||||||
}
|
}
|
|
@ -297,6 +297,9 @@ public class XSSFFont implements Font {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)} instead.
|
||||||
|
*/
|
||||||
public void setBoldweight(short boldweight)
|
public void setBoldweight(short boldweight)
|
||||||
{
|
{
|
||||||
setBold(boldweight == BOLDWEIGHT_BOLD);
|
setBold(boldweight == BOLDWEIGHT_BOLD);
|
||||||
|
@ -307,8 +310,8 @@ public class XSSFFont implements Font {
|
||||||
* @return boldweight
|
* @return boldweight
|
||||||
* @see #BOLDWEIGHT_NORMAL
|
* @see #BOLDWEIGHT_NORMAL
|
||||||
* @see #BOLDWEIGHT_BOLD
|
* @see #BOLDWEIGHT_BOLD
|
||||||
|
* @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold} instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public short getBoldweight()
|
public short getBoldweight()
|
||||||
{
|
{
|
||||||
return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;
|
return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;
|
||||||
|
|
|
@ -69,7 +69,7 @@ public final class TestXSSFFont extends BaseTestFont{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBoldweight() {
|
public void testBold() {
|
||||||
CTFont ctFont=CTFont.Factory.newInstance();
|
CTFont ctFont=CTFont.Factory.newInstance();
|
||||||
CTBooleanProperty bool=ctFont.addNewB();
|
CTBooleanProperty bool=ctFont.addNewB();
|
||||||
bool.setVal(false);
|
bool.setVal(false);
|
||||||
|
|
Loading…
Reference in New Issue