示例#1
0
 internal void RegisterDataRegion(Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion)
 {
     if (!m_scopes.TryGetValue(dataRegion, out ScopeTreeNode value))
     {
         value = new SubScopeNode(dataRegion, m_activeScopes.First);
     }
     AddScope(value);
     m_dataRegionScopes   = m_dataRegionScopes.Add(value);
     m_activeRowScopes    = m_activeRowScopes.Add(null);
     m_activeColumnScopes = m_activeColumnScopes.Add(null);
 }
示例#2
0
 private void AddScope(ScopeTreeNode scopeNode, IRIFDataScope scope)
 {
     m_activeScopes  = m_activeScopes.Add(scopeNode);
     m_scopes[scope] = scopeNode;
     if (!string.IsNullOrEmpty(scopeNode.ScopeName))
     {
         m_scopesByName[scopeNode.ScopeName] = scopeNode;
     }
 }
示例#3
0
 private void AddGroupScope(Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member, ref FunctionalList <ScopeTreeNode> axisScopes)
 {
     if (!m_scopes.TryGetValue(member, out ScopeTreeNode value))
     {
         value = (HasScope(axisScopes) ? new SubScopeNode(member, m_activeScopes.First) : new SubScopeNode(member, m_dataRegionScopes.First));
     }
     AddScope(value);
     axisScopes = axisScopes.Add(value);
 }
        private void AddGroupScope(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode member, ref FunctionalList <ScopeTreeNode> axisScopes)
        {
            ScopeTreeNode scopeTreeNode = default(ScopeTreeNode);

            if (!this.m_scopes.TryGetValue((IRIFDataScope)member, out scopeTreeNode))
            {
                scopeTreeNode = (this.HasScope(axisScopes) ? new SubScopeNode(member, this.m_activeScopes.First) : new SubScopeNode(member, this.m_dataRegionScopes.First));
            }
            this.AddScope(scopeTreeNode);
            axisScopes = axisScopes.Add(scopeTreeNode);
        }
        protected override void InternalParse(string richText)
        {
            this.m_htmlLexer = new HtmlLexer(richText);
            int num = 0;
            FunctionalList <ListStyle> functionalList = FunctionalList <ListStyle> .Empty;

            HtmlElement.HtmlNodeType    htmlNodeType     = HtmlElement.HtmlNodeType.Element;
            HtmlElement.HtmlNodeType    htmlNodeType2    = HtmlElement.HtmlNodeType.Element;
            HtmlElement.HtmlElementType htmlElementType  = HtmlElement.HtmlElementType.None;
            HtmlElement.HtmlElementType htmlElementType2 = HtmlElement.HtmlElementType.None;
            while (this.m_htmlLexer.Read())
            {
                this.m_currentHtmlElement = this.m_htmlLexer.CurrentElement;
                htmlElementType2          = this.m_currentHtmlElement.ElementType;
                htmlNodeType2             = this.m_currentHtmlElement.NodeType;
                switch (htmlNodeType2)
                {
                case HtmlElement.HtmlNodeType.Element:
                    if (num != 0 && htmlElementType2 != HtmlElement.HtmlElementType.TITLE)
                    {
                        break;
                    }
                    switch (htmlElementType2)
                    {
                    case HtmlElement.HtmlElementType.TITLE:
                        if (!this.m_currentHtmlElement.IsEmptyElement)
                        {
                            num++;
                        }
                        htmlElementType2 = htmlElementType;
                        htmlNodeType2    = htmlNodeType;
                        break;

                    case HtmlElement.HtmlElementType.P:
                    case HtmlElement.HtmlElementType.DIV:
                    case HtmlElement.HtmlElementType.LI:
                    case HtmlElement.HtmlElementType.H1:
                    case HtmlElement.HtmlElementType.H2:
                    case HtmlElement.HtmlElementType.H3:
                    case HtmlElement.HtmlElementType.H4:
                    case HtmlElement.HtmlElementType.H5:
                    case HtmlElement.HtmlElementType.H6:
                        this.ParseParagraphElement(htmlElementType2, functionalList);
                        break;

                    case HtmlElement.HtmlElementType.UL:
                    case HtmlElement.HtmlElementType.OL:
                    {
                        this.FlushPendingLI();
                        this.CloseParagraph();
                        ListStyle listStyleForElement2 = this.GetListStyleForElement(htmlElementType2);
                        functionalList = functionalList.Add(listStyleForElement2);
                        base.m_currentParagraph.ListLevel = functionalList.Count;
                        break;
                    }

                    case HtmlElement.HtmlElementType.SPAN:
                    case HtmlElement.HtmlElementType.FONT:
                    case HtmlElement.HtmlElementType.STRONG:
                    case HtmlElement.HtmlElementType.STRIKE:
                    case HtmlElement.HtmlElementType.B:
                    case HtmlElement.HtmlElementType.I:
                    case HtmlElement.HtmlElementType.U:
                    case HtmlElement.HtmlElementType.S:
                    case HtmlElement.HtmlElementType.EM:
                        this.ParseTextRunElement(htmlElementType2);
                        break;

                    case HtmlElement.HtmlElementType.A:
                        this.ParseActionElement(functionalList.Count);
                        break;

                    case HtmlElement.HtmlElementType.BR:
                        if (htmlNodeType != HtmlElement.HtmlNodeType.EndElement)
                        {
                            this.AppendText(Environment.NewLine);
                        }
                        else
                        {
                            this.SetTextRunValue(Environment.NewLine);
                        }
                        break;

                    default:
                        htmlElementType2 = htmlElementType;
                        htmlNodeType2    = htmlNodeType;
                        break;
                    }
                    break;

                case HtmlElement.HtmlNodeType.Text:
                    if (num == 0)
                    {
                        string text = this.m_currentHtmlElement.Value;
                        if (htmlNodeType == HtmlElement.HtmlNodeType.Text)
                        {
                            this.AppendText(text);
                        }
                        else if (htmlElementType == HtmlElement.HtmlElementType.BR)
                        {
                            this.AppendText(this.HtmlTrimStart(text));
                        }
                        else
                        {
                            if (base.m_currentParagraphInstance == null)
                            {
                                text = this.HtmlTrimStart(text);
                            }
                            if (!string.IsNullOrEmpty(text))
                            {
                                this.SetTextRunValue(text);
                            }
                            else
                            {
                                htmlElementType2 = htmlElementType;
                                htmlNodeType2    = htmlNodeType;
                            }
                        }
                    }
                    break;

                case HtmlElement.HtmlNodeType.EndElement:
                    if (num != 0 && htmlElementType2 != HtmlElement.HtmlElementType.TITLE)
                    {
                        break;
                    }
                    switch (htmlElementType2)
                    {
                    case HtmlElement.HtmlElementType.TITLE:
                        if (num > 0)
                        {
                            num--;
                        }
                        htmlElementType2 = htmlElementType;
                        htmlNodeType2    = htmlNodeType;
                        break;

                    case HtmlElement.HtmlElementType.UL:
                    case HtmlElement.HtmlElementType.OL:
                        this.FlushPendingLI();
                        this.CloseParagraph();
                        if (functionalList.Count > 0)
                        {
                            ListStyle listStyleForElement = this.GetListStyleForElement(htmlElementType2);
                            bool      flag = false;
                            FunctionalList <ListStyle> functionalList2 = functionalList;
                            do
                            {
                                flag            = (functionalList2.First == listStyleForElement);
                                functionalList2 = functionalList2.Rest;
                            }while (!flag && functionalList2.Count > 0);
                            if (flag)
                            {
                                functionalList = functionalList2;
                                base.m_currentParagraph.ListLevel = functionalList.Count;
                            }
                        }
                        break;

                    case HtmlElement.HtmlElementType.LI:
                        this.CloseParagraph();
                        break;

                    case HtmlElement.HtmlElementType.P:
                    case HtmlElement.HtmlElementType.DIV:
                    case HtmlElement.HtmlElementType.H1:
                    case HtmlElement.HtmlElementType.H2:
                    case HtmlElement.HtmlElementType.H3:
                    case HtmlElement.HtmlElementType.H4:
                    case HtmlElement.HtmlElementType.H5:
                    case HtmlElement.HtmlElementType.H6:
                        this.CloseParagraph();
                        base.m_currentParagraph = base.m_currentParagraph.RemoveParagraph(htmlElementType2);
                        goto case HtmlElement.HtmlElementType.SPAN;

                    case HtmlElement.HtmlElementType.SPAN:
                    case HtmlElement.HtmlElementType.FONT:
                    case HtmlElement.HtmlElementType.STRONG:
                    case HtmlElement.HtmlElementType.STRIKE:
                    case HtmlElement.HtmlElementType.B:
                    case HtmlElement.HtmlElementType.I:
                    case HtmlElement.HtmlElementType.U:
                    case HtmlElement.HtmlElementType.S:
                    case HtmlElement.HtmlElementType.EM:
                        base.m_currentStyle = base.m_currentStyle.RemoveStyle(htmlElementType2);
                        break;

                    case HtmlElement.HtmlElementType.A:
                        this.RevertActionElement(htmlElementType2);
                        break;

                    default:
                        htmlElementType2 = htmlElementType;
                        htmlNodeType2    = htmlNodeType;
                        break;
                    }
                    break;
                }
                htmlNodeType    = htmlNodeType2;
                htmlElementType = htmlElementType2;
            }
            if (base.m_paragraphInstanceCollection.Count == 0)
            {
                this.CreateTextRunInstance();
            }
            base.m_currentParagraph = base.m_currentParagraph.RemoveAll();
        }