From: Nick Burch Date: Fri, 23 Aug 2013 19:00:01 +0000 (+0000) Subject: More unit tests for column conversion, and avoid the use of Math.pow based on the... X-Git-Tag: REL_3_10_BETA2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c44c5fec787cb0fd81a45eb1aeb53b404e7a2e7;p=poi.git More unit tests for column conversion, and avoid the use of Math.pow based on the suggestion from github-6 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516983 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/ss/util/CellReference.java b/src/java/org/apache/poi/ss/util/CellReference.java index c9bea9fd12..3bd7ba9088 100644 --- a/src/java/org/apache/poi/ss/util/CellReference.java +++ b/src/java/org/apache/poi/ss/util/CellReference.java @@ -170,22 +170,19 @@ public class CellReference { * @return zero based column index */ public static int convertColStringToIndex(String ref) { - - int pos = 0; int retval=0; - for (int k = ref.length()-1; k >= 0; k--) { - char thechar = ref.charAt(k); + char[] refs = ref.toUpperCase().toCharArray(); + for (int k=0; k