Beispiel #1
0
        // Token: 0x060034AF RID: 13487 RVA: 0x000EA950 File Offset: 0x000E8B50
        private int PreCoalesceTable(DocumentNode dn)
        {
            int result = 0;
            int index  = dn.Index;
            ColumnStateArray columnStateArray = dn.ComputeColumns();
            int minUnfilledRowIndex           = columnStateArray.GetMinUnfilledRowIndex();

            if (minUnfilledRowIndex > 0)
            {
                DocumentNode documentNode  = new DocumentNode(DocumentNodeType.dnTable);
                DocumentNode documentNode2 = new DocumentNode(DocumentNodeType.dnTableBody);
                documentNode.FormatState           = new FormatState(dn.FormatState);
                documentNode.FormatState.RowFormat = this.EntryAt(minUnfilledRowIndex).FormatState.RowFormat;
                int num  = minUnfilledRowIndex - dn.Index - 1;
                int num2 = dn.ChildCount - num;
                dn.ChildCount = num;
                this.EntryAt(index + 1).ChildCount = num - 1;
                this.InsertNode(minUnfilledRowIndex, documentNode2);
                this.CloseAtHelper(minUnfilledRowIndex, num2);
                this.InsertNode(minUnfilledRowIndex, documentNode);
                this.CloseAtHelper(minUnfilledRowIndex, num2 + 1);
                documentNode2.Parent = documentNode;
                documentNode.Parent  = dn.ClosedParent;
                for (DocumentNode closedParent = documentNode.ClosedParent; closedParent != null; closedParent = closedParent.ClosedParent)
                {
                    closedParent.ChildCount += 2;
                }
                result = 2;
                dn.ColumnStateArray = dn.ComputeColumns();
            }
            else
            {
                dn.ColumnStateArray = columnStateArray;
            }
            return(result);
        }