Fix deprecated warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@960106 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
256e73d16d
commit
2d03e05f92
@ -81,7 +81,9 @@ public class CalculationChain extends POIXMLDocumentPart {
|
|||||||
public void removeItem(int sheetId, String ref){
|
public void removeItem(int sheetId, String ref){
|
||||||
//sheet Id of a sheet the cell belongs to
|
//sheet Id of a sheet the cell belongs to
|
||||||
int id = -1;
|
int id = -1;
|
||||||
CTCalcCell[] c = chain.getCArray();
|
CTCalcCell[] c = new CTCalcCell[chain.getCList().size()];
|
||||||
|
chain.getCList().toArray(c);
|
||||||
|
|
||||||
for (int i = 0; i < c.length; i++){
|
for (int i = 0; i < c.length; i++){
|
||||||
//If sheet Id is omitted, it is assumed to be the same as the value of the previous cell.
|
//If sheet Id is omitted, it is assumed to be the same as the value of the previous cell.
|
||||||
if(c[i].isSetI()) id = c[i].getI();
|
if(c[i].isSetI()) id = c[i].getI();
|
||||||
|
@ -72,7 +72,7 @@ public class MapInfo extends POIXMLDocumentPart {
|
|||||||
mapInfo = doc.getMapInfo();
|
mapInfo = doc.getMapInfo();
|
||||||
|
|
||||||
maps= new HashMap<Integer, XSSFMap>();
|
maps= new HashMap<Integer, XSSFMap>();
|
||||||
for(CTMap map :mapInfo.getMapArray()){
|
for(CTMap map :mapInfo.getMapList()){
|
||||||
maps.put((int)map.getID(), new XSSFMap(map,this));
|
maps.put((int)map.getID(), new XSSFMap(map,this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,8 +107,7 @@ public class MapInfo extends POIXMLDocumentPart {
|
|||||||
public CTSchema getCTSchemaById(String schemaId){
|
public CTSchema getCTSchemaById(String schemaId){
|
||||||
CTSchema xmlSchema = null;
|
CTSchema xmlSchema = null;
|
||||||
|
|
||||||
CTSchema[] schemas = mapInfo.getSchemaArray();
|
for(CTSchema schema: mapInfo.getSchemaList()){
|
||||||
for(CTSchema schema: schemas){
|
|
||||||
if(schema.getID().equals(schemaId)){
|
if(schema.getID().equals(schemaId)){
|
||||||
xmlSchema = schema;
|
xmlSchema = schema;
|
||||||
break;
|
break;
|
||||||
|
@ -110,7 +110,7 @@ public class SharedStringsTable extends POIXMLDocumentPart {
|
|||||||
CTSst sst = _sstDoc.getSst();
|
CTSst sst = _sstDoc.getSst();
|
||||||
count = (int)sst.getCount();
|
count = (int)sst.getCount();
|
||||||
uniqueCount = (int)sst.getUniqueCount();
|
uniqueCount = (int)sst.getUniqueCount();
|
||||||
for (CTRst st : sst.getSiArray()) {
|
for (CTRst st : sst.getSiList()) {
|
||||||
stmap.put(st.toString(), cnt);
|
stmap.put(st.toString(), cnt);
|
||||||
strings.add(st);
|
strings.add(st);
|
||||||
cnt++;
|
cnt++;
|
||||||
|
@ -96,9 +96,8 @@ public class SingleXmlCells extends POIXMLDocumentPart {
|
|||||||
*/
|
*/
|
||||||
public List<XSSFSingleXmlCell> getAllSimpleXmlCell(){
|
public List<XSSFSingleXmlCell> getAllSimpleXmlCell(){
|
||||||
List<XSSFSingleXmlCell> list = new Vector<XSSFSingleXmlCell>();
|
List<XSSFSingleXmlCell> list = new Vector<XSSFSingleXmlCell>();
|
||||||
CTSingleXmlCell[] singleXMLCellArray = singleXMLCells.getSingleXmlCellArray();
|
|
||||||
|
|
||||||
for(CTSingleXmlCell singleXmlCell: singleXMLCellArray){
|
for(CTSingleXmlCell singleXmlCell: singleXMLCells.getSingleXmlCellList()){
|
||||||
list.add(new XSSFSingleXmlCell(singleXmlCell,this));
|
list.add(new XSSFSingleXmlCell(singleXmlCell,this));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
@ -111,33 +111,33 @@ public class StylesTable extends POIXMLDocumentPart {
|
|||||||
doc = StyleSheetDocument.Factory.parse(is);
|
doc = StyleSheetDocument.Factory.parse(is);
|
||||||
// Grab all the different bits we care about
|
// Grab all the different bits we care about
|
||||||
if(doc.getStyleSheet().getNumFmts() != null)
|
if(doc.getStyleSheet().getNumFmts() != null)
|
||||||
for (CTNumFmt nfmt : doc.getStyleSheet().getNumFmts().getNumFmtArray()) {
|
for (CTNumFmt nfmt : doc.getStyleSheet().getNumFmts().getNumFmtList()) {
|
||||||
numberFormats.put((int)nfmt.getNumFmtId(), nfmt.getFormatCode());
|
numberFormats.put((int)nfmt.getNumFmtId(), nfmt.getFormatCode());
|
||||||
}
|
}
|
||||||
if(doc.getStyleSheet().getFonts() != null){
|
if(doc.getStyleSheet().getFonts() != null){
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (CTFont font : doc.getStyleSheet().getFonts().getFontArray()) {
|
for (CTFont font : doc.getStyleSheet().getFonts().getFontList()) {
|
||||||
XSSFFont f = new XSSFFont(font, idx);
|
XSSFFont f = new XSSFFont(font, idx);
|
||||||
fonts.add(f);
|
fonts.add(f);
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(doc.getStyleSheet().getFills() != null)
|
if(doc.getStyleSheet().getFills() != null)
|
||||||
for (CTFill fill : doc.getStyleSheet().getFills().getFillArray()) {
|
for (CTFill fill : doc.getStyleSheet().getFills().getFillList()) {
|
||||||
fills.add(new XSSFCellFill(fill));
|
fills.add(new XSSFCellFill(fill));
|
||||||
}
|
}
|
||||||
if(doc.getStyleSheet().getBorders() != null)
|
if(doc.getStyleSheet().getBorders() != null)
|
||||||
for (CTBorder border : doc.getStyleSheet().getBorders().getBorderArray()) {
|
for (CTBorder border : doc.getStyleSheet().getBorders().getBorderList()) {
|
||||||
borders.add(new XSSFCellBorder(border));
|
borders.add(new XSSFCellBorder(border));
|
||||||
}
|
}
|
||||||
CTCellXfs cellXfs = doc.getStyleSheet().getCellXfs();
|
CTCellXfs cellXfs = doc.getStyleSheet().getCellXfs();
|
||||||
if(cellXfs != null) xfs.addAll(Arrays.asList(cellXfs.getXfArray()));
|
if(cellXfs != null) xfs.addAll(cellXfs.getXfList());
|
||||||
|
|
||||||
CTCellStyleXfs cellStyleXfs = doc.getStyleSheet().getCellStyleXfs();
|
CTCellStyleXfs cellStyleXfs = doc.getStyleSheet().getCellStyleXfs();
|
||||||
if(cellStyleXfs != null) styleXfs.addAll(Arrays.asList(cellStyleXfs.getXfArray()));
|
if(cellStyleXfs != null) styleXfs.addAll(cellStyleXfs.getXfList());
|
||||||
|
|
||||||
CTDxfs styleDxfs = doc.getStyleSheet().getDxfs();
|
CTDxfs styleDxfs = doc.getStyleSheet().getDxfs();
|
||||||
if(styleDxfs != null) dxfs.addAll(Arrays.asList(styleDxfs.getDxfArray()));
|
if(styleDxfs != null) dxfs.addAll(styleDxfs.getDxfList());
|
||||||
|
|
||||||
} catch (XmlException e) {
|
} catch (XmlException e) {
|
||||||
throw new IOException(e.getLocalizedMessage());
|
throw new IOException(e.getLocalizedMessage());
|
||||||
|
@ -133,7 +133,7 @@ public class Table extends POIXMLDocumentPart {
|
|||||||
|
|
||||||
String[] commonTokens ={};
|
String[] commonTokens ={};
|
||||||
|
|
||||||
for(CTTableColumn column :ctTable.getTableColumns().getTableColumnArray()){
|
for(CTTableColumn column :ctTable.getTableColumns().getTableColumnList()){
|
||||||
if(column.getXmlColumnPr()!=null){
|
if(column.getXmlColumnPr()!=null){
|
||||||
String xpath = column.getXmlColumnPr().getXpath();
|
String xpath = column.getXmlColumnPr().getXpath();
|
||||||
String[] tokens = xpath.split("/");
|
String[] tokens = xpath.split("/");
|
||||||
@ -176,7 +176,7 @@ public class Table extends POIXMLDocumentPart {
|
|||||||
|
|
||||||
if(xmlColumnPr==null){
|
if(xmlColumnPr==null){
|
||||||
xmlColumnPr = new Vector<XSSFXmlColumnPr>();
|
xmlColumnPr = new Vector<XSSFXmlColumnPr>();
|
||||||
for(CTTableColumn column:ctTable.getTableColumns().getTableColumnArray()){
|
for(CTTableColumn column:ctTable.getTableColumns().getTableColumnList()){
|
||||||
if(column.getXmlColumnPr()!=null){
|
if(column.getXmlColumnPr()!=null){
|
||||||
XSSFXmlColumnPr columnPr = new XSSFXmlColumnPr(this,column,column.getXmlColumnPr());
|
XSSFXmlColumnPr columnPr = new XSSFXmlColumnPr(this,column,column.getXmlColumnPr());
|
||||||
xmlColumnPr.add(columnPr);
|
xmlColumnPr.add(columnPr);
|
||||||
|
Loading…
Reference in New Issue
Block a user