first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
package jxl.biff.formula;
import common.Assert;
import common.Logger;
import jxl.biff.CellReferenceHelper;
class ColumnRange3d extends Area3d {
private static Logger logger = Logger.getLogger(ColumnRange3d.class);
private ExternalSheet workbook;
private int sheet;
ColumnRange3d(ExternalSheet es) {
super(es);
this.workbook = es;
}
ColumnRange3d(String s, ExternalSheet es) throws FormulaException {
super(es);
this.workbook = es;
int seppos = s.lastIndexOf(":");
Assert.verify((seppos != -1));
String startcell = s.substring(0, seppos);
String endcell = s.substring(seppos + 1);
int sep = s.indexOf('!');
String cellString = s.substring(sep + 1, seppos);
int columnFirst = CellReferenceHelper.getColumn(cellString);
int rowFirst = 0;
String sheetName = s.substring(0, sep);
int sheetNamePos = sheetName.lastIndexOf(']');
if (sheetName.charAt(0) == '\'' && sheetName.charAt(sheetName.length() - 1) == '\'')
sheetName = sheetName.substring(1, sheetName.length() - 1);
this.sheet = es.getExternalSheetIndex(sheetName);
if (this.sheet < 0)
throw new FormulaException(FormulaException.sheetRefNotFound, sheetName);
int columnLast = CellReferenceHelper.getColumn(endcell);
int rowLast = 65535;
boolean columnFirstRelative = true;
boolean rowFirstRelative = true;
boolean columnLastRelative = true;
boolean rowLastRelative = true;
setRangeData(this.sheet, columnFirst, columnLast, rowFirst, rowLast, columnFirstRelative, rowFirstRelative, columnLastRelative, rowLastRelative);
}
public void getString(StringBuffer buf) {
buf.append('\'');
buf.append(this.workbook.getExternalSheetName(this.sheet));
buf.append('\'');
buf.append('!');
CellReferenceHelper.getColumnReference(getFirstColumn(), buf);
buf.append(':');
CellReferenceHelper.getColumnReference(getLastColumn(), buf);
}
}