summaryrefslogtreecommitdiff
path: root/wizards/com
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 09:52:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 12:00:34 +0100
commit41d9584179ef7b4e18eda47c2c0a955df8c087a5 (patch)
tree272551363a71f4ea34c032504cc4e058a60a91ae /wizards/com
parentcb982f14796aa4dc4362bc6fde74161afa11777b (diff)
'new Double' is deprecated in Java
replace with Double.valueOf Change-Id: If5be8e500e31ebf9d5fb20ea7dd474677d7c74ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'wizards/com')
-rw-r--r--wizards/com/sun/star/wizards/common/NumericalHelper.java2
-rw-r--r--wizards/com/sun/star/wizards/db/RecordParser.java4
-rw-r--r--wizards/com/sun/star/wizards/document/Control.java4
-rw-r--r--wizards/com/sun/star/wizards/document/DatabaseControl.java16
4 files changed, 13 insertions, 13 deletions
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index b15d4af02bfc..082a2a7733a9 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -203,7 +203,7 @@ public class NumericalHelper
break;
case TypeClass.DOUBLE_value:
aTypeObject.iType = DOUBLE_TYPE;
- aTypeObject.aValue = new Double(AnyConverter.toDouble(aValue));
+ aTypeObject.aValue = Double.valueOf(AnyConverter.toDouble(aValue));
break;
case TypeClass.STRING_value:
aTypeObject.iType = STRING_TYPE;
diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java
index bb35b041fe97..e4295e473424 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -97,11 +97,11 @@ public class RecordParser extends QueryMetaData
Double DblValue;
if (bisDate)
{
- DblValue = new Double(xResultSetRow.getDouble(ColIndex) + super.getNullDateCorrection());
+ DblValue = Double.valueOf(xResultSetRow.getDouble(ColIndex) + super.getNullDateCorrection());
}
else
{
- DblValue = new Double(xResultSetRow.getDouble(ColIndex));
+ DblValue = Double.valueOf(xResultSetRow.getDouble(ColIndex));
}
if (!xResultSetRow.wasNull())
{
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java
index 5731aa7cf26f..73f91b75e872 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -280,11 +280,11 @@ public class Control extends Shape
if (dblEffMax == 0)
{
// This is relevant for decimal fields
- xPropertySet.setPropertyValue("EffectiveValue", new Double(99999));
+ xPropertySet.setPropertyValue("EffectiveValue", Double.valueOf(99999));
}
else
{
- xPropertySet.setPropertyValue("EffectiveValue", new Double(dblEffMax)); //new Double(100000.2));
+ xPropertySet.setPropertyValue("EffectiveValue", Double.valueOf(dblEffMax)); //Double.valueOf(100000.2));
}
aPreferredSize = getPeer().getPreferredSize();
xPropertySet.setPropertyValue("EffectiveValue", com.sun.star.uno.Any.VOID);
diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java
index a90cc849fb7f..fc756fa4c049 100644
--- a/wizards/com/sun/star/wizards/document/DatabaseControl.java
+++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java
@@ -169,20 +169,20 @@ public class DatabaseControl extends Control
switch (getFieldType())
{
case DataType.BIGINT:
- xPropertySet.setPropertyValue("EffectiveMax", new Double(Long.MAX_VALUE));
- xPropertySet.setPropertyValue("EffectiveMin", new Double(Long.MIN_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMax", Double.valueOf(Long.MAX_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMin", Double.valueOf(Long.MIN_VALUE));
break;
case DataType.INTEGER:
- xPropertySet.setPropertyValue("EffectiveMax", new Double(Integer.MAX_VALUE));
- xPropertySet.setPropertyValue("EffectiveMin", new Double(Integer.MIN_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMax", Double.valueOf(Integer.MAX_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMin", Double.valueOf(Integer.MIN_VALUE));
break;
case DataType.SMALLINT:
- xPropertySet.setPropertyValue("EffectiveMax", new Double(Short.MAX_VALUE));
- xPropertySet.setPropertyValue("EffectiveMin", new Double(Short.MIN_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMax", Double.valueOf(Short.MAX_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMin", Double.valueOf(Short.MIN_VALUE));
break;
case DataType.TINYINT:
- xPropertySet.setPropertyValue("EffectiveMax", new Double(Byte.MAX_VALUE));
- xPropertySet.setPropertyValue("EffectiveMin", new Double(Byte.MIN_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMax", Double.valueOf(Byte.MAX_VALUE));
+ xPropertySet.setPropertyValue("EffectiveMin", Double.valueOf(Byte.MIN_VALUE));
break;
case DataType.FLOAT:
case DataType.REAL: