Beispiel #1
0
        void CreateObjectHierarchy()
        {
            this.dgContainer   = new MsoDataContainer(0x0F, 0x00, XlsConsts.MsoDgContainer);
            this.spgrContainer = new MsoDataContainer(0x0F, 0x00, XlsConsts.MsoSpGrContainer);
            dgContainer.AddItem(new MsoDataDg(0x00, 0x01));
            dgContainer.AddItem(spgrContainer);
            MsoDataContainer spContainer = new MsoDataContainer(0x0F, 0x00, XlsConsts.MsoSpContainer);

            spContainer.AddItem(new MsoDataSpGr(0x01, 0x00));
            spContainer.AddItem(new MsoDataSp(0x02, 0x00, XlsConsts.MsoSpId - 1, 0x005));
            spgrContainer.AddItem(spContainer);
            int i = 0;

            foreach (SheetPicture pic in pictures)
            {
                spContainer = new MsoDataContainer(0x0F, 0x00, XlsConsts.MsoSpContainer);
                spContainer.AddItem(new MsoDataSp(0x02, XlsConsts.SpId_Pict, Convert.ToUInt32(XlsConsts.MsoSpId + i), 0x0A00));
                MsoDataOpt opt = new MsoDataOpt(0x03, 0x0C);
                opt.AddValue(0x4104, pic.ItemId);
                opt.AddValue(0x01BF, 0x10000);
                opt.AddValue(0x03BF, 0x80008);
                spContainer.AddItem(opt);
                spContainer.AddItem(new MsoDataClientAnchor(0x00, 0x00, 0x0002, pic));
                spContainer.AddItem(new MsoDataClientData(0x00, 0x00));
                msoDataList.Add(spContainer);
                i++;
            }
        }
Beispiel #2
0
        void CreateMsoDrawingGroup(XlsPictureCollection pictures)
        {
            if (pictures.Count == 0)
            {
                return;
            }
            this.dggContainer = new MsoDataContainer(0x0F, 0x00, XlsConsts.MsoDggContainer);
            MsoDataOpt opt = new MsoDataOpt(0x03, 0x03);

            dggContainer.AddItem(new MsoDataDgg(0x0, 0x0, pictures.Count));
            if (pictures.Count > 0)
            {
                MsoDataContainer bStoreContainer = new MsoDataContainer(0x0F, 0x01, XlsConsts.MsoBStoreContainer);
                for (int i = 0; i < pictures.Count; i++)
                {
                    bStoreContainer.AddItem(new MsoDataBse(0x02, 0x05, pictures[i], false));
                    bStoreContainer.AddItem(new MsoDataBLIP(0x00, 0x46A, pictures[i]));
                }
                dggContainer.AddItem(bStoreContainer);
            }
            opt.AddValue(0x00BF, 0x00080008);
            opt.AddValue(0x0181, 0x08000009);
            opt.AddValue(0x01C0, 0x08000040);
            dggContainer.AddItem(opt);
            dggContainer.AddItem(new MsoDataSplitMenuColors(0x00, 0x04));
        }