]> source.dussan.org Git - poi.git/commitdiff
More clone support
authorNick Burch <nick@apache.org>
Mon, 13 Jul 2015 18:34:50 +0000 (18:34 +0000)
committerNick Burch <nick@apache.org>
Mon, 13 Jul 2015 18:34:50 +0000 (18:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690791 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/CFRule12Record.java

index 6ab5eb5324bfb43dd46b857914efccd9a1bcb8dc..c99d12587311bb98ead90229ecaa156733404430 100644 (file)
@@ -293,12 +293,25 @@ public final class CFRule12Record extends CFRuleBase implements FutureRecord {
 
     public Object clone() {
         CFRule12Record rec = new CFRule12Record(getConditionType(), getComparisonOperation());
+        rec.futureHeader.setAssociatedRange(futureHeader.getAssociatedRange().copy());
+        
         super.copyTo(rec);
         
-        // TODO The other fields
+        rec.ext_formatting_length = ext_formatting_length;
+        rec.ext_formatting_data = new byte[ext_formatting_length];
+        System.arraycopy(ext_formatting_data, 0, rec.ext_formatting_data, 0, ext_formatting_length);
         
         rec.formula_scale = formula_scale.copy();
+        
+        rec.ext_opts = ext_opts;
+        rec.priority = priority;
+        rec.template_type = template_type;
+        rec.template_param_length = template_param_length;
+        rec.template_params = new byte[template_param_length];
+        System.arraycopy(template_params, 0, rec.template_params, 0, template_param_length);
 
+        // TODO Clone the rgbCT data like Gradients, Databars etc
+        
         return rec;
     }