From 94f52e3edb0d92fa1861c63112eb22d595486c61 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Mon, 13 Jul 2015 18:34:50 +0000 Subject: [PATCH] More clone support git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690791 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/record/CFRule12Record.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/hssf/record/CFRule12Record.java b/src/java/org/apache/poi/hssf/record/CFRule12Record.java index 6ab5eb5324..c99d125873 100644 --- a/src/java/org/apache/poi/hssf/record/CFRule12Record.java +++ b/src/java/org/apache/poi/hssf/record/CFRule12Record.java @@ -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; }