Beispiel #1
0
        public void WriteListOverridesTo(HWPFStream tableStream)
        {
            // use this stream as a buffer for the levels since their size varies.
            MemoryStream levelBuf = new MemoryStream();

            int size = _overrideList.Count;

            byte[] intHolder = new byte[4];
            LittleEndian.PutInt(intHolder, 0, size);
            tableStream.Write(intHolder);

            for (int x = 0; x < size; x++)
            {
                ListFormatOverride lfo = _overrideList[x];
                tableStream.Write(lfo.ToArray());
                ListFormatOverrideLevel[] lfolvls = lfo.GetLevelOverrides();
                for (int y = 0; y < lfolvls.Length; y++)
                {
                    byte[] bytes = lfolvls[y].ToArray();
                    levelBuf.Write(bytes, 0, bytes.Length);
                }
            }
            tableStream.Write(levelBuf.ToArray());
        }