Exemple #1
0
        public override object Clone()
        {
            Class442 class442 = new Class442();

            class442.CopyFrom(this);
            return((object)class442);
        }
Exemple #2
0
        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();
                }
            }
        }
Exemple #3
0
 public void CopyFrom(Class442 from)
 {
     this.CopyFrom((Class441)from);
     this.ulong_1 = from.ulong_1;
     this.ulong_2 = from.ulong_2;
     this.int_0   = from.int_0;
     this.ulong_3 = from.ulong_3;
     this.ulong_4 = from.ulong_4;
     this.ulong_5 = from.ulong_5;
     this.ulong_6 = from.ulong_6;
 }
Exemple #4
0
        private void method_16()
        {
            MemoryStream sectionStream = new MemoryStream();
            Class889     byteStream    = Class889.Create((Stream)sectionStream, this.dxfVersion_0, this.encoding_0);

            foreach (Class504 section in this.list_0)
            {
                if (section.DataSize != 0UL)
                {
                    this.method_17(section, byteStream);
                }
            }
            if (this.dxfVersion_0 == DxfVersion.Dxf21)
            {
                this.method_17(new Class504()
                {
                    HashCode = 0UL,
                    MaxDecompressedPageSize = 63488UL,
                    Encrypted = 0UL,
                    Encoding  = 4UL
                }, byteStream);
            }
            Class442 page     = new Class442();
            ulong    pageSize = Class996.smethod_2((ulong)sectionStream.Length);

            byte[] pageData;
            this.method_20(page, sectionStream, this.class954_0.SectionsMapCrcSeed, pageSize, out pageData);
            Class442 class442 = (Class442)page.Clone();

            this.method_23((Class441)page, pageData, 0, pageData.Length);
            this.method_23((Class441)class442, pageData, 0, pageData.Length);
            this.class954_0.SectionsMapDataRepeatCount  = page.DataRepeatCount;
            this.class954_0.SectionsMapSizeCompressed   = page.CompressedSize;
            this.class954_0.SectionsMapSizeDecompressed = page.DecompressedSize;
            this.class954_0.SectionsMapCrcCompressed    = page.CompressedCrc;
            this.class954_0.SectionsMapCrcDecompressed  = page.DecompressedCrc;
            this.class954_0.SectionsMapId  = (ulong)page.Id;
            this.class954_0.SectionsMap2Id = (ulong)class442.Id;
        }
Exemple #5
0
        private void method_18()
        {
            this.class442_0.StreamOffset = 0UL;
            ulong pageSize = this.method_19(this.list_1.Count);
            long  num1     = (long)(this.list_1.Count + 1 + 2);

            if (pageSize <= 1024UL)
            {
                Class441 class441 = this.list_1[0];
                long     num2     = num1;
                long     num3     = num2 + 1L;
                class441.Id                     = num2;
                this.list_1[1].Id               = num3;
                this.class954_0.PagesMapId      = (ulong)this.list_1[0].Id;
                this.class954_0.PagesMapOffset  = this.list_1[0].StreamOffset;
                this.class954_0.PagesMap2Id     = (ulong)this.list_1[1].Id;
                this.class954_0.PagesMap2Offset = this.list_1[1].StreamOffset;
            }
            else
            {
                Class441 class441_1 = this.list_1[0];
                long     num2       = num1;
                long     num3       = num2 + 1L;
                long     num4       = -num2;
                class441_1.Id = num4;
                Class441 class441_2 = this.list_1[1];
                long     num5       = num3;
                long     num6       = num5 + 1L;
                long     num7       = -num5;
                class441_2.Id = num7;
                uint     num8       = (uint)(this.stream_0.Position - 1152L);
                Class442 class442_1 = new Class442();
                Class442 class442_2 = class442_1;
                long     num9       = num6;
                long     num10      = num9 + 1L;
                class442_2.Id           = num9;
                class442_1.StreamOffset = (ulong)(num8 - 1152U);
                this.list_1.Add((Class441)class442_1);
                Class442 class442_3 = new Class442();
                class442_3.Id           = num10;
                class442_3.StreamOffset = (ulong)((long)num8 + (long)pageSize - 1152L);
                this.list_1.Add((Class441)class442_3);
            }
            this.class954_0.PagesMaxId     = 0UL;
            this.class954_0.PageCount      = (ulong)(uint)this.list_1.Count;
            this.class954_0.PagesMapOffset = this.class442_0.StreamOffset;
            MemoryStream sectionStream = new MemoryStream();
            Class889     class889      = Class889.Create((Stream)sectionStream, this.dxfVersion_0, this.encoding_0);

            foreach (Class441 class441 in this.list_1)
            {
                if (class441 != null)
                {
                    class889.vmethod_13(class441.Length);
                    class889.vmethod_13(class441.Id);
                    if (class441.Id > (long)this.class954_0.PagesMaxId)
                    {
                        this.class954_0.PagesMaxId = (ulong)class441.Id;
                    }
                }
            }
            byte[] pageData;
            this.method_20(this.class442_0, sectionStream, this.class954_0.PagesMapCrcSeed, pageSize, out pageData);
            this.class442_0.Length = (long)pageData.Length;
            long id = this.class442_1.Id;

            this.class442_1.CopyFrom(this.class442_0);
            this.class442_1.Id           = id;
            this.class442_1.StreamOffset = 1024UL;
            this.stream_0.Position       = (long)this.class954_0.PagesMapOffset + 1152L;
            this.stream_0.Write(pageData, 0, pageData.Length);
            this.stream_0.Position = (long)this.class954_0.PagesMap2Offset + 1152L;
            this.stream_0.Write(pageData, 0, pageData.Length);
            this.class954_0.PagesMapDataRepeatCount  = this.class442_0.DataRepeatCount;
            this.class954_0.PagesMapSizeCompressed   = this.class442_0.CompressedSize;
            this.class954_0.PagesMapSizeDecompressed = this.class442_0.DecompressedSize;
            this.class954_0.PagesMapCrcCompressed    = this.class442_0.CompressedCrc;
            this.class954_0.PagesMapCrcDecompressed  = this.class442_0.DecompressedCrc;
        }
 public abstract void Visit(Class442 c);
 public override void Visit(Class442 c) { }
Exemple #8
0
 public Break(IDocument doc, Spire.Doc.Documents.BreakType breakType) : base((Document)doc)
 {
     this.class442_0  = new Class442();
     this.breakType_0 = breakType;
     this.textRange_0 = new Spire.Doc.Fields.TextRange(doc);
 }