private HSSFFontFormatting GetFontFormatting(bool Create) { FontFormatting fontFormatting = cfRuleRecord.FontFormatting; if (fontFormatting != null) { cfRuleRecord.FontFormatting=(fontFormatting); return new HSSFFontFormatting(cfRuleRecord); } else if (Create) { fontFormatting = new FontFormatting(); cfRuleRecord.FontFormatting=(fontFormatting); return new HSSFFontFormatting(cfRuleRecord); } else { return null; } }
public CFRuleRecord(RecordInputStream in1) { field_1_condition_type = (byte)in1.ReadByte(); field_2_comparison_operator = (byte)in1.ReadByte(); int field_3_formula1_len = in1.ReadUShort(); int field_4_formula2_len = in1.ReadUShort(); field_5_options = in1.ReadInt(); field_6_not_used = in1.ReadShort(); if (ContainsFontFormattingBlock) { fontFormatting = new FontFormatting(in1); } if (ContainsBorderFormattingBlock) { borderFormatting = new BorderFormatting(in1); } if (ContainsPatternFormattingBlock) { patternFormatting = new PatternFormatting(in1); } field_17_formula1 = FR.Formula.Read(field_3_formula1_len, in1); field_18_formula2 = FR.Formula.Read(field_4_formula2_len, in1); }
public HSSFFontFormatting(CFRuleRecord cfRuleRecord) { this.fontFormatting = cfRuleRecord.FontFormatting; }
/** Creates new CFRuleRecord */ private CFRuleRecord(byte conditionType, ComparisonOperator comparisonOperation) { field_1_condition_type = conditionType; field_2_comparison_operator =(byte) comparisonOperation; // Set modification flags to 1: by default options are not modified field_5_options = modificationBits.SetValue(field_5_options, -1); // Set formatting block flags to 0 (no formatting blocks) field_5_options = fmtBlockBits.SetValue(field_5_options, 0); field_5_options = Undocumented.Clear(field_5_options); //TODO:: check what's this field used for field_6_not_used = unchecked((short)0x8002); // Excel seems to Write this value, but it doesn't seem to care what it Reads fontFormatting = null; //field_8_align_text_break = 0; //field_9_align_text_rotation_angle = 0; //field_10_align_indentation = 0; //field_11_relative_indentation = 0; //field_12_not_used = 0; borderFormatting = null; patternFormatting = null; field_17_formula1 = FR.Formula.Create(Ptg.EMPTY_PTG_ARRAY); field_18_formula2 = FR.Formula.Create(Ptg.EMPTY_PTG_ARRAY); }