poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fannin...@apache.org
Subject svn commit: r1800147 - in /poi/trunk/src: examples/src/org/apache/poi/hssf/usermodel/examples/ java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/usermodel/ ooxml/java/org/apache/poi/xssf/model/ ooxml/java/org/apache/poi/xssf/streaming/ ooxml/j...
Date Wed, 28 Jun 2017 10:34:39 GMT
Author: fanningpj
Date: Wed Jun 28 10:34:37 2017
New Revision: 1800147

URL: http://svn.apache.org/viewvc?rev=1800147&view=rev
Log:
Remove some deprecated *SSF APIs

Modified:
    poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/CreationHelper.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/Font.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/TableStyleType.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/Workbook.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCreationHelper.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFName.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFChartSheet.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
    poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java
    poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java

Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/RepeatingRowsAndColumns.java Wed Jun 28 10:34:37 2017
@@ -37,7 +37,7 @@ public class RepeatingRowsAndColumns {
 
         HSSFFont boldFont = wb.createFont();
         boldFont.setFontHeightInPoints((short)22);
-        boldFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+        boldFont.setBold(true);
 
         HSSFCellStyle boldStyle = wb.createCellStyle();
         boldStyle.setFont(boldFont);

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java Wed Jun 28 10:34:37 2017
@@ -330,7 +330,7 @@ public class EscherGraphics extends Grap
             hssfColor = workbook.getCustomPalette().findSimilarColor((byte)foreground.getRed(), (byte)foreground.getGreen(), (byte)foreground.getBlue());
         boolean bold = (matchFont.getStyle() & Font.BOLD) != 0;
         boolean italic = (matchFont.getStyle() & Font.ITALIC) != 0;
-        HSSFFont hssfFont = workbook.findFont(bold ? HSSFFont.BOLDWEIGHT_BOLD : 0,
+        HSSFFont hssfFont = workbook.findFont(bold,
                     hssfColor.getIndex(),
                     (short)(matchFont.getSize() * 20),
                     matchFont.getName(),
@@ -341,7 +341,7 @@ public class EscherGraphics extends Grap
         if (hssfFont == null)
         {
             hssfFont = workbook.createFont();
-            hssfFont.setBoldweight(bold ? HSSFFont.BOLDWEIGHT_BOLD : 0);
+            hssfFont.setBold(bold);
             hssfFont.setColor(hssfColor.getIndex());
             hssfFont.setFontHeight((short)(matchFont.getSize() * 20));
             hssfFont.setFontName(matchFont.getName());

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java Wed Jun 28 10:34:37 2017
@@ -21,7 +21,6 @@ import org.apache.poi.ddf.EscherClientAn
 import org.apache.poi.ddf.EscherRecord;
 import org.apache.poi.ss.SpreadsheetVersion;
 import org.apache.poi.ss.usermodel.ClientAnchor;
-import org.apache.poi.util.Removal;
 
 /**
  * A client anchor is attached to an excel worksheet.  It anchors against a
@@ -268,16 +267,6 @@ public final class HSSFClientAnchor exte
     public void setAnchorType(AnchorType anchorType) {
         _escherClientAnchor.setFlag(anchorType.value);
     }
-    /**
-     * Sets the anchor type
-     * @param anchorType the anchor type to set
-     * @deprecated POI 3.15. Use {@link #setAnchorType(AnchorType)} instead.
-     */
-    @Removal(version="3.17")
-    @Override
-    public void setAnchorType(int anchorType) {
-        _escherClientAnchor.setFlag((short) anchorType);
-    }
 
     private void checkRange(int value, int minRange, int maxRange, String varName) {
         if (value < minRange || value > maxRange)

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java Wed Jun 28 10:34:37 2017
@@ -21,7 +21,6 @@ import org.apache.poi.common.usermodel.H
 import org.apache.poi.hssf.record.common.ExtendedColor;
 import org.apache.poi.ss.usermodel.CreationHelper;
 import org.apache.poi.util.Internal;
-import org.apache.poi.util.Removal;
 
 public class HSSFCreationHelper implements CreationHelper {
     private final HSSFWorkbook workbook;
@@ -46,16 +45,6 @@ public class HSSFCreationHelper implemen
         return workbook.createDataFormat();
     }
 
-    /**
-     * {@inheritDoc}
-     * @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
-     */
-    @Deprecated
-    @Removal(version="3.17")
-    @Override
-    public HSSFHyperlink createHyperlink(int type) {
-        return new HSSFHyperlink(type);
-    }
     @Override
     public HSSFHyperlink createHyperlink(HyperlinkType type) {
         return new HSSFHyperlink(type);

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java Wed Jun 28 10:34:37 2017
@@ -20,7 +20,6 @@ package org.apache.poi.hssf.usermodel;
 import org.apache.poi.ss.formula.EvaluationCell;
 import org.apache.poi.ss.formula.EvaluationSheet;
 import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.util.Internal;
 /**
  * HSSF wrapper for a cell under evaluation
  */

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java Wed Jun 28 10:34:37 2017
@@ -31,9 +31,18 @@ import org.apache.poi.ss.usermodel.Font;
 public final class HSSFFont implements Font {
 
     /**
-     * Arial font
+     * Normal boldness (not bold)
      */
+    final static short BOLDWEIGHT_NORMAL = 0x190;
 
+    /**
+     * Bold boldness (bold)
+     */
+    final static short BOLDWEIGHT_BOLD = 0x2bc;
+
+    /**
+     * Arial font
+     */
     public final static String FONT_ARIAL = "Arial";
 
 
@@ -199,18 +208,6 @@ public final class HSSFFont implements F
        HSSFPalette pallette = wb.getCustomPalette();
        return pallette.getColor( getColor() );
     }
-
-    /**
-     * set the boldness to use
-     * @param boldweight
-     * @see #BOLDWEIGHT_NORMAL
-     * @see #BOLDWEIGHT_BOLD
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)} instead.
-     */
-    public void setBoldweight(short boldweight)
-    {
-        font.setBoldWeight(boldweight);
-    }
     
     /**
      * sets the font to be bold or not
@@ -222,25 +219,13 @@ public final class HSSFFont implements F
         else
             font.setBoldWeight(BOLDWEIGHT_NORMAL);
     }
-
-    /**
-     * get the boldness to use
-     * @return boldweight
-     * @see #BOLDWEIGHT_NORMAL
-     * @see #BOLDWEIGHT_BOLD
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold} instead.
-     */
-    public short getBoldweight()
-    {
-        return font.getBoldWeight();
-    }
     
     /**
      * get if the font is bold or not
      */
     public boolean getBold()
     {
-        return getBoldweight() == BOLDWEIGHT_BOLD;
+        return font.getBoldWeight() == BOLDWEIGHT_BOLD;
     }
 
     /**

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java Wed Jun 28 10:34:37 2017
@@ -393,7 +393,7 @@ public final class HSSFRow implements Ro
             case CREATE_NULL_AS_BLANK:
                 return (cell == null) ? createCell(cellnum, CellType.BLANK) : cell;
             default:
-                throw new IllegalArgumentException("Illegal policy " + policy + " (" + policy.id + ")");
+                throw new IllegalArgumentException("Illegal policy " + policy);
         }
     }
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Wed Jun 28 10:34:37 2017
@@ -2172,18 +2172,6 @@ public final class HSSFSheet implements
             }
             setColumnWidth(column, (int) (width));
         }
-
-    }
-
-    /**
-     * Returns cell comment for the specified row and column
-     *
-     * @return cell comment or <code>null</code> if not found
-     * @deprecated as of 2015-11-23 (circa POI 3.14beta1). Use {@link #getCellComment(CellAddress)} instead.
-     */
-    @Override
-    public HSSFComment getCellComment(int row, int column) {
-        return findCellComment(row, column);
     }
     
     /**

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Wed Jun 28 10:34:37 2017
@@ -1207,39 +1207,6 @@ public final class HSSFWorkbook extends
 
     /**
      * Finds a font that matches the one with the supplied attributes
-     * @deprecated 3.15 beta 2. Use {@link #findFont(boolean, short, short, String, boolean, boolean, short, byte)} instead.
-     */
-    @Deprecated
-    @Override
-    public HSSFFont findFont(short boldWeight, short color, short fontHeight,
-                             String name, boolean italic, boolean strikeout,
-                             short typeOffset, byte underline)
-    {
-        short numberOfFonts = getNumberOfFonts();
-        for (short i=0; i<=numberOfFonts; i++) {
-            // Remember - there is no 4!
-            if(i == 4) {
-                continue;
-            }
-
-            HSSFFont hssfFont = getFontAt(i);
-            if (hssfFont.getBoldweight() == boldWeight
-                    && hssfFont.getColor() == color
-                    && hssfFont.getFontHeight() == fontHeight
-                    && hssfFont.getFontName().equals(name)
-                    && hssfFont.getItalic() == italic
-                    && hssfFont.getStrikeout() == strikeout
-                    && hssfFont.getTypeOffset() == typeOffset
-                    && hssfFont.getUnderline() == underline)
-            {
-                return hssfFont;
-            }
-        }
-
-        return null;
-    }
-    /**
-     * Finds a font that matches the one with the supplied attributes
      */
     @Override
     public HSSFFont findFont(boolean bold, short color, short fontHeight,

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java Wed Jun 28 10:34:37 2017
@@ -17,7 +17,6 @@
 package org.apache.poi.ss.usermodel;
 
 import org.apache.poi.util.Internal;
-import org.apache.poi.util.Removal;
 
 /**
  * A client anchor is attached to an excel worksheet.  It anchors against 
@@ -35,51 +34,6 @@ import org.apache.poi.util.Removal;
 public interface ClientAnchor {
     
     /**
-     * Move and Resize With Anchor Cells
-     * <p>
-     * Specifies that the current drawing shall move and
-     * resize to maintain its row and column anchors (i.e. the
-     * object is anchored to the actual from and to row and column)
-     * </p>
-     * @deprecated since POI 3.14beta1 (circa 2015-11-24). Use {@link AnchorType#MOVE_AND_RESIZE} instead.
-     */
-    @Removal(version="3.17")
-    public static final AnchorType MOVE_AND_RESIZE = AnchorType.MOVE_AND_RESIZE;
-    
-    /**
-     * Move With Cells but Do Not Resize
-     * <p>
-     * Specifies that the current drawing shall move with its
-     * row and column (i.e. the object is anchored to the
-     * actual from row and column), but that the size shall remain absolute.
-     * </p>
-     * <p>
-     * If additional rows/columns are added between the from and to locations of the drawing,
-     * the drawing shall move its to anchors as needed to maintain this same absolute size.
-     * </p>
-     * @deprecated since POI 3.14beta1 (circa 2015-11-24). Use {@link AnchorType#MOVE_DONT_RESIZE} instead.
-     */
-    @Removal(version="3.17")
-    public static final AnchorType MOVE_DONT_RESIZE = AnchorType.MOVE_DONT_RESIZE;
-
-    /**
-     * Do Not Move or Resize With Underlying Rows/Columns
-     * <p>
-     * Specifies that the current start and end positions shall
-     * be maintained with respect to the distances from the
-     * absolute start point of the worksheet.
-     * </p>
-     * <p>
-     * If additional rows/columns are added before the
-     * drawing, the drawing shall move its anchors as needed
-     * to maintain this same absolute position.
-     * </p>
-     * @deprecated since POI 3.14beta1 (circa 2015-11-24). Use {@link AnchorType#DONT_MOVE_AND_RESIZE} instead.
-     */
-    @Removal(version="3.17")
-    public static final AnchorType DONT_MOVE_AND_RESIZE = AnchorType.DONT_MOVE_AND_RESIZE;
-    
-    /**
      * @since POI 3.14beta1
      */
     public static enum AnchorType {
@@ -309,13 +263,6 @@ public interface ClientAnchor {
      * @since POI 3.14
      */
     public void setAnchorType( AnchorType anchorType );
-    /**
-     * Sets the anchor type
-     * @param anchorType the anchor type to set
-     * @deprecated POI 3.15. Use {@link #setAnchorType(AnchorType)} instead.
-     */
-    @Removal(version="3.17")
-    public void setAnchorType( int anchorType );
 
     /**
      * Gets the anchor type

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/CreationHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/CreationHelper.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/CreationHelper.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/CreationHelper.java Wed Jun 28 10:34:37 2017
@@ -17,7 +17,6 @@
 package org.apache.poi.ss.usermodel;
 
 import org.apache.poi.common.usermodel.HyperlinkType;
-import org.apache.poi.util.Removal;
 
 /**
  * An object that handles instantiating concrete
@@ -41,14 +40,6 @@ public interface CreationHelper {
      * Creates a new DataFormat instance
      */
     DataFormat createDataFormat();
-
-    /**
-     * Creates a new Hyperlink, of the given type
-     * @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
-     */
-    @Removal(version="3.17")
-    @Deprecated
-    Hyperlink createHyperlink(int type);
     
     /**
      * Creates a new Hyperlink, of the given type

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Font.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Font.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Font.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Font.java Wed Jun 28 10:34:37 2017
@@ -19,19 +19,6 @@ package org.apache.poi.ss.usermodel;
 
 
 public interface Font {
-    /**
-     * Normal boldness (not bold)
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17.
-     * Boldweight constants no longer needed due to {@link #getBold} and {@link #setBold(boolean)}
-     */
-    public final static short BOLDWEIGHT_NORMAL = 0x190;
-
-    /**
-     * Bold boldness (bold)
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17.
-     * Boldweight constants no longer needed due to {@link #getBold} and {@link #setBold(boolean)}
-     */
-    public final static short BOLDWEIGHT_BOLD = 0x2bc;
 
     /**
      * normal type of black color.
@@ -283,15 +270,7 @@ public interface Font {
      */
     public short getIndex();
 
-    /**
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)}.
-     */
-    public void setBoldweight(short boldweight);
     public void setBold(boolean bold);
 
-    /**
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold()}.
-     */
-    public short getBoldweight();
     public boolean getBold();
 }

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java Wed Jun 28 10:34:37 2017
@@ -25,7 +25,6 @@ import java.util.Map;
 import org.apache.poi.ss.util.CellAddress;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.PaneInformation;
-import org.apache.poi.util.Removal;
 
 /**
  * High level representation of a Excel worksheet.
@@ -615,19 +614,6 @@ public interface Sheet extends Iterable<
      * @return true =&gt; protection enabled; false =&gt; protection disabled
      */
     boolean getScenarioProtect();
-
-    /**
-     * Sets the zoom magnication for the sheet.  The zoom is expressed as a
-     * fraction.  For example to express a zoom of 75% use 3 for the numerator
-     * and 4 for the denominator.
-     *
-     * @param numerator     The numerator for the zoom magnification.
-     * @param denominator   The denominator for the zoom magnification.
-     * @deprecated 2015-11-23 (circa POI 3.14beta1). Use {@link #setZoom(int)} instead.
-     */
-    @Removal(version="3.16")
-    @Deprecated
-    void setZoom(int numerator, int denominator);
     
     /**
      * Window zoom magnification for current view representing percent values.
@@ -941,15 +927,6 @@ public interface Sheet extends Iterable<
      * @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
      */
     void autoSizeColumn(int column, boolean useMergedCells);
-
-    /**
-     * Returns cell comment for the specified row and column
-     *
-     * @return cell comment or <code>null</code> if not found
-     * @deprecated as of 2015-11-23 (circa POI 3.14beta1). Use {@link #getCellComment(CellAddress)} instead.
-     */
-    @Deprecated
-    Comment getCellComment(int row, int column);
     
     /**
      * Returns cell comment for the specified location

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/TableStyleType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/TableStyleType.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/TableStyleType.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/TableStyleType.java Wed Jun 28 10:34:37 2017
@@ -17,8 +17,6 @@
 
 package org.apache.poi.ss.usermodel;
 
-import java.util.EnumSet;
-
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellRangeAddressBase;
 

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Workbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Workbook.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Workbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Workbook.java Wed Jun 28 10:34:37 2017
@@ -289,15 +289,6 @@ public interface Workbook extends Closea
      * @return new font object
      */
     Font createFont();
-
-    /**
-     * Finds a font that matches the one with the supplied attributes
-     *
-     * @return the font with the matched attributes or <code>null</code>
-     * @deprecated POI 3.15 beta 2. Use {@link #findFont(boolean, short, short, String, boolean, boolean, short, byte)} instead.
-     */
-    @Deprecated
-    Font findFont(short boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline);
     
     /**
      * Finds a font that matches the one with the supplied attributes

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=1800147&r1=1800146&r2=1800147&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 Wed Jun 28 10:34:37 2017
@@ -835,27 +835,6 @@ public class StylesTable extends POIXMLD
         int indexXf = putCellXf(xf);
         return new XSSFCellStyle(indexXf - 1, xfSize - 1, this, theme);
     }
-
-    /**
-     * Finds a font that matches the one with the supplied attributes
-     * @deprecated POI 3.15 beta 2. Use {@link #findFont(boolean, short, short, String, boolean, boolean, short, byte)} instead.
-     */
-    public XSSFFont findFont(short boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline) {
-        for (XSSFFont font : fonts) {
-            if (	(font.getBoldweight() == boldWeight)
-                    && font.getColor() == color
-                    && font.getFontHeight() == fontHeight
-                    && font.getFontName().equals(name)
-                    && font.getItalic() == italic
-                    && font.getStrikeout() == strikeout
-                    && font.getTypeOffset() == typeOffset
-                    && font.getUnderline() == underline)
-            {
-                return font;
-            }
-        }
-        return null;
-    }
     
     /**
      * Finds a font that matches the one with the supplied attributes

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java Wed Jun 28 10:34:37 2017
@@ -38,12 +38,10 @@ import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.util.CellAddress;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellReference;
-import org.apache.poi.util.Internal;
 import org.apache.poi.util.LocaleUtil;
 import org.apache.poi.util.NotImplemented;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
-import org.apache.poi.util.Removal;
 import org.apache.poi.xssf.usermodel.XSSFHyperlink;
 import org.apache.poi.xssf.usermodel.XSSFRichTextString;
 
@@ -58,17 +56,6 @@ public class SXSSFCell implements Cell {
     private CellStyle _style;
     private Property _firstProperty;
     
-    /**
-     * @deprecated POI 3.15 beta 3.
-     * Will be deleted when we make the CellType enum transition. See bug 59791.
-     */
-    @Removal(version="3.17")
-    @Deprecated
-    public SXSSFCell(SXSSFRow row, int cellType)
-    {
-        this(row, CellType.forInt((cellType)));
-    }
-
     public SXSSFCell(SXSSFRow row,CellType cellType)
     {
         _row=row;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java Wed Jun 28 10:34:37 2017
@@ -26,7 +26,6 @@ import org.apache.poi.ss.usermodel.Hyper
 import org.apache.poi.util.Internal;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
-import org.apache.poi.util.Removal;
 import org.apache.poi.xssf.usermodel.XSSFCreationHelper;
 import org.apache.poi.xssf.usermodel.XSSFRichTextString;
 
@@ -68,16 +67,6 @@ public class SXSSFCreationHelper impleme
     public DataFormat createDataFormat() {
         return helper.createDataFormat();
     }
-    /**
-     * {@inheritDoc}
-     * @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
-     */
-    @Deprecated
-    @Removal(version="3.17")
-    @Override
-    public Hyperlink createHyperlink(int type) {
-        return helper.createHyperlink(type);
-    }
     @Override
     public Hyperlink createHyperlink(HyperlinkType type) {
         return helper.createHyperlink(type);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java Wed Jun 28 10:34:37 2017
@@ -47,18 +47,6 @@ public class SXSSFRow implements Row, Co
     // use Boolean to have a tri-state for on/off/undefined 
     private Boolean _hidden = UNDEFINED;
     private Boolean _collapsed = UNDEFINED;
-
-    /**
-     *
-     * @param sheet the parent sheet the row belongs to
-     * @param initialSize - no longer needed
-     * @deprecated 2015-11-30 (circa POI 3.14beta1). Use {@link #SXSSFRow(SXSSFSheet)} instead.
-     */
-    @Deprecated
-    public SXSSFRow(SXSSFSheet sheet, @SuppressWarnings("UnusedParameters") int initialSize)
-    {
-        this(sheet);
-    }
     
     public SXSSFRow(SXSSFSheet sheet)
     {
@@ -273,7 +261,7 @@ public class SXSSFRow implements Row, Co
             case CREATE_NULL_AS_BLANK:
                 return (cell == null) ? createCell(cellnum, CellType.BLANK) : cell;
             default:
-                throw new IllegalArgumentException("Illegal policy " + policy + " (" + policy.id + ")");
+                throw new IllegalArgumentException("Illegal policy " + policy);
         }
     }
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Wed Jun 28 10:34:37 2017
@@ -47,7 +47,6 @@ import org.apache.poi.ss.util.PaneInform
 import org.apache.poi.ss.util.SheetUtil;
 import org.apache.poi.util.Internal;
 import org.apache.poi.util.NotImplemented;
-import org.apache.poi.util.Removal;
 import org.apache.poi.xssf.usermodel.XSSFColor;
 import org.apache.poi.xssf.usermodel.XSSFComment;
 import org.apache.poi.xssf.usermodel.XSSFDataValidation;
@@ -870,23 +869,6 @@ public class SXSSFSheet implements Sheet
     {
         return _sh.getScenarioProtect();
     }
-
-    /**
-     * Sets the zoom magnification for the sheet.  The zoom is expressed as a
-     * fraction.  For example to express a zoom of 75% use 3 for the numerator
-     * and 4 for the denominator.
-     *
-     * @param numerator     The numerator for the zoom magnification.
-     * @param denominator   The denominator for the zoom magnification.
-     * @deprecated 2015-11-23 (circa POI 3.14beta1). Use {@link #setZoom(int)} instead.
-     */
-    @Deprecated
-    @Removal(version="3.16")
-    @Override
-    public void setZoom(int numerator, int denominator)
-    {
-        _sh.setZoom(numerator,denominator);
-    }
     
     /**
      * Window zoom magnification for current view representing percent values.
@@ -1630,20 +1612,6 @@ public class SXSSFSheet implements Sheet
             setColumnWidth(column, width);
         }
     }
-
-    /**
-     * Returns cell comment for the specified row and column
-     *
-     * @return cell comment or <code>null</code> if not found
-     * @deprecated as of 2015-11-23 (circa POI 3.14beta1). Use {@link #getCellComment(CellAddress)} instead.
-     */
-    @Deprecated
-    @Removal(version="3.16")
-    @Override
-    public XSSFComment getCellComment(int row, int column)
-    {
-        return getCellComment(new CellAddress(row, column));
-    }
     
     /**
      * Returns cell comment for the specified row and column

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java Wed Jun 28 10:34:37 2017
@@ -811,21 +811,6 @@ public class SXSSFWorkbook implements Wo
     {
         return _wb.createFont();
     }
-
-    /**
-     * Finds a font that matches the one with the supplied attributes
-     *
-     * @return the font with the matched attributes or <code>null</code>
-     * @deprecated POI 3.15 beta 2. Use {@link #findFont(boolean, short, short, String, boolean, boolean, short, byte)} instead.
-     */
-    @Deprecated
-    @Override
-    @Removal(version="3.17")
-    public Font findFont(short boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline)
-    {
-        //noinspection deprecation
-        return _wb.findFont(boldWeight, color, fontHeight, name, italic, strikeout, typeOffset, underline);
-    }
     
     /**
      * Finds a font that matches the one with the supplied attributes

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java Wed Jun 28 10:34:37 2017
@@ -26,7 +26,6 @@ import org.apache.poi.ss.formula.eval.Nu
 import org.apache.poi.ss.formula.eval.StringEval;
 import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.apache.poi.ss.usermodel.RichTextString;
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java Wed Jun 28 10:34:37 2017
@@ -18,7 +18,6 @@
 package org.apache.poi.xssf.usermodel;
 
 import org.apache.poi.ss.usermodel.ClientAnchor;
-import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.util.Internal;
 import org.apache.poi.util.Removal;
 import org.apache.poi.util.Units;
@@ -412,17 +411,6 @@ public class XSSFClientAnchor extends XS
     {
         this.anchorType = anchorType;
     }
-    /**
-     * Sets the anchor type
-     * @param anchorType the anchor type to set
-     * @deprecated POI 3.15. Use {@link #setAnchorType(AnchorType)} instead
-     */
-    @Removal(version="3.17")
-    @Override
-    public void setAnchorType( int anchorType )
-    {
-        this.anchorType = AnchorType.byId(anchorType);
-    }
 
     /**
      * Gets the anchor type

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCreationHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCreationHelper.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCreationHelper.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCreationHelper.java Wed Jun 28 10:34:37 2017
@@ -20,7 +20,6 @@ import org.apache.poi.common.usermodel.H
 import org.apache.poi.ss.usermodel.CreationHelper;
 import org.apache.poi.ss.usermodel.Hyperlink;
 import org.apache.poi.util.Internal;
-import org.apache.poi.util.Removal;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor;
 
 public class XSSFCreationHelper implements CreationHelper {
@@ -55,19 +54,6 @@ public class XSSFCreationHelper implemen
     public XSSFColor createExtendedColor() {
         return new XSSFColor(CTColor.Factory.newInstance(), workbook.getStylesSource().getIndexedColors());
     }
-
-    /**
-     * Create a new XSSFHyperlink.
-     *
-     * @param type - the type of hyperlink to create, see {@link HyperlinkType}
-     * @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
-     */
-    @Deprecated
-    @Removal(version="3.17")
-    @Override
-    public XSSFHyperlink createHyperlink(int type) {
-        return new XSSFHyperlink(type);
-    }
     
     /**
      * Create a new XSSFHyperlink.

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java Wed Jun 28 10:34:37 2017
@@ -306,26 +306,6 @@ public class XSSFFont implements Font {
     }
 
     /**
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #setBold(boolean)} instead.
-     */
-    public void setBoldweight(short boldweight)
-    {
-        setBold(boldweight == BOLDWEIGHT_BOLD);
-    }
-
-    /**
-     * get the boldness to use
-     * @return boldweight
-     * @see #BOLDWEIGHT_NORMAL
-     * @see #BOLDWEIGHT_BOLD
-     * @deprecated 3.15 beta 2. Scheduled for removal in 3.17. Use {@link #getBold} instead.
-     */
-    public short getBoldweight()
-    {
-        return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;
-    }
-
-    /**
      * set character-set to use.
      *
      * @param charset - charset

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFName.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFName.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFName.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFName.java Wed Jun 28 10:34:37 2017
@@ -292,7 +292,7 @@ public final class XSSFName implements N
             return _workbook.getSheetName(sheetId);
         }
         String ref = getRefersToFormula();
-        AreaReference areaRef = new AreaReference(ref);
+        AreaReference areaRef = new AreaReference(ref, SpreadsheetVersion.EXCEL2007);
         return areaRef.getFirstCell().getSheetName();
     }
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Wed Jun 28 10:34:37 2017
@@ -761,20 +761,6 @@ public class XSSFSheet extends POIXMLDoc
         getPane().setState(STPaneState.SPLIT);
         getPane().setActivePane(STPane.Enum.forInt(activePane));
     }
-
-    /**
-     * Return cell comment at row, column, if one exists. Otherwise returns null.
-     * @param row the row where the comment is located
-     * @param column the column where the comment is located
-     * @return the cell comment, if one exists. Otherwise return null.
-     * @deprecated as of 2015-11-23 (circa POI 3.14beta1). Use {@link #getCellComment(CellAddress)} instead.
-     */
-    @Deprecated
-    @Override
-    @Removal(version="3.16")
-    public XSSFComment getCellComment(int row, int column) {
-        return getCellComment(new CellAddress(row, column));
-    }
     
     /**
      * Return cell comment at row, column, if one exists. Otherwise returns null.
@@ -2781,23 +2767,6 @@ public class XSSFSheet extends POIXMLDoc
     }
 
     /**
-     * Sets the zoom magnification for the sheet.  The zoom is expressed as a
-     * fraction.  For example to express a zoom of 75% use 3 for the numerator
-     * and 4 for the denominator.
-     *
-     * @param numerator     The numerator for the zoom magnification.
-     * @param denominator   The denominator for the zoom magnification.
-     * @deprecated 2015-11-23 (circa POI 3.14beta1). Use {@link #setZoom(int)} instead.
-     */
-    @Deprecated
-    @Removal(version="3.16")
-    @Override
-    public void setZoom(int numerator, int denominator) {
-        int zoom = 100*numerator/denominator;
-        setZoom(zoom);
-    }
-
-    /**
      * Window zoom magnification for current view representing percent values.
      * Valid values range from 10 to 400. Horizontal & Vertical scale together.
      *

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java Wed Jun 28 10:34:37 2017
@@ -901,16 +901,6 @@ public class XSSFWorkbook extends POIXML
         sheet.setName(sheetname);
         return sheet;
     }
-
-    /**
-     * Finds a font that matches the one with the supplied attributes
-     * @deprecated POI 3.15. Use {@link #findFont(boolean, short, short, String, boolean, boolean, short, byte)} instead.
-     */
-    @Deprecated
-    @Override
-    public XSSFFont findFont(short boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline) {
-        return stylesSource.findFont(boldWeight, color, fontHeight, name, italic, strikeout, typeOffset, underline);
-    }
     
     /**
      * Finds a font that matches the one with the supplied attributes

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFChartSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFChartSheet.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFChartSheet.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFChartSheet.java Wed Jun 28 10:34:37 2017
@@ -57,8 +57,6 @@ public final class TestXSSFChartSheet {
         assertEquals(0, sheet.getNumMergedRegions());
         assertNull(sheet.getActiveCell());
         assertTrue(sheet.getAutobreaks());
-        //noinspection deprecation
-        assertNull(sheet.getCellComment(0, 0));
         assertNull(sheet.getCellComment(new CellAddress(0, 0)));
         assertEquals(0, sheet.getColumnBreaks().length);
         assertTrue(sheet.getRowSumsBelow());

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java Wed Jun 28 10:34:37 2017
@@ -385,8 +385,7 @@ public final class TestXSSFRichTextStrin
     public void testLineBreaks_bug48877() throws IOException{
 
         XSSFFont font = new XSSFFont();
-        //noinspection deprecation
-        font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
+        font.setBold(true);
         font.setFontHeightInPoints((short) 14);
         XSSFRichTextString str;
         STXstring t1, t2, t3;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java Wed Jun 28 10:34:37 2017
@@ -404,22 +404,8 @@ public class ExcelToFoConverter extends
     {
         Triplet triplet = new Triplet();
         triplet.fontName = font.getFontName();
-
-        switch ( font.getBoldweight() )
-        {
-        case HSSFFont.BOLDWEIGHT_BOLD:
-            triplet.bold = true;
-            break;
-        case HSSFFont.BOLDWEIGHT_NORMAL:
-        default:
-            triplet.bold = false;
-            break;
-        }
-
-        if ( font.getItalic() )
-        {
-            triplet.italic = true;
-        }
+        triplet.bold = font.getBold();
+        triplet.italic = font.getItalic();
 
         getFontReplacer().update( triplet );
         setBlockProperties( blockTarget, triplet );

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java Wed Jun 28 10:34:37 2017
@@ -251,15 +251,9 @@ public class ExcelToHtmlConverter extend
     void buildStyle_font( HSSFWorkbook workbook, StringBuilder style,
             HSSFFont font )
     {
-        switch ( font.getBoldweight() )
+        if ( font.getBold() )
         {
-        case HSSFFont.BOLDWEIGHT_BOLD:
             style.append( "font-weight:bold;" );
-            break;
-        case HSSFFont.BOLDWEIGHT_NORMAL:
-            // by default, not not increase HTML size
-            // style.append( "font-weight: normal; " );
-            break;
         }
 
         final HSSFColor fontColor = workbook.getCustomPalette().getColor(

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java Wed Jun 28 10:34:37 2017
@@ -154,7 +154,7 @@ public class TestDrawingShapes {
         anchor.setAnchorType(AnchorType.MOVE_DONT_RESIZE);
         assertEquals(AnchorType.MOVE_DONT_RESIZE, anchor.getAnchorType());
         //noinspection deprecation
-        anchor.setAnchorType(AnchorType.MOVE_DONT_RESIZE.value);
+        anchor.setAnchorType(AnchorType.MOVE_DONT_RESIZE);
         assertEquals(AnchorType.MOVE_DONT_RESIZE, anchor.getAnchorType());
 
         HSSFSimpleShape rectangle = drawing.createSimpleShape(anchor);

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Wed Jun 28 10:34:37 2017
@@ -17,6 +17,7 @@
 
 package org.apache.poi.hssf.usermodel;
 
+import static org.apache.poi.POITestCase.assertContains;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -24,7 +25,6 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.apache.poi.POITestCase.assertContains;
 
 import java.awt.image.BufferedImage;
 import java.io.ByteArrayInputStream;
@@ -98,7 +98,6 @@ import org.junit.Test;
  * <b>YK: If a bug can be tested in terms of common ss interfaces,
  *  define the test in the base class {@link BaseTestBugzillaIssues}</b>
  */
-@SuppressWarnings("deprecation")
 public final class TestBugs extends BaseTestBugzillaIssues {
     // to not affect other tests running in the same JVM
     @After
@@ -996,7 +995,7 @@ public final class TestBugs extends Base
         assertEquals(4, wb.getNumberOfFonts());
 
         HSSFFont f1 = wb.getFontAt((short)0);
-        assertEquals(400, f1.getBoldweight());
+        assertFalse(f1.getBold());
 
         // Check that asking for the same font
         //  multiple times gives you the same thing.
@@ -1020,7 +1019,7 @@ public final class TestBugs extends Base
         //  yet to add
         assertNull(
             wb.findFont(
-                (short)11, (short)123, (short)22,
+                false, (short)123, (short)22,
                 "Thingy", false, true, (short)2, (byte)2
             )
         );
@@ -1031,7 +1030,7 @@ public final class TestBugs extends Base
         assertEquals(5, nf.getIndex());
         assertEquals(nf, wb.getFontAt((short)5));
 
-        nf.setBoldweight((short)11);
+        nf.setBold(false);
         nf.setColor((short)123);
         nf.setFontHeight((short)22);
         nf.setFontName("Thingy");
@@ -1046,12 +1045,12 @@ public final class TestBugs extends Base
         // Find it now
         assertNotNull(
             wb.findFont(
-                (short)11, (short)123, (short)22,
+                false, (short)123, (short)22,
                 "Thingy", false, true, (short)2, (byte)2
             )
         );
         HSSFFont font = wb.findFont(
-                (short) 11, (short) 123, (short) 22,
+                false, (short) 123, (short) 22,
                 "Thingy", false, true, (short) 2, (byte) 2
         );
         assertNotNull(font);
@@ -1061,7 +1060,7 @@ public final class TestBugs extends Base
         );
         assertEquals(nf,
                wb.findFont(
-                   (short)11, (short)123, (short)22,
+                   false, (short)123, (short)22,
                    "Thingy", false, true, (short)2, (byte)2
                )
         );

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java Wed Jun 28 10:34:37 2017
@@ -70,7 +70,7 @@ public final class TestCellStyle extends
         HSSFCellStyle    cs   = wb.createCellStyle();
 
         fnt.setColor(HSSFFont.COLOR_RED);
-        fnt.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+        fnt.setBold(true);
         cs.setFont(fnt);
         for (int rownum = 0; rownum < 100; rownum++) {
             r = s.createRow(rownum);

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java Wed Jun 28 10:34:37 2017
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.apache.poi.POITestCase.assertBetween;
 
 import java.io.IOException;
 import java.util.List;
@@ -59,7 +58,13 @@ import org.apache.poi.hssf.record.aggreg
 import org.apache.poi.hssf.usermodel.RecordInspector.RecordCollector;
 import org.apache.poi.ss.formula.ptg.Area3DPtg;
 import org.apache.poi.ss.formula.ptg.Ptg;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.AutoFilter;
+import org.apache.poi.ss.usermodel.BaseTestSheet;
+import org.apache.poi.ss.usermodel.DataValidation;
+import org.apache.poi.ss.usermodel.DataValidationConstraint;
+import org.apache.poi.ss.usermodel.DataValidationHelper;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellRangeAddressList;
 import org.junit.Test;
@@ -505,7 +510,6 @@ public final class TestHSSFSheet extends
         workbook.close();
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void zoom() throws IOException {
         HSSFWorkbook wb = new HSSFWorkbook();
@@ -945,7 +949,7 @@ public final class TestHSSFSheet extends
         assertEquals(11*20, bs.getFont(wbSimple).getFontHeight());
         assertEquals(8, bs.getFont(wbSimple).getColor());
         assertFalse(bs.getFont(wbSimple).getItalic());
-        assertEquals(HSSFFont.BOLDWEIGHT_NORMAL, bs.getFont(wbSimple).getBoldweight());
+        assertFalse(bs.getFont(wbSimple).getBold());
 
 
         HSSFCellStyle cs = wbComplex.getSheetAt(0).getColumnStyle(1);

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java Wed Jun 28 10:34:37 2017
@@ -17,10 +17,11 @@
         
 package org.apache.poi.hssf.usermodel;
 
-import junit.framework.TestCase;
-
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.ss.usermodel.BorderStyle;
+import org.apache.poi.util.IOUtils;
+
+import junit.framework.TestCase;
 
 /**
  * Class to test row styling functionality
@@ -36,7 +37,6 @@ public final class TestRowStyle extends
      *             Last row, first row is tested against the correct values (99,0).<P>
      * FAILURE:    HSSF does not create a sheet or excepts.  Filesize does not match the known good.
      *             HSSFSheet last row or first row is incorrect.             <P>
-     *
      */
     public void testWriteSheetFont() {
         HSSFWorkbook     wb   = new HSSFWorkbook();
@@ -46,7 +46,7 @@ public final class TestRowStyle extends
         HSSFCellStyle    cs   = wb.createCellStyle();
 
         fnt.setColor(HSSFFont.COLOR_RED);
-        fnt.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+        fnt.setBold(true);
         cs.setFont(fnt);
         for (int rownum = 0; rownum < 100; rownum++)
         {
@@ -54,12 +54,14 @@ public final class TestRowStyle extends
             r.setRowStyle(cs);
             r.createCell(0);
         }
-        wb = HSSFTestDataSamples.writeOutAndReadBack(wb);
+        HSSFWorkbook wb2 = HSSFTestDataSamples.writeOutAndReadBack(wb);
+        IOUtils.closeQuietly(wb);
         		
         SanityChecker sanityChecker = new SanityChecker();
-        sanityChecker.checkHSSFWorkbook(wb);
+        sanityChecker.checkHSSFWorkbook(wb2);
         assertEquals("LAST ROW == 99", 99, s.getLastRowNum());
         assertEquals("FIRST ROW == 0", 0, s.getFirstRowNum());
+        IOUtils.closeQuietly(wb2);
     }
 
     /**
@@ -83,14 +85,15 @@ public final class TestRowStyle extends
         row.setRowStyle(cs);
         row.createCell(0);
 
-        wb = HSSFTestDataSamples.writeOutAndReadBack(wb);
+        HSSFWorkbook wb2 = HSSFTestDataSamples.writeOutAndReadBack(wb);
+        IOUtils.closeQuietly(wb);
         
         SanityChecker sanityChecker = new SanityChecker();
-        sanityChecker.checkHSSFWorkbook(wb);
+        sanityChecker.checkHSSFWorkbook(wb2);
 
         assertEquals("LAST ROW ", 1, s.getLastRowNum());
         assertEquals("FIRST ROW ", 0, s.getFirstRowNum());
-
+        IOUtils.closeQuietly(wb2);
     }
 
     /**
@@ -101,7 +104,6 @@ public final class TestRowStyle extends
      *             Last row, first row is tested against the correct values (99,0).<P>
      * FAILURE:    HSSF does not create a sheet or excepts.  Filesize does not match the known good.
      *             HSSFSheet last row or first row is incorrect.             <P>
-     *
      */
     public void testWriteSheetStyle() {
         HSSFWorkbook     wb   = new HSSFWorkbook();
@@ -135,14 +137,15 @@ public final class TestRowStyle extends
             r.setRowStyle(cs2);
             r.createCell(0);
         }
-        wb = HSSFTestDataSamples.writeOutAndReadBack(wb);
+        HSSFWorkbook wb2 = HSSFTestDataSamples.writeOutAndReadBack(wb);
+        IOUtils.closeQuietly(wb);
         
         SanityChecker sanityChecker = new SanityChecker();
-        sanityChecker.checkHSSFWorkbook(wb);
+        sanityChecker.checkHSSFWorkbook(wb2);
         assertEquals("LAST ROW == 99", 99, s.getLastRowNum());
         assertEquals("FIRST ROW == 0", 0, s.getFirstRowNum());
         
-        s    = wb.getSheetAt(0);
+        s    = wb2.getSheetAt(0);
         assertNotNull("Sheet is not null", s);
         
         for (int rownum = 0; rownum < 100; rownum++)
@@ -167,5 +170,6 @@ public final class TestRowStyle extends
             assertEquals("FillForegroundColor for row: ", cs2.getFillForegroundColor(), (short) 0x0);
             assertEquals("FillPattern for row: ", cs2.getFillPattern(), (short) 0x1);
         }
+        IOUtils.closeQuietly(wb2);
     }
 }

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java Wed Jun 28 10:34:37 2017
@@ -38,19 +38,19 @@ public abstract class BaseTestFont {
     protected final void baseTestDefaultFont(String defaultName, short defaultSize, short defaultColor) throws IOException {
         //get default font and check against default value
         Workbook workbook = _testDataProvider.createWorkbook();
-        Font fontFind=workbook.findFont(Font.BOLDWEIGHT_NORMAL, defaultColor, defaultSize, defaultName, false, false, Font.SS_NONE, Font.U_NONE);
+        Font fontFind=workbook.findFont(false, defaultColor, defaultSize, defaultName, false, false, Font.SS_NONE, Font.U_NONE);
         assertNotNull(fontFind);
 
         //get default font, then change 2 values and check against different values (height changes)
         Font font=workbook.createFont();
-        font.setBoldweight(Font.BOLDWEIGHT_BOLD);
-        assertEquals(Font.BOLDWEIGHT_BOLD, font.getBoldweight());
+        font.setBold(true);
+        assertTrue(font.getBold());
         font.setUnderline(Font.U_DOUBLE);
         assertEquals(Font.U_DOUBLE, font.getUnderline());
         font.setFontHeightInPoints((short)15);
         assertEquals(15*20, font.getFontHeight());
         assertEquals(15, font.getFontHeightInPoints());
-        fontFind=workbook.findFont(Font.BOLDWEIGHT_BOLD, defaultColor, (short)(15*20), defaultName, false, false, Font.SS_NONE, Font.U_DOUBLE);
+        fontFind=workbook.findFont(true, defaultColor, (short)(15*20), defaultName, false, false, Font.SS_NONE, Font.U_DOUBLE);
         assertNotNull(fontFind);
         workbook.close();
     }
@@ -61,7 +61,7 @@ public abstract class BaseTestFont {
         int num0 = wb.getNumberOfFonts();
 
         Font f1=wb.createFont();
-        f1.setBoldweight(Font.BOLDWEIGHT_BOLD);
+        f1.setBold(true);
         short idx1 = f1.getIndex();
         wb.createCellStyle().setFont(f1);
 
@@ -76,7 +76,7 @@ public abstract class BaseTestFont {
         wb.createCellStyle().setFont(f3);
 
         assertEquals(num0 + 3,wb.getNumberOfFonts());
-        assertEquals(Font.BOLDWEIGHT_BOLD,wb.getFontAt(idx1).getBoldweight());
+        assertTrue(wb.getFontAt(idx1).getBold());
         assertEquals(Font.U_DOUBLE,wb.getFontAt(idx2).getUnderline());
         assertEquals(23,wb.getFontAt(idx3).getFontHeightInPoints());
         wb.close();
@@ -97,7 +97,7 @@ public abstract class BaseTestFont {
         int num0 = wb1.getNumberOfFonts();
 
         Font font=wb1.createFont();
-        font.setBoldweight(Font.BOLDWEIGHT_BOLD);
+        font.setBold(true);
         font.setStrikeout(true);
         font.setColor(IndexedColors.YELLOW.getIndex());
         font.setFontName("Courier");
@@ -161,7 +161,7 @@ public abstract class BaseTestFont {
 
         //default font
         Font f1 = wb.getFontAt((short)0);
-        assertEquals(Font.BOLDWEIGHT_NORMAL, f1.getBoldweight());
+        assertFalse(f1.getBold());
 
         // Check that asking for the same font
         //  multiple times gives you the same thing.
@@ -172,7 +172,7 @@ public abstract class BaseTestFont {
         //  yet to add
         assertNull(
             wb.findFont(
-                Font.BOLDWEIGHT_BOLD, (short)123, (short)(22*20),
+                true, (short)123, (short)(22*20),
                 "Thingy", false, true, (short)2, (byte)2
             )
         );
@@ -183,7 +183,7 @@ public abstract class BaseTestFont {
 
         assertSame(nf, wb.getFontAt(nfIdx));
 
-        nf.setBoldweight(Font.BOLDWEIGHT_BOLD);
+        nf.setBold(true);
         nf.setColor((short)123);
         nf.setFontHeightInPoints((short)22);
         nf.setFontName("Thingy");
@@ -201,13 +201,13 @@ public abstract class BaseTestFont {
         // Find it now
         assertNotNull(
             wb.findFont(
-                Font.BOLDWEIGHT_BOLD, (short)123, (short)(22*20),
+                true, (short)123, (short)(22*20),
                 "Thingy", false, true, (short)2, (byte)2
             )
         );
         assertSame(nf,
                wb.findFont(
-                   Font.BOLDWEIGHT_BOLD, (short)123, (short)(22*20),
+                   true, (short)123, (short)(22*20),
                    "Thingy", false, true, (short)2, (byte)2
                )
         );

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java Wed Jun 28 10:34:37 2017
@@ -28,8 +28,10 @@ import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.text.DateFormat;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
+import java.util.List;
 import java.util.Locale;
 
 import org.apache.poi.hssf.HSSFTestDataSamples;
@@ -853,11 +855,34 @@ public class TestDataFormatter {
     }
 
     /**
+     * bug 60422 : simple number formats seem ok
+≈     */
+    @Test
+    public void testSimpleNumericFormatsInGermanyLocale() {
+        List<Locale> locales = Arrays.asList(new Locale[] {Locale.GERMANY, Locale.US, Locale.ROOT} );
+        for (Locale locale : locales) {
+            //show that LocaleUtil has no effect on these tests
+            LocaleUtil.setUserLocale(locale);
+            try {
+                char euro = '\u20AC';
+                DataFormatter df = new DataFormatter(Locale.GERMANY);
+                assertEquals("4,33", df.formatRawCellContents(4.33, -1, "#,##0.00"));
+                assertEquals("1.234,33", df.formatRawCellContents(1234.333, -1, "#,##0.00"));
+                assertEquals("-1.234,33", df.formatRawCellContents(-1234.333, -1, "#,##0.00"));
+                assertEquals("1.234,33 " + euro, df.formatRawCellContents(1234.33, -1, "#,##0.00 " + euro));
+                assertEquals("1.234,33 " + euro, df.formatRawCellContents(1234.33, -1, "#,##0.00 \"" + euro + "\""));
+            } finally {
+                LocaleUtil.resetUserLocale();
+            }
+        }
+    }
+
+    /**
      * bug 60422 : DataFormatter has issues with a specific NumberFormat in Germany default locale
-     * Currently, this test only passes if you set LocaleUtil.setUserLocale(Locale.ROOT) or Locale.US.
-     */
+≈    */
     @Test
     public void testBug60422() {
+        //when this is set to Locale.Germany, the result is 
         LocaleUtil.setUserLocale(Locale.ROOT);
         try {
             char euro = '\u20AC';
@@ -865,6 +890,7 @@ public class TestDataFormatter {
             String formatString = String.format(Locale.ROOT,
                     "_-* #,##0.00\\ \"%s\"_-;\\-* #,##0.00\\ \"%s\"_-;_-* \"-\"??\\ \"%s\"_-;_-@_-",
                     euro, euro, euro);
+            //this should be 4,33
             assertEquals("4.33 " + euro, df.formatRawCellContents(4.33, 178, formatString));
         } finally {
             LocaleUtil.resetUserLocale();

Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java Wed Jun 28 10:34:37 2017
@@ -78,7 +78,7 @@ public class NumberComparingSpreadsheetG
 		HSSFRow row = sheet.createRow(0);
 		HSSFCellStyle style = wb.createCellStyle();
 		HSSFFont font = wb.createFont();
-		font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+		font.setBold(true);
 		style.setFont(font);
 		writeHeaderCell(row, 0, "Raw Long Bits A", style);
 		writeHeaderCell(row, 1, "Raw Long Bits B", style);

Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java?rev=1800147&r1=1800146&r2=1800147&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java Wed Jun 28 10:34:37 2017
@@ -97,7 +97,7 @@ public class NumberRenderingSpreadsheetG
 		HSSFRow row = sheet.createRow(0);
 		HSSFCellStyle style = wb.createCellStyle();
 		HSSFFont font = wb.createFont();
-		font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+		font.setBold(true);
 		style.setFont(font);
 		writeHeaderCell(row, 0, "Value", style);
 		writeHeaderCell(row, 1, "Raw Long Bits", style);



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


Mime
View raw message