diff options
author | rbuj <robert.buj@gmail.com> | 2014-08-20 12:34:07 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-08-20 09:09:21 -0500 |
commit | e5070e0cc2bc7c19668846d3faaa1b97e3440f06 (patch) | |
tree | f71a7c4c105292dc3f1fff052004a9e362d666ab /wizards | |
parent | 5e531e121fae61675fb358e814d49b70cfab14cf (diff) |
wizards: Number parsing
Change-Id: If81db8cf10556dbb79458258a70760e3f12a5524
Reviewed-on: https://gerrit.libreoffice.org/11041
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/NumericalHelper.java | 9 |
1 files changed, 3 insertions, 6 deletions
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) { |