/// <summary> /// Override method to calculate the hash of this component /// </summary> /// <returns>Calculated hash as string</returns> public sealed override string CalculateHash() { StringBuilder sb = new StringBuilder(); if (CurrentBorder == null || CurrentCellXf == null || CurrentFill == null || CurrentFont == null || CurrentNumberFormat == null) { throw new StyleException("MissingReferenceException", "The hash of the style could not be created because one or more components are missing as references"); } sb.Append(StyleManager.STYLEPREFIX); if (InternalID.HasValue == true) { sb.Append(InternalID.Value); sb.Append(':'); } sb.Append(CurrentBorder.CalculateHash()); sb.Append(CurrentCellXf.CalculateHash()); sb.Append(CurrentFill.CalculateHash()); sb.Append(CurrentFont.CalculateHash()); sb.Append(CurrentNumberFormat.CalculateHash()); return(sb.ToString()); }