Beispiel #1
0
 public override DocOleObject Class581.imethod_2(string A_0, DocOleObject A_1)
 {
     if (!this.dictionary_2.ContainsKey(A_0))
     {
         return(null);
     }
     byte[] buffer = this.dictionary_2[A_0];
     using (MemoryStream stream = new MemoryStream(buffer))
     {
         A_1.stream_1 = new MemoryStream(buffer);
         OleObjectType oleObjectType = A_1.OleObjectType;
         if (((((oleObjectType != OleObjectType.Excel_97_2003_Worksheet) && (oleObjectType != OleObjectType.ExcelBinaryWorksheet)) && ((oleObjectType != OleObjectType.ExcelChart) && (oleObjectType != OleObjectType.ExcelMacroWorksheet))) && (((oleObjectType != OleObjectType.ExcelWorksheet) && (oleObjectType != OleObjectType.PowerPoint_97_2003_Presentation)) && ((oleObjectType != OleObjectType.PowerPoint_97_2003_Slide) && (oleObjectType != OleObjectType.PowerPointMacroPresentation)))) && ((((oleObjectType != OleObjectType.PowerPointMacroSlide) && (oleObjectType != OleObjectType.PowerPointPresentation)) && ((oleObjectType != OleObjectType.PowerPointSlide) && (oleObjectType != OleObjectType.VisioDrawing))) && (((oleObjectType != OleObjectType.Word_97_2003_Document) && (oleObjectType != OleObjectType.WordDocument)) && ((oleObjectType != OleObjectType.WordMacroDocument) && (oleObjectType != OleObjectType.VisioDrawing_2013)))))
         {
             Class1004 class3 = null;
             stream.Position = 0L;
             class3          = new Class1004(stream);
             Class1116 class2 = new Class1116();
             class2.method_4(class3.Interface51.imethod_0());
             buffer = class2.method_0();
             if (A_1.OleObjectType == OleObjectType.Package)
             {
                 A_1.method_105(class2.method_2(), class2.method_3());
             }
         }
     }
     A_1.SetNativeData(buffer);
     A_1.method_102(buffer, string.Empty);
     return(A_1);
 }
Beispiel #2
0
    DocOleObject Interface50.imethod_2(string A_0, DocOleObject A_1)
    {
        Class229 class2 = this.method_0().method_183(A_0);

        if (class2 == null)
        {
            return(null);
        }
        byte[] buffer = null;
        class2.method_4().Position = 0L;
        A_1.stream_1 = class2.method_4();
        if (this.method_0().method_185(A_1.OleObjectType))
        {
            buffer = new byte[class2.method_4().Length];
            class2.method_4().Read(buffer, 0, buffer.Length);
        }
        else
        {
            Class1004 class3 = null;
            class3 = new Class1004(class2.method_4());
            Class1116 class4 = new Class1116();
            class4.method_4(class3.Interface51.imethod_0());
            buffer = class4.method_0();
            if (A_1.OleObjectType == OleObjectType.Package)
            {
                A_1.method_105(class4.method_2(), class4.method_3());
            }
        }
        class2.method_4().Position = 0L;
        A_1.SetNativeData(buffer);
        A_1.method_102(buffer, string.Empty);
        return(A_1);
    }
Beispiel #3
0
 public void SetNativeData(byte[] nativeData)
 {
     this.class1116_0 = null;
     this.stream_1    = null;
     this.byte_5      = nativeData;
     this.bool_11     = true;
 }
Beispiel #4
0
 internal void method_80(Stream A_0)
 {
     this.stream_0 = A_0;
     byte[] buffer = new byte[A_0.Length];
     A_0.Position = 0L;
     A_0.Read(buffer, 0, buffer.Length);
     this.class1116_0       = new Class1116(buffer, BookmarkStart.b("礥", 0) + this.Interface49.get_OleStorageName());
     this.stream_0.Position = 0L;
 }
Beispiel #5
0
 internal void method_99(string A_0)
 {
     this.string_13 = NextOleObjId.ToString();
     byte[] buffer = this.method_89(BookmarkStart.b("爬", 7) + this.string_13);
     this.class1116_0      = new Class1116();
     base.m_doc.ObjectPool = this.class1116_0.method_11(buffer, A_0, BookmarkStart.b("爬", 7) + this.string_13, this.oleLinkType_0, this.oleObjectType_0);
     if (!this.Interface49.get_DisplayAsIcon())
     {
         this.method_94();
     }
 }
Beispiel #6
0
 internal void method_101(string A_0)
 {
     this.string_13 = NextOleObjId.ToString();
     byte[] buffer = this.method_89(BookmarkStart.b("焭", 8) + this.string_13);
     this.class1116_0 = new Class1116();
     byte[] buffer2 = this.class1116_0.method_11(buffer, A_0, BookmarkStart.b("焭", 8) + this.string_13, this.oleLinkType_0, this.oleObjectType_0);
     if (!this.Interface49.get_DisplayAsIcon())
     {
         buffer2 = this.method_93(buffer2);
     }
     this.stream_0 = this.method_77(buffer2);
 }
Beispiel #7
0
 internal byte[] method_97(byte[] A_0)
 {
     if (this.OleObjectType == Spire.Doc.Documents.OleObjectType.Package)
     {
         return(this.method_98(A_0));
     }
     byte[] buffer = this.method_91();
     buffer = new Class1116().method_13(buffer, A_0, this);
     if (!this.Interface49.get_DisplayAsIcon())
     {
         buffer = this.method_93(buffer);
     }
     return(buffer);
 }
