From e5070e0cc2bc7c19668846d3faaa1b97e3440f06 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 20 Aug 2014 12:34:07 +0200 Subject: wizards: Number parsing Change-Id: If81db8cf10556dbb79458258a70760e3f12a5524 Reviewed-on: https://gerrit.libreoffice.org/11041 Reviewed-by: David Tardon Tested-by: David Tardon --- wizards/com/sun/star/wizards/common/NumericalHelper.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'wizards') diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index dd1c731fddb9..f2c6e767e271 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -97,8 +97,7 @@ public class NumericalHelper case STRING_TYPE: try { - Integer i = Integer.valueOf((String) aTypeObject.aValue); - retValue = i.intValue(); + retValue = Integer.parseInt((String) aTypeObject.aValue); } catch (java.lang.NumberFormatException e) { @@ -152,8 +151,7 @@ public class NumericalHelper case STRING_TYPE: try { - Float f = new Float((String) aTypeObject.aValue); - retValue = f.floatValue(); + retValue = Float.parseFloat((String) aTypeObject.aValue); } catch (java.lang.NumberFormatException e) { @@ -207,8 +205,7 @@ public class NumericalHelper case STRING_TYPE: try { - Boolean b = Boolean.valueOf((String) aTypeObject.aValue); - retValue = b.booleanValue(); + retValue = Boolean.parseBoolean((String) aTypeObject.aValue); } catch (java.lang.NumberFormatException e) { -- cgit