summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 09:47:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 12:00:24 +0100
commitcb982f14796aa4dc4362bc6fde74161afa11777b (patch)
tree58267840e3cc2a2d6e344337fe3d735063900711 /scripting
parenta71da3b7a80ca32b595a8ca0ea3da650b0af376c (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')
-rw-r--r--scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh2
-rw-r--r--scripting/examples/beanshell/Highlight/highlighter.bsh4
-rw-r--r--scripting/examples/java/Highlight/HighlightText.java2
3 files changed, 4 insertions, 4 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);
}
diff --git a/scripting/examples/java/Highlight/HighlightText.java b/scripting/examples/java/Highlight/HighlightText.java
index f39ccbfa22bf..cc381cec8e59 100644
--- a/scripting/examples/java/Highlight/HighlightText.java
+++ b/scripting/examples/java/Highlight/HighlightText.java
@@ -142,7 +142,7 @@ public class HighlightText implements com.sun.star.awt.XActionListener {
// 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