Exemple #1
0
        // Token: 0x0600349D RID: 13469 RVA: 0x000EA0C0 File Offset: 0x000E82C0
        internal MarkerList GetOpenMarkerStyles()
        {
            MarkerList markerList = new MarkerList();

            if (this._dnaOpen != null)
            {
                this._dnaOpen.CullOpen();
                int num = 0;
                for (int i = 0; i < this._dnaOpen.Count; i++)
                {
                    DocumentNode documentNode = this._dnaOpen.EntryAt(i);
                    if (documentNode.IsPending && documentNode.Type == DocumentNodeType.dnShape)
                    {
                        num = i + 1;
                    }
                }
                for (int j = num; j < this._dnaOpen.Count; j++)
                {
                    DocumentNode documentNode2 = this._dnaOpen.EntryAt(j);
                    if (documentNode2.IsPending && documentNode2.Type == DocumentNodeType.dnList)
                    {
                        markerList.AddEntry(documentNode2.FormatState.Marker, documentNode2.FormatState.ILS, documentNode2.FormatState.StartIndex, documentNode2.FormatState.StartIndexDefault, documentNode2.VirtualListLevel);
                    }
                }
            }
            return(markerList);
        }
        internal MarkerList GetOpenMarkerStyles()
        {
            MarkerList ml = new MarkerList();

            if (_dnaOpen != null)
            {
                _dnaOpen.CullOpen();
                int nShape = 0;
                for (int i = 0; i < _dnaOpen.Count; i++)
                {
                    DocumentNode dn = _dnaOpen.EntryAt(i);

                    if (dn.IsPending && dn.Type == DocumentNodeType.dnShape)
                    {
                        nShape = i + 1;
                    }
                }

                for (int i = nShape; i < _dnaOpen.Count; i++)
                {
                    DocumentNode dn = _dnaOpen.EntryAt(i);

                    if (dn.IsPending && dn.Type == DocumentNodeType.dnList)
                    {
                        ml.AddEntry(dn.FormatState.Marker, dn.FormatState.ILS,
                                    dn.FormatState.StartIndex,
                                    dn.FormatState.StartIndexDefault, dn.VirtualListLevel);
                    }
                }
            }

            return ml;
        }
        internal MarkerList GetMarkerStylesOfParagraph(MarkerList mlHave, FormatState fs, bool bMarkerPresent)
        {
            MarkerList mlWant = new MarkerList();
            long nVirtualListLevel = fs.ListLevel;
            long nStartIndexOverride = -1;

            // No list?
            if (nVirtualListLevel < 1)
            {
                return mlWant;
            }

            // Use currently open list styles for all levels below requested one
            for (int i = 0; i < mlHave.Count; i++)
                if (mlHave.EntryAt(i).VirtualListLevel < nVirtualListLevel || fs.IsContinue)
                {
                    MarkerListEntry mle = mlHave.EntryAt(i);
                    mlWant.AddEntry(mle.Marker, mle.ILS, -1, mle.StartIndexDefault, mle.VirtualListLevel);
                }
                else
                {
                    break;
                }

            // If I'm a continuation paragraph, I'm done.
            if (fs.IsContinue)
            {
                return mlWant;
            }

            // Now determine the list style for the list level I'm going to add.
            ListOverrideTable lot = _converterState.ListOverrideTable;
            ListOverride lo = lot.FindEntry((int)fs.ILS);
            if (lo != null)
            {
                ListLevelTable levels = lo.Levels;
                if (levels == null || levels.Count == 0)
                {
                    ListTableEntry lte = _converterState.ListTable.FindEntry(lo.ID);
                    if (lte != null)
                    {
                        levels = lte.Levels;
                    }

                    // Did the list override specify a start index?
                    if (lo.StartIndex > 0)
                    {
                        nStartIndexOverride = lo.StartIndex;
                    }
                }

                if (levels != null)
                {
                    ListLevel listLevel = levels.EntryAt((int)nVirtualListLevel - 1);
                    if (listLevel != null)
                    {
                        // If there was a marker present, we ignore the "Hidden" style in the list table.
                        MarkerStyle ms = listLevel.Marker;
                        if (ms == MarkerStyle.MarkerHidden && bMarkerPresent)
                        {
                            ms = MarkerStyle.MarkerBullet;
                        }

                        mlWant.AddEntry(ms, fs.ILS, nStartIndexOverride, listLevel.StartIndex, nVirtualListLevel);
                        return mlWant;
                    }
                }
            }

            // If there wasn't a list definition, use the marker type in the formatstate.
            mlWant.AddEntry(fs.Marker, fs.ILS, nStartIndexOverride, fs.StartIndex, nVirtualListLevel);
            return mlWant;
        }