public TextMasterStyle9Atom(BinaryReader _reader, uint size, uint typeCode, uint version, uint instance) : base(_reader, size, typeCode, version, instance) { uint level = this.Reader.ReadUInt16(); for (int i = 0; i < level; i++) { ParagraphMask pmask = (ParagraphMask)Reader.ReadUInt32(); ParagraphRun9 pr = new ParagraphRun9(); pr.mask = pmask; if ((pmask & ParagraphMask.BulletBlip) != 0) { int bulletblipref = Reader.ReadInt16(); pr.bulletblipref = bulletblipref; } if ((pmask & ParagraphMask.BulletHasScheme) != 0) { pr.fBulletHasAutoNumber = Reader.ReadInt16(); } if ((pmask & ParagraphMask.BulletScheme) != 0) { pr.bulletAutoNumberScheme = Reader.ReadUInt16(); pr.startAt = Reader.ReadInt16(); //start value } this.pruns.Add(pr); CharacterMask cmask = (CharacterMask)Reader.ReadUInt32(); if ((cmask & CharacterMask.pp11ext) != 0) { byte[] rest = Reader.ReadBytes(4); } } }
public CharacterRun(BinaryReader reader) { try { this.Mask = (CharacterMask)reader.ReadUInt32(); if (this.StyleFlagsFieldPresent) { this.Style = (StyleMask)reader.ReadUInt16(); } if (this.TypefacePresent) { this.TypefaceIdx = reader.ReadUInt16(); } if (this.FEOldTypefacePresent) { this.FEOldTypefaceIdx = reader.ReadUInt16(); } if (this.ANSITypefacePresent) { this.ANSITypefaceIdx = reader.ReadUInt16(); } if (this.SymbolTypefacePresent) { this.SymbolTypefaceIdx = reader.ReadUInt16(); } if (this.SizePresent) { this.Size = reader.ReadUInt16(); } if (this.ColorPresent) { this.Color = new GrColorAtom(reader); } if (this.PositionPresent) { this.Position = reader.ReadUInt16(); } } catch (EndOfStreamException e) { string s = e.ToString(); //ignore } }
public CharacterRun(BinaryReader reader) { this.Length = reader.ReadUInt32(); this.Mask = (CharacterMask)reader.ReadUInt32(); if (this.StyleFlagsFieldPresent) { this.Style = (StyleMask)reader.ReadUInt16(); } if (this.TypefacePresent) { this.TypefaceIdx = reader.ReadUInt16(); } if (this.FEOldTypefacePresent) { this.FEOldTypefaceIdx = reader.ReadUInt16(); } if (this.ANSITypefacePresent) { this.ANSITypefaceIdx = reader.ReadUInt16(); } if (this.SymbolTypefacePresent) { this.SymbolTypefaceIdx = reader.ReadUInt16(); } if (this.SizePresent) { this.Size = reader.ReadUInt16(); } if (this.PositionPresent) { this.Position = reader.ReadUInt16(); } if (this.ColorPresent) { this.Color = new GrColorAtom(reader); } }
public StyleTextProp9Atom(BinaryReader _reader, uint size, uint typeCode, uint version, uint instance) : base(_reader, size, typeCode, version, instance) { while (Reader.BaseStream.Position < Reader.BaseStream.Length) { try { ParagraphRun9 pr = new ParagraphRun9(); ParagraphMask pmask = (ParagraphMask)Reader.ReadUInt32(); pr.mask = pmask; if ((pmask & ParagraphMask.BulletBlip) != 0) { int bulletblipref = Reader.ReadInt16(); pr.bulletblipref = bulletblipref; } if ((pmask & ParagraphMask.BulletHasScheme) != 0) { pr.fBulletHasAutoNumber = Reader.ReadInt16(); } if ((pmask & ParagraphMask.BulletScheme) != 0) { pr.bulletAutoNumberScheme = Reader.ReadInt16(); pr.startAt = Reader.ReadInt16(); //start value } P9Runs.Add(pr); CharacterMask cmask = (CharacterMask)Reader.ReadUInt32(); if ((cmask & CharacterMask.pp11ext) != 0) { byte[] rest = Reader.ReadBytes(4); } si = new TextSIException(Reader); } catch (Exception) { //ignore } } }