Modified: poi/trunk/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/FrameRecord.java Sun 
Dec 22 21:44:45 2019
@@ -23,31 +23,34 @@ import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * The frame record indicates whether there is a border around the displayed 
text of a chart.
  */
-public final class FrameRecord extends StandardRecord implements Cloneable {
-    public final static short sid  = 0x1032;
+public final class FrameRecord extends StandardRecord {
+    public static final short sid  = 0x1032;
+    public static final short       BORDER_TYPE_REGULAR            = 0;
+    public static final short       BORDER_TYPE_SHADOW             = 1;
 
     private static final BitField autoSize     = 
BitFieldFactory.getInstance(0x1);
     private static final BitField autoPosition = 
BitFieldFactory.getInstance(0x2);
 
-    private  short      field_1_borderType;
-    public final static short       BORDER_TYPE_REGULAR            = 0;
-    public final static short       BORDER_TYPE_SHADOW             = 1;
-    private  short      field_2_options;
+    private short field_1_borderType;
+    private short field_2_options;
 
 
-    public FrameRecord()
-    {
+    public FrameRecord() {}
 
+    public FrameRecord(FrameRecord other) {
+        super(other);
+        field_1_borderType = other.field_1_borderType;
+        field_2_options = other.field_2_options;
     }
 
-    public FrameRecord(RecordInputStream in)
-    {
-        field_1_borderType             = in.readShort();
-        field_2_options                = in.readShort();
+    public FrameRecord(RecordInputStream in) {
+        field_1_borderType = in.readShort();
+        field_2_options = in.readShort();
     }
 
     public String toString()
@@ -58,13 +61,13 @@ public final class FrameRecord extends S
         buffer.append("    .borderType           = ")
             .append("0x").append(HexDump.toHex(  getBorderType ()))
             .append(" (").append( getBorderType() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .options              = ")
             .append("0x").append(HexDump.toHex(  getOptions ()))
             .append(" (").append( getOptions() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
-        buffer.append("         .autoSize                 = 
").append(isAutoSize()).append('\n'); 
-        buffer.append("         .autoPosition             = 
").append(isAutoPosition()).append('\n'); 
+        buffer.append(System.getProperty("line.separator"));
+        buffer.append("         .autoSize                 = 
").append(isAutoSize()).append('\n');
+        buffer.append("         .autoPosition             = 
").append(isAutoPosition()).append('\n');
 
         buffer.append("[/FRAME]\n");
         return buffer.toString();
@@ -85,21 +88,22 @@ public final class FrameRecord extends S
     }
 
     @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
     public FrameRecord clone() {
-        FrameRecord rec = new FrameRecord();
-    
-        rec.field_1_borderType = field_1_borderType;
-        rec.field_2_options = field_2_options;
-        return rec;
+        return copy();
     }
 
-
-
+    @Override
+    public FrameRecord copy() {
+        return new FrameRecord(this);
+    }
 
     /**
      * Get the border type field for the Frame record.
      *
-     * @return  One of 
+     * @return  One of
      *        BORDER_TYPE_REGULAR
      *        BORDER_TYPE_SHADOW
      */
@@ -112,7 +116,7 @@ public final class FrameRecord extends S
      * Set the border type field for the Frame record.
      *
      * @param field_1_borderType
-     *        One of 
+     *        One of
      *        BORDER_TYPE_REGULAR
      *        BORDER_TYPE_SHADOW
      */

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/LegendRecord.java Sun 
Dec 22 21:44:45 2019
@@ -23,12 +23,13 @@ import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * Defines a legend for a chart.
  */
-public final class LegendRecord extends StandardRecord implements Cloneable {
-    public final static short sid = 0x1015;
+public final class LegendRecord extends StandardRecord {
+    public static final short sid = 0x1015;
 
     private static final BitField autoPosition     = 
BitFieldFactory.getInstance(0x01);
     private static final BitField autoSeries       = 
BitFieldFactory.getInstance(0x02);
@@ -37,38 +38,46 @@ public final class LegendRecord extends
     private static final BitField vertical         = 
BitFieldFactory.getInstance(0x10);
     private static final BitField dataTable        = 
BitFieldFactory.getInstance(0x20);
 
-    private  int        field_1_xAxisUpperLeft;
-    private  int        field_2_yAxisUpperLeft;
-    private  int        field_3_xSize;
-    private  int        field_4_ySize;
-    private  byte       field_5_type;
-    public final static byte        TYPE_BOTTOM                    = 0;
-    public final static byte        TYPE_CORNER                    = 1;
-    public final static byte        TYPE_TOP                       = 2;
-    public final static byte        TYPE_RIGHT                     = 3;
-    public final static byte        TYPE_LEFT                      = 4;
-    public final static byte        TYPE_UNDOCKED                  = 7;
-    private  byte       field_6_spacing;
-    public final static byte        SPACING_CLOSE                  = 0;
-    public final static byte        SPACING_MEDIUM                 = 1;
-    public final static byte        SPACING_OPEN                   = 2;
-    private  short      field_7_options;
-
-
-    public LegendRecord()
-    {
-
-    }
-
-    public LegendRecord(RecordInputStream in)
-    {
-        field_1_xAxisUpperLeft         = in.readInt();
-        field_2_yAxisUpperLeft         = in.readInt();
-        field_3_xSize                  = in.readInt();
-        field_4_ySize                  = in.readInt();
-        field_5_type                   = in.readByte();
-        field_6_spacing                = in.readByte();
-        field_7_options                = in.readShort();
+    public static final byte TYPE_BOTTOM    = 0;
+    public static final byte TYPE_CORNER    = 1;
+    public static final byte TYPE_TOP       = 2;
+    public static final byte TYPE_RIGHT     = 3;
+    public static final byte TYPE_LEFT      = 4;
+    public static final byte TYPE_UNDOCKED  = 7;
+    public static final byte SPACING_CLOSE  = 0;
+    public static final byte SPACING_MEDIUM = 1;
+    public static final byte SPACING_OPEN   = 2;
+
+
+    private int   field_1_xAxisUpperLeft;
+    private int   field_2_yAxisUpperLeft;
+    private int   field_3_xSize;
+    private int   field_4_ySize;
+    private byte  field_5_type;
+    private byte  field_6_spacing;
+    private short field_7_options;
+
+    public LegendRecord() {}
+
+    public LegendRecord(LegendRecord other) {
+        super(other);
+        field_1_xAxisUpperLeft = other.field_1_xAxisUpperLeft;
+        field_2_yAxisUpperLeft = other.field_2_yAxisUpperLeft;
+        field_3_xSize          = other.field_3_xSize;
+        field_4_ySize          = other.field_4_ySize;
+        field_5_type           = other.field_5_type;
+        field_6_spacing        = other.field_6_spacing;
+        field_7_options        = other.field_7_options;
+    }
+
+    public LegendRecord(RecordInputStream in) {
+        field_1_xAxisUpperLeft = in.readInt();
+        field_2_yAxisUpperLeft = in.readInt();
+        field_3_xSize          = in.readInt();
+        field_4_ySize          = in.readInt();
+        field_5_type           = in.readByte();
+        field_6_spacing        = in.readByte();
+        field_7_options        = in.readShort();
     }
 
     public String toString()
@@ -79,37 +88,37 @@ public final class LegendRecord extends
         buffer.append("    .xAxisUpperLeft       = ")
             .append("0x").append(HexDump.toHex(  getXAxisUpperLeft ()))
             .append(" (").append( getXAxisUpperLeft() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .yAxisUpperLeft       = ")
             .append("0x").append(HexDump.toHex(  getYAxisUpperLeft ()))
             .append(" (").append( getYAxisUpperLeft() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .xSize                = ")
             .append("0x").append(HexDump.toHex(  getXSize ()))
             .append(" (").append( getXSize() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .ySize                = ")
             .append("0x").append(HexDump.toHex(  getYSize ()))
             .append(" (").append( getYSize() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .type                 = ")
             .append("0x").append(HexDump.toHex(  getType ()))
             .append(" (").append( getType() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .spacing              = ")
             .append("0x").append(HexDump.toHex(  getSpacing ()))
             .append(" (").append( getSpacing() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .options              = ")
             .append("0x").append(HexDump.toHex(  getOptions ()))
             .append(" (").append( getOptions() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
-        buffer.append("         .autoPosition             = 
").append(isAutoPosition()).append('\n'); 
-        buffer.append("         .autoSeries               = 
").append(isAutoSeries()).append('\n'); 
-        buffer.append("         .autoXPositioning         = 
").append(isAutoXPositioning()).append('\n'); 
-        buffer.append("         .autoYPositioning         = 
").append(isAutoYPositioning()).append('\n'); 
-        buffer.append("         .vertical                 = 
").append(isVertical()).append('\n'); 
-        buffer.append("         .dataTable                = 
").append(isDataTable()).append('\n'); 
+        buffer.append(System.getProperty("line.separator"));
+        buffer.append("         .autoPosition             = 
").append(isAutoPosition()).append('\n');
+        buffer.append("         .autoSeries               = 
").append(isAutoSeries()).append('\n');
+        buffer.append("         .autoXPositioning         = 
").append(isAutoXPositioning()).append('\n');
+        buffer.append("         .autoYPositioning         = 
").append(isAutoYPositioning()).append('\n');
+        buffer.append("         .vertical                 = 
").append(isVertical()).append('\n');
+        buffer.append("         .dataTable                = 
").append(isDataTable()).append('\n');
 
         buffer.append("[/LEGEND]\n");
         return buffer.toString();
@@ -135,17 +144,16 @@ public final class LegendRecord extends
     }
 
     @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
     public LegendRecord clone() {
-        LegendRecord rec = new LegendRecord();
-    
-        rec.field_1_xAxisUpperLeft = field_1_xAxisUpperLeft;
-        rec.field_2_yAxisUpperLeft = field_2_yAxisUpperLeft;
-        rec.field_3_xSize = field_3_xSize;
-        rec.field_4_ySize = field_4_ySize;
-        rec.field_5_type = field_5_type;
-        rec.field_6_spacing = field_6_spacing;
-        rec.field_7_options = field_7_options;
-        return rec;
+        return copy();
+    }
+
+    @Override
+    public LegendRecord copy() {
+        return new LegendRecord(this);
     }
 
 
@@ -218,7 +226,7 @@ public final class LegendRecord extends
     /**
      * Get the type field for the Legend record.
      *
-     * @return  One of 
+     * @return  One of
      *        TYPE_BOTTOM
      *        TYPE_CORNER
      *        TYPE_TOP
@@ -235,7 +243,7 @@ public final class LegendRecord extends
      * Set the type field for the Legend record.
      *
      * @param field_5_type
-     *        One of 
+     *        One of
      *        TYPE_BOTTOM
      *        TYPE_CORNER
      *        TYPE_TOP
@@ -251,7 +259,7 @@ public final class LegendRecord extends
     /**
      * Get the spacing field for the Legend record.
      *
-     * @return  One of 
+     * @return  One of
      *        SPACING_CLOSE
      *        SPACING_MEDIUM
      *        SPACING_OPEN
@@ -265,7 +273,7 @@ public final class LegendRecord extends
      * Set the spacing field for the Legend record.
      *
      * @param field_6_spacing
-     *        One of 
+     *        One of
      *        SPACING_CLOSE
      *        SPACING_MEDIUM
      *        SPACING_OPEN

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/LineFormatRecord.java 
Sun Dec 22 21:44:45 2019
@@ -23,50 +23,58 @@ import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * Describes a line format record.  The line format record controls how a line 
on a chart appears.
  */
-public final class LineFormatRecord extends StandardRecord implements 
Cloneable {
-    public final static short sid = 0x1007;
+public final class LineFormatRecord extends StandardRecord {
+    public static final short sid = 0x1007;
 
     private static final BitField auto      = BitFieldFactory.getInstance(0x1);
     private static final BitField drawTicks = BitFieldFactory.getInstance(0x4);
     private static final BitField unknown   = BitFieldFactory.getInstance(0x4);
 
-    private  int        field_1_lineColor;
-    private  short      field_2_linePattern;
-    public final static short       LINE_PATTERN_SOLID             = 0;
-    public final static short       LINE_PATTERN_DASH              = 1;
-    public final static short       LINE_PATTERN_DOT               = 2;
-    public final static short       LINE_PATTERN_DASH_DOT          = 3;
-    public final static short       LINE_PATTERN_DASH_DOT_DOT      = 4;
-    public final static short       LINE_PATTERN_NONE              = 5;
-    public final static short       LINE_PATTERN_DARK_GRAY_PATTERN = 6;
-    public final static short       LINE_PATTERN_MEDIUM_GRAY_PATTERN = 7;
-    public final static short       LINE_PATTERN_LIGHT_GRAY_PATTERN = 8;
-    private  short      field_3_weight;
-    public final static short       WEIGHT_HAIRLINE                = -1;
-    public final static short       WEIGHT_NARROW                  = 0;
-    public final static short       WEIGHT_MEDIUM                  = 1;
-    public final static short       WEIGHT_WIDE                    = 2;
-    private  short      field_4_format;
-    private  short      field_5_colourPaletteIndex;
-
-
-    public LineFormatRecord()
-    {
-
-    }
-
-    public LineFormatRecord(RecordInputStream in)
-    {
-        field_1_lineColor              = in.readInt();
-        field_2_linePattern            = in.readShort();
-        field_3_weight                 = in.readShort();
-        field_4_format                 = in.readShort();
-        field_5_colourPaletteIndex     = in.readShort();
-
+    public static final short LINE_PATTERN_SOLID             = 0;
+    public static final short LINE_PATTERN_DASH              = 1;
+    public static final short LINE_PATTERN_DOT               = 2;
+    public static final short LINE_PATTERN_DASH_DOT          = 3;
+    public static final short LINE_PATTERN_DASH_DOT_DOT      = 4;
+    public static final short LINE_PATTERN_NONE              = 5;
+    public static final short LINE_PATTERN_DARK_GRAY_PATTERN = 6;
+    public static final short LINE_PATTERN_MEDIUM_GRAY_PATTERN = 7;
+    public static final short LINE_PATTERN_LIGHT_GRAY_PATTERN = 8;
+
+    public static final short WEIGHT_HAIRLINE                = -1;
+    public static final short WEIGHT_NARROW                  = 0;
+    public static final short WEIGHT_MEDIUM                  = 1;
+    public static final short WEIGHT_WIDE                    = 2;
+
+
+    private int   field_1_lineColor;
+    private short field_2_linePattern;
+    private short field_3_weight;
+    private short field_4_format;
+    private short field_5_colourPaletteIndex;
+
+
+    public LineFormatRecord() {}
+
+    public LineFormatRecord(LineFormatRecord other) {
+        super(other);
+        field_1_lineColor          = other.field_1_lineColor;
+        field_2_linePattern        = other.field_2_linePattern;
+        field_3_weight             = other.field_3_weight;
+        field_4_format             = other.field_4_format;
+        field_5_colourPaletteIndex = other.field_5_colourPaletteIndex;
+    }
+
+    public LineFormatRecord(RecordInputStream in) {
+        field_1_lineColor          = in.readInt();
+        field_2_linePattern        = in.readShort();
+        field_3_weight             = in.readShort();
+        field_4_format             = in.readShort();
+        field_5_colourPaletteIndex = in.readShort();
     }
 
     public String toString()
@@ -77,26 +85,26 @@ public final class LineFormatRecord exte
         buffer.append("    .lineColor            = ")
             .append("0x").append(HexDump.toHex(  getLineColor ()))
             .append(" (").append( getLineColor() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .linePattern          = ")
             .append("0x").append(HexDump.toHex(  getLinePattern ()))
             .append(" (").append( getLinePattern() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .weight               = ")
             .append("0x").append(HexDump.toHex(  getWeight ()))
             .append(" (").append( getWeight() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .format               = ")
             .append("0x").append(HexDump.toHex(  getFormat ()))
             .append(" (").append( getFormat() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
-        buffer.append("         .auto                     = 
").append(isAuto()).append('\n'); 
-        buffer.append("         .drawTicks                = 
").append(isDrawTicks()).append('\n'); 
-        buffer.append("         .unknown                  = 
").append(isUnknown()).append('\n'); 
+        buffer.append(System.getProperty("line.separator"));
+        buffer.append("         .auto                     = 
").append(isAuto()).append('\n');
+        buffer.append("         .drawTicks                = 
").append(isDrawTicks()).append('\n');
+        buffer.append("         .unknown                  = 
").append(isUnknown()).append('\n');
         buffer.append("    .colourPaletteIndex   = ")
             .append("0x").append(HexDump.toHex(  getColourPaletteIndex ()))
             .append(" (").append( getColourPaletteIndex() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/LINEFORMAT]\n");
         return buffer.toString();
@@ -120,19 +128,17 @@ public final class LineFormatRecord exte
     }
 
     @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
     public LineFormatRecord clone() {
-        LineFormatRecord rec = new LineFormatRecord();
-    
-        rec.field_1_lineColor = field_1_lineColor;
-        rec.field_2_linePattern = field_2_linePattern;
-        rec.field_3_weight = field_3_weight;
-        rec.field_4_format = field_4_format;
-        rec.field_5_colourPaletteIndex = field_5_colourPaletteIndex;
-        return rec;
+        return copy();
     }
 
-
-
+    @Override
+    public LineFormatRecord copy() {
+        return new LineFormatRecord(this);
+    }
 
     /**
      * Get the line color field for the LineFormat record.
@@ -153,7 +159,7 @@ public final class LineFormatRecord exte
     /**
      * Get the line pattern field for the LineFormat record.
      *
-     * @return  One of 
+     * @return  One of
      *        LINE_PATTERN_SOLID
      *        LINE_PATTERN_DASH
      *        LINE_PATTERN_DOT
@@ -173,7 +179,7 @@ public final class LineFormatRecord exte
      * Set the line pattern field for the LineFormat record.
      *
      * @param field_2_linePattern
-     *        One of 
+     *        One of
      *        LINE_PATTERN_SOLID
      *        LINE_PATTERN_DASH
      *        LINE_PATTERN_DOT
@@ -192,7 +198,7 @@ public final class LineFormatRecord exte
     /**
      * Get the weight field for the LineFormat record.
      *
-     * @return  One of 
+     * @return  One of
      *        WEIGHT_HAIRLINE
      *        WEIGHT_NARROW
      *        WEIGHT_MEDIUM
@@ -207,7 +213,7 @@ public final class LineFormatRecord exte
      * Set the weight field for the LineFormat record.
      *
      * @param field_3_weight
-     *        One of 
+     *        One of
      *        WEIGHT_HAIRLINE
      *        WEIGHT_NARROW
      *        WEIGHT_MEDIUM

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/LinkedDataRecord.java 
Sun Dec 22 21:44:45 2019
@@ -19,44 +19,52 @@ package org.apache.poi.hssf.record.chart
 
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.record.StandardRecord;
-import org.apache.poi.ss.formula.ptg.Ptg;
 import org.apache.poi.ss.formula.Formula;
+import org.apache.poi.ss.formula.ptg.Ptg;
 import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * Describes a linked data record.  This record refers to the series data or 
text.
  */
-public final class LinkedDataRecord extends StandardRecord implements 
Cloneable {
-    public final static short sid  = 0x1051;
+public final class LinkedDataRecord extends StandardRecord {
+    public static final short sid  = 0x1051;
+
+    public static final byte LINK_TYPE_TITLE_OR_TEXT        = 0;
+    public static final byte LINK_TYPE_VALUES               = 1;
+    public static final byte LINK_TYPE_CATEGORIES           = 2;
+    public static final byte LINK_TYPE_SECONDARY_CATEGORIES = 3;
+
+    public static final byte REFERENCE_TYPE_DEFAULT_CATEGORIES = 0;
+    public static final byte REFERENCE_TYPE_DIRECT          = 1;
+    public static final byte REFERENCE_TYPE_WORKSHEET       = 2;
+    public static final byte REFERENCE_TYPE_NOT_USED        = 3;
+    public static final byte REFERENCE_TYPE_ERROR_REPORTED  = 4;
 
     private static final BitField customNumberFormat= 
BitFieldFactory.getInstance(0x1);
 
     private  byte       field_1_linkType;
-    public final static byte        LINK_TYPE_TITLE_OR_TEXT        = 0;
-    public final static byte        LINK_TYPE_VALUES               = 1;
-    public final static byte        LINK_TYPE_CATEGORIES           = 2;
-    public final static byte        LINK_TYPE_SECONDARY_CATEGORIES = 3;
     private  byte       field_2_referenceType;
-    public final static byte        REFERENCE_TYPE_DEFAULT_CATEGORIES = 0;
-    public final static byte        REFERENCE_TYPE_DIRECT          = 1;
-    public final static byte        REFERENCE_TYPE_WORKSHEET       = 2;
-    public final static byte        REFERENCE_TYPE_NOT_USED        = 3;
-    public final static byte        REFERENCE_TYPE_ERROR_REPORTED  = 4;
     private  short      field_3_options;
     private  short      field_4_indexNumberFmtRecord;
     private  Formula field_5_formulaOfLink;
 
 
-    public LinkedDataRecord()
-    {
+    public LinkedDataRecord() {}
 
+    public LinkedDataRecord(LinkedDataRecord other) {
+        super(other);
+        field_1_linkType               = other.field_1_linkType;
+        field_2_referenceType          = other.field_2_referenceType;
+        field_3_options                = other.field_3_options;
+        field_4_indexNumberFmtRecord   = other.field_4_indexNumberFmtRecord;
+        field_5_formulaOfLink = (other.field_5_formulaOfLink == null) ? null : 
other.field_5_formulaOfLink.copy();
     }
 
-    public LinkedDataRecord(RecordInputStream in)
-    {
+    public LinkedDataRecord(RecordInputStream in) {
         field_1_linkType               = in.readByte();
         field_2_referenceType          = in.readByte();
         field_3_options                = in.readShort();
@@ -102,26 +110,24 @@ public final class LinkedDataRecord exte
     }
 
     @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
     public LinkedDataRecord clone() {
-        LinkedDataRecord rec = new LinkedDataRecord();
-
-        rec.field_1_linkType = field_1_linkType;
-        rec.field_2_referenceType = field_2_referenceType;
-        rec.field_3_options = field_3_options;
-        rec.field_4_indexNumberFmtRecord = field_4_indexNumberFmtRecord;
-        rec.field_5_formulaOfLink = field_5_formulaOfLink.copy();
-        return rec;
+        return copy();
     }
 
-
-
+    @Override
+    public LinkedDataRecord copy() {
+        return new LinkedDataRecord(this);
+    }
 
     /**
      * Get the link type field for the LinkedData record.
      *
      * @return  One of
      *        {@link #LINK_TYPE_TITLE_OR_TEXT},
-     *        {@link #LINK_TYPE_VALUES}, 
+     *        {@link #LINK_TYPE_VALUES},
      *        {@link #LINK_TYPE_CATEGORIES}, or
      *        {@link #LINK_TYPE_SECONDARY_CATEGORIES}
      */

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java
 Sun Dec 22 21:44:45 2019
@@ -21,23 +21,25 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * The number format index record indexes format table. This applies to an 
axis.
  */
-public final class NumberFormatIndexRecord extends StandardRecord implements 
Cloneable {
-    public final static short      sid                             = 0x104E;
-    private  short      field_1_formatIndex;
+public final class NumberFormatIndexRecord extends StandardRecord {
+    public static final short sid = 0x104E;
 
+    private short field_1_formatIndex;
 
-    public NumberFormatIndexRecord()
-    {
+    public NumberFormatIndexRecord() { }
 
+    public NumberFormatIndexRecord(NumberFormatIndexRecord other) {
+        super(other);
+        field_1_formatIndex = other.field_1_formatIndex;
     }
 
-    public NumberFormatIndexRecord(RecordInputStream in)
-    {
-        field_1_formatIndex            = in.readShort();
+    public NumberFormatIndexRecord(RecordInputStream in) {
+        field_1_formatIndex = in.readShort();
     }
 
     public String toString()
@@ -48,7 +50,7 @@ public final class NumberFormatIndexReco
         buffer.append("    .formatIndex          = ")
             .append("0x").append(HexDump.toHex(  getFormatIndex ()))
             .append(" (").append( getFormatIndex() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/IFMT]\n");
         return buffer.toString();
@@ -68,15 +70,17 @@ public final class NumberFormatIndexReco
     }
 
     @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
     public NumberFormatIndexRecord clone() {
-        NumberFormatIndexRecord rec = new NumberFormatIndexRecord();
-    
-        rec.field_1_formatIndex = field_1_formatIndex;
-        return rec;
+        return copy();
     }
 
-
-
+    @Override
+    public NumberFormatIndexRecord copy() {
+        return new NumberFormatIndexRecord(this);
+    }
 
     /**
      * Get the format index field for the NumberFormatIndex record.

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/ObjectLinkRecord.java 
Sun Dec 22 21:44:45 2019
@@ -21,33 +21,37 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * Links text to an object on the chart or identifies it as the title.
  */
-public final class ObjectLinkRecord extends StandardRecord implements 
Cloneable {
-    public final static short      sid                             = 0x1027;
-    private  short      field_1_anchorId;
-    public final static short       ANCHOR_ID_CHART_TITLE          = 1;
-    public final static short       ANCHOR_ID_Y_AXIS               = 2;
-    public final static short       ANCHOR_ID_X_AXIS               = 3;
-    public final static short       ANCHOR_ID_SERIES_OR_POINT      = 4;
-    public final static short       ANCHOR_ID_Z_AXIS               = 7;
-    private  short      field_2_link1;
-    private  short      field_3_link2;
-
-
-    public ObjectLinkRecord()
-    {
-
-    }
-
-    public ObjectLinkRecord(RecordInputStream in)
-    {
-        field_1_anchorId               = in.readShort();
-        field_2_link1                  = in.readShort();
-        field_3_link2                  = in.readShort();
+public final class ObjectLinkRecord extends StandardRecord {
+    public static final short sid                            = 0x1027;
 
+    public static final short ANCHOR_ID_CHART_TITLE          = 1;
+    public static final short ANCHOR_ID_Y_AXIS               = 2;
+    public static final short ANCHOR_ID_X_AXIS               = 3;
+    public static final short ANCHOR_ID_SERIES_OR_POINT      = 4;
+    public static final short ANCHOR_ID_Z_AXIS               = 7;
+
+    private short field_1_anchorId;
+    private short field_2_link1;
+    private short field_3_link2;
+
+    public ObjectLinkRecord() {}
+
+    public ObjectLinkRecord(ObjectLinkRecord other) {
+        super(other);
+        field_1_anchorId = other.field_1_anchorId;
+        field_2_link1 = other.field_2_link1;
+        field_3_link2 = other.field_3_link2;
+    }
+
+    public ObjectLinkRecord(RecordInputStream in) {
+        field_1_anchorId = in.readShort();
+        field_2_link1 = in.readShort();
+        field_3_link2 = in.readShort();
     }
 
     public String toString()
@@ -58,15 +62,15 @@ public final class ObjectLinkRecord exte
         buffer.append("    .anchorId             = ")
             .append("0x").append(HexDump.toHex(  getAnchorId ()))
             .append(" (").append( getAnchorId() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .link1                = ")
             .append("0x").append(HexDump.toHex(  getLink1 ()))
             .append(" (").append( getLink1() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .link2                = ")
             .append("0x").append(HexDump.toHex(  getLink2 ()))
             .append(" (").append( getLink2() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/OBJECTLINK]\n");
         return buffer.toString();
@@ -88,22 +92,22 @@ public final class ObjectLinkRecord exte
     }
 
     @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
     public ObjectLinkRecord clone() {
-        ObjectLinkRecord rec = new ObjectLinkRecord();
-    
-        rec.field_1_anchorId = field_1_anchorId;
-        rec.field_2_link1 = field_2_link1;
-        rec.field_3_link2 = field_3_link2;
-        return rec;
+        return copy();
     }
 
-
-
+    @Override
+    public ObjectLinkRecord copy() {
+        return new ObjectLinkRecord(this);
+    }
 
     /**
      * Get the anchor id field for the ObjectLink record.
      *
-     * @return  One of 
+     * @return  One of
      *        ANCHOR_ID_CHART_TITLE
      *        ANCHOR_ID_Y_AXIS
      *        ANCHOR_ID_X_AXIS
@@ -119,7 +123,7 @@ public final class ObjectLinkRecord exte
      * Set the anchor id field for the ObjectLink record.
      *
      * @param field_1_anchorId
-     *        One of 
+     *        One of
      *        ANCHOR_ID_CHART_TITLE
      *        ANCHOR_ID_Y_AXIS
      *        ANCHOR_ID_X_AXIS

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotAreaRecord.java Sun 
Dec 22 21:44:45 2019
@@ -20,26 +20,20 @@ package org.apache.poi.hssf.record.chart
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * preceeds and identifies a frame as belonging to the plot area.
  */
 public final class PlotAreaRecord extends StandardRecord {
-    public final static short      sid                             = 0x1035;
+    public static final short sid = 0x1035;
 
-
-    public PlotAreaRecord()
-    {
-
-    }
+    public PlotAreaRecord() {}
 
     /**
      * @param in unused (since this record has no data)
      */
-    public PlotAreaRecord(RecordInputStream in)
-    {
-
-    }
+    public PlotAreaRecord(RecordInputStream in) {}
 
     public String toString()
     {
@@ -63,7 +57,16 @@ public final class PlotAreaRecord extend
         return sid;
     }
 
-    public Object clone() {
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public PlotAreaRecord clone() {
+        return copy();
+    }
+
+    @Override
+    public PlotAreaRecord copy() {
         return new PlotAreaRecord();
     }
 }

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/PlotGrowthRecord.java 
Sun Dec 22 21:44:45 2019
@@ -21,26 +21,27 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * The plot growth record specifies the scaling factors used when a font is 
scaled.
  */
 public final class PlotGrowthRecord extends StandardRecord {
-    public final static short      sid                             = 0x1064;
-    private  int        field_1_horizontalScale;
-    private  int        field_2_verticalScale;
+    public static final short sid = 0x1064;
+    private int field_1_horizontalScale;
+    private int field_2_verticalScale;
 
 
-    public PlotGrowthRecord()
-    {
+    public PlotGrowthRecord() {}
 
+    public PlotGrowthRecord(PlotGrowthRecord other) {
+        field_1_horizontalScale = other.field_1_horizontalScale;
+        field_2_verticalScale = other.field_2_verticalScale;
     }
 
-    public PlotGrowthRecord(RecordInputStream in)
-    {
-        field_1_horizontalScale        = in.readInt();
-        field_2_verticalScale          = in.readInt();
-
+    public PlotGrowthRecord(RecordInputStream in) {
+        field_1_horizontalScale = in.readInt();
+        field_2_verticalScale = in.readInt();
     }
 
     public String toString()
@@ -51,11 +52,11 @@ public final class PlotGrowthRecord exte
         buffer.append("    .horizontalScale      = ")
             .append("0x").append(HexDump.toHex(  getHorizontalScale ()))
             .append(" (").append( getHorizontalScale() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .verticalScale        = ")
             .append("0x").append(HexDump.toHex(  getVerticalScale ()))
             .append(" (").append( getVerticalScale() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/PLOTGROWTH]\n");
         return buffer.toString();
@@ -75,16 +76,17 @@ public final class PlotGrowthRecord exte
         return sid;
     }
 
-    public Object clone() {
-        PlotGrowthRecord rec = new PlotGrowthRecord();
-    
-        rec.field_1_horizontalScale = field_1_horizontalScale;
-        rec.field_2_verticalScale = field_2_verticalScale;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public PlotGrowthRecord clone() {
+        return copy();
     }
 
-
-
+    public PlotGrowthRecord copy() {
+        return new PlotGrowthRecord(this);
+    }
 
     /**
      * Get the horizontalScale field for the PlotGrowth record.

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesChartGroupIndexRecord.java
 Sun Dec 22 21:44:45 2019
@@ -21,23 +21,25 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * The series chart group index record stores the index to the CHARTFORMAT 
record (0 based).
  */
 public final class SeriesChartGroupIndexRecord extends StandardRecord {
-    public final static short      sid                             = 0x1045;
-    private  short      field_1_chartGroupIndex;
+    public static final short sid = 0x1045;
 
+    private short field_1_chartGroupIndex;
 
-    public SeriesChartGroupIndexRecord()
-    {
+    public SeriesChartGroupIndexRecord() {}
 
+    public SeriesChartGroupIndexRecord(SeriesChartGroupIndexRecord other) {
+        super(other);
+        field_1_chartGroupIndex = other.field_1_chartGroupIndex;
     }
 
-    public SeriesChartGroupIndexRecord(RecordInputStream in)
-    {
-        field_1_chartGroupIndex        = in.readShort();
+    public SeriesChartGroupIndexRecord(RecordInputStream in) {
+        field_1_chartGroupIndex = in.readShort();
     }
 
     public String toString()
@@ -48,7 +50,7 @@ public final class SeriesChartGroupIndex
         buffer.append("    .chartGroupIndex      = ")
             .append("0x").append(HexDump.toHex(  getChartGroupIndex ()))
             .append(" (").append( getChartGroupIndex() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/SERTOCRT]\n");
         return buffer.toString();
@@ -67,15 +69,18 @@ public final class SeriesChartGroupIndex
         return sid;
     }
 
-    public Object clone() {
-        SeriesChartGroupIndexRecord rec = new SeriesChartGroupIndexRecord();
-    
-        rec.field_1_chartGroupIndex = field_1_chartGroupIndex;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SeriesChartGroupIndexRecord clone() {
+        return copy();
     }
 
-
-
+    @Override
+    public SeriesChartGroupIndexRecord copy() {
+        return new SeriesChartGroupIndexRecord(this);
+    }
 
     /**
      * Get the chart group index field for the SeriesChartGroupIndex record.

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesIndexRecord.java 
Sun Dec 22 21:44:45 2019
@@ -21,23 +21,24 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * links a series to its position in the series list.
  */
 public final class SeriesIndexRecord extends StandardRecord {
-    public final static short      sid                             = 0x1065;
-    private  short      field_1_index;
+    public static final short sid = 0x1065;
+    private short field_1_index;
 
+    public SeriesIndexRecord() {}
 
-    public SeriesIndexRecord()
-    {
-
+    public SeriesIndexRecord(SeriesIndexRecord other) {
+        super(other);
+        field_1_index = other.field_1_index;
     }
 
-    public SeriesIndexRecord(RecordInputStream in)
-    {
-        field_1_index                  = in.readShort();
+    public SeriesIndexRecord(RecordInputStream in) {
+        field_1_index = in.readShort();
     }
 
     public String toString()
@@ -48,7 +49,7 @@ public final class SeriesIndexRecord ext
         buffer.append("    .index                = ")
             .append("0x").append(HexDump.toHex(  getIndex ()))
             .append(" (").append( getIndex() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/SINDEX]\n");
         return buffer.toString();
@@ -67,15 +68,18 @@ public final class SeriesIndexRecord ext
         return sid;
     }
 
-    public Object clone() {
-        SeriesIndexRecord rec = new SeriesIndexRecord();
-    
-        rec.field_1_index = field_1_index;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SeriesIndexRecord clone() {
+        return copy();
     }
 
-
-
+    @Override
+    public SeriesIndexRecord copy() {
+        return new SeriesIndexRecord(this);
+    }
 
     /**
      * Get the index field for the SeriesIndex record.

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesLabelsRecord.java 
Sun Dec 22 21:44:45 2019
@@ -23,14 +23,13 @@ import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
- * The series label record defines the type of label associated with the data 
format record.<p>
- * 
- * @author Glen Stampoultzis (glens at apache.org)
+ * The series label record defines the type of label associated with the data 
format record.
  */
 public final class SeriesLabelsRecord extends StandardRecord {
-    public final static short      sid = 0x100c;
+    public static final short sid = 0x100c;
 
     private static final BitField showActual        = 
BitFieldFactory.getInstance(0x01);
     private static final BitField showPercent       = 
BitFieldFactory.getInstance(0x02);
@@ -39,16 +38,17 @@ public final class SeriesLabelsRecord ex
     private static final BitField showLabel         = 
BitFieldFactory.getInstance(0x10);
     private static final BitField showBubbleSizes   = 
BitFieldFactory.getInstance(0x20);
 
-    private  short      field_1_formatFlags;
+    private short field_1_formatFlags;
 
-    public SeriesLabelsRecord()
-    {
+    public SeriesLabelsRecord() {}
 
+    public SeriesLabelsRecord(SeriesLabelsRecord other) {
+        super(other);
+        field_1_formatFlags = other.field_1_formatFlags;
     }
 
-    public SeriesLabelsRecord(RecordInputStream in)
-    {
-        field_1_formatFlags            = in.readShort();
+    public SeriesLabelsRecord(RecordInputStream in) {
+        field_1_formatFlags = in.readShort();
     }
 
     public String toString()
@@ -59,13 +59,13 @@ public final class SeriesLabelsRecord ex
         buffer.append("    .formatFlags          = ")
             .append("0x").append(HexDump.toHex(  getFormatFlags ()))
             .append(" (").append( getFormatFlags() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
-        buffer.append("         .showActual               = 
").append(isShowActual()).append('\n'); 
-        buffer.append("         .showPercent              = 
").append(isShowPercent()).append('\n'); 
-        buffer.append("         .labelAsPercentage        = 
").append(isLabelAsPercentage()).append('\n'); 
-        buffer.append("         .smoothedLine             = 
").append(isSmoothedLine()).append('\n'); 
-        buffer.append("         .showLabel                = 
").append(isShowLabel()).append('\n'); 
-        buffer.append("         .showBubbleSizes          = 
").append(isShowBubbleSizes()).append('\n'); 
+        buffer.append(System.getProperty("line.separator"));
+        buffer.append("         .showActual               = 
").append(isShowActual()).append('\n');
+        buffer.append("         .showPercent              = 
").append(isShowPercent()).append('\n');
+        buffer.append("         .labelAsPercentage        = 
").append(isLabelAsPercentage()).append('\n');
+        buffer.append("         .smoothedLine             = 
").append(isSmoothedLine()).append('\n');
+        buffer.append("         .showLabel                = 
").append(isShowLabel()).append('\n');
+        buffer.append("         .showBubbleSizes          = 
").append(isShowBubbleSizes()).append('\n');
 
         buffer.append("[/ATTACHEDLABEL]\n");
         return buffer.toString();
@@ -84,15 +84,18 @@ public final class SeriesLabelsRecord ex
         return sid;
     }
 
-    public Object clone() {
-        SeriesLabelsRecord rec = new SeriesLabelsRecord();
-    
-        rec.field_1_formatFlags = field_1_formatFlags;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SeriesLabelsRecord clone() {
+        return copy();
     }
 
-
-
+    @Override
+    public SeriesLabelsRecord copy() {
+        return new SeriesLabelsRecord(this);
+    }
 
     /**
      * Get the format flags field for the SeriesLabels record.

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesListRecord.java 
Sun Dec 22 21:44:45 2019
@@ -22,18 +22,24 @@ import java.util.Arrays;
 import org.apache.poi.hssf.record.RecordInputStream;
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * SERIESLIST (0x1016)<p>
- * 
+ *
  * The series list record defines the series displayed as an overlay to the 
main chart record.<p>
- * 
+ *
  * (As with all chart related records, documentation is lacking.
  * See {@link ChartRecord} for more details)
  */
 public final class SeriesListRecord extends StandardRecord {
-    public final static short sid = 0x1016;
-    private  short[]    field_1_seriesNumbers;
+    public static final short sid = 0x1016;
+    private short[] field_1_seriesNumbers;
+
+    public SeriesListRecord(SeriesListRecord other) {
+        super(other);
+        field_1_seriesNumbers = (other.field_1_seriesNumbers == null) ? null : 
other.field_1_seriesNumbers.clone();
+    }
 
     public SeriesListRecord(short[] seriesNumbers) {
        field_1_seriesNumbers = (seriesNumbers == null) ? null : 
seriesNumbers.clone();
@@ -44,17 +50,17 @@ public final class SeriesListRecord exte
        short[] ss = new short[nItems];
        for (int i = 0; i < nItems; i++) {
                        ss[i] = in.readShort();
-                       
+
                }
         field_1_seriesNumbers = ss;
     }
 
     public String toString() {
         StringBuilder buffer = new StringBuilder();
-        
+
         buffer.append("[SERIESLIST]\n");
         buffer.append("    .seriesNumbers= ").append(" (").append( 
Arrays.toString(getSeriesNumbers()) ).append(" )");
-        buffer.append("\n"); 
+        buffer.append("\n");
 
         buffer.append("[/SERIESLIST]\n");
         return buffer.toString();
@@ -77,8 +83,17 @@ public final class SeriesListRecord exte
         return sid;
     }
 
-    public Object clone() {
-        return new SeriesListRecord(field_1_seriesNumbers);
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SeriesListRecord clone() {
+        return copy();
+    }
+
+    @Override
+    public SeriesListRecord copy() {
+        return new SeriesListRecord(this);
     }
 
     /**

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java Sun 
Dec 22 21:44:45 2019
@@ -21,46 +21,56 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * The series record describes the overall data for a series.
  */
 public final class SeriesRecord extends StandardRecord {
-    public final static short      sid                             = 0x1003;
-    private  short      field_1_categoryDataType;
-    public final static short       CATEGORY_DATA_TYPE_DATES       = 0;
-    public final static short       CATEGORY_DATA_TYPE_NUMERIC     = 1;
-    public final static short       CATEGORY_DATA_TYPE_SEQUENCE    = 2;
-    public final static short       CATEGORY_DATA_TYPE_TEXT        = 3;
-    private  short      field_2_valuesDataType;
-    public final static short       VALUES_DATA_TYPE_DATES         = 0;
-    public final static short       VALUES_DATA_TYPE_NUMERIC       = 1;
-    public final static short       VALUES_DATA_TYPE_SEQUENCE      = 2;
-    public final static short       VALUES_DATA_TYPE_TEXT          = 3;
-    private  short      field_3_numCategories;
-    private  short      field_4_numValues;
-    private  short      field_5_bubbleSeriesType;
-    public final static short       BUBBLE_SERIES_TYPE_DATES       = 0;
-    public final static short       BUBBLE_SERIES_TYPE_NUMERIC     = 1;
-    public final static short       BUBBLE_SERIES_TYPE_SEQUENCE    = 2;
-    public final static short       BUBBLE_SERIES_TYPE_TEXT        = 3;
-    private  short      field_6_numBubbleValues;
-
-
-    public SeriesRecord()
-    {
-
-    }
-
-    public SeriesRecord(RecordInputStream in)
-    {
-        field_1_categoryDataType       = in.readShort();
-        field_2_valuesDataType         = in.readShort();
-        field_3_numCategories          = in.readShort();
-        field_4_numValues              = in.readShort();
-        field_5_bubbleSeriesType       = in.readShort();
-        field_6_numBubbleValues        = in.readShort();
+    public static final short sid                         = 0x1003;
 
+    public static final short CATEGORY_DATA_TYPE_DATES    = 0;
+    public static final short CATEGORY_DATA_TYPE_NUMERIC  = 1;
+    public static final short CATEGORY_DATA_TYPE_SEQUENCE = 2;
+    public static final short CATEGORY_DATA_TYPE_TEXT     = 3;
+
+    public static final short VALUES_DATA_TYPE_DATES      = 0;
+    public static final short VALUES_DATA_TYPE_NUMERIC    = 1;
+    public static final short VALUES_DATA_TYPE_SEQUENCE   = 2;
+    public static final short VALUES_DATA_TYPE_TEXT       = 3;
+
+    public static final short BUBBLE_SERIES_TYPE_DATES    = 0;
+    public static final short BUBBLE_SERIES_TYPE_NUMERIC  = 1;
+    public static final short BUBBLE_SERIES_TYPE_SEQUENCE = 2;
+    public static final short BUBBLE_SERIES_TYPE_TEXT     = 3;
+
+    private short field_1_categoryDataType;
+    private short field_2_valuesDataType;
+    private short field_3_numCategories;
+    private short field_4_numValues;
+    private short field_5_bubbleSeriesType;
+    private short field_6_numBubbleValues;
+
+
+    public SeriesRecord() {}
+
+    public SeriesRecord(SeriesRecord other) {
+        super(other);
+        field_1_categoryDataType = other.field_1_categoryDataType;
+        field_2_valuesDataType   = other.field_2_valuesDataType;
+        field_3_numCategories    = other.field_3_numCategories;
+        field_4_numValues        = other.field_4_numValues;
+        field_5_bubbleSeriesType = other.field_5_bubbleSeriesType;
+        field_6_numBubbleValues  = other.field_6_numBubbleValues;
+    }
+
+    public SeriesRecord(RecordInputStream in) {
+        field_1_categoryDataType = in.readShort();
+        field_2_valuesDataType   = in.readShort();
+        field_3_numCategories    = in.readShort();
+        field_4_numValues        = in.readShort();
+        field_5_bubbleSeriesType = in.readShort();
+        field_6_numBubbleValues  = in.readShort();
     }
 
     public String toString()
@@ -71,27 +81,27 @@ public final class SeriesRecord extends
         buffer.append("    .categoryDataType     = ")
             .append("0x").append(HexDump.toHex(  getCategoryDataType ()))
             .append(" (").append( getCategoryDataType() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .valuesDataType       = ")
             .append("0x").append(HexDump.toHex(  getValuesDataType ()))
             .append(" (").append( getValuesDataType() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .numCategories        = ")
             .append("0x").append(HexDump.toHex(  getNumCategories ()))
             .append(" (").append( getNumCategories() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .numValues            = ")
             .append("0x").append(HexDump.toHex(  getNumValues ()))
             .append(" (").append( getNumValues() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .bubbleSeriesType     = ")
             .append("0x").append(HexDump.toHex(  getBubbleSeriesType ()))
             .append(" (").append( getBubbleSeriesType() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
         buffer.append("    .numBubbleValues      = ")
             .append("0x").append(HexDump.toHex(  getNumBubbleValues ()))
             .append(" (").append( getNumBubbleValues() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/SERIES]\n");
         return buffer.toString();
@@ -115,25 +125,23 @@ public final class SeriesRecord extends
         return sid;
     }
 
-    public Object clone() {
-        SeriesRecord rec = new SeriesRecord();
-    
-        rec.field_1_categoryDataType = field_1_categoryDataType;
-        rec.field_2_valuesDataType = field_2_valuesDataType;
-        rec.field_3_numCategories = field_3_numCategories;
-        rec.field_4_numValues = field_4_numValues;
-        rec.field_5_bubbleSeriesType = field_5_bubbleSeriesType;
-        rec.field_6_numBubbleValues = field_6_numBubbleValues;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SeriesRecord clone() {
+        return copy();
     }
 
-
-
+    @Override
+    public SeriesRecord copy() {
+        return new SeriesRecord(this);
+    }
 
     /**
      * Get the category data type field for the Series record.
      *
-     * @return  One of 
+     * @return  One of
      *        CATEGORY_DATA_TYPE_DATES
      *        CATEGORY_DATA_TYPE_NUMERIC
      *        CATEGORY_DATA_TYPE_SEQUENCE
@@ -148,7 +156,7 @@ public final class SeriesRecord extends
      * Set the category data type field for the Series record.
      *
      * @param field_1_categoryDataType
-     *        One of 
+     *        One of
      *        CATEGORY_DATA_TYPE_DATES
      *        CATEGORY_DATA_TYPE_NUMERIC
      *        CATEGORY_DATA_TYPE_SEQUENCE
@@ -162,7 +170,7 @@ public final class SeriesRecord extends
     /**
      * Get the values data type field for the Series record.
      *
-     * @return  One of 
+     * @return  One of
      *        VALUES_DATA_TYPE_DATES
      *        VALUES_DATA_TYPE_NUMERIC
      *        VALUES_DATA_TYPE_SEQUENCE
@@ -177,7 +185,7 @@ public final class SeriesRecord extends
      * Set the values data type field for the Series record.
      *
      * @param field_2_valuesDataType
-     *        One of 
+     *        One of
      *        VALUES_DATA_TYPE_DATES
      *        VALUES_DATA_TYPE_NUMERIC
      *        VALUES_DATA_TYPE_SEQUENCE
@@ -223,7 +231,7 @@ public final class SeriesRecord extends
     /**
      * Get the bubble series type field for the Series record.
      *
-     * @return  One of 
+     * @return  One of
      *        BUBBLE_SERIES_TYPE_DATES
      *        BUBBLE_SERIES_TYPE_NUMERIC
      *        BUBBLE_SERIES_TYPE_SEQUENCE
@@ -238,7 +246,7 @@ public final class SeriesRecord extends
      * Set the bubble series type field for the Series record.
      *
      * @param field_5_bubbleSeriesType
-     *        One of 
+     *        One of
      *        BUBBLE_SERIES_TYPE_DATES
      *        BUBBLE_SERIES_TYPE_NUMERIC
      *        BUBBLE_SERIES_TYPE_SEQUENCE

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java 
Sun Dec 22 21:44:45 2019
@@ -21,17 +21,21 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 import org.apache.poi.util.StringUtil;
 
 /**
- * SERIESTEXT (0x100D)<p> 
+ * SERIESTEXT (0x100D)<p>
  * Defines a series name
  */
 public final class SeriesTextRecord extends StandardRecord {
-       public final static short sid = 0x100D;
+       public static final short sid = 0x100D;
 
-       /** the actual text cannot be longer than 255 characters */
+       /**
+        * the actual text cannot be longer than 255 characters
+        */
        private static final int MAX_LEN = 0xFF;
+
        private int field_1_id;
        private boolean is16bit;
        private String field_4_text;
@@ -41,6 +45,13 @@ public final class SeriesTextRecord exte
                is16bit = false;
        }
 
+       public SeriesTextRecord(SeriesTextRecord other) {
+               super(other);
+               field_1_id = other.field_1_id;
+               is16bit = other.is16bit;
+               field_4_text = other.field_4_text;
+       }
+
        public SeriesTextRecord(RecordInputStream in) {
                field_1_id = in.readUShort();
                int field_2_textLength = in.readUByte();
@@ -87,13 +98,17 @@ public final class SeriesTextRecord exte
                return sid;
        }
 
-       public Object clone() {
-               SeriesTextRecord rec = new SeriesTextRecord();
+       @Override
+       @SuppressWarnings("squid:S2975")
+       @Deprecated
+       @Removal(version = "5.0.0")
+       public SeriesTextRecord clone() {
+               return copy();
+       }
 
-               rec.field_1_id = field_1_id;
-               rec.is16bit = is16bit;
-               rec.field_4_text = field_4_text;
-               return rec;
+       @Override
+       public SeriesTextRecord copy() {
+               return new SeriesTextRecord(this);
        }
 
        /**

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java
 Sun Dec 22 21:44:45 2019
@@ -21,25 +21,26 @@ import org.apache.poi.hssf.record.Record
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
- * Indicates the chart-group index for a series. The order probably defines 
the mapping.  
- * So the 0th record probably means the 0th series. The only field in this of 
course defines which chart 
+ * Indicates the chart-group index for a series. The order probably defines 
the mapping.
+ * So the 0th record probably means the 0th series. The only field in this of 
course defines which chart
  * group the 0th series (for instance) would map to. Confusing?  Well thats 
because it is.  (p 522 BCG)
  */
 public final class SeriesToChartGroupRecord extends StandardRecord {
-    public final static short      sid                             = 0x1045;
-    private  short      field_1_chartGroupIndex;
+    public static final short sid = 0x1045;
+    private short field_1_chartGroupIndex;
 
+    public SeriesToChartGroupRecord() {}
 
-    public SeriesToChartGroupRecord()
-    {
-
+    public SeriesToChartGroupRecord(SeriesToChartGroupRecord other) {
+        super(other);
+        field_1_chartGroupIndex = other.field_1_chartGroupIndex;
     }
 
-    public SeriesToChartGroupRecord(RecordInputStream in)
-    {
-        field_1_chartGroupIndex        = in.readShort();
+    public SeriesToChartGroupRecord(RecordInputStream in) {
+        field_1_chartGroupIndex = in.readShort();
     }
 
     public String toString()
@@ -50,7 +51,7 @@ public final class SeriesToChartGroupRec
         buffer.append("    .chartGroupIndex      = ")
             .append("0x").append(HexDump.toHex(  getChartGroupIndex ()))
             .append(" (").append( getChartGroupIndex() ).append(" )");
-        buffer.append(System.getProperty("line.separator")); 
+        buffer.append(System.getProperty("line.separator"));
 
         buffer.append("[/SeriesToChartGroup]\n");
         return buffer.toString();
@@ -69,15 +70,18 @@ public final class SeriesToChartGroupRec
         return sid;
     }
 
-    public Object clone() {
-        SeriesToChartGroupRecord rec = new SeriesToChartGroupRecord();
-    
-        rec.field_1_chartGroupIndex = field_1_chartGroupIndex;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SeriesToChartGroupRecord clone() {
+        return copy();
     }
 
-
-
+    @Override
+    public SeriesToChartGroupRecord copy() {
+        return new SeriesToChartGroupRecord(this);
+    }
 
     /**
      * Get the chart group index field for the SeriesToChartGroup record.

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java?rev=1871911&r1=1871910&r2=1871911&view=diff
==============================================================================
--- 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java 
(original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java 
Sun Dec 22 21:44:45 2019
@@ -23,31 +23,36 @@ import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.Removal;
 
 /**
  * Describes a chart sheet properties record. SHTPROPS (0x1044)<p>
- * 
+ *
  * (As with all chart related records, documentation is lacking.
  * See {@link ChartRecord} for more details)
  */
 public final class SheetPropertiesRecord extends StandardRecord {
-    public final static short sid = 0x1044;
-    
+    public static final short sid = 0x1044;
+
+    public static final byte EMPTY_NOT_PLOTTED  = 0;
+    public static final byte EMPTY_ZERO         = 1;
+    public static final byte EMPTY_INTERPOLATED = 2;
+
     private static final BitField chartTypeManuallyFormatted = 
BitFieldFactory.getInstance(0x01);
     private static final BitField plotVisibleOnly            = 
BitFieldFactory.getInstance(0x02);
     private static final BitField doNotSizeWithWindow        = 
BitFieldFactory.getInstance(0x04);
     private static final BitField defaultPlotDimensions      = 
BitFieldFactory.getInstance(0x08);
     private static final BitField autoPlotArea               = 
BitFieldFactory.getInstance(0x10);
-    
+
     private int field_1_flags;
     private int field_2_empty;
-    public final static byte        EMPTY_NOT_PLOTTED              = 0;
-    public final static byte        EMPTY_ZERO                     = 1;
-    public final static byte        EMPTY_INTERPOLATED             = 2;
 
+    public SheetPropertiesRecord() {}
 
-    public SheetPropertiesRecord() {
-        // fields uninitialised
+    public SheetPropertiesRecord(SheetPropertiesRecord other) {
+        super(other);
+        field_1_flags = other.field_1_flags;
+        field_2_empty = other.field_2_empty;
     }
 
     public SheetPropertiesRecord(RecordInputStream in) {
@@ -60,12 +65,12 @@ public final class SheetPropertiesRecord
 
         buffer.append("[SHTPROPS]\n");
         buffer.append("    .flags                = 
").append(HexDump.shortToHex(field_1_flags)).append('\n');
-        buffer.append("         .chartTypeManuallyFormatted= 
").append(isChartTypeManuallyFormatted()).append('\n'); 
-        buffer.append("         .plotVisibleOnly           = 
").append(isPlotVisibleOnly()).append('\n'); 
-        buffer.append("         .doNotSizeWithWindow       = 
").append(isDoNotSizeWithWindow()).append('\n'); 
-        buffer.append("         .defaultPlotDimensions     = 
").append(isDefaultPlotDimensions()).append('\n'); 
-        buffer.append("         .autoPlotArea              = 
").append(isAutoPlotArea()).append('\n'); 
-        buffer.append("    .empty                = 
").append(HexDump.shortToHex(field_2_empty)).append('\n'); 
+        buffer.append("         .chartTypeManuallyFormatted= 
").append(isChartTypeManuallyFormatted()).append('\n');
+        buffer.append("         .plotVisibleOnly           = 
").append(isPlotVisibleOnly()).append('\n');
+        buffer.append("         .doNotSizeWithWindow       = 
").append(isDoNotSizeWithWindow()).append('\n');
+        buffer.append("         .defaultPlotDimensions     = 
").append(isDefaultPlotDimensions()).append('\n');
+        buffer.append("         .autoPlotArea              = 
").append(isAutoPlotArea()).append('\n');
+        buffer.append("    .empty                = 
").append(HexDump.shortToHex(field_2_empty)).append('\n');
 
         buffer.append("[/SHTPROPS]\n");
         return buffer.toString();
@@ -84,12 +89,17 @@ public final class SheetPropertiesRecord
         return sid;
     }
 
-    public Object clone() {
-        SheetPropertiesRecord rec = new SheetPropertiesRecord();
-    
-        rec.field_1_flags = field_1_flags;
-        rec.field_2_empty = field_2_empty;
-        return rec;
+    @Override
+    @SuppressWarnings("squid:S2975")
+    @Deprecated
+    @Removal(version = "5.0.0")
+    public SheetPropertiesRecord clone() {
+        return copy();
+    }
+
+    @Override
+    public SheetPropertiesRecord copy() {
+        return new SheetPropertiesRecord(this);
     }
 
     /**
@@ -102,7 +112,7 @@ public final class SheetPropertiesRecord
     /**
      * Get the empty field for the SheetProperties record.
      *
-     * @return  One of 
+     * @return  One of
      *        EMPTY_NOT_PLOTTED
      *        EMPTY_ZERO
      *        EMPTY_INTERPOLATED
@@ -115,7 +125,7 @@ public final class SheetPropertiesRecord
      * Set the empty field for the SheetProperties record.
      *
      * @param empty
-     *        One of 
+     *        One of
      *        EMPTY_NOT_PLOTTED
      *        EMPTY_ZERO
      *        EMPTY_INTERPOLATED



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

Reply via email to