📄 numberformatrecord.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: NumberFormatRecord.java
package jxl.write.biff;
import common.Logger;
import jxl.biff.FormatRecord;
public class NumberFormatRecord extends FormatRecord
{
protected static class NonValidatingFormat
{
public NonValidatingFormat()
{
}
}
private static Logger logger;
static Class class$jxl$write$biff$NumberFormatRecord; /* synthetic field */
protected NumberFormatRecord(String fmt)
{
String fs = fmt;
fs = replace(fs, "E0", "E+0");
fs = trimInvalidChars(fs);
setFormatString(fs);
}
protected NumberFormatRecord(String fmt, NonValidatingFormat dummy)
{
String fs = fmt;
fs = replace(fs, "E0", "E+0");
setFormatString(fs);
}
private String trimInvalidChars(String fs)
{
int firstHash = fs.indexOf(35);
int firstZero = fs.indexOf(48);
int firstValidChar = 0;
if(firstHash == -1 && firstZero == -1)
return "#.###";
if(firstHash != 0 && firstZero != 0 && firstHash != 1 && firstZero != 1)
{
firstHash = firstHash != -1 ? firstHash : (firstHash = 0x7fffffff);
firstZero = firstZero != -1 ? firstZero : (firstZero = 0x7fffffff);
firstValidChar = Math.min(firstHash, firstZero);
StringBuffer tmp = new StringBuffer();
tmp.append(fs.charAt(0));
tmp.append(fs.substring(firstValidChar));
fs = tmp.toString();
}
int lastHash = fs.lastIndexOf(35);
int lastZero = fs.lastIndexOf(48);
if(lastHash == fs.length() || lastZero == fs.length())
return fs;
int lastValidChar;
for(lastValidChar = Math.max(lastHash, lastZero); fs.length() > lastValidChar + 1 && (fs.charAt(lastValidChar + 1) == ')' || fs.charAt(lastValidChar + 1) == '%'); lastValidChar++);
return fs.substring(0, lastValidChar + 1);
}
static Class class$(String x0)
{
return Class.forName(x0);
ClassNotFoundException x1;
x1;
throw new NoClassDefFoundError(x1.getMessage());
}
static
{
logger = Logger.getLogger(class$jxl$write$biff$NumberFormatRecord != null ? class$jxl$write$biff$NumberFormatRecord : (class$jxl$write$biff$NumberFormatRecord = class$("jxl.write.biff.NumberFormatRecord")));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -