private IStyle ReadStyle(IRepositoryReader reader) { IStyle result; MappedStyleType mappedStyleType = (MappedStyleType)reader.ReadInt32(); switch (mappedStyleType) { case MappedStyleType.CapStyle: result = reader.ReadCapStyle(); break; case MappedStyleType.CharacterStyle: result = reader.ReadCharacterStyle(); break; case MappedStyleType.ColorStyle: result = reader.ReadColorStyle(); break; case MappedStyleType.FillStyle: result = reader.ReadFillStyle(); break; case MappedStyleType.LineStyle: result = reader.ReadLineStyle(); break; case MappedStyleType.ParagraphStyle: result = reader.ReadParagraphStyle(); break; case MappedStyleType.Unassigned: // Skip value - it does not matter what we read here reader.ReadColorStyle(); // ToDo: Find a better solution for skipping an object id result = null; break; default: throw new NShapeUnsupportedValueException(mappedStyleType); } return(result); }
private IStyle ReadStyle(IRepositoryReader reader) { IStyle result; MappedStyleType mappedStyleType = (MappedStyleType)reader.ReadInt32(); switch (mappedStyleType) { case MappedStyleType.CapStyle: result = reader.ReadCapStyle(); break; case MappedStyleType.CharacterStyle: result = reader.ReadCharacterStyle(); break; case MappedStyleType.ColorStyle: result = reader.ReadColorStyle(); break; case MappedStyleType.FillStyle: result = reader.ReadFillStyle(); break; case MappedStyleType.LineStyle: result = reader.ReadLineStyle(); break; case MappedStyleType.ParagraphStyle: result = reader.ReadParagraphStyle(); break; case MappedStyleType.Unassigned: // Skip value - it does not matter what we read here reader.ReadColorStyle(); // ToDo: Find a better solution for skipping an object id result = null; break; default: throw new NShapeUnsupportedValueException(mappedStyleType); } return result; }
/// <override></override> protected override void LoadFieldsCore(IRepositoryReader reader, int version) { base.LoadFieldsCore(reader, version); ColumnBackgroundColorStyle = reader.ReadColorStyle(); ColumnCharacterStyle = reader.ReadCharacterStyle(); ColumnParagraphStyle = reader.ReadParagraphStyle(); int colCnt = reader.ReadInt32(); if (columnNames == null) columnNames = new string[colCnt]; else Array.Resize(ref columnNames, colCnt); }