internal static DocObject ConstructNewContentHandler(string nodeLocalName, DocObjectWithContent parent) { switch (nodeLocalName) { case ParaMarker.nodeName: return new ParaMarker(parent); case Change.nodeName: return new Change(parent); case TextRun.nodeName: return new TextRun(parent); case Field.nodeName: return new Field(parent); case FootNote.nodeName: return new FootNote(parent); case EndNote.nodeName: return new EndNote(parent); case Table.nodeName: return new Table(parent); case Bookmark.nodeName: return new Bookmark(parent); case Pict.nodeName: return new Pict(parent); case Blob.nodeName: return new Blob(parent); case Shape.nodeName: return new Shape(parent); case Textbox.nodeName: return new Textbox(parent); case Comment.nodeName: return new Comment(parent); default: return null; } }
private bool ProcessCollection(DocObjectWithContent dowc, int startIndex) { for (int i = startIndex; i < dowc.Content.Count; i++) { if (!ProcessItem(dowc.Content[i])) return false; } return true; }
private void ProcessContainer(DocObjectWithContent dowc) { _counter.StartItem(dowc); foreach (DocObject dobj in dowc.Content) { dobj.RedlineCharPos = _counter.CurrentPosition; if (dobj is DocObjectWithContent) { ProcessContainer(dobj as DocObjectWithContent); } else { ProcessItem(dobj); } } _counter.EndItem(dowc); }
public Shape(DocObjectWithContent parent) : base(parent) { }
private void ProcessSubItems(DocObjectWithContent docObjectWithContent) { foreach (DocObject item in docObjectWithContent.Content) { ProcessDocObject(item); } }
private bool? FindRTLInSubObjects(DocObjectWithContent dowc) { foreach (DocObject dobj in dowc.Content) { if (dobj is TextRun) { m_bRightToLeft = (dobj as TextRun).RTL; } else if (dobj is DocObjectWithContent) { m_bRightToLeft = FindRTLInSubObjects(dobj as DocObjectWithContent); } if (m_bRightToLeft.HasValue) return m_bRightToLeft.Value; } return null; }
protected DocObjectWithContent(DocObjectWithContent parent) : base(parent) { }
public Section(DocObjectWithContent parent) : base(parent) { }
private string GetText(DocObjectWithContent dowc) { StringBuilder bld = new StringBuilder(); dowc.GetInnerText(bld); return bld.ToString(); }
public Change(DocObjectWithContent parent) : base(parent) { }
public ChangeableStructure(DocObjectWithContent parent) : base (parent) { }
public ParaMarker(DocObjectWithContent parent) : base(parent) { }
protected DocObject(DocObjectWithContent parent) { Parent = parent; _isFirst = true; }
public FieldInst(DocObjectWithContent parent) : base(parent) { }
public Row(DocObjectWithContent parent) : base(parent) { }
public Pict(DocObjectWithContent parent) : base(parent) { }
private void ProcessCollection(DocObjectWithContent dowc, bool passTextToStateMachine) { if (SummaryItemBuilder.StartsNewContext(dowc)) DispatchContextChangeChar(); _location.PushCollection(dowc); if (SummaryItemBuilder.StartsNewContext(dowc)) ResetAndDispatchContextChangeChar(); foreach (DocObject dobj in dowc.Content) { if (ContextExcluder != null && ContextExcluder(dobj)) { _location.IncrementChildCount(); continue; } if (dobj is Change) { Change ch = dobj as Change; if (ChangeTypeSelector == null || ChangeTypeSelector(ch.Type)) { ProcessCollection(ch, passTextToStateMachine); } else { ProcessCollection(ch, false); } } else if (dobj is DocObjectWithContent) { ProcessCollection(dobj as DocObjectWithContent, passTextToStateMachine); } else if (dobj is TextRun) { if (passTextToStateMachine) { ProcessText(dobj as TextRun); } else { _location.RedlineCharPos += (dobj as TextRun).Content.Length; } } else if (dobj is ParaMarker) { HandleChar('\r'); _location.RedlineCharPos--; } else { Reset(); } _location.IncrementChildCount(); } if (SummaryItemBuilder.StartsNewContext(dowc)) DispatchContextChangeChar(); _location.PopCollection(); if (SummaryItemBuilder.StartsNewContext(dowc)) ResetAndDispatchContextChangeChar(); }
public Bookmark(DocObjectWithContent parent) : base(parent) { }
public Comment(DocObjectWithContent parent) : base(parent) { }
public EndNote(DocObjectWithContent parent) : base(parent) { }
public FieldResult(DocObjectWithContent parent) : base(parent) { }
public HighlightedTextRun(DocObjectWithContent parent) : base(parent) { }
public Textbox(DocObjectWithContent parent) : base(parent) { }
public FootNote(DocObjectWithContent parent) : base(parent) { }
private void AddContentToSummaryItem(DocObjectWithContent dowc, int index) { ProcessCollection(dowc, index); }
public Blob(DocObjectWithContent parent) : base(parent) { }
public HeaderFooter(DocObjectWithContent parent) : base(parent) { }
public Table(DocObjectWithContent parent) : base(parent) { }