summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-18 13:48:08 +0200
committerNoel Grandin <noel@peralex.com>2015-01-05 10:15:07 +0200
commit5c7d33ade643891e526a22aa397aeddf76464434 (patch)
treed51af8490e246b78958bb6ac8b8cd2b62344eec6
parent8f2935a6d44baa23204bfef22a9f42ec8a86bf51 (diff)
java: more efficient float parsing
found by CodePro Change-Id: I01c18ddc842fd89105fa95daaa482fba8fcb7bec
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScChartObj.java2
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScChartsObj.java2
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java2
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDiagram.java8
4 files changed, 9 insertions, 5 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScChartObj.java b/qadevOOo/tests/java/mod/_sc/ScChartObj.java
index 001b634bb17e..d50f2f9dbdae 100644
--- a/qadevOOo/tests/java/mod/_sc/ScChartObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScChartObj.java
@@ -268,7 +268,7 @@ public class ScChartObj extends TestCase {
}
if (flag.equals("V")) {
- oCell.setValue(new Float(theValue).floatValue());
+ oCell.setValue(Float.parseFloat(theValue));
} else {
oCell.setFormula(theValue);
}
diff --git a/qadevOOo/tests/java/mod/_sc/ScChartsObj.java b/qadevOOo/tests/java/mod/_sc/ScChartsObj.java
index 674aa6625a5b..c526105b5118 100644
--- a/qadevOOo/tests/java/mod/_sc/ScChartsObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScChartsObj.java
@@ -251,7 +251,7 @@ public class ScChartsObj extends TestCase {
}
if (flag.equals("V")) {
- oCell.setValue(new Float(theValue).floatValue());
+ oCell.setValue(Float.parseFloat(theValue));
} else {
oCell.setFormula(theValue);
}
diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java
index 579c5956dc42..d35c31f07d9a 100644
--- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java
@@ -212,7 +212,7 @@ public class ScIndexEnumeration_TableChartsEnumeration extends TestCase {
}
if (flag.equals("V")) {
- oCell.setValue(new Float(theValue).floatValue());
+ oCell.setValue(Float.parseFloat(theValue));
} else {
oCell.setFormula(theValue);
}
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDiagram.java b/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
index 1fd03beb029a..b74ec9944dac 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXDiagram.java
@@ -388,8 +388,12 @@ public class ChXDiagram extends TestCase {
} catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
System.out.println("Could not get Cell");
}
- if (flag.equals("V")) {oCell.setValue((new Float(theValue)).floatValue());}
- else {oCell.setFormula(theValue);}
+ if (flag.equals("V")) {
+ oCell.setValue(Float.parseFloat(theValue));
+ }
+ else {
+ oCell.setFormula(theValue);
+ }
} // end of insertIntoCell