private static Class656 smethod_7(object A_0) { Class656 class2 = new Class656(); if (A_0 is CellFormat) { CellFormat format = A_0 as CellFormat; class2.method_5(6, format.CellScaling); class2.method_5(0xbc6, (WidthType)format.WidthUnit); class2.method_5(0xbc4, format.CellWidth); class2.method_5(0xbe0, format.HorizontalMerge); class2.method_5(0xbd6, format.VerticalMerge); class2.method_5(1, format.Borders); class2.method_5(0xc62, format.Shading); class2.method_5(2, format.Paddings); class2.method_5(0xc6c, format.TextWrap); class2.method_5(0xc94, format.HideMark); class2.method_5(0xc76, format.FitText); class2.method_5(0xbea, format.TextDirection); class2.method_5(0xbf4, format.VerticalAlignment); class2.method_5(0x271a, format.FormatRevision); return(class2); } return(A_0 as Class656); }
internal static void smethod_4(Class732 A_0, SprmCode A_1, Interface53 A_2, IComparer A_3) { ArrayList list = new ArrayList(); CellAlign none = CellAlign.None; for (int i = 0; i < A_0.Count; i++) { Hashtable hashtable = smethod_8(A_0.method_0(i), A_1, A_2); Class656 class2 = new Class656(); foreach (object obj2 in hashtable.Keys) { CellAlign align3 = (CellAlign)hashtable[obj2]; class2.method_5((int)align3, obj2); none |= align3; } list.Add(class2); } ArrayList list2 = new ArrayList(); for (CellAlign align2 = CellAlign.None; align2 <= none; align2 += 1) { list2.AddRange(smethod_6(list, (int)align2)); } smethod_5(list2, A_1, A_2, A_3); }
private void method_2(Table A_0) { Class656 class2 = new Class656(); float num = A_0.method_71(A_0); int num2 = (int)(this.method_0(A_0.FirstRow).LeftIndent * 20f); for (TableRow row = A_0.FirstRow; row != null; row = row.NextSibling as TableRow) { CellCollection cells = row.Cells; int gridBefore = row.RowFormat.GridBefore; int num6 = (int)Math.Round((double)(num2 + this.method_0(row).GridBeforeWidth.method_49())); class2.method_4(num6, null); foreach (TableCell cell in cells) { int num5 = gridBefore + cell.GridSpanEx; CellFormat format = this.method_1(cell); format.TwipCellWidth = (format.TwipCellWidth != 0) ? format.TwipCellWidth : this.method_4(cell, num, A_0._ColumnWidths, ref gridBefore, num5); num6 += this.method_1(cell).TwipCellWidth; class2.method_4(num6, null); } } this.int_1 = new int[Math.Max(class2.method_2() - 1, 0)]; for (int i = 0; i < this.int_1.Length; i++) { this.int_1[i] = class2.method_13(i + 1) - class2.method_13(i); } }
protected Class656 method_7() { Class656 class2 = (Class656)base.MemberwiseClone(); class2.int_1 = 0; class2.int_2 = new int[this.int_2.Length]; class2.object_0 = new object[this.object_0.Length]; return(class2); }
private void method_3(Class656 A_0) { for (int i = A_0.method_2() - 1; i > 0; i--) { if (Math.Abs((int)(A_0.method_13(i) - A_0.method_13(i - 1))) < 5) { A_0.method_17(i); } } }
internal StyleCollection(Document A_0) : base(A_0, A_0) { this.string_2 = string.Empty; this.string_3 = string.Empty; this.class547_0 = new Class547(); this.class656_0 = new Class656(); this.class181_0 = new Class181(); this.class656_1 = new Class656(); this.object_0 = new object(); this.object_1 = new object(); this.characterFormat_0 = new CharacterFormat(A_0); this.paragraphFormat_0 = new ParagraphFormat(A_0); this.dictionary_0 = null; }
protected void method_59(int[] A_0) { if (this.class656_0 == null) { this.class656_0 = new Class656(); } else { this.class656_0.method_6(); } foreach (int num2 in A_0) { this.class656_0.method_5(num2, null); } this.int_0 = 0; }
private unsafe void method_22( Class504 section, byte[] buffer, ulong position, ulong uncompressedLength) { Class443 class443 = new Class443(); class443.PageSize = section.MaxDecompressedPageSize; class443.DataOffset = position; class443.DecompressedSize = uncompressedLength; class443.CheckSum = (ulong)Class996.smethod_3((ulong)this.uint_0, buffer, (uint)position, (uint)uncompressedLength); Class746 class7461 = Class746.class746_1; MemoryStream memoryStream = new MemoryStream(); if (section.Compressed) { new Class955().method_1(buffer, (int)position, (int)uncompressedLength, (Stream)memoryStream); if (memoryStream.Length >= (long)uncompressedLength) { memoryStream = new MemoryStream(); memoryStream.Write(buffer, (int)position, (int)uncompressedLength); } } else { memoryStream.Write(buffer, (int)position, (int)uncompressedLength); } class443.CompressedSize = (ulong)memoryStream.Length; class443.Crc = Class656.class656_1.method_0(memoryStream.GetBuffer(), 0U, (uint)memoryStream.Length, Class656.smethod_0((ulong)this.uint_0, (uint)memoryStream.Length)); ulong num1 = (ulong)(memoryStream.Length + 8L - 1L & -8L); int num2 = (int)((ulong)((long)num1 + (long)class7461.K - 1L) / (ulong)class7461.K); byte[] data; if (section.Encoding == 4UL) { data = new byte[(long)num2 * (long)class7461.N]; int num3 = (int)((long)num1 - memoryStream.Length); for (int index = 0; index < num3; ++index) { memoryStream.WriteByte((byte)0); fixed(byte *destination = data) fixed(byte *source = memoryStream.GetBuffer()) this.method_28(destination, source, (int)memoryStream.Length, class7461); } else { if (section.Encoding != 1UL) { throw new Exception(); } uint num3 = (uint)(num1 - (ulong)memoryStream.Length); for (uint index = 0; index < num3; ++index) { memoryStream.WriteByte((byte)0); } data = new byte[num1 + (ulong)num2 * (ulong)(class7461.N - class7461.K)]; fixed(byte *dataBufferPtr = data) fixed(byte *sourcePtr = memoryStream.GetBuffer()) this.method_26(dataBufferPtr, dataBufferPtr + num1, sourcePtr, (int)memoryStream.Length, class7461); } this.method_23((Class441)class443, data, 0, data.Length); if (class443.Id > 0L) { ++section.PageCount; } section.Pages.Add(class443); }
private unsafe void method_20( Class442 page, MemoryStream sectionStream, ulong crcSeed, ulong pageSize, out byte[] pageData) { page.CrcSeed = crcSeed; page.DecompressedSize = (ulong)sectionStream.Length; page.DecompressedCrc = Class656.class656_1.method_0(sectionStream.GetBuffer(), 0U, (uint)sectionStream.Length, Class656.smethod_0(crcSeed, (uint)sectionStream.Length)); MemoryStream memoryStream = new MemoryStream(); new Class955().method_1(sectionStream.GetBuffer(), 0, (int)sectionStream.Length, (Stream)memoryStream); if (memoryStream.Length >= sectionStream.Length) { memoryStream = sectionStream; } page.CompressedSize = (ulong)memoryStream.Length; page.CompressedCrc = Class656.class656_1.method_0(memoryStream.GetBuffer(), 0U, (uint)memoryStream.Length, Class656.smethod_0(crcSeed, (uint)memoryStream.Length)); ulong num1 = (ulong)(memoryStream.Length + 8L - 1L & -8L); int num2 = (int)((long)num1 - memoryStream.Length); for (int index = 0; index < num2; ++index) { memoryStream.WriteByte((byte)0); } ulong num3 = pageSize / (ulong)byte.MaxValue; ulong num4 = num3 * (ulong)Class746.class746_0.K; page.DataRepeatCount = num4 / num1; for (int index = 1; index < (int)page.DataRepeatCount; ++index) { memoryStream.Write(memoryStream.GetBuffer(), 0, (int)num1); } pageData = new byte[pageSize]; fixed(byte *source = memoryStream.GetBuffer()) fixed(byte *destination = pageData) { uint num5 = (uint)(this.method_28(destination, source, (int)memoryStream.Length, Class746.class746_0) * (int)byte.MaxValue); byte *pagePtr = destination + (int)num5; uint num6 = (uint)num3 * (uint)byte.MaxValue; uint num7 = num6 - num5; for (int index = 0; (long)index < (long)num7; ++index) { *pagePtr++ = (byte)0; } uint paddingSize = (uint)pageSize - num6; this.method_24(pagePtr, paddingSize); if (pagePtr + (int)paddingSize - destination != (long)pageSize) { throw new Exception(); } } }
private unsafe void method_1() { this.stream_0.Position = this.stream_0.Length; this.class954_0.FileSize = (ulong)(this.stream_0.Length + 1024L); this.class954_0.Header2Offset = (ulong)(this.stream_0.Position - 1152L); this.class954_0.SectionsMapCrcSeed = this.class995_0.method_2((uint)this.class954_0.SectionsMapCrcSeed); this.class954_0.PagesMapCrcSeed = this.class995_0.method_2((uint)this.class954_0.PagesMapCrcSeed); Class888 class888 = new Class888(); class888.method_0(this.class954_0.CrcSeed, this.class995_0); this.class954_0.CrcSeedEncoded = this.class995_0.method_2((uint)(this.class954_0.CrcSeed & (ulong)ushort.MaxValue)); MemoryStream memoryStream1 = new MemoryStream(); Class889 byteStream = Class889.Create((Stream)memoryStream1, this.dxfVersion_0, this.encoding_0); this.method_3(byteStream); ulong num1 = Class656.class656_0.method_0(memoryStream1.GetBuffer(), 0U, (uint)memoryStream1.Length, Class656.smethod_1(0UL, (uint)memoryStream1.Length)); memoryStream1.Position = 264L; byteStream.vmethod_15(num1); Class955 class955 = new Class955(); MemoryStream memoryStream2 = new MemoryStream(); class955.method_1(memoryStream1.GetBuffer(), 0, (int)memoryStream1.Length, (Stream)memoryStream2); if (memoryStream2.Length >= memoryStream1.Length) { memoryStream2 = memoryStream1; } ulong num2 = Class656.class656_0.method_0(memoryStream2.GetBuffer(), 0U, (uint)memoryStream2.Length, Class656.smethod_1(0UL, (uint)memoryStream2.Length)); MemoryStream memoryStream3 = new MemoryStream(12); Class889 class889_1 = Class889.Create((Stream)memoryStream3, this.dxfVersion_0, this.encoding_0); ulong control = this.class995_0.method_1(); class889_1.vmethod_15(control); class889_1.vmethod_15(Class888.smethod_0(control, control)); ulong num3 = Class656.class656_0.method_0(memoryStream3.GetBuffer(), 0U, (uint)memoryStream3.Length, Class656.smethod_0(0UL, (uint)memoryStream3.Length)); MemoryStream memoryStream4 = new MemoryStream(1024); Class889 class889_2 = Class889.Create((Stream)memoryStream4, this.dxfVersion_0, this.encoding_0); class889_2.vmethod_15(num3); class889_2.vmethod_15(control); class889_2.vmethod_15(num2); if (memoryStream2.Length < 272L) { class889_2.vmethod_13(memoryStream2.Length); } else { if (memoryStream2.Length != 272L) { throw new Exception(); } class889_2.vmethod_13(-272L); } memoryStream4.Write(memoryStream2.GetBuffer(), 0, (int)memoryStream2.Length); uint num4 = Class746.class746_0.K * 3U; uint length = (uint)class889_2.Stream.Length; uint num5 = (uint)((ulong)(uint)((int)length + 8 - 1) & 18446744073709551608UL); uint paddingSize1 = num5 - length; this.method_25((Stream)memoryStream4, paddingSize1); uint num6 = num4 / num5; for (int index = 1; (long)index < (long)num6; ++index) { memoryStream4.Write(memoryStream4.GetBuffer(), 0, (int)num5); } uint paddingSize2 = num4 - (uint)memoryStream4.Length; this.method_25((Stream)memoryStream4, paddingSize2); byte[] buffer = new byte[1024]; fixed(byte *source = memoryStream4.GetBuffer()) fixed(byte *destination = buffer) { this.method_28(destination, source, (int)num4, Class746.class746_0); this.method_24(destination + 765, 259U); } MemoryStream memoryStream5 = new MemoryStream(buffer, true); memoryStream5.Position = memoryStream5.Length - 40L; class888.Write((Stream)memoryStream5); if (memoryStream5.Length != 1024L) { throw new Exception(); } this.stream_0.Write(buffer, 0, buffer.Length); this.stream_0.Position = 128L; this.stream_0.Write(buffer, 0, buffer.Length); }