Ejemplo n.º 1
0
 public ChangeContextFilter(string contextName, Predicate<DocObject> objectSelector, ChangeCategory category)
 {
     m_selector = objectSelector;
     m_result = SummaryCategoryNode.Create(contextName + " Changes", category);
     m_unusedItems = new List<ISummaryItem>();
     m_result.ToolTipText = "Changes made to the " + contextName + "s of the document.";
 }
Ejemplo n.º 2
0
        private void SelectDuplicates()
        {
            foreach (long l in m_matchMap.Keys)
            {
                List<ISummaryItem> list = m_matchMap[l];
                if (list.Count <= 1)
                {
                    m_unusedItems.Add(list[0]);
                    continue;
                }

                if (m_matchingChanges == null)
                {
                    m_matchingChanges = SummaryCategoryNode.Create("Matching Changes", ChangeCategory.MatchingChanges);
                    m_matchingChanges.ToolTipText = GetTooltipText();
                }

                AddGroup(list);
            }
        }
Ejemplo n.º 3
0
 private string GetOldText(SummaryNode parentNode)
 {
     SummaryChangeNode scn = parentNode.ChildNodes[0] as SummaryChangeNode;
     if (scn == null)
         return null;
     return scn.GetOldText(true);
 }
Ejemplo n.º 4
0
 private List<ISummaryItem> SummaryItemsFromChildNodes(SummaryNode scn)
 {
     List<ISummaryItem> result = new List<ISummaryItem>();
     foreach (SummaryChangeNode subScn in scn.ChildNodes)
     {
         result.Add(subScn.SummaryItem);
     }
     return result;
 }
Ejemplo n.º 5
0
        private void AddMissingChangeItems(SummaryNode parentNode, SearchResult sr)
        {
            if (m_missingChanges == null)
            {
                m_missingChanges = SummaryCategoryNode.Create("Suggested Changes", ChangeCategory.MissingChanges);
                m_missingChanges.ToolTipText = "Changes that a reviewer might have neglected to make. This category highlights places where a matching replacement or deletion has not been applied consistently accross the whole document." +
                " Suggest changes are only flagged where the number of unchanged instances found is less than half the number of changed instances.";
            }

            SummaryNode headingNode = new RedlineHeadingNode((parentNode as RedlineHeadingNode).RedlineObjects, m_context.RTB);
            SearchSummaryItemBuilder ssib = new SearchSummaryItemBuilder(sr, Utils.IsInOriginalDocument);
            foreach (ISummaryItem isi in ssib.Execute())
            {
                headingNode.ChildNodes.Add(new SummarySearchNode(isi, m_context.RTB, m_context.ChangePositionMap));
            }
            m_missingChanges.ChildNodes.Add(headingNode);
        }
Ejemplo n.º 6
0
        private string GetRedlineText(SummaryNode sn)
        {
            StringBuilder bld = new StringBuilder();
            foreach (Inline il in sn.Redline)
            {
                GetRedlineText(bld, il);

            }
            return bld.ToString();
        }