]> source.dussan.org Git - poi.git/commitdiff
Fix deprecated warnings
authorNick Burch <nick@apache.org>
Fri, 2 Jul 2010 21:16:40 +0000 (21:16 +0000)
committerNick Burch <nick@apache.org>
Fri, 2 Jul 2010 21:16:40 +0000 (21:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@960106 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
src/ooxml/java/org/apache/poi/xssf/model/Table.java

index 2d6aadc0fffe6e9b180ed37a56ce5339824787db..43fa66343993f528662d1a5693670c2bc57368f5 100644 (file)
@@ -81,7 +81,9 @@ public class CalculationChain extends POIXMLDocumentPart {
     public void removeItem(int sheetId, String ref){
         //sheet Id of a sheet the cell belongs to
         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++){
             //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();
index eb66c7df96db65870baa4de06713d598a69806de..f664f6bbc0d6242a8ab6f94e07d8f4f65705f6bf 100644 (file)
@@ -72,7 +72,7 @@ public class MapInfo extends POIXMLDocumentPart {
                        mapInfo = doc.getMapInfo();
 
             maps= new HashMap<Integer, XSSFMap>();
-            for(CTMap map :mapInfo.getMapArray()){
+            for(CTMap map :mapInfo.getMapList()){
                 maps.put((int)map.getID(), new XSSFMap(map,this));
             }
 
@@ -107,8 +107,7 @@ public class MapInfo extends POIXMLDocumentPart {
        public CTSchema getCTSchemaById(String schemaId){
                CTSchema xmlSchema = null;
 
-               CTSchema[] schemas = mapInfo.getSchemaArray();
-               for(CTSchema schema: schemas){
+               for(CTSchema schema: mapInfo.getSchemaList()){
                        if(schema.getID().equals(schemaId)){
                                xmlSchema = schema;
                                break;
index 3d402ea436418350f94efe4e3c53f9043c7aa6f7..7d738e587151098c7729527cbc8f320c820239e8 100644 (file)
@@ -110,7 +110,7 @@ public class SharedStringsTable extends POIXMLDocumentPart {
             CTSst sst = _sstDoc.getSst();
             count = (int)sst.getCount();
             uniqueCount = (int)sst.getUniqueCount();
-            for (CTRst st : sst.getSiArray()) {
+            for (CTRst st : sst.getSiList()) {
                 stmap.put(st.toString(), cnt);
                 strings.add(st);
                 cnt++;
index 9b118bfdf8361216f650687c4a2aecd3a6fb679d..63c514b1309d46d4095c408c57fdde295ebb2709 100644 (file)
@@ -96,9 +96,8 @@ public class SingleXmlCells extends POIXMLDocumentPart {
         */
        public List<XSSFSingleXmlCell> getAllSimpleXmlCell(){
                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));
                }               
                return list;
index 6120e5b48b24f796d0007c717650e60c4a08fd77..98c3c5f18d73e75f2d81d6cd984b57842027cb7e 100644 (file)
@@ -111,33 +111,33 @@ public class StylesTable extends POIXMLDocumentPart {
                        doc = StyleSheetDocument.Factory.parse(is);
                        // Grab all the different bits we care about
                        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());
                        }
                        if(doc.getStyleSheet().getFonts() != null){
                                int idx = 0;
-                               for (CTFont font : doc.getStyleSheet().getFonts().getFontArray()) {
+                               for (CTFont font : doc.getStyleSheet().getFonts().getFontList()) {
                                        XSSFFont f = new XSSFFont(font, idx);
                                        fonts.add(f);
                                        idx++;
                                }
                        }
                        if(doc.getStyleSheet().getFills() != null)
-                       for (CTFill fill : doc.getStyleSheet().getFills().getFillArray()) {
+                       for (CTFill fill : doc.getStyleSheet().getFills().getFillList()) {
                                fills.add(new XSSFCellFill(fill));
                        }
                        if(doc.getStyleSheet().getBorders() != null)
-                       for (CTBorder border : doc.getStyleSheet().getBorders().getBorderArray()) {
+                       for (CTBorder border : doc.getStyleSheet().getBorders().getBorderList()) {
                                borders.add(new XSSFCellBorder(border));
                        }
             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();
-            if(cellStyleXfs != null) styleXfs.addAll(Arrays.asList(cellStyleXfs.getXfArray()));
+            if(cellStyleXfs != null) styleXfs.addAll(cellStyleXfs.getXfList());
 
             CTDxfs styleDxfs = doc.getStyleSheet().getDxfs();
-                       if(styleDxfs != null) dxfs.addAll(Arrays.asList(styleDxfs.getDxfArray()));
+                       if(styleDxfs != null) dxfs.addAll(styleDxfs.getDxfList());
 
                } catch (XmlException e) {
                        throw new IOException(e.getLocalizedMessage());
index eddff2296485e35c592bdce8f1024daf1e6c9719..f69c85c46c0cda50b8c54f900f98ced9fa7caaa1 100644 (file)
@@ -133,7 +133,7 @@ public class Table extends POIXMLDocumentPart {
                
                String[] commonTokens ={};
                
-               for(CTTableColumn column :ctTable.getTableColumns().getTableColumnArray()){
+               for(CTTableColumn column :ctTable.getTableColumns().getTableColumnList()){
                        if(column.getXmlColumnPr()!=null){
                                String xpath = column.getXmlColumnPr().getXpath();
                                String[] tokens =  xpath.split("/");
@@ -176,7 +176,7 @@ public class Table extends POIXMLDocumentPart {
                
                if(xmlColumnPr==null){
                        xmlColumnPr = new Vector<XSSFXmlColumnPr>();
-                       for(CTTableColumn column:ctTable.getTableColumns().getTableColumnArray()){
+                       for(CTTableColumn column:ctTable.getTableColumns().getTableColumnList()){
                                if(column.getXmlColumnPr()!=null){
                                        XSSFXmlColumnPr columnPr = new XSSFXmlColumnPr(this,column,column.getXmlColumnPr());
                                        xmlColumnPr.add(columnPr);