Beispiel #8
0
        internal void method_100(byte[] A_0, string A_1)
        {
            int num = 11;

            A_1            = (A_1 == null) ? string.Empty : A_1;
            this.string_13 = NextOleObjId.ToString();
            byte[] buffer = this.method_89(BookmarkStart.b("渰", num) + this.string_13);
            this.class1116_0 = new Class1116();
            this.class1116_0.method_29(this.string_15, this.string_16);
            base.m_doc.ObjectPool = this.class1116_0.method_12(buffer, A_0, A_1, this);
            this.OleObjectType    = this.class1116_0.method_1();
            if (!this.Interface49.get_DisplayAsIcon())
            {
                this.method_94();
            }
        }
Beispiel #9
0
        internal void method_102(byte[] A_0, string A_1)
        {
            int num = 3;

            A_1            = (A_1 == null) ? string.Empty : A_1;
            A_1            = (!string.IsNullOrEmpty(A_1) || string.IsNullOrEmpty(this.string_16)) ? A_1 : this.string_16;
            this.string_13 = NextOleObjId.ToString();
            byte[] buffer = this.method_90(BookmarkStart.b("瘨", num) + this.string_13, null);
            this.class1116_0 = new Class1116();
            this.class1116_0.method_29(this.string_15, this.string_16);
            byte[] buffer2 = this.class1116_0.method_12(buffer, A_0, A_1, this);
            this.OleObjectType = this.class1116_0.method_1();
            if (!this.Interface49.get_DisplayAsIcon())
            {
                buffer2 = this.method_93(buffer2);
            }
            this.stream_0 = this.method_77(buffer2);
        }
Beispiel #10
0
        private void method_88()
        {
            int num = 11;

            try
            {
                if ((this.stream_1 != null) && (this.stream_1.Length > 0L))
                {
                    long   position = this.stream_1.Position;
                    byte[] buffer   = new byte[this.stream_1.Length];
                    this.stream_1.Read(buffer, 0, (int)this.stream_1.Length);
                    this.stream_1.Position = position;
                    this.class1116_0       = new Class1116(buffer, BookmarkStart.b("渰", num) + this.Interface49.get_OleStorageName());
                }
                else if ((base.m_doc.ObjectPool != null) && (base.m_doc.ObjectPool.Length > 0))
                {
                    this.class1116_0 = new Class1116(base.m_doc.ObjectPool, BookmarkStart.b("渰", num) + this.Interface49.get_OleStorageName());
                }
            }
            catch (Exception)
            {
            }
        }
Beispiel #11
0
 internal void method_84(Class1116 A_0)
 {
     this.class1116_0 = A_0;
 }
Beispiel #12
0
        internal void method_81(Class1089 A_0)
        {
            Class1132    class2 = new Class1132(A_0);
            MemoryStream stream = new MemoryStream();

            class2.method_5(stream);
            byte[] buffer = new byte[stream.Length];
            stream.Position = 0L;
            stream.Read(buffer, 0, buffer.Length);
            this.class1116_0 = new Class1116(buffer, BookmarkStart.b("礥", 0) + this.Interface49.get_OleStorageName());
            Class1089 class3 = new Class1089();

            class3.method_3(BookmarkStart.b("礥", 0) + this.Interface49.get_OleStorageName(), A_0);
            class2 = new Class1132(class3);
            MemoryStream stream2 = new MemoryStream();

            class2.method_5(stream2);
            this.stream_0          = stream2;
            this.stream_0.Position = 0L;
            if (A_0.Contains(string_12))
            {
                MemoryStream stream3 = A_0.method_4(string_12);
                stream3.Position = 0L;
                byte[] buffer2 = new byte[stream3.Length];
                stream3.Read(buffer2, 0, buffer2.Length);
                using (MemoryStream stream4 = new MemoryStream(buffer2))
                {
                    byte[] buffer4 = new byte[6];
                    stream4.Read(buffer4, 0, buffer4.Length);
                    this.Interface49.set_DisplayAsIcon((buffer4[0] & 0x40) == 0x40);
                    stream4.Flush();
                }
            }
            if (A_0.Contains(string_9))
            {
                Stream stream5 = A_0.method_4(string_9);
                stream5.Position = 0L;
                byte[] buffer3 = new byte[stream5.Length];
                stream5.Read(buffer3, 0, buffer3.Length);
                using (BinaryReader reader = new BinaryReader(new MemoryStream(buffer3)))
                {
                    reader.ReadInt32();
                    reader.ReadInt32();
                    reader.ReadBytes(4);
                    new Guid(reader.ReadBytes(0x10));
                    Class627.smethod_2(reader);
                    new Class451(reader, false);
                    string str = Class627.smethod_2(reader);
                    if (!string.IsNullOrEmpty(str) && (str.Length > 0))
                    {
                        this.Interface49.set_ObjectType(str);
                    }
                    if (((reader.BaseStream.Length - reader.BaseStream.Position) >= 4L) && (reader.ReadInt32() == 0x71b239f4))
                    {
                        this.method_82(reader);
                        new Class451(reader, true);
                        this.method_82(reader);
                    }
                }
            }
        }