poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1721864 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
Date Mon, 28 Dec 2015 00:52:47 GMT
Author: onealj
Date: Mon Dec 28 00:52:47 2015
New Revision: 1721864

URL: http://svn.apache.org/viewvc?rev=1721864&view=rev
Log:
bug 58740: add @Internal annotations and decrease access level to methods that only exist
for unit testing

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java?rev=1721864&r1=1721863&r2=1721864&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java Mon Dec 28 00:52:47
2015
@@ -37,6 +37,7 @@ import org.apache.poi.ss.SpreadsheetVers
 import org.apache.poi.ss.usermodel.BuiltinFormats;
 import org.apache.poi.ss.usermodel.FontFamily;
 import org.apache.poi.ss.usermodel.FontScheme;
+import org.apache.poi.util.Internal;
 import org.apache.poi.xssf.usermodel.XSSFCellStyle;
 import org.apache.poi.xssf.usermodel.XSSFFactory;
 import org.apache.poi.xssf.usermodel.XSSFFont;
@@ -326,25 +327,35 @@ public class StylesTable extends POIXMLD
         return fills.size() - 1;
     }
 
+    @Internal
     public CTXf getCellXfAt(int idx) {
         return xfs.get(idx);
     }
+    
+    @Internal
     public int putCellXf(CTXf cellXf) {
         xfs.add(cellXf);
         return xfs.size();
     }
+    
+    @Internal
     public void replaceCellXfAt(int idx, CTXf cellXf) {
         xfs.set(idx, cellXf);
     }
 
+    @Internal
     public CTXf getCellStyleXfAt(int idx) {
         return idx < styleXfs.size() ? styleXfs.get(idx) : null;
     }
+    
+    @Internal
     public int putCellStyleXf(CTXf cellStyleXf) {
         styleXfs.add(cellStyleXf);
         return styleXfs.size();
     }
-    public void replaceCellStyleXfAt(int idx, CTXf cellStyleXf) {
+    
+    @Internal
+    protected void replaceCellStyleXfAt(int idx, CTXf cellStyleXf) {
         styleXfs.set(idx, cellStyleXf);
     }
 
@@ -360,6 +371,7 @@ public class StylesTable extends POIXMLD
     /**
      * For unit testing only
      */
+    @Internal
     public int _getNumberFormatSize() {
         return numberFormats.size();
     }
@@ -367,21 +379,27 @@ public class StylesTable extends POIXMLD
     /**
      * For unit testing only
      */
-    public int _getXfsSize() {
+    @Internal
+    /*package*/ int _getXfsSize() {
         return xfs.size();
     }
     /**
      * For unit testing only
      */
+    @Internal
     public int _getStyleXfsSize() {
         return styleXfs.size();
     }
+    
     /**
      * For unit testing only!
      */
+    @Internal
     public CTStylesheet getCTStylesheet() {
         return doc.getStyleSheet();
     }
+    
+    @Internal
     public int _getDXfsSize() {
         return dxfs.size();
     }
@@ -553,15 +571,22 @@ public class StylesTable extends POIXMLD
         return xssfFont;
     }
 
+    @Internal
     public CTDxf getDxfAt(int idx) {
         return dxfs.get(idx);
     }
 
+    @Internal
     public int putDxf(CTDxf dxf) {
         this.dxfs.add(dxf);
         return this.dxfs.size();
     }
 
+    /**
+     * Create a cell style in this style table.
+     * Note - End users probably want to call {@link XSSFWorkbook#createCellStyle()}
+     * rather than working with the styles table directly.
+     */
     public XSSFCellStyle createCellStyle() {
         if (getNumCellStyles() > MAXIMUM_STYLE_ID) {
             throw new IllegalStateException("The maximum number of Cell Styles was exceeded.
" +



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message