diff options
author | Nick Burch <nick@apache.org> | 2008-07-12 17:21:54 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2008-07-12 17:21:54 +0000 |
commit | 69d508e3e2e5e879188399f859638d77bf159c0d (patch) | |
tree | c3b35132d5018df9353927885c41d62180818c7d /src/java | |
parent | 0027e4bb0f6e3f3d9255c8e398c876020ce95c60 (diff) | |
download | poi-69d508e3e2e5e879188399f859638d77bf159c0d.tar.gz poi-69d508e3e2e5e879188399f859638d77bf159c0d.zip |
Support for cloning one extended format record onto another, plus tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@676203 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java b/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java index c668d5f876..ae98387671 100644 --- a/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java @@ -1814,6 +1814,27 @@ public class ExtendedFormatRecord { return sid; } + + /** + * Clones all the style information from another + * ExtendedFormatRecord, onto this one. This + * will then hold all the same style options. + * + * If The source ExtendedFormatRecord comes from + * a different Workbook, you will need to sort + * out the font and format indicies yourself! + */ + public void cloneStyleFrom(ExtendedFormatRecord source) { + field_1_font_index = source.field_1_font_index; + field_2_format_index = source.field_2_format_index; + field_3_cell_options = source.field_3_cell_options; + field_4_alignment_options = source.field_4_alignment_options; + field_5_indention_options = source.field_5_indention_options; + field_6_border_options = source.field_6_border_options; + field_7_palette_options = source.field_7_palette_options; + field_8_adtl_palette_options = source.field_8_adtl_palette_options; + field_9_fill_palette_options = source.field_9_fill_palette_options; + } public int hashCode() { final int prime = 31; |