コード例 #1
0
ファイル: FileInformationBlock.cs プロジェクト: yesonsik/npoi
        public void FillVariableFields(byte[] mainDocument, byte[] tableStream)
        {
            _shortHandler = new FIBshortHandler(mainDocument);
            _longHandler  = new FIBLongHandler(mainDocument, FIBshortHandler.START + _shortHandler.SizeInBytes());

            List <int> knownFieldSet = new List <int>();

            knownFieldSet.Add(FIBFieldHandler.STSHF);
            knownFieldSet.Add(FIBFieldHandler.CLX);
            knownFieldSet.Add(FIBFieldHandler.DOP);
            knownFieldSet.Add(FIBFieldHandler.PLCFBTECHPX);
            knownFieldSet.Add(FIBFieldHandler.PLCFBTEPAPX);
            knownFieldSet.Add(FIBFieldHandler.PLCFSED);
            knownFieldSet.Add(FIBFieldHandler.PLCFLST);
            knownFieldSet.Add(FIBFieldHandler.PLFLFO);

            // field info
            foreach (FieldsDocumentPart part in Enum.GetValues(typeof(FieldsDocumentPart)))
            {
                knownFieldSet.Add((int)part);
            }

            // bookmarks
            knownFieldSet.Add(FIBFieldHandler.PLCFBKF);
            knownFieldSet.Add(FIBFieldHandler.PLCFBKL);
            knownFieldSet.Add(FIBFieldHandler.STTBFBKMK);


            // notes
            foreach (NoteType noteType in NoteType.Values)
            {
                knownFieldSet.Add(noteType
                                  .GetFibDescriptorsFieldIndex());
                knownFieldSet.Add(noteType
                                  .GetFibTextPositionsFieldIndex());
            }

            knownFieldSet.Add(FIBFieldHandler.STTBFFFN);
            knownFieldSet.Add(FIBFieldHandler.STTBFRMARK);
            knownFieldSet.Add(FIBFieldHandler.STTBSAVEDBY);
            knownFieldSet.Add(FIBFieldHandler.MODIFIED);


            _fieldHandler = new FIBFieldHandler(mainDocument,
                                                FIBshortHandler.START + _shortHandler.SizeInBytes() + _longHandler.SizeInBytes(),
                                                tableStream, knownFieldSet, true);
        }
コード例 #2
0
        public void FillVariableFields(byte[] mainDocument, byte[] tableStream)
        {
            _shortHandler = new FIBshortHandler(mainDocument);
            _longHandler = new FIBLongHandler(mainDocument, FIBshortHandler.START + _shortHandler.SizeInBytes());

            List<int> knownFieldSet = new List<int>();
            knownFieldSet.Add(FIBFieldHandler.STSHF);
            knownFieldSet.Add(FIBFieldHandler.CLX);
            knownFieldSet.Add(FIBFieldHandler.DOP);
            knownFieldSet.Add(FIBFieldHandler.PLCFBTECHPX);
            knownFieldSet.Add(FIBFieldHandler.PLCFBTEPAPX);
            knownFieldSet.Add(FIBFieldHandler.PLCFSED);
            knownFieldSet.Add(FIBFieldHandler.PLCFLST);
            knownFieldSet.Add(FIBFieldHandler.PLFLFO);

        // field info
        foreach ( FieldsDocumentPart part in Enum.GetValues(typeof(FieldsDocumentPart)) )
            knownFieldSet.Add((int)part);

            // bookmarks
            knownFieldSet.Add(FIBFieldHandler.PLCFBKF);
            knownFieldSet.Add(FIBFieldHandler.PLCFBKL);
            knownFieldSet.Add(FIBFieldHandler.STTBFBKMK);


            // notes
            foreach (NoteType noteType in NoteType.Values)
            {
                knownFieldSet.Add(noteType
                        .GetFibDescriptorsFieldIndex());
                knownFieldSet.Add(noteType
                        .GetFibTextPositionsFieldIndex());
            }

            knownFieldSet.Add(FIBFieldHandler.STTBFFFN);
            knownFieldSet.Add(FIBFieldHandler.STTBFRMARK);
            knownFieldSet.Add(FIBFieldHandler.STTBSAVEDBY);
            knownFieldSet.Add(FIBFieldHandler.MODIFIED);


            _fieldHandler = new FIBFieldHandler(mainDocument,
                                                FIBshortHandler.START + _shortHandler.SizeInBytes() + _longHandler.SizeInBytes(),
                                                tableStream, knownFieldSet, true);
        }