aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-07-16 14:51:23 +0000
committerPJ Fanning <fanningpj@apache.org>2020-07-16 14:51:23 +0000
commit38220f65b00801868a3c6942e5d3620a40380591 (patch)
tree8df828f71c55fc1f092e7b5214a413540556cfe8 /src/ooxml
parent41cedc65fc1e7adb4422f3f594bb377c92e18b4c (diff)
downloadpoi-38220f65b00801868a3c6942e5d3620a40380591.tar.gz
poi-38220f65b00801868a3c6942e5d3620a40380591.zip
[bug-64605] update javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879960 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml')
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDefaultRunStyle.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java5
2 files changed, 19 insertions, 2 deletions
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDefaultRunStyle.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDefaultRunStyle.java
index 884949d6d7..140ca8bfc2 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDefaultRunStyle.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDefaultRunStyle.java
@@ -17,6 +17,7 @@
package org.apache.poi.xwpf.usermodel;
+import org.apache.poi.util.Removal;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr;
import java.math.BigDecimal;
@@ -37,11 +38,26 @@ public class XWPFDefaultRunStyle {
return rpr;
}
+ /**
+ * Specifies the font size.
+ *
+ * @return value representing the font size (non-integer size will be rounded with half rounding up,
+ * -1 is returned if size not set)
+ * @deprecated use {@link #getFontSizeAsDouble()}
+ */
+ @Deprecated
+ @Removal(version = "6.0.0")
public int getFontSize() {
BigDecimal bd = getFontSizeAsBigDecimal(0);
return bd == null ? -1 : bd.intValue();
}
+ /**
+ * Specifies the font size.
+ *
+ * @return value representing the font size (can be null if size is not set)
+ * @since POI 5.0.0
+ */
public Double getFontSizeAsDouble() {
BigDecimal bd = getFontSizeAsBigDecimal(1);
return bd == null ? null : bd.doubleValue();
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
index 0dece4dab6..96821bde3b 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
@@ -867,7 +867,8 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
* Specifies the font size which shall be applied to all non complex script
* characters in the contents of this run when displayed.
*
- * @return value representing the font size (non-integer size will be rounded with half rounding up)
+ * @return value representing the font size (non-integer size will be rounded with half rounding up,
+ * -1 is returned if size not set)
* @deprecated use {@link #getFontSizeAsDouble()}
*/
@Deprecated
@@ -882,7 +883,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
* Specifies the font size which shall be applied to all non complex script
* characters in the contents of this run when displayed.
*
- * @return value representing the font size
+ * @return value representing the font size (can be null if size not set)
* @since POI 5.0.0
*/
@Override