Lines 29-34
Link Here
|
29 |
import java.util.Iterator; |
29 |
import java.util.Iterator; |
30 |
import java.util.List; |
30 |
import java.util.List; |
31 |
import java.util.Locale; |
31 |
import java.util.Locale; |
|
|
32 |
import java.io.UnsupportedEncodingException; |
32 |
|
33 |
|
33 |
/** |
34 |
/** |
34 |
* Low level model implementation of a Workbook. Provides creational methods |
35 |
* Low level model implementation of a Workbook. Provides creational methods |
Lines 1963-1968
Link Here
|
1963 |
maxformatid = maxformatid >= (short) 0xa4 ? (short) ( maxformatid + 1 ) : (short) 0xa4; //Starting value from M$ empiracle study. |
1964 |
maxformatid = maxformatid >= (short) 0xa4 ? (short) ( maxformatid + 1 ) : (short) 0xa4; //Starting value from M$ empiracle study. |
1964 |
rec.setIndexCode( maxformatid ); |
1965 |
rec.setIndexCode( maxformatid ); |
1965 |
rec.setFormatStringLength( (byte) format.length() ); |
1966 |
rec.setFormatStringLength( (byte) format.length() ); |
|
|
1967 |
rec.setUnicodeFlag(isUnicodeFormat(format)); |
1966 |
rec.setFormatString( format ); |
1968 |
rec.setFormatString( format ); |
1967 |
|
1969 |
|
1968 |
int pos = 0; |
1970 |
int pos = 0; |
Lines 1974-1979
Link Here
|
1974 |
return maxformatid; |
1976 |
return maxformatid; |
1975 |
} |
1977 |
} |
1976 |
|
1978 |
|
|
|
1979 |
/** |
1980 |
* @param format |
1981 |
* @return true if format is Unicode. |
1982 |
*/ |
1983 |
private boolean isUnicodeFormat(final String format) { |
1984 |
try { |
1985 |
return !format.equals(new String(format.getBytes("ISO-8859-1"), "ISO-8859-1")); |
1986 |
} catch (UnsupportedEncodingException e) { |
1987 |
return true; |
1988 |
} |
1989 |
} |
1977 |
|
1990 |
|
1978 |
/** |
1991 |
/** |
1979 |
* Returns the first occurance of a record matching a particular sid. |
1992 |
* Returns the first occurance of a record matching a particular sid. |