private static ArrayList smethod_0(DocumentObject A_0, DocumentObject A_1) { int num = Class681.smethod_19(A_0); int num2 = Class681.smethod_19(A_1); int num3 = Math.Min(num, num2); A_0 = Class681.smethod_20(A_0, num - num3); A_1 = Class681.smethod_20(A_1, num2 - num3); while (A_0 != null) { if ((A_1 == null) || (A_0.ParentObject == A_1.ParentObject)) { break; } A_0 = A_0.ParentObject; A_1 = A_1.ParentObject; } if ((A_0 == null) || (A_1 == null)) { return(null); } ArrayList list = new ArrayList(); while (A_0 != null) { if (A_0 == A_1) { break; } list.Add(A_0); A_0 = (DocumentObject)A_0.NextSibling; } list.Add(A_1); return(list); }
private static Table smethod_3(Class857 A_0, Class106 A_1, Class975 A_2) { int num = 0; Table table = new Table(A_0.method_9()); int num2 = smethod_4(A_0, A_1, A_2); foreach (Class571 class4 in A_2) { TableCell cell = new TableCell(A_0.method_9()); TableRow lastRow = null; if (table.FirstRow != null) { lastRow = table.LastRow; cell = (TableCell)Class681.smethod_15(lastRow.FirstChild); } table.method_13(new TableRow(A_0.method_9(), class4.method_2())); for (int i = 0; i < class4.Count; i++) { Class1140 class3 = class4.method_0(i); if (class3.method_8() == null) { class3.method_9((TableCell)cell.Clone()); if ((class3.method_4() == CellMerge.Continue) && (i != 0)) { class3.method_8().CellFormat.PreferredWidth.method_50(0f); class3.method_8().CellFormat.PreferredWidth.method_52(FtsWidth.Point); } if (((class3.method_6() == CellMerge.Continue) && (lastRow != null)) && (lastRow.Cells[i] != null)) { class3.method_8().CellFormat.PreferredWidth.method_50(((float)A_1.method_20().method_1(i).method_12()) / 20f); class3.method_8().CellFormat.PreferredWidth.method_52(FtsWidth.Point); } } else if (class3.method_4() != CellMerge.Continue) { int num6 = 0; for (int k = 0; k < class3.method_0(); k++) { if ((A_1 != null) && ((i + k) < A_1.method_20().Count)) { Class94 class2 = A_1.method_20().method_1(i + k); if (class2 != null) { num6 += (class2.method_12() == -2147483648) ? num2 : class2.method_12(); } } } class3.method_8().CellFormat.PreferredWidth.method_50(((float)num6) / 20f); class3.method_8().CellFormat.PreferredWidth.method_52(FtsWidth.Point); } class3.method_8().CellFormat.HorizontalMerge = class3.method_4(); class3.method_8().CellFormat.VerticalMerge = class3.method_6(); table.LastRow.Cells.Add(class3.method_8()); cell = class3.method_8(); } if ((class4.method_0(0).method_6() == CellMerge.Continue) && (lastRow != null)) { table.LastRow.RowFormat.LeftIndent = lastRow.RowFormat.LeftIndent; } for (int j = 1; j < class4.method_4(); j++) { table.method_13(table.LastRow); } } if (A_1 != null) { string str = A_1.method_12(); if (str != null) { if (!(str == BookmarkStart.b("吥䐧ܩ堫䰭", num))) { if (str == BookmarkStart.b("䨥娧ܩ堫䰭", num)) { table.TableFormat.Bidi = false; } } else { table.TableFormat.Bidi = true; } } table.DocxTableFormat.Format.HorizontalAlignment = (RowAlignment)A_1.method_14(); } if ((A_1 != null) && (A_1.method_16() != -2147483648)) { table.PreferredWidth = new PreferredWidth(WidthType.Twip, (short)A_1.method_16()); } return(table); }