diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 09:47:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 12:00:24 +0100 |
commit | cb982f14796aa4dc4362bc6fde74161afa11777b (patch) | |
tree | 58267840e3cc2a2d6e344337fe3d735063900711 /scripting/examples/beanshell | |
parent | a71da3b7a80ca32b595a8ca0ea3da650b0af376c (diff) |
'new Float' is deprecated in Java
replace with Float.valueOf
Change-Id: Ib6408b24dac2953789d0ec67e73b8be8aefca252
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158784
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/examples/beanshell')
-rw-r--r-- | scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh | 2 | ||||
-rw-r--r-- | scripting/examples/beanshell/Highlight/highlighter.bsh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh b/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh index ac6efacce5d3..74f00ca1efa1 100644 --- a/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh +++ b/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh @@ -80,7 +80,7 @@ else // Sets the replaced text property fontweight value to Bold PropertyValue wv = new PropertyValue("CharWeight", -1, - new Float(com.sun.star.awt.FontWeight.BOLD), + Float.valueOf(com.sun.star.awt.FontWeight.BOLD), com.sun.star.beans.PropertyState.DIRECT_VALUE); // Sets the replaced text property color value to RGB parameter diff --git a/scripting/examples/beanshell/Highlight/highlighter.bsh b/scripting/examples/beanshell/Highlight/highlighter.bsh index a69f76e1a113..576650392c41 100644 --- a/scripting/examples/beanshell/Highlight/highlighter.bsh +++ b/scripting/examples/beanshell/Highlight/highlighter.bsh @@ -44,12 +44,12 @@ int replaceText(searchKey, color, bold) { wv = null; if (bold) { wv = new PropertyValue("CharWeight", -1, - new Float(com.sun.star.awt.FontWeight.BOLD), + Float.valueOf(com.sun.star.awt.FontWeight.BOLD), com.sun.star.beans.PropertyState.DIRECT_VALUE); } else { wv = new PropertyValue("CharWeight", -1, - new Float(com.sun.star.awt.FontWeight.NORMAL), + Float.valueOf(com.sun.star.awt.FontWeight.NORMAL), com.sun.star.beans.PropertyState.DIRECT_VALUE); } |