/// <summary> /// Form a DocumentFormat.OpenXml.Spreadsheet.InlineString class from this SLRstType class. /// </summary> /// <returns>A DocumentFormat.OpenXml.Spreadsheet.InlineString class.</returns> public InlineString ToInlineString() { InlineString istr = new InlineString(); istr.InnerXml = SLTool.RemoveNamespaceDeclaration(this.istrReal.InnerXml); return(istr); }
/// <summary> /// Form a DocumentFormat.OpenXml.Spreadsheet.SharedStringItem class from this SLRstType class. /// </summary> /// <returns>A DocumentFormat.OpenXml.Spreadsheet.SharedStringItem class.</returns> public SharedStringItem ToSharedStringItem() { SharedStringItem ssi = new SharedStringItem(); ssi.InnerXml = SLTool.RemoveNamespaceDeclaration(this.istrReal.InnerXml); return(ssi); }
/// <summary> /// Form a DocumentFormat.OpenXml.Spreadsheet.CommentText class from this SLRstType class. /// </summary> /// <returns>A DocumentFormat.OpenXml.Spreadsheet.CommentText class.</returns> public CommentText ToCommentText() { CommentText ct = new CommentText(); ct.InnerXml = SLTool.RemoveNamespaceDeclaration(this.istrReal.InnerXml); return(ct); }
internal void ForceSaveToSharedStringTable(SharedStringItem ssi) { int index = listSharedString.Count; string sHash = SLTool.RemoveNamespaceDeclaration(ssi.InnerXml); listSharedString.Add(sHash); dictSharedStringHash[sHash] = index; }
internal int DirectSaveToSharedStringTable(InlineString Data) { int index = 0; string sHash = SLTool.RemoveNamespaceDeclaration(Data.InnerXml); if (dictSharedStringHash.ContainsKey(sHash)) { index = dictSharedStringHash[sHash]; } else { index = listSharedString.Count; listSharedString.Add(sHash); dictSharedStringHash[sHash] = index; } return(index); }
internal string ToHash() { // Just use the left border. Make sure it's consistent with the FromHash() function. LeftBorder lb = this.ToLeftBorder(); string sXml = SLTool.RemoveNamespaceDeclaration(lb.InnerXml); StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}", sXml, SLConstants.XmlBorderPropertiesElementAttributeSeparator); if (lb.Style != null) { sb.AppendFormat("{0}{1}", lb.Style.Value, SLConstants.XmlBorderPropertiesAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlBorderPropertiesAttributeSeparator); } return(sb.ToString()); }
internal string ToHash() { TableStyle ts = this.ToTableStyle(); string sXml = SLTool.RemoveNamespaceDeclaration(ts.InnerXml); StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}", sXml, SLConstants.XmlTableStyleElementAttributeSeparator); sb.AppendFormat("{0}{1}", ts.Name.Value, SLConstants.XmlTableStyleAttributeSeparator); if (ts.Pivot != null) { sb.AppendFormat("{0}{1}", ts.Pivot.Value, SLConstants.XmlTableStyleAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlTableStyleAttributeSeparator); } if (ts.Table != null) { sb.AppendFormat("{0}{1}", ts.Table.Value, SLConstants.XmlTableStyleAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlTableStyleAttributeSeparator); } if (ts.Count != null) { sb.AppendFormat("{0}{1}", ts.Count.Value, SLConstants.XmlTableStyleAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlTableStyleAttributeSeparator); } return(sb.ToString()); }
internal TableStyle ToTableStyle() { TableStyle ts = new TableStyle(); ts.InnerXml = SLTool.RemoveNamespaceDeclaration(this.TableStyleInnerXml); ts.Name = this.Name; if (this.Pivot != null) { ts.Pivot = this.Pivot.Value; } if (this.Table != null) { ts.Table = this.Table.Value; } if (this.Count != null) { ts.Count = this.Count.Value; } return(ts); }
internal string ToHash() { Border b = this.ToBorder(); string sXml = SLTool.RemoveNamespaceDeclaration(b.InnerXml); StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}", sXml, SLConstants.XmlBorderElementAttributeSeparator); if (b.DiagonalUp != null) { sb.AppendFormat("{0}{1}", b.DiagonalUp.Value, SLConstants.XmlBorderAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlBorderAttributeSeparator); } if (b.DiagonalDown != null) { sb.AppendFormat("{0}{1}", b.DiagonalDown.Value, SLConstants.XmlBorderAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlBorderAttributeSeparator); } if (b.Outline != null) { sb.AppendFormat("{0}{1}", b.Outline.Value, SLConstants.XmlBorderAttributeSeparator); } else { sb.AppendFormat("null{0}", SLConstants.XmlBorderAttributeSeparator); } return(sb.ToString()); }
internal string ToHash() { InlineString istr = this.ToInlineString(); return(SLTool.RemoveNamespaceDeclaration(istr.InnerXml)); }
internal string ToHash() { DifferentialFormat df = this.ToDifferentialFormat(); return(SLTool.RemoveNamespaceDeclaration(df.InnerXml)); }
internal string ToHash() { Font font = this.ToFont(); return(SLTool.RemoveNamespaceDeclaration(font.InnerXml)); }