aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-06-16 06:51:53 +0000
committerJaven O'Neal <onealj@apache.org>2016-06-16 06:51:53 +0000
commit0d929dbc093125ad10c2db04e907bc3c0509721a (patch)
treefa1c6dd38d9cc015c3bf07986c640fa0c86f9a3d
parenta71a9df56692ae30e16d1a991e468104a1aebf7e (diff)
downloadpoi-0d929dbc093125ad10c2db04e907bc3c0509721a.tar.gz
poi-0d929dbc093125ad10c2db04e907bc3c0509721a.zip
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
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFFont.java2
-rw-r--r--src/java/org/apache/poi/ss/usermodel/Font.java14
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java5
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java2
4 files changed, 18 insertions, 5 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
index aed0c513fd..cd3ac619d1 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
@@ -205,6 +205,7 @@ public final class HSSFFont implements Font {
* @param boldweight
* @see #BOLDWEIGHT_NORMAL
* @see #BOLDWEIGHT_BOLD
+ * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)} instead.
*/
public void setBoldweight(short boldweight)
{
@@ -227,6 +228,7 @@ public final class HSSFFont implements Font {
* @return boldweight
* @see #BOLDWEIGHT_NORMAL
* @see #BOLDWEIGHT_BOLD
+ * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold} instead.
*/
public short getBoldweight()
{
diff --git a/src/java/org/apache/poi/ss/usermodel/Font.java b/src/java/org/apache/poi/ss/usermodel/Font.java
index a145f132a2..d4bcc110a5 100644
--- a/src/java/org/apache/poi/ss/usermodel/Font.java
+++ b/src/java/org/apache/poi/ss/usermodel/Font.java
@@ -21,14 +21,16 @@ package org.apache.poi.ss.usermodel;
public interface Font {
/**
* 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;
/**
* 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;
/**
@@ -281,9 +283,15 @@ public interface Font {
*/
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 setBold(boolean bold);
+ /**
+ * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold()}.
+ */
public short getBoldweight();
public boolean getBold();
-} \ No newline at end of file
+}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java
index 8b5dc413b1..bdbbf74782 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java
@@ -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)
{
setBold(boldweight == BOLDWEIGHT_BOLD);
@@ -307,8 +310,8 @@ public class XSSFFont implements Font {
* @return boldweight
* @see #BOLDWEIGHT_NORMAL
* @see #BOLDWEIGHT_BOLD
+ * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold} instead.
*/
-
public short getBoldweight()
{
return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java
index 4289bab785..2eeb5e8bb0 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFont.java
@@ -69,7 +69,7 @@ public final class TestXSSFFont extends BaseTestFont{
}
@Test
- public void testBoldweight() {
+ public void testBold() {
CTFont ctFont=CTFont.Factory.newInstance();
CTBooleanProperty bool=ctFont.addNewB();
bool.setVal(false);