Esempio n. 1
0
        bool IsContextExcluded(DocObject docObj)
        {
            if (m_excludedContexts.Contains(docObj.GetType()))
                return true;

            return false;

        }
 private void ProcessDocObject(DocObject item)
 {
     if (item is Change)
     {
         Change ch = item as Change;
         if (m_visitor.ShouldHighlightChange(ch))
         {
             SetHighlight(ch.Type);
             ProcessSubItems(ch);
             ClearHighlight();
         }
         else
         {
             if (IsInOriginal(ch.Type))
             {
                 ProcessSubItems(ch);
             }
         }
     }
     else if (item is Field || item is FieldInst || item is FieldResult)
     {
         m_fieldStateStack.Push(item.GetType());
         ProcessSubItems(item as DocObjectWithContent);
         m_fieldStateStack.Pop();
     }
     else if (item is HighlightedTextRun)
     {
         HighlightedTextRun tr = item as HighlightedTextRun;
         m_bSeenChange = true;
         m_bHighlight = true;
         AddTextToResult(tr.Content, tr.Font, tr.RTL, tr.Parent is Comment);
         m_bHighlight = false;
     }
     else if (item is TextRun)
     {
         TextRun tr = item as TextRun;
         AddTextToResult(tr.Content, tr.Font, tr.RTL, tr.Parent is Comment);
     }
     else if (item is ParaMarker)
     {
         ParaMarker pr = item as ParaMarker;
         if (pr.IsInsertedListItem)
             SetHighlight(ChangeType.Insertion);
         if (!string.IsNullOrEmpty(pr.ListNumber))
             AddTextToResult(pr.ListNumber, "", false, pr.Parent is Comment);
         if (pr.IsInsertedListItem)
             ClearHighlight();
     }
     else if (item is Pict)
     {
         if (m_visitor.WantsTextForImages)
             AddTextToResult("[Picture]", "", false, item.Parent is Comment);
     }
 }