diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-07-16 12:50:40 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-07-16 12:50:40 +0000 |
commit | 4a173780dd793aed02c54ba0a9c816ce1b1f8991 (patch) | |
tree | 0f7caea89796cffe5e2916d4f0c4b6e9a08ee9f4 /src/scratchpad | |
parent | cb1d9a0061ff0c2fe94e96883964d0fd42b48239 (diff) | |
download | poi-4a173780dd793aed02c54ba0a9c816ce1b1f8991.tar.gz poi-4a173780dd793aed02c54ba0a9c816ce1b1f8991.zip |
[bug-64605] add support for non-integer font sizes on character runs (use double instead of float)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879950 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad')
-rw-r--r-- | src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java index 530196eb26..4e51c747de 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java @@ -352,9 +352,9 @@ public final class CharacterRun extends Range implements Duplicatable, org.apach return _props.getHps(); } - public float getFontSizeAsFloat() + public Double getFontSizeAsDouble() { - return (float)getFontSize(); + return (double)getFontSize(); } public void setFontSize(int halfPoints) @@ -365,7 +365,7 @@ public final class CharacterRun extends Range implements Duplicatable, org.apach } - public void setFontSize(float halfPoints) + public void setFontSize(double halfPoints) { setFontSize(BigDecimal.valueOf(halfPoints).setScale(0, RoundingMode.HALF_UP).intValue()); } |