// Token: 0x06001993 RID: 6547 RVA: 0x000CA044 File Offset: 0x000C8244 private void ProcessText(RtfToken token) { if (this.state.Skip) { return; } RtfDestination destination = this.state.Destination; if (destination != RtfDestination.RTF) { if (destination != RtfDestination.HtmlTagIndex) { this.firstKeyword = false; return; } } else if (this.ignoreRtf) { return; } token.StripZeroBytes = true; int num = token.Text.Read(this.parseBuffer, this.parseEnd, this.parseBuffer.Length - this.parseEnd - 1); this.parseEnd += num; this.parseBuffer[this.parseEnd] = '\0'; if (this.parseEnd == this.parseBuffer.Length - 1) { this.incompleteToken = token; return; } this.incompleteToken = null; }
private void WriteToken(RtfToken token) { foreach (RtfRun rtfRun in token.Runs) { this.output.WriteBinary(rtfRun.Buffer, rtfRun.Offset, rtfRun.Length); } }
private void ProcessBinary(RtfToken token) { if (this.state.Level >= 0) { this.WriteToken(token); } }
// Token: 0x0600176C RID: 5996 RVA: 0x000B6828 File Offset: 0x000B4A28 private void ProcessText(RtfToken token) { if (this.skipLevel != 0 && this.level >= this.skipLevel) { return; } this.firstKeyword = false; if (this.level < this.invisibleLevel) { token.Text.WriteTo(this.output); } }
internal TextEnumerator(RtfToken token) { this.token = token; }
internal TextReader(RtfToken token) { this.token = token; }
internal KeywordEnumerator(RtfToken token) { this.token = token; }
internal RunEnumerator(RtfToken token) { this.token = token; }
// Token: 0x0600176B RID: 5995 RVA: 0x000B6664 File Offset: 0x000B4864 private void ProcessKeywords(RtfToken token) { if (this.skipLevel != 0 && this.level >= this.skipLevel) { return; } foreach (RtfKeyword rtfKeyword in token.Keywords) { if (this.firstKeyword) { if (rtfKeyword.Id == 1) { this.ignorableDestination = true; continue; } this.firstKeyword = false; short id = rtfKeyword.Id; if (id <= 201) { if (id <= 24) { if (id != 8 && id != 15 && id != 24) { goto IL_118; } } else if (id != 50 && id != 175 && id != 201) { goto IL_118; } } else if (id <= 252) { if (id != 210 && id != 246 && id != 252) { goto IL_118; } } else { switch (id) { case 255: case 257: break; case 256: goto IL_118; default: if (id != 268) { switch (id) { case 315: case 316: case 319: break; case 317: case 318: goto IL_118; default: goto IL_118; } } break; } } this.skipLevel = this.level; break; IL_118: if (this.ignorableDestination) { this.skipLevel = this.level; break; } } short id2 = rtfKeyword.Id; if (id2 <= 68) { if (id2 == 40 || id2 == 48 || id2 == 68) { this.output.Write("\r\n"); } } else if (id2 != 119 && id2 != 126) { if (id2 == 136) { this.invisibleLevel = ((rtfKeyword.Value != 0) ? this.level : int.MaxValue); } } else { this.output.Write("\t"); } } }
private void ProcessText(RtfToken token) { if (this.state.Level >= 0) { if (this.state.Destination == RtfDestination.RTF && this.state.SkipLevel == 0) { bool flag = true; foreach (RtfRun rtfRun in token.Runs) { if (rtfRun.Kind != RtfRunKind.Ignore) { flag = false; break; } } token.Runs.Rewind(); if (!flag) { if (this.injection != null && this.injection.HaveHead && !this.injection.HeadDone) { this.output.WriteControlText("\r\n", false); this.output.RtfLineLength = 0; this.injection.InjectRtf(true, false); } this.lineLength++; this.lineBreaks = 0; } } if (this.firstKeyword && this.state.SkipLevel == 0) { this.output.WriteControlText("{", false); this.firstKeyword = false; } this.WriteToken(token); token.Runs.Rewind(); switch (this.state.Destination) { case RtfDestination.FontTable: case RtfDestination.RealFontName: case RtfDestination.AltFontName: break; case RtfDestination.ColorTable: this.scratch.Reset(); while (this.scratch.AppendRtfTokenText(token, 256)) { for (int i = 0; i < this.scratch.Length; i++) { if (this.scratch[i] == ';') { this.colorsCount++; this.color = 0; } } this.scratch.Reset(); } break; default: return; } } }
private void ProcessKeywords(RtfToken token) { if (this.state.Level >= 0) { foreach (RtfKeyword kw in token.Keywords) { if (this.state.SkipLevel != 0) { this.WriteKeyword(kw); } else { if (this.firstKeyword) { this.firstKeyword = false; if (kw.Id == 1) { this.state.SkipGroup(); } else { short id = kw.Id; if (id <= 241) { if (id <= 175) { if (id != 15 && id != 24) { if (id != 175) { goto IL_25B; } if (this.state.Destination == RtfDestination.RTF) { this.state.FontIndex = -1; this.state.Destination = RtfDestination.FontTable; goto IL_2B4; } goto IL_2B4; } } else if (id <= 210) { if (id != 201) { if (id != 210) { goto IL_25B; } if (this.state.Destination == RtfDestination.FontTable && this.state.FontIndex >= 0) { this.state.Destination = RtfDestination.RealFontName; goto IL_2B4; } goto IL_2B4; } } else if (id != 230 && id != 241) { goto IL_25B; } } else if (id <= 258) { if (id != 246) { switch (id) { case 252: if (this.state.Destination == RtfDestination.RTF) { this.state.Destination = RtfDestination.ColorTable; goto IL_2B4; } goto IL_2B4; case 253: break; default: if (id != 258) { goto IL_25B; } break; } } } else if (id <= 273) { switch (id) { case 267: this.output.WriteControlText("{", false); this.WriteKeyword(kw); continue; case 268: if (this.state.Destination == RtfDestination.FontTable && this.state.FontIndex >= 0) { this.state.Destination = RtfDestination.AltFontName; goto IL_2B4; } goto IL_2B4; default: if (id != 273) { goto IL_25B; } break; } } else if (id != 277) { switch (id) { case 315: case 316: break; default: goto IL_25B; } } this.state.SkipGroup(); goto IL_2B4; IL_25B: if (this.state.Destination == RtfDestination.RTF && this.injection != null && this.injection.HaveHead && !this.injection.HeadDone) { this.output.WriteControlText("\r\n", false); this.output.RtfLineLength = 0; this.injection.InjectRtf(true, false); } } IL_2B4: this.output.WriteControlText("{", false); } short id2 = kw.Id; if (id2 <= 148) { if (id2 <= 76) { if (id2 != 48 && id2 != 68) { if (id2 == 76) { goto IL_584; } } else { if (this.state.Destination == RtfDestination.RTF) { this.lineLength = 0; this.lineBreaks++; goto IL_51D; } goto IL_51D; } } else if (id2 <= 116) { if (id2 == 88) { goto IL_480; } switch (id2) { case 109: case 112: case 115: case 116: goto IL_584; case 113: if (this.state.Destination == RtfDestination.FontTable || this.state.Destination == RtfDestination.AltFontName || this.state.Destination == RtfDestination.RealFontName) { if (this.state.FontIndex >= 0) { this.state.FontIndex = -1; } short num = this.parser.FontIndex((short)kw.Value); if (num >= 0) { this.state.FontIndex = num; if (this.parser.FontHandle(num) > this.maxFontHandle) { this.maxFontHandle = this.parser.FontHandle(num); } } } break; } } else { if (id2 == 126) { goto IL_51D; } if (id2 == 148) { goto IL_480; } } } else if (id2 <= 206) { if (id2 <= 184) { if (id2 == 170) { goto IL_584; } if (id2 == 184) { goto IL_51D; } } else { if (id2 == 200) { goto IL_51D; } if (id2 == 206) { goto IL_584; } } } else if (id2 <= 284) { if (id2 == 265 || id2 == 284) { goto IL_584; } } else { if (id2 == 309) { goto IL_480; } if (id2 == 331) { goto IL_584; } } IL_5DD: this.WriteKeyword(kw); continue; IL_480: if (this.state.Destination == RtfDestination.ColorTable) { this.color &= ~(255 << (int)(RTFData.keywords[(int)kw.Id].idx * 8)); this.color |= (kw.Value & 255) << (int)(RTFData.keywords[(int)kw.Id].idx * 8); goto IL_5DD; } goto IL_5DD; IL_51D: if (this.state.Destination == RtfDestination.RTF && this.injection != null && this.injection.HaveHead && !this.injection.HeadDone) { this.output.WriteControlText("\r\n", false); this.output.RtfLineLength = 0; this.injection.InjectRtf(true, false); goto IL_5DD; } goto IL_5DD; IL_584: if (this.state.Destination == RtfDestination.RTF && this.injection != null && this.injection.HaveHead && !this.injection.HeadDone) { this.output.WriteControlText("\r\n", false); this.output.RtfLineLength = 0; this.injection.InjectRtf(true, false); goto IL_5DD; } goto IL_5DD; } } } }
internal RtfKeyword(RtfToken token) { this.token = token; }
// Token: 0x0600173B RID: 5947 RVA: 0x000B4ED0 File Offset: 0x000B30D0 private void ProcessBinary(RtfToken token) { }
// Token: 0x0600173A RID: 5946 RVA: 0x000B4D5C File Offset: 0x000B2F5C private void ProcessText(RtfToken token) { if (this.state.SkipLevel != 0 && this.state.Level >= this.state.SkipLevel) { return; } RtfDestination destination = this.state.Destination; if (destination != RtfDestination.RTF) { switch (destination) { case RtfDestination.Field: break; case RtfDestination.FieldResult: if (this.hyperLinkActive && this.urlCompareSink.IsActive) { token.Text.WriteTo(this.urlCompareSink); token.Text.Rewind(); goto IL_107; } goto IL_107; case RtfDestination.FieldInstruction: this.firstKeyword = false; this.scratch.AppendRtfTokenText(token, 4096); return; default: switch (destination) { case RtfDestination.Picture: case RtfDestination.PictureProperties: break; case RtfDestination.ShapeName: this.firstKeyword = false; this.scratch.AppendRtfTokenText(token, 128); return; case RtfDestination.ShapeValue: this.firstKeyword = false; if (this.descriptionProperty) { this.scratch.AppendRtfTokenText(token, 4096); return; } return; default: this.firstKeyword = false; return; } break; } this.firstKeyword = false; return; } IL_107: if (this.state.IsInvisible) { return; } if (this.output.LineEmpty && this.lineIndent >= 120 && this.lineIndent < 7200) { this.output.OutputSpace(this.lineIndent / 120); } token.TextElements.OutputTextElements(this.output, this.treatNbspAsBreakable); }
// Token: 0x06001739 RID: 5945 RVA: 0x000B47D8 File Offset: 0x000B29D8 private void ProcessKeywords(RtfToken token) { if (this.state.SkipLevel != 0 && this.state.Level >= this.state.SkipLevel) { return; } foreach (RtfKeyword rtfKeyword in token.Keywords) { if (this.firstKeyword) { if (rtfKeyword.Id == 1) { this.ignorableDestination = true; continue; } this.firstKeyword = false; short id = rtfKeyword.Id; if (id <= 135) { if (id <= 29) { if (id != 15 && id != 24) { if (id != 29) { goto IL_2EB; } if (this.state.Destination == RtfDestination.RTF || this.state.Destination == RtfDestination.FieldResult) { this.state.Destination = RtfDestination.Field; } break; } } else if (id <= 50) { if (id != 43) { if (id != 50) { goto IL_2EB; } if (this.state.Destination == RtfDestination.RTF || this.state.Destination == RtfDestination.FieldResult) { this.state.Destination = RtfDestination.Picture; this.pictureWidth = 0; this.pictureHeight = 0; goto IL_303; } this.state.SkipGroup(); break; } else { if (this.state.Destination == RtfDestination.Picture && this.includePictureField) { this.state.Destination = RtfDestination.PictureProperties; continue; } this.state.SkipGroup(); break; } } else if (id != 124) { if (id != 135) { goto IL_2EB; } if (this.state.Destination == RtfDestination.PictureProperties) { this.state.Destination = RtfDestination.ShapeName; continue; } continue; } else { if (this.state.Destination == RtfDestination.PictureProperties) { this.state.Destination = RtfDestination.ShapeValue; continue; } continue; } } else if (id <= 246) { if (id != 175) { if (id != 201 && id != 246) { goto IL_2EB; } } else { if (this.state.Destination == RtfDestination.RTF) { this.state.SkipGroup(); break; } continue; } } else if (id <= 269) { if (id != 252) { if (id != 269) { goto IL_2EB; } if (this.state.Destination == RtfDestination.Field && !this.skipFieldResult) { this.state.Destination = RtfDestination.FieldResult; continue; } this.skipFieldResult = false; this.state.SkipGroup(); break; } else { if (this.state.Destination == RtfDestination.RTF) { this.state.SkipGroup(); break; } continue; } } else if (id != 306) { if (id != 315) { goto IL_2EB; } } else { if (this.state.Destination == RtfDestination.Field) { this.state.Destination = RtfDestination.FieldInstruction; continue; } this.state.SkipGroup(); break; } this.state.SkipGroup(); break; IL_2EB: if (this.ignorableDestination) { this.state.SkipGroup(); break; } } IL_303: short id2 = rtfKeyword.Id; if (id2 <= 126) { if (id2 <= 68) { if (id2 <= 40) { if (id2 != 6) { if (id2 != 40) { continue; } goto IL_466; } else { if (this.state.Destination == RtfDestination.Picture) { this.pictureHeight = rtfKeyword.Value; continue; } continue; } } else if (id2 != 48) { if (id2 != 68) { continue; } goto IL_466; } IL_4A5: this.output.OutputNewLine(); continue; IL_466: if (this.hyperLinkActive) { if (!this.urlCompareSink.IsMatch) { this.output.CloseAnchor(); } else { this.output.CancelAnchor(); } this.hyperLinkActive = false; this.urlCompareSink.Reset(); goto IL_4A5; } goto IL_4A5; } else if (id2 <= 95) { if (id2 != 71) { if (id2 != 95) { } } else if (rtfKeyword.Value > 0 && rtfKeyword.Value <= 32767) { } } else if (id2 == 119 || id2 == 126) { this.output.OutputTabulation(1); } } else if (id2 <= 170) { if (id2 <= 142) { switch (id2) { case 134: case 135: case 137: break; case 136: this.state.IsInvisible = (rtfKeyword.Value != 0); break; default: if (id2 == 142) { if (rtfKeyword.Value >= 75 && this.output.LineEmpty && this.output.RenderingPosition() != 0) { this.output.CloseParagraph(); } } break; } } else if (id2 != 154) { if (id2 != 170) { } } else if (this.state.Destination == RtfDestination.Picture) { this.pictureWidth = rtfKeyword.Value; } } else if (id2 <= 206) { if (id2 != 184) { if (id2 == 206) { this.lineIndent = rtfKeyword.Value; } } else { this.lineIndent = 0; } } else if (id2 != 222) { if (id2 != 284) { if (id2 != 287) { } } else { this.lineIndent += rtfKeyword.Value; } } } }
internal RtfRun(RtfToken token) { this.token = token; }
// Token: 0x06001932 RID: 6450 RVA: 0x000C896B File Offset: 0x000C6B6B internal RtfTextElement(RtfToken token) { this.token = token; }
// Token: 0x06001992 RID: 6546 RVA: 0x000C9D8C File Offset: 0x000C7F8C private void ProcessKeywords(RtfToken token) { if (this.state.Skip) { return; } foreach (RtfKeyword rtfKeyword in token.Keywords) { if (this.firstKeyword) { if (rtfKeyword.Id == 1) { this.ignorableDestination = true; continue; } this.firstKeyword = false; short id = rtfKeyword.Id; if (id <= 210) { if (id <= 24) { if (id != 15 && id != 24) { goto IL_19D; } } else if (id != 50) { switch (id) { case 175: if (this.state.Destination == RtfDestination.RTF) { this.state.Destination = RtfDestination.FontTable; continue; } continue; case 176: goto IL_19D; case 177: this.state.Destination = RtfDestination.HtmlTagIndex; continue; default: if (id != 210) { goto IL_19D; } if (this.state.Destination == RtfDestination.FontTable) { this.state.Destination = RtfDestination.RealFontName; continue; } continue; } } } else if (id <= 252) { if (id != 246) { if (id != 252) { goto IL_19D; } if (this.state.Destination == RtfDestination.RTF) { this.state.Destination = RtfDestination.ColorTable; continue; } continue; } } else if (id != 268) { if (id != 315) { if (id != 319) { goto IL_19D; } this.state.Destination = RtfDestination.ListText; continue; } } else { if (this.state.Destination == RtfDestination.FontTable) { this.state.Destination = RtfDestination.AltFontName; continue; } continue; } this.state.PushSkipGroup(); return; IL_19D: if (this.ignorableDestination) { this.state.PushSkipGroup(); return; } } short id2 = rtfKeyword.Id; if (id2 <= 68) { if (id2 == 40 || id2 == 48 || id2 == 68) { if (!this.ignoreRtf && (this.state.Destination == RtfDestination.RTF || this.state.Destination == RtfDestination.HtmlTagIndex)) { this.Output("\r\n"); } } } else { if (id2 <= 119) { if (id2 == 83) { goto IL_27B; } if (id2 != 119) { goto IL_27B; } } else if (id2 != 126) { if (id2 != 153) { goto IL_27B; } this.ignoreRtf = (rtfKeyword.Value != 0); goto IL_27B; } if (!this.ignoreRtf && (this.state.Destination == RtfDestination.RTF || this.state.Destination == RtfDestination.HtmlTagIndex)) { this.Output("\t"); } } IL_27B: if (this.parseBuffer.Length - this.parseEnd >= 6) { continue; } this.incompleteToken = token; return; } this.incompleteToken = null; }