Esempio n. 1
0
        // Token: 0x0600349E RID: 13470 RVA: 0x000EA1A0 File Offset: 0x000E83A0
        internal MarkerList GetLastMarkerStyles(MarkerList mlHave, MarkerList mlWant)
        {
            MarkerList markerList = new MarkerList();

            if (mlHave.Count > 0 || mlWant.Count == 0)
            {
                return(markerList);
            }
            bool flag = true;

            for (int i = this.Count - 1; i >= 0; i--)
            {
                DocumentNode documentNode = this.EntryAt(i);
                if (documentNode.Type == DocumentNodeType.dnCell || documentNode.Type == DocumentNodeType.dnTable)
                {
                    break;
                }
                if (documentNode.Type == DocumentNodeType.dnListItem)
                {
                    DocumentNode parentOfType = documentNode.GetParentOfType(DocumentNodeType.dnCell);
                    if (parentOfType != null && !parentOfType.IsPending)
                    {
                        break;
                    }
                    DocumentNode parentOfType2 = documentNode.GetParentOfType(DocumentNodeType.dnShape);
                    if (parentOfType2 == null || parentOfType2.IsPending)
                    {
                        for (DocumentNode parent = documentNode.Parent; parent != null; parent = parent.Parent)
                        {
                            if (parent.Type == DocumentNodeType.dnList)
                            {
                                MarkerListEntry markerListEntry = new MarkerListEntry();
                                markerListEntry.Marker             = parent.FormatState.Marker;
                                markerListEntry.StartIndexOverride = parent.FormatState.StartIndex;
                                markerListEntry.StartIndexDefault  = parent.FormatState.StartIndexDefault;
                                markerListEntry.VirtualListLevel   = parent.VirtualListLevel;
                                markerListEntry.ILS = parent.FormatState.ILS;
                                markerList.Insert(0, markerListEntry);
                                if (markerListEntry.Marker != MarkerStyle.MarkerBullet)
                                {
                                    flag = false;
                                }
                            }
                        }
                        break;
                    }
                }
            }
            if (markerList.Count == 1 && flag)
            {
                markerList.RemoveRange(0, 1);
            }
            return(markerList);
        }
Esempio n. 2
0
        // Token: 0x060034B0 RID: 13488 RVA: 0x000EAA6C File Offset: 0x000E8C6C
        private void PreCoalesceRow(DocumentNode dn, ref bool fVMerged)
        {
            DocumentNodeArray rowsCells        = dn.GetRowsCells();
            RowFormat         rowFormat        = dn.FormatState.RowFormat;
            DocumentNode      parentOfType     = dn.GetParentOfType(DocumentNodeType.dnTable);
            ColumnStateArray  columnStateArray = (parentOfType != null) ? parentOfType.ColumnStateArray : null;
            int num = (rowsCells.Count < rowFormat.CellCount) ? rowsCells.Count : rowFormat.CellCount;
            int i   = 0;
            int j   = 0;

            while (j < num)
            {
                DocumentNode documentNode = rowsCells.EntryAt(j);
                CellFormat   cellFormat   = rowFormat.NthCellFormat(j);
                long         cellX        = cellFormat.CellX;
                if (cellFormat.IsVMerge)
                {
                    fVMerged = true;
                }
                if (cellFormat.IsHMergeFirst)
                {
                    for (j++; j < num; j++)
                    {
                        cellFormat = rowFormat.NthCellFormat(j);
                        if (cellFormat.IsVMerge)
                        {
                            fVMerged = true;
                        }
                        if (cellFormat.IsHMerge)
                        {
                            rowsCells.EntryAt(j).ColSpan = 0;
                        }
                    }
                }
                else
                {
                    j++;
                }
                if (columnStateArray != null)
                {
                    int num2 = i;
                    while (i < columnStateArray.Count)
                    {
                        ColumnState columnState = columnStateArray.EntryAt(i);
                        i++;
                        if (columnState.CellX == cellX || columnState.CellX > cellX)
                        {
                            break;
                        }
                    }
                    if (i - num2 > documentNode.ColSpan)
                    {
                        documentNode.ColSpan = i - num2;
                    }
                }
            }
        }
Esempio n. 3
0
 // Token: 0x0600349F RID: 13471 RVA: 0x000EA2FC File Offset: 0x000E84FC
 internal void OpenLastList()
 {
     for (int i = this.Count - 1; i >= 0; i--)
     {
         DocumentNode documentNode = this.EntryAt(i);
         if (documentNode.Type == DocumentNodeType.dnListItem)
         {
             DocumentNode parentOfType = documentNode.GetParentOfType(DocumentNodeType.dnShape);
             if (parentOfType == null || parentOfType.IsPending)
             {
                 for (DocumentNode documentNode2 = documentNode; documentNode2 != null; documentNode2 = documentNode2.Parent)
                 {
                     if (documentNode2.Type == DocumentNodeType.dnList || documentNode2.Type == DocumentNodeType.dnListItem)
                     {
                         documentNode2.IsPending = true;
                         this._dnaOpen.InsertOpenNode(documentNode2);
                     }
                 }
                 return;
             }
         }
     }
 }
Esempio n. 4
0
 // Token: 0x060034A0 RID: 13472 RVA: 0x000EA378 File Offset: 0x000E8578
 internal void OpenLastCell()
 {
     for (int i = this._dnaOpen.Count - 1; i >= 0; i--)
     {
         DocumentNode documentNode = this._dnaOpen.EntryAt(i);
         if (documentNode.IsPending)
         {
             if (documentNode.Type == DocumentNodeType.dnCell)
             {
                 return;
             }
             if (documentNode.Type == DocumentNodeType.dnTable || documentNode.Type == DocumentNodeType.dnTableBody || documentNode.Type == DocumentNodeType.dnRow)
             {
                 for (int j = this.Count - 1; j >= 0; j--)
                 {
                     DocumentNode documentNode2 = this.EntryAt(j);
                     if (documentNode2 == documentNode)
                     {
                         return;
                     }
                     if (documentNode2.Type == DocumentNodeType.dnCell && documentNode2.GetParentOfType(documentNode.Type) == documentNode)
                     {
                         DocumentNode documentNode3 = documentNode2;
                         while (documentNode3 != null && documentNode3 != documentNode)
                         {
                             documentNode3.IsPending = true;
                             this._dnaOpen.InsertOpenNode(documentNode3);
                             documentNode3 = documentNode3.Parent;
                         }
                         return;
                     }
                 }
             }
         }
     }
 }